Uploaded image for project: 'Mahout'
  1. Mahout
  2. MAHOUT-1467

ClusterClassifier readPolicy leaks file handles

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.10.0
    • Component/s: Clustering
    • Labels:
      None

      Description

      The org.apache.mahout.clustering.classify.ClusterClassifier.readPolicy method leaks file handles.

      This leak causes a serious problems in setups that reuse JVMs for multiple tasks (as with "mapred.job.reuse.jvm.num.tasks").

      In more detail:
      The org.apache.mahout.clustering.classify.ClusterClassifier class has static methods to read policies: readPolicy.

      It opens a SequenceFile.Reader and reads from it, and then neglects to close it.

      suggested fix:
      add a call to reader.close() before the return statement in readPolicy

        Attachments

        1. MAHOUT-1467.patch
          0.8 kB
          Suneel Marthi

          Activity

            People

            • Assignee:
              smarthi Suneel Marthi
              Reporter:
              avishinnar Avi Shinnar
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: