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

Could FSEditLog report problems more elegantly than with System.exit(-1)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Incomplete
    • None
    • None
    • None
    • None

    Description

      When FSEdit encounters problems, it prints something and then exits.

      It would be better for any in-JVM deployments of FSEdit for these to be raised in some other way (such as throwing an exception), rather than taking down the whole JVM. That could be in JUnit tests, or it could be inside other applications. Test runners and the like can intercept those System.exit() calls with their own Security Manager -often turning the System.exit() operation into an exception there and then. If FSEdit did that itself, it may be easier to stay in control.

      The current approach has some benefits -it can exit regardless of which thread has encountered problems, but it is tricky to test.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: