카테고리 없음

Hadoop

nolja 2024. 11. 12. 15:08

https://cloudinfrastructureservices.co.uk/how-to-setup-hadoop-cluster-multi-node-on-ubuntu/

 

-----host name 변경-----------

sudo hostnamectl set-hostname masternode

sudo hostnamectl set-hostname datanode1

sudo hostnamectl set-hostname datanode2

sudo hostnamectl set-hostname datanode3

 

-----all nodes-----------
nano $HADOOP_HOME/etc/hadoop/hadoop-env.sh    : line 54
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

----Masternode: create node--------------------
mkdir -p ~/hadoopdata/hdfs/{namenode,datanode}

------copy-----
scp $HADOOP_HOME/etc/hadoop/* hadoop@datanode1:$HADOOP_HOME/etc/hadoop/
scp $HADOOP_HOME/etc/hadoop/* hadoop@datanode2:$HADOOP_HOME/etc/hadoop/
scp $HADOOP_HOME/etc/hadoop/* hadoop@datanode3:$HADOOP_HOME/etc/hadoop/


-----start-----
start-dfs.sh
start-yarn.sh


------------------start benchmark and save log-----------------------
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 1500 -size 177MB -resFile ~/result.txt 2>&1 | tee log.txt


yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log01.txt
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log02.txt
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log03.txt
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log04.txt
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log05.txt
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log06.txt
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log07.txt
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log08.txt
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log09.txt
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.5-tests.jar TestDFSIO -write -nrFiles 150 -size 177MB -resFile ~/result.txt 2>&1 | tee log10.txt


------------------save data files-----------------------
hadoop fs -get /benchmarks/TestDFSIO ~/result_files01
hadoop fs -get /benchmarks/TestDFSIO ~/result_files02
hadoop fs -get /benchmarks/TestDFSIO ~/result_files03
hadoop fs -get /benchmarks/TestDFSIO ~/result_files04
hadoop fs -get /benchmarks/TestDFSIO ~/result_files05
hadoop fs -get /benchmarks/TestDFSIO ~/result_files06
hadoop fs -get /benchmarks/TestDFSIO ~/result_files07
hadoop fs -get /benchmarks/TestDFSIO ~/result_files08
hadoop fs -get /benchmarks/TestDFSIO ~/result_files09
hadoop fs -get /benchmarks/TestDFSIO ~/result_files10