Skip to content

Instantly share code, notes, and snippets.

@lucarin91
Created October 23, 2015 10:42
Show Gist options
  • Save lucarin91/7471722827901b9c079c to your computer and use it in GitHub Desktop.
Save lucarin91/7471722827901b9c079c to your computer and use it in GitHub Desktop.
This script start all the Hadoop demons and initialize the Hadoop File System with same data. Can be used after start the PC to start all the Hadoop framework.
#!/bin/bash
#
# This script start all the Hadoop demons and initialize the Hadoop File System with same data
# (Fill up the above variable)
#
HADOOP_PATH=#path to the Hadoop installation
DATA_PATH=#path to the data to put in the hadoop DFS
$HADOOP_PATH/stop-all.sh
rm -rvf /tmp/hadoop*/dfs
$HADOOP_PATH/hadoop namenode -format
$HADOOP_PATH/start-all.sh
$HADOOP_PATH/hadoop fs -put $DATA_PATH data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment