hbase:用于实现版本文件及配置同步的两个shell脚本
复制master节点上的版本内容到所有slaves节点上 注意: 1:版本目录做了软链接,如 ln -s hbase-0.94.6 hbase 2: 要根据实际情况,将/usr/local/修改为hbase所在的目录 #!/bin/bash # copy a new release of HBase from the masternode to all slave nodes # Rsyncs HBase files across all slaves. Must run on master. # Assumes all files are located in /usr/local if [ "$#" != "2" ]; then echo "usage: $(basename $0) <dir-name> <ln-name>" echo " example: $(basename $0) hbase-0.1 hbase" exit 1 fi SRC_PATH="/usr/local/$1/conf/regionservers" for srv in $(cat $SRC_PATH); do echo "Sending command to $srv..."; rsync -vaz --exclude='logs/*' /usr/local/$1 $srv:/usr/local/