-
Notifications
You must be signed in to change notification settings - Fork 4
/
travis_install.sh
executable file
·42 lines (36 loc) · 1.02 KB
/
travis_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash -eux
sudo apt-get update
sudo apt-get -q install -y wget openjdk-8-jdk-headless
#sudo update-java-alternatives -s java-8-oracle
# download and install hbase 2.2.x
ver='2.2.5'
tarball="hbase-${ver}-bin.tar.gz"
wget -q -O /tmp/${tarball} https://archive.apache.org/dist/hbase/${ver}/${tarball}
tar -xzf /tmp/${tarball} -C /var/tmp/
#configuration
cd /var/tmp/hbase-${ver}
cat <<EOF >conf/hbase-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///var/tmp/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/var/tmp/zookeeper</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
</configuration>
EOF
export HBASE_HOME=/var/tmp/hbase-${ver}
export PATH=$PATH:$HBASE_HOME/bin
#start hbase server and thriftserver
bin/start-hbase.sh
sleep 2
bin/hbase-daemon.sh start thrift2
sleep 2