正文
hbasefamily所有值,hbase uninitialized constant formatter
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
HBase数据结构是什么?
在底层实现上,HBase使用了基于Hadoop的分布式文件系统HDFS来存储数据,并且使用了一种称为LSM-Tree(Log-Structured Merge-Tree)的数据结构来管理数据。
hbase的核心数据结构为LSM树。LSM树分为内存部分和磁盘部分。内存部分是一个维护有序数据集合的数据结构。
RowKey 与nosql数据库们一样,RowKey是用来检索记录的主键。
region下所有的hfile默认存放
1、/hbase/.archive HBase 在做 Split或者 compact 操作完成之后,会将 HFile 移到.archive 目录中,然后将之前的 hfile 删除掉,该目录由 HMaster 上的一个定时任务定期去清理。
2、每一个hfile当达到一定大小的时候就会拆分成两个hfile所以一个store目录中会包含多个hfile。
3、依次加载各部分的HFileBlock(load-on-open所有部分都是以HFileBlock格式存储):data index block、meta index block、FileInfo block、generate bloom filter index、和delete bloom filter。HFileBlock的格式会在下面介绍。
4、即HFile和region不在同一个DataNode。这种情况会在major compaction 之后得到解决。
5、这个参数默认是10,如果某个hfile跨越的region数超过10个就会报上述Exception。解决方案:将hbase.bulkload.retries.number这个参数设置为更大的值,比如目标表的region数量或者将这个参数设置成0,0表示不断重试直到成功。
HBASE之创建表、插入值、表结构查看
对表的创建、删除、显示以及修改等,可以用HBaseAdmin,一旦创建了表,那么可以通过HTable的实例来访问表,每次可以往表里增加数据。
与nosql数据库们一样,RowKey是用来检索记录的主键。
创建表 使用HBaseShell或HBaseAPI可以创建表,需要指定表的名称和列族。例如,创建一个名为student的表,包含一个列族info。插入数据 使用Put命令可以向表中插入数据,需要指定行键、列族、列和值。
hbasefamily所有值的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于hbase uninitialized constant formatter、hbasefamily所有值的信息别忘了在本站进行查找喔。