can not set usersFile as null when run org.apache.mahout.cf.taste.hadoop.item.RecommenderJob --------------------------------------------------------------------------------------------
Key: MAHOUT-351 URL: https://issues.apache.org/jira/browse/MAHOUT-351 Project: Mahout Issue Type: Bug Components: Collaborative Filtering Affects Versions: 0.4 Reporter: Hui Wen Han I want to get all users recommendations using RecommenderJob. it seems need not set the usersFile parameters, In Class:RecommenderMapper.java String usersFilePathString = jobConf.get(USERS_FILE); if (usersFilePathString == null) { usersToRecommendFor = null; } else { usersToRecommendFor = new FastIDSet(); Path usersFilePath = new Path(usersFilePathString).makeQualified(fs); FSDataInputStream in = fs.open(usersFilePath); for (String line : new FileLineIterable(in)) { usersToRecommendFor.add(Long.parseLong(line)); } } if ((usersToRecommendFor != null) && !usersToRecommendFor.contains(userID.get())) { return; } but when I inore userFile parameters ,get following error: run job : ra...@dan:~/app/steer/item$ hadoop org.apache.mahout.cf.taste.hadoop.item.RecommenderJob -Dmapred.job.name=HADOOP_REC_tap_tag\ -Dmapred.reduce.tasks=200 --input /steer/item/in --tempDir /steer/item/temp --output /steer/item/out --jarFile mahout-0.4-SNAPSHOT.jar --numRecommendations 10 Exception in thread "main" java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:394) at java.util.Properties.setProperty(Properties.java:143) at org.apache.hadoop.conf.Configuration.set(Configuration.java:403) at org.apache.mahout.cf.taste.hadoop.item.RecommenderJob.run(RecommenderJob.java:110) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) at org.apache.mahout.cf.taste.hadoop.item.RecommenderJob.main(RecommenderJob.java:117) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.