Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-175

FSNamesystem.startFile throws an IOException when the number of chosen targets is less than the required minimum number

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      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)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hairong Hairong Kuang
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: