72 | | 編輯以下資訊 |
73 | | |
74 | | {{{ |
75 | | #!diff |
76 | | --- hadoop-0.18.3/conf/hadoop-env.sh.org |
77 | | +++ hadoop-0.18.3/conf/hadoop-env.sh |
78 | | @@ -6,7 +6,10 @@ |
79 | | # remote nodes. |
80 | | # The java implementation to use. Required. |
81 | | -# export JAVA_HOME=/usr/lib/j2sdk1.5-sun |
82 | | +export JAVA_HOME=/usr/lib/jvm/java-6-sun |
83 | | +export HADOOP_HOME=/opt/hadoop |
84 | | +export HADOOP_CONF_DIR=/opt/hadoop/conf |
85 | | +export HADOOP_LOG_DIR=/home/hadooper/logs |
86 | | +export HADOOP_PID_DIR=/home/hadooper/pids |
87 | | |
88 | | # Extra Java CLASSPATH elements. Optional. |
89 | | # export HADOOP_CLASSPATH= |
| 78 | 將以下資訊貼入conf/hadoop-env.sh檔內 |
| 79 | |
| 80 | {{{ |
| 81 | #!sh |
| 82 | export JAVA_HOME=/usr/lib/jvm/java-6-sun |
| 83 | export HADOOP_HOME=/opt/hadoop |
| 84 | export HADOOP_CONF_DIR=/opt/hadoop/conf |
| 85 | export HADOOP_LOG_DIR=/home/hadooper/logs |
| 86 | export HADOOP_PID_DIR=/home/hadooper/pids |
103 | | #!diff |
104 | | --- hadoop-0.18.3/conf/hadoop-site.xml.org |
105 | | +++ hadoop-0.18.3/conf/hadoop-site.xml |
106 | | @@ -4,5 +4,31 @@ |
107 | | <!-- Put site-specific property overrides in this file. --> |
108 | | <configuration> |
109 | | - |
110 | | + <property> |
111 | | + <name>fs.default.name</name> |
112 | | + <value>hdfs://node1_ip:9000/</value> |
113 | | + <description> |
114 | | + The name of the default file system. Either the literal string |
115 | | + "local" or a host:port for NDFS. |
116 | | + </description> |
117 | | + </property> |
118 | | + <property> |
119 | | + <name>mapred.job.tracker</name> |
120 | | + <value>hdfs://node1_ip:9001</value> |
121 | | + <description> |
122 | | + The host and port that the MapReduce job tracker runs at. If |
123 | | + "local", then jobs are run in-process as a single map and |
124 | | + reduce task. |
125 | | + </description> |
126 | | + </property> |
127 | | + <property> |
128 | | + <name>hadoop.tmp.dir</name> |
129 | | + <value>/tmp/hadoop/hadoop-${user.name}</value> |
130 | | + <description>A base for other temporary directories.</description> |
131 | | + </property> |
132 | | </configuration> |
| 100 | #!sh |
| 101 | <!-- Put site-specific property overrides in this file. --> |
| 102 | <configuration> |
| 103 | <property> |
| 104 | <name>fs.default.name</name> |
| 105 | <value>hdfs://node1_ip:9000/</value> |
| 106 | <description> </description> |
| 107 | </property> |
| 108 | <property> |
| 109 | <name>mapred.job.tracker</name> |
| 110 | <value>hdfs://node2_ip:9001</value> |
| 111 | <description> </description> |
| 112 | </property> |
| 113 | <property> |
| 114 | <name>hadoop.tmp.dir</name> |
| 115 | <value>/tmp/hadoop/hadoop-${user.name}</value> |
| 116 | <description>A base for other temporary directories.</description> |
| 117 | </property> |
| 118 | </configuration> |