Hbase創建表參數說明


Hbase創建表操作及參數說明

1、創建命名空間

  create_namespace 'test'

2、創建user表,列族:info

  create 'test:user', 'info'

3、查看表結構

  describe 'test:user'

表結構

Table test:user is ENABLED 
test:user 
COLUMN FAMILIES DESCRIPTION 
{NAME => 'info', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'F
ALSE', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', COMPRESSION => 'NONE', MIN_VERSIONS => '0', BL
OCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} 

表結構參數詳情

 1 DESCRIPTION
 2 'test:user', //namespace:tableName
 3 {
 4   NAME => 'info',        //列族
 5   BLOOMFILTER => 'ROW',  //參見:http://hbase.apache.org/book.html#bloom.filters.when
 6   VERSIONS => '1',       //設置保存的版本數
 7   IN_MEMORY => 'false',  //設置激進緩存,優先考慮將該列族放入塊緩存中,
 8                  //針對隨機讀操作相對較多的列族可以設置該屬性為true
 9   KEEP_DELETED_CELLS => 'false', //參見:http://hbase.apache.org/book.html#cf.keep.deleted
10   DATA_BLOCK_ENCODING => 'NONE', //數據塊編碼方式設置
11                      //參見:http://hbase.apache.org/book.html#data.block.encoding.enable
12   TTL => 'FOREVER', //參見:http://hbase.apache.org/book.html#ttl
13              'ColumnFamilies can set a TTL length in seconds, and HBase reached. 
               This applies to all versions of a row - even the current one.
               The TTL time encoded in the HBase for the row is specified in UTC.'
14   COMPRESSION => 'NONE', //設置壓縮算法 15   MIN_VERSIONS => '0', //最小存儲版本數 16   BLOCKSIZE => '65536', //設置HFile數據塊大小(默認64kb) 17   REPLICATION_SCOPE => '0', //配置HBase集群replication時需要將該參數設置為1. 18                   //參見:http://blog.cloudera.com/blog/2012/08/hbase-replication-operational-overview/?utm_source=tuicool 19                   'REPLICATION_SCOPE is a column-family level attribute user has to alter each column family with the alter command as shown above,
                    for all the column families he wants to replicate.'
20   OCKCACHE => 'true' //數據塊緩存屬性 21 }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM