title: Mahout : java.lang.NumberFormatException: For input string:
body: <p>I am trying to get mahout working and I am getting the following error :</p>
  
  <pre><code>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.&lt;init&gt;(DFSClient.java:1834)
      at org.apache.hadoop.hdfs.DFSClient.open(DFSClient.java:578)
  </code></pre>
  
  <p>My input file is very simple : (sample)
  userid, storyId, rating (1-5)</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I am trying to run a basic example using the following command :</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Java information:</p>
  
  <p>java version "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) I am on a mac 10.8.2</p>
  
  <p>Does anyone have any suggestions on why the integer is being read as a string and is generating the <code>NumberFormatException</code>?</p>
  
  <p>Thank you.</p>