我正在尝试在Windows 7计算机上安装Hadoop。我第一次这样做,并按照此处的说明进行操作。
https://wiki.apache.org/hadoop/Hadoop2OnWindows
我仔细研究了所有内容并自定义设置,使其看起来像下面概述的步骤。
我从以下文件夹中执行并安装了Java:
C:\Java\jdk-8u201-windows-x64.exe
我在这里拥有所有Hadoop文件夹和文件:
C:\Hadoop\
我已按照以下显示的方式修改了以下文件:
hadoop-env.sh
set JAVA_Home=C:\Java
set HADOOP_PREFIX=C:\Hadoop\
set HADOOP_CONF_DIR=%HADOOP_PREFIX%
set YARN_CONF_DIR=%HADOOP_CONF_DIR%
set PATH=%PATH%;%HADOOP_PREFIX%\bin
#
core-site.xml:
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:19000</value>
</property>
</configuration>
#
hdfs-site.xml:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
mapred-site.xml:
<configuration>
<property>
<name>mapreduce.job.user.name</name>
<value>%USERNAME%</value>
</property>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>yarn.apps.stagingDir</name>
<value>/user/%USERNAME%/staging</value>
</property>
<property>
<name>mapreduce.jobtracker.address</name>
<value>local</value>
</property>
</configuration>
#
yaml-site.xml:
<configuration>
<property>
<name>yarn.server.resourcemanager.address</name>
<value>0.0.0.0:8020</value>
</property>
<property>
<name>yarn.server.resourcemanager.application.expiry.interval</name>
<value>60000</value>
</property>
<property>
<name>yarn.server.nodemanager.address</name>
<value>0.0.0.0:45454</value>
</property>
<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>
<property>
<name>yarn.server.nodemanager.remote-app-log-dir</name>
<value>/app-logs</value>
</property>
<property>
<name>yarn.nodemanager.log-dirs</name>
<value>/dep/logs/userlogs</value>
</property>
<property>
<name>yarn.server.mapreduce-appmanager.attempt-listener.bindAddress</name>
<value>0.0.0.0</value>
</property>
<property>
<name>yarn.server.mapreduce-appmanager.client-service.bindAddress</name>
<value>0.0.0.0</value>
</property>
<property>
<name>yarn.log-aggregation-enable</name>
<value>true</value>
</property>
<property>
<name>yarn.log-aggregation.retain-seconds</name>
<value>-1</value>
</property>
<property>
<name>yarn.application.classpath</name>
<value>%HADOOP_CONF_DIR%,%HADOOP_COMMON_HOME%/share/hadoop/common/*,%HADOOP_COMMON_HOME%/share/hadoop/common/lib/*,%HADOOP_HDFS_HOME%/share/hadoop/hdfs/*,%HADOOP_HDFS_HOME%/share/hadoop/hdfs/lib/*,%HADOOP_MAPRED_HOME%/share/hadoop/mapreduce/*,%HADOOP_MAPRED_HOME%/share/hadoop/mapreduce/lib/*,%HADOOP_YARN_HOME%/share/hadoop/yarn/*,%HADOOP_YARN_HOME%/share/hadoop/yarn/lib/*</value>
</property>
</configuration>
#
slaves:
master
slave
localhost
现在,这应该与我发布的链接中建议的设置非常接近,但是某些地方出现了问题,因为我无法启动Hadoop并显示localhost网页。有人可以看到丢失的东西吗?我希望早晚进行此操作!谢谢!
答案 0 :(得分:0)
好,所以我知道了。您需要按照我发布的链接中的说明进行操作。另外,您需要确保所有Java依赖项都已更新。下载并运行以下2个可执行文件:
jre-8u201-windows-x64.exe
https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
jdk-8u201-windows-x64.exe
https://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html
最后,下载两个文件(hadoop.dll & winutils.exe
)并将它们放在下面的文件夹中。
C:\Hadoop\bin\
可以从下面的链接中找到这两个文件:
https://github.com/steveloughran/winutils/tree/master/hadoop-2.7.1/bin
下载两个文件并将它们放在以下文件夹中: