- #!/bin/bash
- lis=`cat $1`
- cmd=$2
- logsout="logs/202206"
- if [[ ! -d $logsout ]];then
-         (mkdir $logsout)
- fi
- for i in ${lis[@]};do
-         if [ "$cmd" = "mrCount" ];then
-                 echo "nohup sudo -u hbase hbase org.apache.hadoop.hbase.mapreduce.RowCounter $i >> ${logsout}/${i}.log 2>&1 &"
-         fi
-         if [ "$cmd" = "delete_snapshot" ];then
-                 echo "delete_snapshot '${i}_snapshot'"
-         fi
-         if [ "$cmd" = "disable" ];then
-                 echo "disable '${i}'"
-         fi
-         if [ "$cmd" = "enable" ];then
-                 echo "enable '${i}'"
-         fi
-         if [ "$cmd" = "snapshot" ];then
-                 echo "snapshot '${i}','${i}_snapshot'"
-         fi
-         if [ "$cmd" = "clone_snapshot" ];then
-                 pre=$3
-                 echo "clone_snapshot '${i}_snapshot','${i}_${pre}'"
-         fi
-         if [ "$cmd" = "drop" ];then
-                 echo "drop '${i}'"
-         fi
- done