Working with HDFS
Introduction
Vagrant up
cd msbx5420vagrant
vagrant halt
vagrant upStop remove all containers - you will see errors if you have no containers running
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)Start the HDFS container
docker run -it --name hdfs sequenceiq/hadoop-docker:2.7.1 /etc/bootstrap.sh -bashYou should see the bash prompt
#bash-4.18Run commands
Update Environmental Variable
Create a data directory
Create a csv file - Enter these one at a time!!!!
HDFS Operations
Make a HDFS directory
Copy the people.csv file to HDFS
Examine people.csv on HDFS
Copy the HDFS file to your local file system
Read the local file
List HDFS files
Exit the docker machine (#bash-4.18)
Stop all docker containers on the VM
Shut down the VM - from the native machine
Last updated
Was this helpful?