Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-3506

Occasional NPE in Jets3tFileSystemStore

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.17.0
    • Fix Version/s: 0.19.0
    • Component/s: fs/s3
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In extraordinary circumstances (eg. S3 outages), calling S3FileSystem functions will throw NullPointerExceptions when trying to read from the filesystem. I've traced this down to calls to Jets3tFileSystemStore.get().

      Both get() functions catch an S3ServiceException, and check its error code using a string comparison. However, the underlying libs3t library will sometimes produce an exception with a null error code string. This results in an NPE that propagates all the way to the S3FileSystem, and to the caller.

      To fix this, Jets3tFileSystemStore lines 196 and 212 should be changed from:

      if (e.getS3ErrorCode().equals("NoSuchKey")) {

      to:

      if ("NoSuchKey".equals(e.getS3ErrorCode())) {

        Attachments

        1. hadoop-3506.patch
          3 kB
          Thomas White

          Activity

            People

            • Assignee:
              tomwhite Thomas White
              Reporter:
              robert Robert
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: