HBase创建表参数说明
2015-07-21 17:45
302 查看
HBase创建表参数
创建dimensoft namespace> create_namespace 'dimensoft'
注:这里的namespace类似与RDBMS中的数据库的概念。
创建user表
> create 'dimensoft:user', 'info'
查看表结构
> describe 'dimensoft:user'
在使用最简单的建表语句后HBase会给一些参数设置默认值,这些参数都是针对的列族而言,如果一个表有多个列族则每个列族都会有一份如下的参数:
DESCRIPTION 'dimensoft:user', //namespace:tableName { NAME => 'info', //列族 DATA_BLOCK_ENCODING => 'NONE', //数据块编码方式设置 //参见:http://hbase.apache.org/book.html#data.block.encoding.enable BLOOMFILT => 'ROW', //参见:http://hbase.apache.org/book.html#bloom.filters.when REPLICATION_SCOPE => '0', //配置HBase集群replication时需要将该参数设置为1. //参见:http://blog.cloudera.com/blog/2012/08/hbase-replication-operational-overview/?utm_source=tuicool '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.' VERSIONS => '1', //设置保存的版本数 COMPRESSION => 'NONE', //设置压缩算法 MIN_VERSIONS => '0', //最小存储版本数 TTL => 'FOREVER', //参见:http://hbase.apache.org/book.html#ttl '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.' KEEP_DELETED_CELLS => 'false', //参见:http://hbase.apache.org/book.html#cf.keep.deleted BLOCKSIZE => '65536', //设置HFile数据块大小(默认64kb) IN_MEMORY => 'false',//设置激进缓存,优先考虑将该列族放入块缓存中, //针对随机读操作相对较多的列族可以设置该属性为true BLOCKCACHE => 'true' //数据块缓存属性 }
相关文章推荐
- 广播机制BroadCastReceiver
- 引号与撇号
- [黑马程序员](第5天)今晚做的一道题
- 测试网络连通
- 深入剖析Android音频之AudioPolicyService
- Protocol
- SPDL : 得到桌面,快速启动或程序组的路径
- 详解js跨域问题
- db2 、 oracle、sql server 各自特点
- Android实践篇:如何优雅的完成后台任务
- Java.web-application-development-environments-for-macosx
- JasperReports+iReport在eclipse中的使用
- Algorithms—3.Longest Substring Without Repeating Characters
- git安装流程
- ios8 UITableView设置 setSeparatorInset:UIEdgeInsetsZero不起作用的解决办法
- SqlBulkCopy使用
- Android开发面试题
- spark环境搭建
- 线程池中的某个线程一直运行中, 某个 update sql 执行超时
- 分享即得源码