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

libhdfs logs errors when opened FS doesn't support ByteBufferReadable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 3.0.3
    • None
    • libhdfs, native
    • None
    • Made changes to TestClientMetrics.java to fix the issue.

    Description

      Problem:
      ------------
      There is excessive error logging when a file is opened by libhdfs (DFSClient/HDFS) in S3 environment, this issue is caused because buffered read is not supported in S3 environment, HADOOP-14603 "S3A input stream to support ByteBufferReadable"

      The following message is printed repeatedly in the error log/ to STDERR:

      --------------------------------------------------------------------------------------------------
      UnsupportedOperationException: Byte-buffer read unsupported by input streamjava.lang.UnsupportedOperationException: Byte-buffer read unsupported by input stream
              at org.apache.hadoop.fs.FSDataInputStream.read(FSDataInputStream.java:150)
      

      Root cause

      After investigating the issue, it appears that the above exception is printed because
      when a file is opened via hdfsOpenFileImpl() calls readDirect() which is hitting this
      exception.

      Fix:

      Since the hdfs client is not initiating the byte buffered read but is happening in a implicit manner, we should not be generating the error log during open of a file.

      Attachments

        1. HADOOP-15928.001.patch
          3 kB
          Pranay Singh
        2. HADOOP-15928.002.patch
          3 kB
          Pranay Singh
        3. HDFS-14083.003.patch
          7 kB
          Pranay Singh
        4. HDFS-14083.004.patch
          6 kB
          Pranay Singh
        5. HDFS-14083.005.patch
          6 kB
          Pranay Singh
        6. HDFS-14083.006.patch
          3 kB
          Pranay Singh
        7. HDFS-14083.007.patch
          1 kB
          Pranay Singh
        8. HDFS-14083.008.patch
          3 kB
          Pranay Singh
        9. HDFS-14083.009.patch
          3 kB
          Pranay Singh

        Issue Links

          Activity

            People

              pranay_singh Pranay Singh
              pranay_singh Pranay Singh
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: