分享

hive查询时卡住,不报错,跪求大神进来看看啊!

4429674 发表于 2015-10-28 18:22:31 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 11 60849
日志信息:
2015-10-28 16:51:03,551 INFO  metastore.HiveMetaStore (HiveMetaStore.java:addAdminUsers(588)) - No user is added in admin role, since config is empty
2015-10-28 16:51:04,674 INFO  session.SessionState (SessionState.java:start(360)) - No Tez session required at this point. hive.execution.engine=mr.
2015-10-28 16:51:04,690 INFO  log.PerfLogger (PerfLogger.java:PerfLogBegin(108)) - <PERFLOG method=Driver.run from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:04,691 INFO  log.PerfLogger (PerfLogger.java:PerfLogBegin(108)) - <PERFLOG method=TimeToSubmit from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:04,691 INFO  ql.Driver (Driver.java:checkConcurrency(158)) - Concurrency mode is disabled, not creating a lock manager
2015-10-28 16:51:04,694 INFO  log.PerfLogger (PerfLogger.java:PerfLogBegin(108)) - <PERFLOG method=compile from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:04,732 INFO  log.PerfLogger (PerfLogger.java:PerfLogBegin(108)) - <PERFLOG method=parse from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:04,737 INFO  parse.ParseDriver (ParseDriver.java:parse(185)) - Parsing command: select * from dual limit 1
2015-10-28 16:51:05,134 INFO  parse.ParseDriver (ParseDriver.java:parse(206)) - Parse Completed
2015-10-28 16:51:05,146 INFO  log.PerfLogger (PerfLogger.java:PerfLogEnd(135)) - </PERFLOG method=parse start=1446022264732 end=1446022265146 duration=414 from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:05,147 INFO  log.PerfLogger (PerfLogger.java:PerfLogBegin(108)) - <PERFLOG method=semanticAnalyze from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:05,235 INFO  parse.SemanticAnalyzer (SemanticAnalyzer.java:analyzeInternal(9172)) - Starting Semantic Analysis
2015-10-28 16:51:05,236 INFO  parse.SemanticAnalyzer (SemanticAnalyzer.java:analyzeInternal(9207)) - Completed phase 1 of Semantic Analysis
2015-10-28 16:51:05,237 INFO  parse.SemanticAnalyzer (SemanticAnalyzer.java:getMetaData(1199)) - Get metadata for source tables
2015-10-28 16:51:05,310 INFO  metastore.HiveMetaStore (HiveMetaStore.java:logInfo(623)) - 1: get_table : db=jt_mas_safe tbl=dual
2015-10-28 16:51:05,313 INFO  HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(305)) - ugi=dishuai      ip=unknown-ip-add      cmd=get_table : db=jt_mas_safe tbl=dual
2015-10-28 16:51:05,313 INFO  metastore.HiveMetaStore (HiveMetaStore.java:newRawStore(493)) - 1: Opening raw store with implemenation class:org.apache.hadoop.hive.metastore.ObjectStore
2015-10-28 16:51:05,315 INFO  metastore.ObjectStore (ObjectStore.java:initialize(246)) - ObjectStore, initialize called
2015-10-28 16:51:05,325 INFO  DataNucleus.Query (Log4JLogger.java:info(77)) - Reading in results for query "org.datanucleus.store.rdbms.query.SQLQuery@0" since the connection used is closing
2015-10-28 16:51:05,328 INFO  metastore.ObjectStore (ObjectStore.java:setConf(229)) - Initialized ObjectStore
2015-10-28 16:51:05,353 INFO  parse.SemanticAnalyzer (SemanticAnalyzer.java:getMetaData(1336)) - Get metadata for subqueries
2015-10-28 16:51:05,354 INFO  parse.SemanticAnalyzer (SemanticAnalyzer.java:getMetaData(1361)) - Get metadata for destination tables
2015-10-28 16:51:05,564 INFO  ql.Context (Context.java:getMRScratchDir(267)) - New scratch dir is hdfs://hdp-hdfs/tmp/dishuai/hive_2015-10-28_16-51-04_731_6204319160032076834-1
2015-10-28 16:51:05,566 INFO  parse.SemanticAnalyzer (SemanticAnalyzer.java:analyzeInternal(9210)) - Completed getting MetaData in Semantic Analysis
2015-10-28 16:51:05,702 INFO  ppd.OpProcFactory (OpProcFactory.java:process(549)) - Processing for FS(3)
2015-10-28 16:51:05,702 INFO  ppd.OpProcFactory (OpProcFactory.java:process(119)) - Processing for LIM(2)
2015-10-28 16:51:05,703 INFO  ppd.OpProcFactory (OpProcFactory.java:process(549)) - Processing for SEL(1)
2015-10-28 16:51:05,703 INFO  ppd.OpProcFactory (OpProcFactory.java:process(189)) - Processing for TS(0)
2015-10-28 16:51:05,747 INFO  parse.SemanticAnalyzer (SemanticAnalyzer.java:analyzeInternal(9292)) - Completed plan generation
2015-10-28 16:51:05,747 INFO  ql.Driver (Driver.java:compile(431)) - Semantic Analysis Completed
2015-10-28 16:51:05,747 INFO  log.PerfLogger (PerfLogger.java:PerfLogEnd(135)) - </PERFLOG method=semanticAnalyze start=1446022265147 end=1446022265747 duration=600 from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:05,772 INFO  exec.TableScanOperator (Operator.java:initialize(337)) - Initializing Self 0 TS
2015-10-28 16:51:05,773 INFO  exec.TableScanOperator (Operator.java:initializeChildren(410)) - Operator 0 TS initialized
2015-10-28 16:51:05,773 INFO  exec.TableScanOperator (Operator.java:initializeChildren(414)) - Initializing children of 0 TS
2015-10-28 16:51:05,773 INFO  exec.SelectOperator (Operator.java:initialize(449)) - Initializing child 1 SEL
2015-10-28 16:51:05,773 INFO  exec.SelectOperator (Operator.java:initialize(337)) - Initializing Self 1 SEL
2015-10-28 16:51:05,789 INFO  exec.SelectOperator (SelectOperator.java:initializeOp(63)) - SELECT struct<x:string>
2015-10-28 16:51:05,796 INFO  exec.SelectOperator (Operator.java:initializeChildren(410)) - Operator 1 SEL initialized
2015-10-28 16:51:05,797 INFO  exec.SelectOperator (Operator.java:initializeChildren(414)) - Initializing children of 1 SEL
2015-10-28 16:51:05,797 INFO  exec.LimitOperator (Operator.java:initialize(449)) - Initializing child 2 LIM
2015-10-28 16:51:05,797 INFO  exec.LimitOperator (Operator.java:initialize(337)) - Initializing Self 2 LIM
2015-10-28 16:51:05,797 INFO  exec.LimitOperator (Operator.java:initializeChildren(410)) - Operator 2 LIM initialized
2015-10-28 16:51:05,797 INFO  exec.LimitOperator (Operator.java:initializeChildren(414)) - Initializing children of 2 LIM
2015-10-28 16:51:05,798 INFO  exec.ListSinkOperator (Operator.java:initialize(449)) - Initializing child 4 OP
2015-10-28 16:51:05,798 INFO  exec.ListSinkOperator (Operator.java:initialize(337)) - Initializing Self 4 OP
2015-10-28 16:51:05,800 INFO  exec.ListSinkOperator (Operator.java:initializeChildren(410)) - Operator 4 OP initialized
2015-10-28 16:51:05,800 INFO  exec.ListSinkOperator (Operator.java:initialize(385)) - Initialization Done 4 OP
2015-10-28 16:51:05,800 INFO  Configuration.deprecation (Configuration.java:warnOnceIfDeprecated(1087)) - mapred.task.is.map is deprecated. Instead, use mapreduce.task.ismap
2015-10-28 16:51:05,800 INFO  exec.LimitOperator (Operator.java:initialize(385)) - Initialization Done 2 LIM
2015-10-28 16:51:05,801 INFO  exec.SelectOperator (Operator.java:initialize(385)) - Initialization Done 1 SEL
2015-10-28 16:51:05,801 INFO  exec.TableScanOperator (Operator.java:initialize(385)) - Initialization Done 0 TS
2015-10-28 16:51:05,805 INFO  ql.Driver (Driver.java:getSchema(238)) - Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:dual.x, type:string, comment:null)], properties:null)
2015-10-28 16:51:05,805 INFO  log.PerfLogger (PerfLogger.java:PerfLogBegin(108)) - <PERFLOG method=doAuthorization from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:05,807 INFO  metastore.HiveMetaStore (HiveMetaStore.java:logInfo(623)) - 1: get_database: jt_mas_safe
2015-10-28 16:51:05,807 INFO  HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(305)) - ugi=dishuai596      ip=unknown-ip-addr      cmd=get_database: jt_mas_safe
2015-10-28 16:51:05,997 INFO  log.PerfLogger (PerfLogger.java:PerfLogEnd(135)) - </PERFLOG method=doAuthorization start=1446022265805 end=1446022265997 duration=192 from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:05,997 INFO  log.PerfLogger (PerfLogger.java:PerfLogEnd(135)) - </PERFLOG method=compile start=1446022264694 end=1446022265997 duration=1303 from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:05,998 INFO  log.PerfLogger (PerfLogger.java:PerfLogBegin(108)) - <PERFLOG method=Driver.execute from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:05,998 INFO  ql.Driver (Driver.java:execute(1192)) - Starting command: select * from dual limit 1
2015-10-28 16:51:06,010 INFO  log.PerfLogger (PerfLogger.java:PerfLogEnd(135)) - </PERFLOG method=TimeToSubmit start=1446022264691 end=1446022266010 duration=1319 from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:06,010 INFO  log.PerfLogger (PerfLogger.java:PerfLogBegin(108)) - <PERFLOG method=runTasks from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:06,010 INFO  log.PerfLogger (PerfLogger.java:PerfLogEnd(135)) - </PERFLOG method=runTasks start=1446022266010 end=1446022266010 duration=0 from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:06,011 INFO  log.PerfLogger (PerfLogger.java:PerfLogEnd(135)) - </PERFLOG method=Driver.execute start=1446022265998 end=1446022266011 duration=13 from=org.apache.hadoop.hive.ql.Driver>
OK
2015-10-28 16:51:06,011 INFO  ql.Driver (SessionState.java:printInfo(536)) - OK
2015-10-28 16:51:06,011 INFO  log.PerfLogger (PerfLogger.java:PerfLogBegin(108)) - <PERFLOG method=releaseLocks from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:06,011 INFO  log.PerfLogger (PerfLogger.java:PerfLogEnd(135)) - </PERFLOG method=releaseLocks start=1446022266011 end=1446022266011 duration=0 from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:06,011 INFO  log.PerfLogger (PerfLogger.java:PerfLogEnd(135)) - </PERFLOG method=Driver.run start=1446022264690 end=1446022266011 duration=1321 from=org.apache.hadoop.hive.ql.Driver>
2015-10-28 16:51:06,031 INFO  Configuration.deprecation (Configuration.java:warnOnceIfDeprecated(1087)) - mapred.input.dir is deprecated. Instead, use mapreduce.input.fileinputformat.inputdir



后台代码:
ArrayList<String> res = new ArrayList<String>();
private static Driver qp = null;
CommandProcessor proc = HiveUtils.getCommandProcessor(cmd, hiveConf);
qp = (Driver) proc;

while (qp.getResults(res)) {    //据我按日志跟踪,就是卡在这里,不报错
}
本人也是刚刚接触hadoop2.0没多久,请大神们帮忙看看啊!

已有(11)人评论

跳转到指定楼层
NEOGX 发表于 2015-10-28 19:16:00
根据自己的情况尝试下面修改
在 hive-site.xml 上添加如下:

<property>

<name>hive.metastore.uris</name>

<value>thrift://192.168.52.128:9083</value>

</property>

回复

使用道具 举报

arsenduan 发表于 2015-10-28 19:22:04
是否使用的oozie,尝试下面解决方案:

找到hive-site.xml文件 一般位置在:/opt/cm-5.3.0/run/cloudera-scm-agent/process/64-hue-HUE_SERVER/hive-conf/hive-site.xml

将其上传到hdfs上面

然后在设计hive作业的时候指定作业 XML为hdfs上的hive-site.xml

回复

使用道具 举报

杰仕人生 发表于 2015-10-29 08:54:07
以上问题我也同样遇到,不是那么多乱七八糟 arsenduan 说的那样。最根本问题是资源不足,你的硬盘空间至少是你查询数据文件3倍以上,也就是你的硬盘资源不足,或者内存  CPU 等资源不足也会导致。
回复

使用道具 举报

4429674 发表于 2015-10-29 11:03:52
NEOGX 发表于 2015-10-28 19:16
根据自己的情况尝试下面修改
在 hive-site.xml 上添加如下:

不好意思!这个要怎么修改,我使用的是hadoop2.0 HA模式 ,那个value里面的ip应该填什么?要填namenode的ip么?但是有两个啊?
回复

使用道具 举报

4429674 发表于 2015-10-29 11:07:34
杰仕人生 发表于 2015-10-29 08:54
以上问题我也同样遇到,不是那么多乱七八糟 arsenduan 说的那样。最根本问题是资源不足,你的硬盘空间至少 ...

哥们,你说的这种情况,我应该不存在吧?我们都是把项目打包到服务器上运行,而且集群都是公司里面搭建的!资源不足?你能说的详细点么?
回复

使用道具 举报

4429674 发表于 2015-10-29 11:09:37
杰仕人生 发表于 2015-10-29 08:54
以上问题我也同样遇到,不是那么多乱七八糟 arsenduan 说的那样。最根本问题是资源不足,你的硬盘空间至少 ...

不好意思,哥们,你说的这种情况,我应该不会存在吧?我们运行项目都是打包到公司服务器上运行,而且分布式集群也是公司搭建的。资源不足?你能说的详细点么?
回复

使用道具 举报

4429674 发表于 2015-10-29 11:32:18
arsenduan 发表于 2015-10-28 19:22
是否使用的oozie,尝试下面解决方案:

找到hive-site.xml文件 一般位置在:/opt/cm-5.3.0/run/cloudera- ...

没有使用oozie,我们就是 hadoop2.0 HA + hive!
回复

使用道具 举报

tntzbzc 发表于 2015-10-29 13:21:30
mapreduce正常能跑吗
回复

使用道具 举报

4429674 发表于 2015-10-30 10:28:14
tntzbzc 发表于 2015-10-29 13:21
mapreduce正常能跑吗

   集群上肯定能跑mapreduce,集群是稳定的,而且不止我一个项目搭建在上面。
现在的问题是我自己项目hive查询出问题!hive查询也是以mapreduce的形式去拿数据,所以觉得问题应该是出在hive这里。
回复

使用道具 举报

12下一页
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条