Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bugcy013/4484307 to your computer and use it in GitHub Desktop.
Save bugcy013/4484307 to your computer and use it in GitHub Desktop.
# hdfs-site.hml
#<property>
# <name>dfs.replication</name>
# <value>1</value>
# </property>
# <property>
# <name>dfs.namenode.name.dir</name>
# <value>file:/opt/yarn_data/hdfs/namenode</value>
# </property>
# <property>
# <name>dfs.datanode.data.dir</name>
# <value>file:/opt/yarn_data/hdfs/datanode</value>
# </property>
# format if necessary
bin/hadoop namenode -format
#core-site.xml
#<property>
# <name>fs.default.name</name>
# <value>hdfs://localhost:9000</value>
#</property>
# start it
sbin/hadoop-daemon.sh start namenode
sbin/hadoop-daemon.sh start datanode
sbin/hadoop-daemon.sh start secondarynamenode
#stop it
sbin/hadoop-daemon.sh stop secondarynamenode
sbin/hadoop-daemon.sh stop datanode
sbin/hadoop-daemon.sh stop namenode
# etc/hadoop/yarn-env.sh
#export YARN_HOME=/opt/hadoop-0.23.5
## User for YARN daemons
#export HADOOP_YARN_USER=${HADOOP_YARN_USER:-alex}
## resolve links - $0 may be a softlink
#export YARN_CONF_DIR="${YARN_CONF_DIR:-$YARN_HOME/etc/hadoop}"
#export HADOOP_COMMON_HOME="${HADOOP_COMMON_HOME:-$YARN_HOME}"
#export HADOOP_HDFS_HOME="${HADOOP_HDFS_HOME:-$YARN_HOME}"
## some Java parameters
# export JAVA_HOME=/opt/jdk1.6.0_35
# yarn-site.xml
#<property>
# <name>yarn.nodemanager.aux-services</name>
# <value>mapreduce.shuffle</value>
# </property>
# <property>
# <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
# <value>org.apache.hadoop.mapred.ShuffleHandler</value>
# </property>
# mapred-site.xml
#<property>
# <name>mapreduce.framework.name</name>
# <value>yarn</value>
# </property>
# start daemons
sbin/yarn-daemon.sh start resourcemanager
sbin/yarn-daemon.sh start nodemanager
##########bin/yarn-daemon.sh start historyserver
sbin/mr-jobhistory-daemon.sh start historyserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment