[
https://issues.apache.org/jira/browse/HDFS-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13908986#comment-13908986
]
Yongjun Zhang commented on HDFS-5939:
-------------------------------------
Thanks Haohui for posting the code and ATM for the comments.
Indeed, the trouble I had with creating a cluster of 0 datanode was because the
replication is 0 (thus an exception thrown, which I referred to as the other
problem). I thought it made sense for replication to be 0 when there is no
datanode, so I was not sure whether it's a real bug. But the way modified the
test made the replication non-zero, and it reproduced the bug and demonstrated
the fix work fine.
Now I learned that we could force the replication to be non-zero, which is a
simpler solution, so I will make the change.
On the other hand, I wonder if it's a bug that the system set the replication
to 0 (instead of non-zero), and we now have to manually set the replication to
non-zero?
Thanks.
> WebHdfs returns misleading error code and logs nothing if trying to create a
> file with no DNs in cluster
> --------------------------------------------------------------------------------------------------------
>
> Key: HDFS-5939
> URL: https://issues.apache.org/jira/browse/HDFS-5939
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs-client
> Affects Versions: 2.3.0
> Reporter: Yongjun Zhang
> Assignee: Yongjun Zhang
> Attachments: HDFS-5939.001.patch, HDFS-5939.002.patch,
> HDFS-5939.003.patch, HDFS-5939.004.patch
>
>
> When trying to access hdfs via webhdfs, and when datanode is dead, user will
> see an exception below without any clue that it's caused by dead datanode:
> $ curl -i -X PUT
> ".../webhdfs/v1/t1?op=CREATE&user.name=<userName>&overwrite=false"
> ...
> {"RemoteException":{"exception":"IllegalArgumentException","javaClassName":"java.lang.IllegalArgumentException","message":"n
> must be positive"}}
> Need to fix the report to give user hint about dead datanode.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)