我正在尝试让 mahout 工作,但出现以下错误:
3/05/16 22:48:53 INFO mapred.MapTask: record buffer = 262144/327680
13/05/16 22:48:53 WARN mapred.LocalJobRunner: job_local_0001
java.lang.NumberFormatException: For input string: "1119"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:430)
at java.lang.Long.parseLong(Long.java:483)
at org.apache.mahout.cf.taste.hadoop.item.ItemIDIndexMapper.map(ItemIDIndexMapper.java:47)
at org.apache.mahout.cf.taste.hadoop.item.ItemIDIndexMapper.map(ItemIDIndexMapper.java:31)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:212)
13/05/16 22:48:54 INFO mapred.JobClient: map 0% reduce 0%
13/05/16 22:48:54 INFO mapred.JobClient: Job complete: job_local_0001
13/05/16 22:48:54 INFO mapred.JobClient: Counters: 0
Exception in thread "main" java.io.FileNotFoundException: File does not exist: /user/eric.waite/temp/preparePreferenceMatrix/numUsers.bin
at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.openInfo(DFSClient.java:1843)
at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.<init>(DFSClient.java:1834)
at org.apache.hadoop.hdfs.DFSClient.open(DFSClient.java:578)
我的输入文件非常简单:(示例)用户 ID、故事 ID、评级(1-5)
2840281,1119,2
2840321,1170,3
2840323,1124,5
2840371,1170,5
2840347,1157,3
2840371,1172,5
2840347,1157,5
2840358,1333,5
2840371,1172,5
2840347,1157,5
我正在尝试使用以下命令运行一个基本示例:
hadoop jar /sourcecode/mahout/mahout-distribution-0.7/mahout-core-0.7-job.jar org.apache.mahout.cf.taste.hadoop.item.RecommenderJob -s SIMILARITY_COOCCURRENCE --input ratings.dat --output output
爪哇资料:
java 版本 "1.7.0_13" Java(TM) SE Runtime Environment (build 1.7.0_13-b20) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode) 我在 mac 10.8.2
有没有人对为什么整数被读取为字符串并生成NumberFormatException
?
谢谢你。