HBASE-11440 Make KeyValueCodecWithTags as the default codec for
[hbase.git] / bin / hbase-daemons.sh
blob843eaaa74ffe1d53afba007aa1e62f82d8a3e3f2
1 #!/usr/bin/env bash
3 #/**
4 # * Copyright 2007 The Apache Software Foundation
5 # *
6 # * Licensed to the Apache Software Foundation (ASF) under one
7 # * or more contributor license agreements. See the NOTICE file
8 # * distributed with this work for additional information
9 # * regarding copyright ownership. The ASF licenses this file
10 # * to you under the Apache License, Version 2.0 (the
11 # * "License"); you may not use this file except in compliance
12 # * with the License. You may obtain a copy of the License at
13 # *
14 # * http://www.apache.org/licenses/LICENSE-2.0
15 # *
16 # * Unless required by applicable law or agreed to in writing, software
17 # * distributed under the License is distributed on an "AS IS" BASIS,
18 # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 # * See the License for the specific language governing permissions and
20 # * limitations under the License.
21 # */
23 # Run a hbase command on all slave hosts.
24 # Modelled after $HADOOP_HOME/bin/hadoop-daemons.sh
26 usage="Usage: hbase-daemons.sh [--config <hbase-confdir>] \
27 [--hosts regionserversfile] [start|stop] command args..."
29 # if no args specified, show usage
30 if [ $# -le 1 ]; then
31 echo $usage
32 exit 1
35 bin=`dirname "${BASH_SOURCE-$0}"`
36 bin=`cd "$bin">/dev/null; pwd`
38 . $bin/hbase-config.sh
40 remote_cmd="cd ${HBASE_HOME}; $bin/hbase-daemon.sh --config ${HBASE_CONF_DIR} $@"
41 args="--hosts ${HBASE_REGIONSERVERS} --config ${HBASE_CONF_DIR} $remote_cmd"
43 command=$2
44 case $command in
45 (zookeeper)
46 exec "$bin/zookeepers.sh" $args
48 (master-backup)
49 exec "$bin/master-backup.sh" $args
51 (*)
52 exec "$bin/regionservers.sh" $args
54 esac