Created
March 24, 2014 13:08
-
-
Save natbusa/9739726 to your computer and use it in GitHub Desktop.
Beam up the lorem.txt to hdfs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#check if the directory exists on hdfs | |
$HADOOP_HOME/bin/hadoop fs -ls wordcount-input | |
if [ $? -ne 0 ] | |
then $HADOOP_HOME/bin/hadoop fs -mkdir wordcount-input/ | |
fi | |
#check if the lorem.txt exists on hdfs | |
$HADOOP_HOME/bin/hadoop fs -ls wordcount-input/lorem.txt | |
if [ $? -ne 0 ] | |
then $HADOOP_HOME/bin/hadoop fs -copyFromLocal lorem.txt wordcount-input/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment