2015-06-18 40 views
0

這會導致MR作業。 MR作業成功運行,但是當蜂蠟嘗試渲染結果時,我得到一個OOM異常。配置單元 - 內存不足異常

我想知道是否有一個配置設置來幫助我通過這個問題。

java.lang.OutOfMemoryError: Java heap space 
    at java.util.Arrays.copyOfRange(Arrays.java:2694) 
    at java.lang.String.<init>(String.java:203) 
    at java.nio.HeapCharBuffer.toString(HeapCharBuffer.java:561) 
    at java.nio.CharBuffer.toString(CharBuffer.java:1201) 
    at org.apache.hadoop.io.Text.decode(Text.java:394) 
    at org.apache.hadoop.io.Text.decode(Text.java:371) 
    at org.apache.hadoop.io.Text.toString(Text.java:273) 
    at org.apache.hadoop.hive.serde2.SerDeUtils.buildJSONString(SerDeUtils.java:280) 
    at org.apache.hadoop.hive.serde2.SerDeUtils.getJSONString(SerDeUtils.java:220) 
    at org.apache.hadoop.hive.serde2.DelimitedJSONSerDe.serializeField(DelimitedJSONSerDe.java:59) 
    at org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.serialize(LazySimpleSerDe.java:427) 
    at org.apache.hadoop.hive.ql.exec.ListSinkOperator.processOp(ListSinkOperator.java:91) 
    at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:474) 
    at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:498) 
    at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:137) 
    at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1474) 
    at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.materializeResults(BeeswaxServiceImpl.java:434) 
    at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.fetch(BeeswaxServiceImpl.java:543) 
    at com.cloudera.beeswax.BeeswaxServiceImpl$5.run(BeeswaxServiceImpl.java:986) 
    at com.cloudera.beeswax.BeeswaxServiceImpl$5.run(BeeswaxServiceImpl.java:981) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at javax.security.auth.Subject.doAs(Subject.java:415) 
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1438) 
    at com.cloudera.beeswax.BeeswaxServiceImpl.doWithState(BeeswaxServiceImpl.java:772) 
    at com.cloudera.beeswax.BeeswaxServiceImpl.fetch(BeeswaxServiceImpl.java:980) 
    at com.cloudera.beeswax.api.BeeswaxService$Processor$fetch.getResult(BeeswaxService.java:987) 
    at com.cloudera.beeswax.api.BeeswaxService$Processor$fetch.getResult(BeeswaxService.java:971) 
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) 
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) 
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:244) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 

更新 我在Cloudera的經理,但沒有雪茄增加內存設置。第一次重新啓動服務後,我運行查詢它的工作原理。我運行它的第二次失敗:

  • 順化 - 蜂蠟服務器(默認)/資源管理 - 蜂蠟服務器的字節[1吉布] Java堆大小
  • 蜂巢 - 網關(默認)/資源管理 - 客戶端Java堆大小(字節)[1吉布]
  • 蜂巢 - HiveServer2 (默認)/資源管理 - 在 字節[1吉布] HiveServer2的Java堆大小

回答

0

有三個-Xmx你可以玩(incr易用性) - 客戶端java,Hive Serever 2和Hive Meta Store服務器。我想你正在碰到這些限制之一。

+0

Thanks @Ruslan。我想這是客戶端,我如何將客戶端xmx設置爲蜂蠟? – hba

+0

您是否在使用Cloudera發行版?如果是,請導航到Hive - >配置 - >在搜索框中輸入「xmx」。第一個選項是「客戶端Java堆大小(字節數)」,我相信它默認爲1Gb。看看增加這個是否有幫助。 – Tagar

+0

我會試一試並更新帖子... thx @Ruslan – hba