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

Add native gzip read/write coverage to TestCodec

    Details

    • Type: Test
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: io
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Looking at ZlibCompressor I noticed that the finished member is never modified, and is therefore always false. This means ZlibCompressor#finished will always return false so CompressorStream#close loops indefinitely in finish:

       
            while (!compressor.finished()) {
              compress();
            }
      

      I modifed TestCodec#testGzipCodecWrite to also cover writing using the native lib and confirmed the hang with jstack. The fix is simple, ZlibCompressor should record when it's been finished.

        Attachments

        1. hadoop-6803-1.patch
          4 kB
          Eli Collins
        2. hadoop-6803-2.patch
          3 kB
          Eli Collins
        3. hadoop-6803-3.patch
          3 kB
          Eli Collins

          Activity

            People

            • Assignee:
              eli Eli Collins
              Reporter:
              eli Eli Collins
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: