Writing to HDFS from Java, getting “could only be replicated to 0 nodes instead of minReplication”

后端 未结 11 867
时光取名叫无心
时光取名叫无心 2021-02-01 18:59

I’ve downloaded and started up Cloudera\'s Hadoop Demo VM for CDH4 (running Hadoop 2.0.0). I’m trying to write a Java program that will run from my windows 7 machine (The same

11条回答
  •  [愿得一人]
    2021-02-01 19:17

    add given property in hdfs-site.xml

    
       dfs.replication
       1
     
    

    and add this file also in your program

    conf.addResource("hdfs-site.xml");
    

    stop hadoop

    stop-all.sh
    

    then start

    start-all.sh
    

提交回复
热议问题