hbase常用命令
创建namespace:
create_namespace 'ssdTable'
建表:
create 'ssdTable:table_name', {NAME => 'info', COMPRESSION => 'snappy',TTL=> '63072000'}, SPLITS_FILE => '/root/splits_file.txt'
设置HDFS表文件存储策略:
bin/hdfs storagepolicies -setStoragePolicy -path hdfs://node001:8020/hbase/data/ssdTable/table_name -policy ALL_SSD
shell命令中执行:
echo "create 'ssdTable:table_name', {NAME => 'info'}" | bin/hbase shell -n
查看文件位置:
bin/hadoop fsck /file/dir -files -blocks -locations