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

Potentially unclosed SequenceFile.Writer in DistCpV1#setup()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6.0
    • 2.7.0
    • None
    • None
    • Reviewed

    Description

          SequenceFile.Writer src_writer = SequenceFile.createWriter(jobfs, jobConf,
              srcfilelist, LongWritable.class, FilePair.class,
              SequenceFile.CompressionType.NONE);
      
          Path dstfilelist = new Path(jobDirectory, "_distcp_dst_files");
          SequenceFile.Writer dst_writer = SequenceFile.createWriter(jobfs, jobConf,
              dstfilelist, Text.class, Text.class,
              SequenceFile.CompressionType.NONE);
      

      If creation of dst_writer throws exception, src_writer would be left unclosed since there is no finally clause doing that for the above code.

      Attachments

        1. HADOOP-11283.patch
          3 kB
          Varun Saxena
        2. HADOOP-11283.001.patch
          4 kB
          Varun Saxena
        3. HADOOP-11283.002.patch
          4 kB
          Varun Saxena

        Activity

          People

            varun_saxena Varun Saxena
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: