HBase configuration files from master to slave synchronization

Source: Internet
Author: User

For the rsync used therein, see: basic use of rsync

#!/bin/bash#Rsyncs HBase files across all slaves. Must run on master. assumes#All files is located in/usr/localif["$#"!="2" ]; Then Echo"Usage: $ (basename $) <dir-name> <ln-name>"Echo"Example: $ (basename $) hbase-0.1 hbase"Exit1fi Src_path="/usr/local/$1/conf/regionservers"  forSrvinch$ (cat$SRC _path); DoEcho"sending command to $srv ..."; #–v represents complex output information;-A represents the permission save mode, which is equivalent to the-rlptgod parameter. Very fast saves almost all permission settings except for hard connections;-Z for Compression
-vaz--exclude= ' logs/* '/usr/local/$$srv:/usr/local/$srv"rm-fr /usr/local/$2; Ln-s/usr/local/$1/usr/local/$2""done. "

The same function, the following simple

 #  !/bin/bash  #   Rsync ' s HBase config files across all region servers. Must  run on master.  for  srv in  $ (cat/usr/local/hbase/conf/ Regionservers); do   echo   " sending command to $srv ...   "  
#  $srv:/usr/local/hadoop/$srv:/usr/local/hbase/"  Done. "

HBase configuration files from master to slave synchronization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.