4
# Copyright 2010 The Apache Software Foundation
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
14
# http://www.apache.org/licenses/LICENSE-2.0
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.
23
HBASE_HOME=`ls -d /usr/local/hbase-*`
25
# HBase configuration (Zookeeper)
26
cat > $HBASE_HOME/conf/hbase-site.xml <<EOF
28
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
31
<name>hbase.zookeeper.quorum</name>
32
<value>$ZOOKEEPER_QUORUM</value>
35
<name>zookeeper.session.timeout</name>
39
<name>hbase.zookeeper.property.dataDir</name>
40
<value>/mnt/hbase/zk</value>
43
<name>hbase.zookeeper.property.maxClientCnxns</name>
51
# up open file descriptor limits
52
echo "root soft nofile 32768" >> /etc/security/limits.conf
53
echo "root hard nofile 32768" >> /etc/security/limits.conf
56
# ok if this fails, only valid for kernels 2.6.27+
57
sysctl -w fs.epoll.max_user_instance=32768 > /dev/null 2>&1
59
mkdir -p /mnt/hbase/logs
60
mkdir -p /mnt/hbase/zk
62
[ ! -f /etc/hosts ] && echo "127.0.0.1 localhost" > /etc/hosts
64
"$HBASE_HOME"/bin/hbase-daemon.sh start zookeeper