Hadoop: Das Standarddateisystem kann in core-site.xml nicht als HDFS festgelegt werden

Ich benutze Hadoop 1.0.3 in einem Pseudo-Distributed-Modus. Und meine conf / core-site.xml ist wie folgt eingestellt:

<configuration>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://localhost:9000</value>
    </property>
    <property>
    <name>mapred.child.tmp</name>
    <value>/home/administrator/hadoop/temp</value>
    </property>
</configuration>

Also glaubte ich, dass mein Standard-Dateisystem auf HDFS eingestellt ist. Wenn ich jedoch den folgenden Code ausführe:

Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(conf);

Ich dachte, dass fs a sein sollteDistributedFileSystem Beispiel. Es stellt sich jedoch herausLocalFileSystem Beispiel.

Aber wenn ich den folgenden Code ausführe:

Configuration conf = new Configuration();
conf.set("fs.default.name", "hdfs://localhost:9000");
FileSystem fs = FileSystem.get(conf);

Dann kann ich einen bekommenDistributedFileSystem fs.

Ist mein Standarddateisystem in core-site.xml nicht auf HDFS eingestellt? Wenn nicht, wie soll ich das einstellen?

Antworten auf die Frage(1)

Ihre Antwort auf die Frage