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

libhdfs: fix exception handling

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.1-alpha
    • 2.0.2-alpha
    • libhdfs
    • None

    Description

      libhdfs does not consistently handle exceptions. Sometimes we don't free the memory associated with them (memory leak). Sometimes we invoke JNI functions that are not supposed to be invoked when an exception is active.

      Running a libhdfs test program with -Xcheck:jni shows the latter problem clearly:

      WARNING in native method: JNI call made with exception pending
      WARNING in native method: JNI call made with exception pending
      WARNING in native method: JNI call made with exception pending
      WARNING in native method: JNI call made with exception pending
      WARNING in native method: JNI call made with exception pending
      Exception in thread "main" java.io.IOException: ...
      

      Attachments

        1. HDFS-3579.004.patch
          138 kB
          Colin McCabe
        2. HDFS-3579.005.patch
          137 kB
          Colin McCabe
        3. HDFS-3579.006.patch
          139 kB
          Colin McCabe

        Issue Links

          Activity

            People

              cmccabe Colin McCabe
              cmccabe Colin McCabe
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: