SHARE
TWEET

dic_bash_script

a guest Feb 17th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. echo "Now script is updating hadoop configuration files"  
  2.  
  3. #cat >> /usr/local/hadoop/etc/hadoop/hadoop-env.sh << EOL  
  4. #export JAVA_HOME=/usr/  
  5. #EOL  
  6.  
  7. cd /usr/lib/hadoop/etc/hadoop  
  8.  
  9. cat > core-site.xml << EOL  
  10. <configuration>  
  11. <property>  
  12. <name>fs.default.name</name>  
  13. <value>hdfs://localhost:9000</value>  
  14. </property>  
  15. </configuration>  
  16. 'EOL'
  17.  
  18. cp mapred-site.xml.template mapred-site.xml  
  19. cat > mapred-site.xml << EOL  
  20. <configuration>  
  21. <property>  
  22. <name>mapreduce.framework.name</name>  
  23. <value>yarn</value>  
  24. </property>  
  25. </configuration>  
  26. 'EOL'  
  27.  
  28. cat > yarn-site.xml << EOL  
  29. <configuration>  
  30. <property>  
  31. <name>yarn.nodemanager.aux-services</name>  
  32. <value>mapreduce_shuffle</value>  
  33. </property>  
  34. </configuration>  
  35. 'EOL'  
  36.  
  37. cat > hdfs-site.xml << EOL  
  38. <configuration>  
  39. <property>  
  40. <name>dfs.replication</name>  
  41. <value>1</value>  
  42. </property>  
  43. <property>  
  44. <name>dfs.name.dir</name>  
  45. <value>file:///home/hadoop/hadoopinfra/hdfs/namenode </value>  
  46. </property>  
  47. <property>  
  48. <name>dfs.data.dir</name>  
  49. <value>file:///home/hadoop/hadoopinfra/hdfs/datanode </value >  
  50. </property>  
  51. </configuration>  
  52. 'EOL'  
  53.  
  54. echo "Completed process Now Reloading Bash Profile...."  
  55. cd ~  
  56.  
  57. echo "You may require reloading bash profile, you can reload using following command."  
  58. echo "source ~/.bashrc"  
  59.  
  60. echo "To Start you need to format Name Node Once you can use following command."  
  61. echo "hdfs namenode -format"  
  62.  
  63. echo "Hadoop configured. now you can start hadoop using following commands. "  
  64. echo "start-dfs.sh"  
  65. echo "start-yarn.sh"  
  66.  
  67. echo "To stop hadoop use following scripts."  
  68. echo "stop-dfs.sh"  
  69. echo "stop-yarn.sh"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top