FSNamesystem.startFile throws an IOException when the number of chosen targets
is less than the required minimum number
-----------------------------------------------------------------------------------------------------------------------
Key: HADOOP-1248
URL: https://issues.apache.org/jira/browse/HADOOP-1248
Project: Hadoop
Issue Type: Bug
Components: dfs
Affects Versions: 0.12.3
Reporter: Hairong Kuang
Fix For: 0.13.0
When I ran a test on a one-node dfs cluster, the test failed because of the
exception listed below. First of all, I wonder why chooseTarget returns 0
target when # of datanodes is 1. Secondly I think it would be nicer if
startFile retries chooseTarget before throws the exception back to client.
java.io.IOException: Failed to create file /user/hairong/xxx on client
127.0.0.1 because there were not enough datanodes available. Found 0 datanodes
but MIN_REPLICATION for the cluster is configured to be 1.
at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:813)
at org.apache.hadoop.dfs.NameNode.create(NameNode.java:294)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:339)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:573)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.