Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
Consider this function:
protected void reduce ( VarIntWritable index, Iterable<VarLongWritable> ids, Context ctx) throws IOException, InterruptedException { ctx.write(index, ids.iterator().next()); }
The line `ctx.write(index, ids.iterator().next());` does not check for empty iterator when calling the next() function, which could result in an exception.
Function can be found on the GitHub repository here.
Line 395, in file /src/main/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJob.java