Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-2243

Close all the file streams propely in a finally block to avoid their leakage.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.22.0, 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: jobtracker, tasktracker
    • Labels:
      None
    • Environment:

      NA

    • Hadoop Flags:
      Reviewed

      Description

      In the following classes streams should be closed in finally block to avoid their leakage in the exceptional cases.

      CompletedJobStatusStore.java
      ------------------------------------------
      dataOut.writeInt(events.length);
      for (TaskCompletionEvent event : events)

      { event.write(dataOut); }

      dataOut.close() ;

      EventWriter.java
      ----------------------
      encoder.flush();
      out.close();

      MapTask.java
      -------------------
      splitMetaInfo.write(out);
      out.close();

      TaskLog
      ------------
      1) str = fis.readLine();
      fis.close();

      2) dos.writeBytes(Long.toString(new File(logLocation, LogName.SYSLOG
      .toString()).length() - prevLogLength) + "\n");
      dos.close();

      TotalOrderPartitioner.java
      -----------------------------------
      while (reader.next(key, value))

      { parts.add(key); key = ReflectionUtils.newInstance(keyClass, conf); }

      reader.close();

      1. MAPREDUCE-2243-4.patch
        10 kB
        Devaraj K
      2. MAPREDUCE-2243-3.patch
        10 kB
        Devaraj K
      3. MAPREDUCE-2243-2.patch
        9 kB
        Devaraj K
      4. MAPREDUCE-2243-1.patch
        10 kB
        Devaraj K
      5. MAPREDUCE-2243.patch
        10 kB
        Devaraj K

        Activity

          People

          • Assignee:
            Devaraj K
            Reporter:
            Bhallamudi Venkata Siva Kamesh
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 72h
              72h
              Remaining:
              Remaining Estimate - 72h
              72h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development