脚本主要是方便自己工作使用,服务器环境中配置了hbase相关环境变量

1.hbase备份脚本

#!/bin/bash

tableList=("table1" "table2" "table3" "table4" "table5")

for table in ${tableList[@]}
do
  hbase org.apache.hadoop.hbase.mapreduce.Export $table /user/dw_hbkal/przhang/hbasebak/$table;echo "$table success done"
done

2. hbase清表脚本

#!/bin/bash

tableList=("table1","table2","table3","table4","table5" )

for table in ${tableList[@]}
do
  echo "truncate '$table'" | hbase shell
done

 

相关文章:

  • 2021-04-26
  • 2022-01-11
  • 2021-11-11
  • 2021-05-08
  • 2022-01-14
  • 2021-08-24
猜你喜欢
  • 2022-12-23
  • 2022-02-22
  • 2021-07-14
  • 2022-12-23
  • 2021-06-02
  • 2021-07-16
相关资源
相似解决方案