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

Have a way of creating datanodes that throws an meaningful exception on failure

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.22.0
    • None
    • datanode
    • None

    Description

      In HDFS-884, I proposed printing out more details on why things fail. This is hard to test, because you need to subvert the log4j back end that your test harness will itself have grabbed.

      There is a way to make it testable, and to make it easier for anyone creating datanodes in process to recognise and handle failure: have a static CreateDatanode() method that throws exceptions when directories cannot be created or other problems arise. Right now some problems trigger failure, others just return a null reference saying "something went wrong but we won't tell you what -hope you know where the logs go".

      The HDFS-884 patch would be replaced by something that threw an exception; the existing methods would catch this, log it and return null. The new method would pass it straight up.

      This is easier to test, better for others. If people think this is good, I will code it up and mark the old API as deprecated.

      Attachments

        Issue Links

          Activity

            People

              stevel@apache.org Steve Loughran
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: