[
https://issues.apache.org/jira/browse/MAHOUT-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13743328#comment-13743328
]
Stevo Slavic commented on MAHOUT-1314:
--------------------------------------
[~adihaviv] thanks for reporting this.
Line info from stack trace doesn't seem to match 0.8 release (nor current
trunk), you must be using some 0.8 snapshot.
{{StreamingKMeansTestMR}} which uses configuration with
{{REDUCE_STREAMING_KMEANS}} set to {{true}} successfully passes. So just
setting this parameter to {{true}} is not enough to reproduce issue.
> StreamingKMeansReducer throws NullPointerException when
> REDUCE_STREAMING_KMEANS is set to true
> ----------------------------------------------------------------------------------------------
>
> Key: MAHOUT-1314
> URL: https://issues.apache.org/jira/browse/MAHOUT-1314
> Project: Mahout
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 0.8
> Reporter: Adi Haviv
> Fix For: 0.9
>
>
> when REDUCE_STREAMING_KMEANS option is set to true (-rskm) the reducer fails
> with NullPointerException.
> the problem is in the reduce method itself: on line 60 ( return
> input.getCentroid(); )
> it should be input.getCentroid().clone();
> similar to line 81.
> full stack trace:
> java.lang.NullPointerException
> at
> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
> at
> org.apache.mahout.math.random.WeightedThing.<init>(WeightedThing.java:31)
> at
> org.apache.mahout.math.neighborhood.BruteSearch.searchFirst(BruteSearch.java:133)
> at
> org.apache.mahout.clustering.ClusteringUtils.estimateDistanceCutoff(ClusteringUtils.java:100)
> at
> org.apache.mahout.clustering.streaming.mapreduce.StreamingKMeansThread.call(StreamingKMeansThread.java:64)
> at
> org.apache.mahout.clustering.streaming.mapreduce.StreamingKMeansReducer.reduce(StreamingKMeansReducer.java:66)
> at
> org.apache.mahout.clustering.streaming.mapreduce.StreamingKMeansReducer.reduce(StreamingKMeansReducer.java:1)
> at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:176)
> at
> org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:650)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:418)
> at
> org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:260)
> it happens every time the REDUCE_STREAMING_KMEANS is set to true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira