java.lang.outofmemoryerror

sxpgvts3  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(209)

将Map器输出数据放入hbase表时出现问题。

15/09/21 17:19:12 INFO mapred.LocalJobRunner: 
    15/09/21 17:19:12 WARN mapred.LocalJobRunner: job_local_0001
    java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:640)
    at   java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:681)
    at   java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecuto    r.java:706)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:650)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:92)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processBatchCallback(HConnectionManager.java:1555)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processBatch(HConnectionManager.java:1418)
    at org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:918)
    at org.apache.hadoop.hbase.client.HTable.doPut(HTable.java:774)
    at org.apache.hadoop.hbase.client.HTable.put(HTable.java:749)
    at hbaseAdmin.HbaseConnection.createColumnQualifier(HbaseConnection.java:74)
    at hbaseMapReduce.MapperClass.map(MapperClass.java:31)
    at hbaseMapReduce.MapperClass.map(MapperClass.java:1)
    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)
15/09/21 17:19:12 INFO mapred.JobClient:  map 12% reduce 0%

Map程序代码:-

public void map(LongWritable key, Text value, Context output) throws            IOException, InterruptedException
    {

     String values=value.toString();
     String[] arr=values.split(",");
     String Date=arr[0];
      System.out.println(output.getCurrentKey()+"" +output.getCurrentValue());
     System.out.println(Thread.activeCount());
     HbaseConnection.createColumnQualifier("10","NASDEQDATA25","StokeData",Date,high);

注意:-sysout thread.activecount()返回581。我正在使用VMwarePlayer中的localjob并使用ApacheHadoop1.x版本

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题