hbase创建region,按照rowkey的划分来建:
create 'BT_NET_LOG_000','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_001','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_002','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_003','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_004','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_005','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_006','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_007','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_008','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_009','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_010','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_011','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_012','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_013','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_014','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_015','cf',{ SPLITS_FILE => 'splits.txt' }
create 'BT_NET_LOG_016','cf',{ SPLITS_FILE => 'splits.txt' }
splits.txt文件的内容:
0000189005000000000000000000000000000000
0000189010000000000000000000000000000000
0000189015000000000000000000000000000000
0000189020000000000000000000000000000000
0000189025000000000000000000000000000000
0000189030000000000000000000000000000000
0000189035000000000000000000000000000000
0000189040000000000000000000000000000000
0000189045000000000000000000000000000000
0000189050000000000000000000000000000000
0000189055000000000000000000000000000000
下面修改表的压缩方式:
create 'BT_NET_LOG_001','cf',{ SPLITS_FILE => 'split_500.txt' }
disable 'BT_NET_LOG_001'
alter 'BT_NET_LOG_001', NAME => 'cf', COMPRESSION => 'GZ'
enable 'BT_NET_LOG_001'
把GZ改成snappy就可以了
在兴国等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都做网站、网站制作 网站设计制作定制网站开发,公司网站建设,企业网站建设,品牌网站制作,网络营销推广,成都外贸网站建设公司,兴国网站建设费用合理。
http://www.itinit.net/thread-1764-1-1.html
网页标题:hbase预建分区表,修改压缩方式
网站URL:
http://cxhlcq.com/article/jsdsjh.html