module load hadoop2.6
module load jdk-11.0.2
کامپایل فایل
export CLASSPATH="$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.6.0.jar:$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.6.0.jar:$HADOOP_HOME/share/hadoop/common/hadoop-common-2.6.0.jar:~/hadoop/MyCodes/*:$HADOOP_HOME/lib/*"
/opt/java/jdk1.8.0_144/bin/javac -d . *.java
تولید فایل jar با استفاده از Manifest.txt با محتوای
Main-Class: SalesCountry.SalesCountryDriver
/opt/java/jdk1.8.0_144/bin/jar cfm FinalPackageName.jar Manifest.txt PackageName/*.class
اجرای برنامه هدوپ
hadoop jar ProductSalePerCountry.jar /ali.shakiba/data.csv /ali.shakiba/output.log