zoukankan      html  css  js  c++  java
  • 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 }
    做自己的太阳,成为别人的光!
  • 相关阅读:
    Treap 树堆 容易实现的平衡树
    (转)Maven实战(二)构建简单Maven项目
    (转)Maven实战(一)安装与配置
    根据请求头跳转判断Android&iOS
    (转)苹果消息推送服务器 php 证书生成
    (转)How to renew your Apple Push Notification Push SSL Certificate
    (转)How to build an Apple Push Notification provider server (tutorial)
    (转)pem, cer, p12 and the pains of iOS Push Notifications encryption
    (转)Apple Push Notification Services in iOS 6 Tutorial: Part 2/2
    (转)Apple Push Notification Services in iOS 6 Tutorial: Part 1/2
  • 原文地址:https://www.cnblogs.com/botaoli/p/14119747.html
Copyright © 2011-2022 走看看