Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- set -x
- #en
- cd /usr/local/hadoop/
- bin/hdfs namenode -format
- sbin/start-dfs.sh
- bin/hdfs dfs -mkdir /user
- bin/hdfs dfs -mkdir /user/domi
- bin/hdfs dfs -put /home/domi/Desktop/wikiscraps/en wc_input
- #wc map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output wc_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_reducer.py
- #bin/hdfs dfs -cat wc_output/*
- #all map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output all_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/all/all_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/all/all_reducer.py
- bin/hdfs dfs -cat all_output/* > /home/domi/all_output.txt
- bin/hdfs dfs -put /home/domi/all_output.txt .
- #freq map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_output -output freq_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_reducer.py -cacheFile hdfs://localhost:9000/user/domi/all_output.txt#all_output.txt
- bin/hdfs dfs -cat freq_output/* > /home/domi/freq_output.txt
- bin/hdfs dfs -cat freq_output/*
- head -200 /home/domi/freq_output.txt > /home/domi/PycharmProjects/HadoopWordCount/better/most_frequent/en_200_most_frequent.txt
- sbin/stop-dfs.sh
- for x in `cd /etc/init.d ; ls hadoop*` ; do sudo service $x stop ; done
- rm -rf /tmp/hadoop-domi/dfs/*
- #pl
- cd /usr/local/hadoop/
- bin/hdfs namenode -format
- sbin/start-dfs.sh
- bin/hdfs dfs -mkdir /user
- bin/hdfs dfs -mkdir /user/domi
- bin/hdfs dfs -put /home/domi/Desktop/wikiscraps/pl wc_input
- #wc map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output wc_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_reducer.py
- #bin/hdfs dfs -cat wc_output/*
- #all map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output all_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/all/all_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/all/all_reducer.py
- bin/hdfs dfs -cat all_output/* > /home/domi/all_output.txt
- bin/hdfs dfs -put /home/domi/all_output.txt .
- #freq map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_output -output freq_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_reducer.py -cacheFile hdfs://localhost:9000/user/domi/all_output.txt#all_output.txt
- bin/hdfs dfs -cat freq_output/* > /home/domi/freq_output.txt
- bin/hdfs dfs -cat freq_output/*
- head -200 /home/domi/freq_output.txt > /home/domi/PycharmProjects/HadoopWordCount/better/most_frequent/pl_200_most_frequent.txt
- sbin/stop-dfs.sh
- for x in `cd /etc/init.d ; ls hadoop*` ; do sudo service $x stop ; done
- rm -rf /tmp/hadoop-domi/dfs/*
- #hu
- cd /usr/local/hadoop/
- bin/hdfs namenode -format
- sbin/start-dfs.sh
- bin/hdfs dfs -mkdir /user
- bin/hdfs dfs -mkdir /user/domi
- bin/hdfs dfs -put /home/domi/Desktop/wikiscraps/hu wc_input
- #wc map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output wc_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_reducer.py
- #bin/hdfs dfs -cat wc_output/*
- #all map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output all_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/all/all_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/all/all_reducer.py
- bin/hdfs dfs -cat all_output/* > /home/domi/all_output.txt
- bin/hdfs dfs -put /home/domi/all_output.txt .
- #freq map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_output -output freq_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_reducer.py -cacheFile hdfs://localhost:9000/user/domi/all_output.txt#all_output.txt
- bin/hdfs dfs -cat freq_output/* > /home/domi/freq_output.txt
- bin/hdfs dfs -cat freq_output/*
- head -200 /home/domi/freq_output.txt > /home/domi/PycharmProjects/HadoopWordCount/better/most_frequent/hu_200_most_frequent.txt
- sbin/stop-dfs.sh
- for x in `cd /etc/init.d ; ls hadoop*` ; do sudo service $x stop ; done
- rm -rf /tmp/hadoop-domi/dfs/*
- #de
- cd /usr/local/hadoop/
- bin/hdfs namenode -format
- sbin/start-dfs.sh
- bin/hdfs dfs -mkdir /user
- bin/hdfs dfs -mkdir /user/domi
- bin/hdfs dfs -put /home/domi/Desktop/wikiscraps/de wc_input
- #wc map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output wc_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_reducer.py
- #bin/hdfs dfs -cat wc_output/*
- #all map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output all_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/all/all_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/all/all_reducer.py
- bin/hdfs dfs -cat all_output/* > /home/domi/all_output.txt
- bin/hdfs dfs -put /home/domi/all_output.txt .
- #freq map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_output -output freq_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_reducer.py -cacheFile hdfs://localhost:9000/user/domi/all_output.txt#all_output.txt
- bin/hdfs dfs -cat freq_output/* > /home/domi/freq_output.txt
- bin/hdfs dfs -cat freq_output/*
- head -200 /home/domi/freq_output.txt > /home/domi/PycharmProjects/HadoopWordCount/better/most_frequent/de_200_most_frequent.txt
- sbin/stop-dfs.sh
- for x in `cd /etc/init.d ; ls hadoop*` ; do sudo service $x stop ; done
- rm -rf /tmp/hadoop-domi/dfs/*
- #sv
- cd /usr/local/hadoop/
- bin/hdfs namenode -format
- sbin/start-dfs.sh
- bin/hdfs dfs -mkdir /user
- bin/hdfs dfs -mkdir /user/domi
- bin/hdfs dfs -put /home/domi/Desktop/wikiscraps/sv wc_input
- #wc map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output wc_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_reducer.py
- #bin/hdfs dfs -cat wc_output/*
- #all map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output all_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/all/all_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/all/all_reducer.py
- bin/hdfs dfs -cat all_output/* > /home/domi/all_output.txt
- bin/hdfs dfs -put /home/domi/all_output.txt .
- #freq map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_output -output freq_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_reducer.py -cacheFile hdfs://localhost:9000/user/domi/all_output.txt#all_output.txt
- bin/hdfs dfs -cat freq_output/* > /home/domi/freq_output.txt
- bin/hdfs dfs -cat freq_output/*
- head -200 /home/domi/freq_output.txt > /home/domi/PycharmProjects/HadoopWordCount/better/most_frequent/sv_200_most_frequent.txt
- sbin/stop-dfs.sh
- for x in `cd /etc/init.d ; ls hadoop*` ; do sudo service $x stop ; done
- rm -rf /tmp/hadoop-domi/dfs/*
- #nl
- cd /usr/local/hadoop/
- bin/hdfs namenode -format
- sbin/start-dfs.sh
- bin/hdfs dfs -mkdir /user
- bin/hdfs dfs -mkdir /user/domi
- bin/hdfs dfs -put /home/domi/Desktop/wikiscraps/nl wc_input
- #wc map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output wc_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/wc/wc_reducer.py
- #bin/hdfs dfs -cat wc_output/*
- #all map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_input -output all_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/all/all_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/all/all_reducer.py
- bin/hdfs dfs -cat all_output/* > /home/domi/all_output.txt
- bin/hdfs dfs -put /home/domi/all_output.txt .
- #freq map reduce
- bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar -input wc_output -output freq_output -mapper /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_mapper.py -reducer /home/domi/PycharmProjects/HadoopWordCount/better/freq/freq_reducer.py -cacheFile hdfs://localhost:9000/user/domi/all_output.txt#all_output.txt
- bin/hdfs dfs -cat freq_output/* > /home/domi/freq_output.txt
- bin/hdfs dfs -cat freq_output/*
- head -200 /home/domi/freq_output.txt > /home/domi/PycharmProjects/HadoopWordCount/better/most_frequent/nl_200_most_frequent.txt
- sbin/stop-dfs.sh
- for x in `cd /etc/init.d ; ls hadoop*` ; do sudo service $x stop ; done
- rm -rf /tmp/hadoop-domi/dfs/*
Add Comment
Please, Sign In to add comment