[ https://issues.apache.org/jira/browse/MAHOUT-351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen resolved MAHOUT-351. ------------------------------ Resolution: Fixed Fix Version/s: 0.4 I see, it seems that it's not allowed to set a conf parameter to null -- not the same as not setting it. I easily fixed that with a check for null. Try it now. > 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 > Fix For: 0.4 > > > 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.