0

Windows 7 の cygwin に Hadoop 1.1.2 をインストールして起動しようとしています。単純なジョブを実行しようとすると、次の問題が発生します。

bin/hadoop jar hadoop-*-examples.jar pi 10 100

13/04/26 17:56:10 WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /user/username/PiEstimator_TMP_3_141592654/in/part0 could only be replicated to 0 nodes, instead of 1
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1639)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:736)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)

私の構成は次のとおりです。

mapred-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
</configuration>

hdfs-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>

core-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
4

2 に答える 2

0

このエラーは、Windows で Hadoop を実行しようとしているからではありません。これは、DataNode に問題があるためです。Chris Gerken の指摘に加えて、他にもいくつかの理由がある可能性があります。私は最近、同様の質問に答えました。あなたはそれを見てください。ローカルの非 Hadoop マシンから Amazon EC2 で実行されている HDFS にデータをアップロードする

于 2013-04-27T15:39:02.017 に答える
0

答えはログにあります。そこに詳述されている特定の例外があります。おそらくファイルアクセスの問題で、chmod 755 -R 一部のディレクトリとその内容が必要です。

于 2013-04-27T05:04:01.143 に答える