Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HDFS JAVA API from Windows

Highlighted

HDFS JAVA API from Windows

New Contributor

Hi Team,

am trying to write data into hdp data lake using java api from windows machine. but am getting the fallowing exception.file could only be replicated to 0 nodes instead of minReplication (=1). There are 1 datanode(s) running and 1 node(s) are excluded in this operation. at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget4NewBlock(BlockManager.java:1640)

I have single node cluster , data node as enough space. am assuming some how from my machine am unable to connect to data node private ip provided by namenode. can some one provide guidence on this.

Regards,

6 REPLIES 6

Re: HDFS JAVA API from Windows

Mentor

Check firewall rules, make sure that ports are port forwardedin your virtualizer properties

Re: HDFS JAVA API from Windows

New Contributor

@Artem Ervits Am using AWS instance and open for all trafic .

Re: HDFS JAVA API from Windows

Mentor

@V_A n then make sure you're using public IPs when you interact with cluster and place the entry in the /etc/hosts

Re: HDFS JAVA API from Windows

New Contributor

@Artem Ervits am able to perform operations like list where only interaction with name node is enough. But when am trying to use read/write where datanode interaction needs an getting fallowing error. Btw yes am using public ip only.

,

@Artem Ervits I am able to connect to cluster and perform operations like list . But when am trying to do write/read operations then am getting fallowing error. My assumption is am able to connect to Name mode but not with datannode from my client.

Re: HDFS JAVA API from Windows

Mentor

I would confirm the list of open ports, chance is you missed a few.

Re: HDFS JAVA API from Windows

Mentor

Did that resolve your issue, can you close the thread be accepting the answer.