2020-11-05

在hive上执行插入数据,一直卡着

0: jdbc:hive2://node02:10000> insert into stu values (1,"zhangsan");
INFO  : Compiling command(queryId=root_20201105093355_cdaba547-5a2e-4ec9-ab15-a89408448721): insert into stu values (1,"zhangsan")
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Semantic Analysis Completed (retrial = false)
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:col1, type:int, comment:null), FieldSchema(name:col2, type:string, comment:null)], properties:null)
INFO  : Completed compiling command(queryId=root_20201105093355_cdaba547-5a2e-4ec9-ab15-a89408448721); Time taken: 0.364 seconds
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Executing command(queryId=root_20201105093355_cdaba547-5a2e-4ec9-ab15-a89408448721): insert into stu values (1,"zhangsan")
WARN  : Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
INFO  : Query ID = root_20201105093355_cdaba547-5a2e-4ec9-ab15-a89408448721
INFO  : Total jobs = 3
INFO  : Launching Job 1 out of 3
INFO  : Starting task [Stage-1:MAPRED] in serial mode
INFO  : Number of reduce tasks determined at compile time: 1
INFO  : In order to change the average load for a reducer (in bytes):
INFO  :   set hive.exec.reducers.bytes.per.reducer=
INFO  : In order to limit the maximum number of reducers:
INFO  :   set hive.exec.reducers.max=
INFO  : In order to set a constant number of reducers:
INFO  :   set mapreduce.job.reduces=

查看日志,tmp是默认路径,root是登录用户名,hive.log是文件名,以前的日志,还有hive.log.2020-11-03
tail /tmp/root/hive.log

2020-11-05T09:35:49,591  INFO [HiveServer2-Background-Pool: Thread-270] ipc.Client: Retrying connect to server: node03/192.168.52.120:8032. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2020-11-05T09:35:50,592  INFO [HiveServer2-Background-Pool: Thread-270] ipc.Client: Retrying connect to server: node03/192.168.52.120:8032. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2020-11-05T09:35:51,593  INFO [HiveServer2-Background-Pool: Thread-270] ipc.Client: Retrying connect to server: node03/192.168.52.120:8032. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2020-11-05T09:35:52,487  INFO [HiveServer2-Handler-Pool: Thread-63] conf.HiveConf: Using the default value passed in for log id: df6a81f9-4f62-49bf-81e3-275b8ac15362
2020-11-05T09:35:52,487  INFO [df6a81f9-4f62-49bf-81e3-275b8ac15362 HiveServer2-Handler-Pool: Thread-63] conf.HiveConf: Using the default value passed in for log id: df6a81f9-4f62-49bf-81e3-275b8ac15362
2020-11-05T09:35:52,487  INFO [HiveServer2-Handler-Pool: Thread-63] session.SessionState: Updating thread name to df6a81f9-4f62-49bf-81e3-275b8ac15362 HiveServer2-Handler-Pool: Thread-63
2020-11-05T09:35:52,487  INFO [df6a81f9-4f62-49bf-81e3-275b8ac15362 HiveServer2-Handler-Pool: Thread-63] session.SessionState: Resetting thread name to  HiveServer2-Handler-Pool: Thread-63
2020-11-05T09:35:52,594  INFO [HiveServer2-Background-Pool: Thread-270] ipc.Client: Retrying connect to server: node03/192.168.52.120:8032. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

是因为没有启动yarn

start-yarn.sh

使用:jps 查看进程,确定yarn起来后,再执行hive插入语句。

你可能感兴趣的:(2020-11-05)