[ 
https://issues.apache.org/jira/browse/MAHOUT-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104366#comment-13104366
 ] 

Florian Bausch commented on MAHOUT-807:
---------------------------------------

Yes, I tested it.

I am currently using Mahout 0.5 where I stumbled over this bug.

The PrefixAdditionFilter without the patched line creates wrong paths: 
/home/user/Documents/something/important.doc becomes 
/home/Documents/important.doc.

Using the patched line the path is correct.
Since the creation of the prefix does not differ to the current revision 
(except it uses getters instead of variables) the patch should work.

> Wrong prefixes in PrefixAdditionFilter
> --------------------------------------
>
>                 Key: MAHOUT-807
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-807
>             Project: Mahout
>          Issue Type: Bug
>          Components: Clustering
>    Affects Versions: 0.6
>            Reporter: Florian Bausch
>            Priority: Minor
>              Labels: patch
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The org.apache.mahout.text.PrefixAdditionFilter is not working as intended. 
> The prefix is computed wrong when there is recursion (this is when there is 
> at least one subdirectory).
> I think the line:
> fs.listStatus(fst.getPath(), new PrefixAdditionFilter(getConf(), getPrefix() 
> + Path.SEPARATOR + current.getName(), getOptions(), writer, fs));
> should better be:
> fs.listStatus(fst.getPath(), new PrefixAdditionFilter(getConf(), getPrefix() 
> + Path.SEPARATOR + current.getName() + Path.SEPARATOR + 
> fst.getPath().getName(), getOptions(), writer, fs));

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to