HBase操作

HBase导出HFile数据并压缩

hbase org.apache.hadoop.hbase.mapreduce.Export -D mapreduce.output.fileoutputformat.compress=true -D mapreduce.output.fileoutputformat.compress.codec=org.apache.hadoop.io.compress.GzipCodec -D mapreduce.output.fileoutputformat.compress.type=BLOCK INDEXBZFMX3 /test/demo/INDEXBZFMX3

echo “scan ‘hbase:meta’”| hbase shell > meta.txt

cat meta.txt | grep “INDEXBZFMX3”|grep “STARTKEY” | awk -F’=>’ ‘{print $4}’ | awk -F" ’ " ‘{print $2}’| sed ‘1d’ > INDEXBZFMX3.txt

你可能感兴趣的:(大数据)