Skip to content

Instantly share code, notes, and snippets.

@anhtranbk
Last active April 9, 2018 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anhtranbk/37f2483bc1c466475579e5dd134ea583 to your computer and use it in GitHub Desktop.
Save anhtranbk/37f2483bc1c466475579e5dd134ea583 to your computer and use it in GitHub Desktop.
HBase configuration
create 'g3:edges', {NAME => 'cf', COMPRESSION => 'SNAPPY', BLOCKCACHE => 'true', IN_MEMORY => 'true'}, {SPLITS => ['012', '024', '036', '048', '060', '072', '084', '096', '108', '120', '132', '144', '156', '168', '180', '192', '204', '216', '228', '240', '252'], DURABILITY => 'ASYNC_WAL'}
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>dfs.client.read.shortcircuit</name>
<value>true</value>
</property>
<property>
<name>hbase.regionserver.checksum.verify</name>
<value>true</value>
</property>
<property>
<name>hbase.storescanner.parallel.seek.enable</name>
<value>false</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://10.5.36.102:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.bucketcache.combinedcache.enabled</name>
<value>true</value>
</property>
<property>
<name>hbase.bucketcache.size</name>
<value>20480</value>
</property>
<property>
<name>hbase.bucketcache.ioengine</name>
<value>offheap</value>
</property>
<property>
<name>hbase.regionserver.handler.count</name>
<value>64</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>10.5.36.102,10.5.36.109,10.5.36.111,10.5.36.165,10.5.36.166,10.5.36.19,10.5.36.34,10.5.36.40,10.5.36.49,10.5.36.52,10.5.36.218,10.5.36.222,10.5.36.224,10.5.36.226,10.5.36.227,10.5.36.207,10.5.36.216,10.5.36.219,10.5.36.221,10.5.36.223</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>phoenix.schema.isNamespaceMappingEnabled</name>
<value>true</value>
</property>
</configuration>
<configuration>
<property>
<name>dfs.replication</name>
<value>4</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/data2/hadoop/namenode</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/data2/hadoop/datanode</value>
</property>
<property>
<name>dfs.client.read.shortcircuit</name>
<value>true</value>
</property>
<property>
<name>hbase.regionserver.checksum.verify</name>
<value>true</value>
</property>
<property>
<name>dfs.block.local-path-access.user</name>
<value>hadoop,hbase</value>
</property>
<property>
<name>dfs.domain.socket.path</name>
</value>/data1/hadoop/hadoop.sock
</property>
<property>
<name>dfs.datanode.max.transfer.threads</name>
<value>4096</value>
</property>
</configuration>
yum install -y unzip
wget https://www.dropbox.com/s/2sa9rxy5mj8n810/jdk-8u152-linux-x64.rpm?dl=0 -O jdk-8u152-linux-x64.rpm
rpm -ivh jdk-8u152-linux-x64.rpm
adduser hadoop
mkdir /data1/data2
ln -s /data1/data2 /data2
chown -R hadoop:hadoop /data1/data2
chown -R hadoop:hadoop /data2
cd /data1
wget https://www.dropbox.com/s/ihpesj5ldavs3xu/hbasecluster.tar.gz?dl=0 -O hbasecluster.tar
tar -xvf hbasecluster.tar
chown -R hadoop:hadoop /data1/hadoop
chown -R hadoop:hadoop /data1/hbase
cp /data1/hadoop/lib/native/* /usr/lib64/
mkdir /data2/hadoop/datanode
chown -R hadoop:hadoop /data2/hadoop/datanode
wget https://www.dropbox.com/s/arpizxat4mxbzj1/hbase-site.xml?dl=0 -O hbase-site.xml
wget https://www.dropbox.com/s/pby8cq85hwipagz/hdfs-site.xml?dl=0 -O hdfs-site.xml
mv hbase-site.xml /data1/hbase/conf/
mv hdfs-site.xml /data1/hadoop/etc/hadoop/hdfs-site.xml
chown -R hadoop:hadoop /data1/hbase/conf/hbase-site.xml
chown -R hadoop:hadoop /data1/hadoop/etc/hadoop/hdfs-site.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment