How hbase pre-allocates region
This article mainly shows you "hbase how to pre-allocate region", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "hbase how to pre-allocate region" this article.
If a pre-allocated region is not specified in a table in create, a region will be allocated by default, so the performance is relatively low when big data loads in parallel, because all the data is poured into a single region, which can easily cause an increase in the load of a single node, thus affecting the storage performance. A good method is to allocate several region in advance when creating a table. There are two methods, mainly for different versions to choose from.
Use the RegionSplitter method, mainly for the hbase-0.90.X version
(1) first, use RegionSplitter to build a table and pre-allocate region. For example, create a poidb table with info columns and pre-allocate 9 region.
Hbase org.apache.hadoop.hbase.util.RegionSplitter-c 9-f info poidb
(2) modify table creation parameters (optional)
Bloomfilter and compression parameters are not enabled by default in table creation. In order to provide read performance, it is recommended to enable Bloomfilter and use compressed SNAPPY to enter hbase shell. You first need disable 'poidb', and then use
Alter 'poidb', {NAME = >' info',BLOOMFILTER = > 'ROWCOL',COMPRESSION = >' SNAPPY',VERSIONS = >'1'}
Last
Enable 'poidb'
two。 Using hbase shell to build table parameters, there are really many 0.94.x versions.
Version 0.94 can directly use pre-allocated regions when creating tables:
Create 'poidb', {NAME = >' info', COMPRESSION = > 'snappy'}, {NUMREGIONS = > 9, SPLITALGO = >' HexStringSplit'} these are all the contents of the article "how hbase pre-allocates region". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!