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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -