我想在伪分布式模式下设置一个hadoop-cluster进行开发.由于端口9000上的连接被拒绝,尝试启动hadoop集群失败.
这些是我的配置(非常标准):
网站core.xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>~/hacking/hd-data/tmp</value>
</property>
<property>
<name>fs.checkpoint.dir</name>
<value>~/hacking/hd-data/snn</value>
</property>
</configuration>
Run Code Online (Sandbox Code Playgroud)
HDFS-site.xml中
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>~/hacking/hd-data/nn</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>~/hacking/hd-data/dn</value>
</property>
<property>
<name>dfs.permissions.supergroup</name>
<value>hadoop</value>
</property>
</configuration>
Run Code Online (Sandbox Code Playgroud)
haddop-env.sh - 这里我只将配置更改为IPv4模式(参见最后一行):
# Set Hadoop-specific environment variables here.
# The only required environment variable is JAVA_HOME. All others are
# optional. When running a distributed configuration it is best to
# set JAVA_HOME …Run Code Online (Sandbox Code Playgroud)