From 358f72a2a571bebc0bdb64925edc16270a135afb Mon Sep 17 00:00:00 2001 From: balaShashanka Date: Tue, 14 Jul 2020 23:53:36 +0530 Subject: [PATCH 1/2] MAHOUT-2096 - next() Called On Possible Empty iterator() --- .../cf/taste/hadoop/als/ParallelALSFactorizationJob.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/community/mahout-mr/mr/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJob.java b/community/mahout-mr/mr/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJob.java index 2ce9b61603..65a672add3 100644 --- a/community/mahout-mr/mr/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJob.java +++ b/community/mahout-mr/mr/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJob.java @@ -392,7 +392,11 @@ static class IDMapReducer extends Reducer ids, Context ctx) throws IOException, InterruptedException { - ctx.write(index, ids.iterator().next()); + if (ids.iterator().hasNext()) { + ctx.write(index, ids.iterator().next()); + } else { + log.debug("Iterator is empty"); + } } } From eb99791077dfddad384e21cacd6e2e80fb25bcb1 Mon Sep 17 00:00:00 2001 From: Trevor Grant Date: Thu, 15 Feb 2024 14:08:29 -1000 Subject: [PATCH 2/2] [hotfix][website] test removing license to fix build --- .../classification/bankmarketing-example.md | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/website/documentation/users/classification/bankmarketing-example.md b/website/documentation/users/classification/bankmarketing-example.md index fa55673004..2037a7a420 100644 --- a/website/documentation/users/classification/bankmarketing-example.md +++ b/website/documentation/users/classification/bankmarketing-example.md @@ -1,24 +1,6 @@ - --- layout: default -title: - - +title: Bank Marketing Example --- Notice: Licensed to the Apache Software Foundation (ASF) under one @@ -66,4 +48,4 @@ This example consists of 3 classes: When you run the main method of BankMarketingClassificationMain it parses the dataset using the TelephoneCallParser and trains a logistic regression model with 20 runs and 20 passes. The TelephoneCallParser uses Mahout's feature vector encoder -to encode the features in the dataset into a vector. Afterwards the model is tested and the learning rate and AUC is printed accuracy is printed to standard output. \ No newline at end of file +to encode the features in the dataset into a vector. Afterwards the model is tested and the learning rate and AUC is printed accuracy is printed to standard output.