mirror of
https://github.com/silicoflare/docker-hadoop.git
synced 2026-05-26 12:09:54 +05:30
Add hbase installation
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -70,5 +70,18 @@ RUN echo "export PIG_HOME=/pig" >> ~/.bashrc
|
||||
RUN echo "export PATH=\$PATH:/pig/bin" >> ~/.bashrc
|
||||
RUN echo "export PIG_CLASSPATH=\$HADOOP_HOME/etc/hadoop" >> ~/.bashrc
|
||||
|
||||
# Install hbase
|
||||
RUN wget http://apache.mirror.gtcomm.net/hbase/stable/hbase-2.5.7-bin.tar.gz
|
||||
RUN tar -xzvf hbase-2.5.7-bin.tar.gz
|
||||
RUN mv hbase-2.5.7 /usr/local/hbase
|
||||
RUN echo "export HBASE_HOME=/usr/local/hbase" >> ~/.bashrc
|
||||
RUN echo "export PATH=\$PATH:\$HBASE_HOME/bin" >> ~/.bashrc
|
||||
RUN echo "export HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP=\"true\"" >> /usr/local/hbase/conf/hbase-env.sh
|
||||
RUN echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/" >> /usr/local/hbase/conf/hbase-env.sh
|
||||
COPY hbase-site.xml ~/hbase-site.xml
|
||||
|
||||
RUN mkdir -p /hadoop/zookeeper
|
||||
RUN chown -R $USER:$USER /hadoop/
|
||||
|
||||
# Expose necessary ports
|
||||
EXPOSE 9870 8088 9000
|
||||
|
||||
15
README.md
15
README.md
@@ -1,12 +1,19 @@
|
||||
# Hadoop on Docker
|
||||
Use this to get a quick version of Hadoop to run on Docker.
|
||||
|
||||
1. Install Docker
|
||||
1. Install Docker on your host PC
|
||||
<br>
|
||||
|
||||
2. Clone this repository
|
||||
2. Clone your platform specific branch of this repository
|
||||
```bash
|
||||
git clone https://github.com/silicoflare/docker-hadoop
|
||||
# Windows
|
||||
git clone -b windows --single-branch https://github.com/silicoflare/docker-hadoop
|
||||
|
||||
# Mac
|
||||
git clone -b mac --single-branch https://github.com/silicoflare/docker-hadoop
|
||||
|
||||
# Linux
|
||||
git clone -b linux --single-branch https://github.com/silicoflare/docker-hadoop
|
||||
```
|
||||
<br>
|
||||
|
||||
@@ -27,7 +34,7 @@ docker build -t hadoop .
|
||||
|
||||
6. Create a new container using the newly created image
|
||||
```bash
|
||||
docker run -it -p 9870:3000 --name anyname hadoop bash
|
||||
docker run -it -p 9870:9870 --name anyname hadoop bash
|
||||
```
|
||||
<br>
|
||||
|
||||
|
||||
28
hbase-site.xml
Normal file
28
hbase-site.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
||||
<configuration>
|
||||
<property>
|
||||
<name>hbase.cluster.distributed</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>hbase.tmp.dir</name>
|
||||
<value>./tmp</value>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>hbase.unsafe.stream.capability.enforce</name>
|
||||
<value>false</value>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>hbase.zookeeper.property.dataDir</name>
|
||||
<value>/hadoop/zookeeper</value>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>hbase.cluster.distributed</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
</configuration>
|
||||
2
init
2
init
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
service ssh restart
|
||||
stop-hbase.sh
|
||||
stop-all.sh
|
||||
hdfs namenode -format
|
||||
start-all.sh
|
||||
start-hbase.sh
|
||||
jps
|
||||
Reference in New Issue
Block a user