• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
逆光飞翔
逆光飞翔
博客园    首页    新随笔    联系   管理    订阅  订阅

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 }

 

做自己的太阳,成为别人的光!
posted @ 2020-12-11 12:16  逆光飞翔-  阅读(1498)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3