title: Error: Java heap space
body: <p>In Ubuntu, when I am running the hadoop example : </p>
  
  <pre><code>$bin/hadoop jar hadoop-examples-1.0.4.jar grep input output 'dfs[a-z.]+' 
  
  $echo $HADOOP_HEAPSIZE
  2000
  </code></pre>
  
  <p>In log, I am getting the error as : </p>
  
  <blockquote>
    <p>INFO mapred.JobClient: Task Id : attempt_201303251213_0012_m_000000_2,
    Status : FAILED
    <strong>Error: Java heap space</strong> 13/03/25 15:03:43 INFO mapred.JobClient: Task Id :attempt_201303251213_0012_m_000001_2,  Status : FAILED Error:
    Java heap space13/03/25 15:04:28 INFO mapred.JobClient: Job Failed: #
    of failed     Map Tasks exceeded allowed limit. FailedCount: 1.
    LastFailedTask:    task_201303251213_0012_m_000000
    java.io.IOException: Job failed! at
    org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1265) at
    org.apache.hadoop.examples.Grep.run(Grep.java:69) at
    org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at
    org.apache.hadoop.examples.Grep.main(Grep.java:93)</p>
  </blockquote>
  
  <p>Let us know what is the problem.</p>