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

ClusterClassifier readPolicy leaks file handles

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9
    • 0.10.0
    • classic
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: