Principles of composition/aggregation reuse
The Composite/Aggregate Reuse Principle (CARP) is generally called the Composite Reuse Principle (CRP), which is defined as: try to use composite/aggregate instead of inheriting to achieve the purpose of reuse. The principle of composition/aggregation reuse is to use some existing objects in a new object to make it a part of the new object; the new object achieves the purpose of reusing existing functions by delegating to these objects held internally. Instead of getting existing functions th...
1. Salt
The application of Salting in HBase is to assign a random character to each rowkey prefix, so that the data is scattered in multiple different regions to achieve a balanced load. If the table region in HBase is distinguished according to the prefix of each letter, let's compare the changes before and after adding salt to the rowkey. First, we give a set of rowkeys before salt: rk001 rk002 rk003 According to the partition, the above rowkey is in the same region. Below we add salt to the above ...
Significance of the Single Responsibility Principle
The single responsibility principle tells us: a class cannot do too many things. In a software system, the more responsibilities a class (a module, or a method) assumes, the lower the possibility of it being reused. A very typical example is the universal class. In fact, we can tell the truth: any conventional MVC project, in extreme cases, can use one class (or even one method) to complete all functions. But doing so will cause serious coupling and even affect the whole body. A class underta...
https://rss3.bio/0x8fC645e6a176F07395B8f44196d1443772FE9d57
Principles of composition/aggregation reuse
The Composite/Aggregate Reuse Principle (CARP) is generally called the Composite Reuse Principle (CRP), which is defined as: try to use composite/aggregate instead of inheriting to achieve the purpose of reuse. The principle of composition/aggregation reuse is to use some existing objects in a new object to make it a part of the new object; the new object achieves the purpose of reusing existing functions by delegating to these objects held internally. Instead of getting existing functions th...
1. Salt
The application of Salting in HBase is to assign a random character to each rowkey prefix, so that the data is scattered in multiple different regions to achieve a balanced load. If the table region in HBase is distinguished according to the prefix of each letter, let's compare the changes before and after adding salt to the rowkey. First, we give a set of rowkeys before salt: rk001 rk002 rk003 According to the partition, the above rowkey is in the same region. Below we add salt to the above ...
Significance of the Single Responsibility Principle
The single responsibility principle tells us: a class cannot do too many things. In a software system, the more responsibilities a class (a module, or a method) assumes, the lower the possibility of it being reused. A very typical example is the universal class. In fact, we can tell the truth: any conventional MVC project, in extreme cases, can use one class (or even one method) to complete all functions. But doing so will cause serious coupling and even affect the whole body. A class underta...
Share Dialog
Share Dialog
https://rss3.bio/0x8fC645e6a176F07395B8f44196d1443772FE9d57

Subscribe to rojeck

Subscribe to rojeck
<100 subscribers
<100 subscribers
HBase is playing an increasingly important role in real-time query due to its high performance in storage and reading and writing, but because it belongs to the NOSQL database type, it is not suitable for relational data. HBase query can only be queried by its rowkey (we can think of it as the unique index of the table in HBase). Therefore, the design of rowkey is particularly important in the design of using HBase. In addition, the design of rowkey is also related to the storage location of data in the database. If the design of rowkey is improper, it will cause data hotspot problems in HBase partitions, that is, centralized data access. In a certain node or region, it will eventually lead to performance degradation or the region is unavailable due to heavy load.
In order to prevent data hotspots during write operations, data should be written to multiple regions as much as possible at the same time when designing rowkeys. Here are several common rowkey design methods.
HBase is playing an increasingly important role in real-time query due to its high performance in storage and reading and writing, but because it belongs to the NOSQL database type, it is not suitable for relational data. HBase query can only be queried by its rowkey (we can think of it as the unique index of the table in HBase). Therefore, the design of rowkey is particularly important in the design of using HBase. In addition, the design of rowkey is also related to the storage location of data in the database. If the design of rowkey is improper, it will cause data hotspot problems in HBase partitions, that is, centralized data access. In a certain node or region, it will eventually lead to performance degradation or the region is unavailable due to heavy load.
In order to prevent data hotspots during write operations, data should be written to multiple regions as much as possible at the same time when designing rowkeys. Here are several common rowkey design methods.
No activity yet