title: How could I use mahout with hadoop in Eclipse?
body: <p>I want to use eclipse to develop my project with mahout-0.9 and hadoop-2.2.0.</p>
  
  <p>I could run my code with mahout-0.9 successfully. But I faced the problem how could I run my project with hadoop mod? I think I have to install hadoop in my computer, and use command to start it. Then I could run my project in eclipse with hadoop mod.</p>
  
  <p>Since Mahout can use <code>MAHOUT_LOCAL</code> to determine the local mod or hadoop mod in linux. But when I set the environment variable <code>MAHOUT_LOCAL</code> to "", it also use local mod, why?</p>
  
  <p>If it is impossible to run mahout with hadoop in eclipse, how could I run my project? Thanks:)</p>
  
  <p>My sample code</p>
  
  <pre><code>package com.predictionmarketing.itemrecommend;
  
  import java.io.File;
  import java.io.IOException;
  import java.util.List;
  
  import org.apache.mahout.cf.taste.common.TasteException;
  import org.apache.mahout.cf.taste.impl.model.file.FileDataModel;
  import org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender;
  import org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity;
  import org.apache.mahout.cf.taste.impl.similarity.UncenteredCosineSimilarity;
  import org.apache.mahout.cf.taste.model.DataModel;
  import org.apache.mahout.cf.taste.recommender.RecommendedItem;
  import org.apache.mahout.cf.taste.recommender.Recommender;
  import org.apache.mahout.cf.taste.similarity.ItemSimilarity;
  
  public class ItemRecommend {
  
      public static void main(String[] args) {
          try {
               DataModel model = new FileDataModel(new File("data/test.txt")); 
               ItemSimilarity similarity = new UncenteredCosineSimilarity(model); 
               Recommender recommender = new GenericItemBasedRecommender(model, similarity);
  
               List&lt;RecommendedItem&gt; recommendations = recommender.recommend(2, 10);
               for(RecommendedItem recommendation : recommendations) {
                   System.out.println(recommendation.getItemID() + "," + recommendation.getValue());
               }
          } catch (IOException e) {
              System.out.println("There was an error.");
              e.printStackTrace();
          } catch (TasteException e) {
              System.out.println("There was a Taste Exception");
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/NWB6m.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/NJO3c.png" alt="enter image description here"></p>