unix - Shell script for hbase commands | count 'table' -
i trying counts of list of tables in hbase using count command. placing command in input.txt.
sample input
count 'test.table1', interval => 10000000, cache => 10000000 count 'test.table2', interval => 10000000, cache => 10000000
command
hbase shell ./input.txt
is there way write shell script can run on nohup.out , output below via shell script can run number of tables :
table1,500000 table2,300
appreciate in regard
this bit of code might count of records tables in hbase.
#!/bin/bash echo 'list' | hbase shell | sed -e '1,/table/d' -e '/seconds/,$d' | while ifs='' read -r line || [[ -n "$line" ]]; echo "count '$line'" | hbase shell | tail -n 1 | xargs echo "$line,">> ./tablecount.log done
tested in hbase 1.1.8, output stored in tablecount.log.
Comments
Post a Comment