Could u submit a patch? Please work off of trunk as some if the clustering code 
was moved around .

Sent from my iPhone

> On Mar 17, 2014, at 3:13 PM, "Avi Shinnar (JIRA)" <[email protected]> wrote:
> 
> Avi Shinnar created MAHOUT-1467:
> -----------------------------------
> 
>             Summary: ClusterClassifier read/writePolicy leak file handles
>                 Key: MAHOUT-1467
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1467
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.9
>            Reporter: Avi Shinnar
> 
> 
> org.apache.mahout.clustering.classify.ClusterClassifier.readPolicy/writePolicy
>  methods leak 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/write policies: readPolicy and writePolicy
> 
> Both of them open a SequenceFile.Reader/Writer and read/write from/to it, and 
> then neglect to close it.
> 
> suggested fix:
> add a call to reader.close() before the return statement in readPolicy
> and
> add a call to writer.close() before the return statement in writePolicy
> 
> 
> 
> 
> 
> --
> This message was sent by Atlassian JIRA
> (v6.2#6252)

Reply via email to