Public Repository

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

Build the image

If you'd like to try directly from the Dockerfile you can build the image as:

docker build -t ward07/hadoop-ubuntu .

Pull the image

The image is also released as an official Docker image from Docker's automated build repository - you can always pull or refer the image when launching containers.

docker pull ward07/hadoop-ubuntu

Create a container

In order to use the Docker image you have just build or pulled use:

docker run -i -t ward07/hadoop-ubuntu /etc/bootstrap.sh -bash

or use...

docker run -it  --name  hadoop -p 2122:2122 -p 8030-8033:8030-8033 -p 8040:8040 -p 8042:8042 -p 8088:8088 -p 19888:19888 -p 49707:49707 -p 50010:50010 -p 50020:50020 -p 50070:50070 -p 50075:50075 -p 50090:50090  -p 50030:50030 -p 9001:9001 -p 9000:9000  -d ward07/hadoop-ubuntu /etc/bootstrap.sh -bash

Start a container

docker exec -it hadoop /bin/bash

Configuration

docker cp <name>.txt hadoop:/usr/local/hadoop/bin

docker cp <name>.jar hadoop:/usr/local/hadoop/bin


./hadoop fs -put <name>.txt  input


./hadoop jar <name>.jar <pakage.classProgram> input/<name>.txt <output name>


./hadoop fs -ls <output name>
./hadoop fs -cat <output name>/part-r-00000

Testing

You can run one of the stock examples:

cd $HADOOP_PREFIX
# run the mapreduce
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar grep input output 'dfs[a-z.]+'

# check the output
bin/hdfs dfs -cat output/*
Docker Pull Command
Owner
ward07