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

Add native gzip read/write coverage to TestCodec

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.22.0
    • 0.22.0
    • io
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: