- Step1: creating a file
J$ cat>file.txt
hi how are you
how is your job
how is your family
what is time now
what is the strength of hadoop
ctrl+d(to save and exit)
- Step2: loading file.txt from local file system to HDFS
J$hadoop fs -put file.txt file
- Step3: Writing programs
DriverCode.java
MapperCode.java
ReducerCode.java
- Step4: Compiling all above .java files
J$javac -classpath $HADOOP_HOME/hadoop-core.jar *java
- Step5: creating jar file
J$jar cvf test.jar *.class
*.class: all * files will be taken
- Step6: running above test.jar on file(which is there in HDFS)
J$hadoop jar test.jar DriverCode file TestOutput
The above step's screenshot will available soon!
No comments:
Post a Comment