Reply
Explorer
Posts: 9
Registered: ‎04-17-2017

Hive DML commands not executing at all from hive cli as well as HUE

Just able to create a database and table in hive. Not able to do anything further from both Hive command line interface and Hue hive query editor.

When trying to insert, the job stays in execution state. Need to kill the job manually.

Please suggest.

 

Cloudera Employee
Posts: 211
Registered: ‎03-23-2015

Re: Hive DML commands not executing at all from hive cli as well as HUE

How many nodes you have? Have you checked that you have enough resources to run YARN applications?

When you run "SELECT COUNT(*) FROM table", can you share the beeline output here?
Explorer
Posts: 9
Registered: ‎04-17-2017

Hive DML commands not executing at all from hive cli as well as HUE

It's a single node cluster. Hive is using the default postgresql db. Just installed Hive, is there any jar or jdbc file to placed anywhere?
Cloudera Employee
Posts: 211
Registered: ‎03-23-2015

Re: Hive DML commands not executing at all from hive cli as well as HUE

Typically you need to put postgres connector JAR file under /usr/share/java, so that HMS can connect to postgres.

However, for your original issue, I believe you simply do not have enough resources to run jobs. Maybe check RM logs to see if there is any clues.
Explorer
Posts: 9
Registered: ‎04-17-2017

Re: Hive DML commands not executing at all from hive cli as well as HUE

17/10/31 01:59:01 [main]: WARN session.HiveSessionImpl: Unable to create operation log session directory: /var/log/hive/operation_logs/e3f007f6-62cc-4199-b187-14c06c5c293d Connected to: Apache Hive (version 1.1.0-cdh5.11.1) Driver: Hive JDBC (version 1.1.0-cdh5.11.1) Transaction isolation: TRANSACTION_REPEATABLE_READ 0: jdbc:hive2://> show tables; OK 17/10/31 01:59:33 [Thread-10]: WARN thrift.ThriftCLIService: Error fetching results: org.apache.hive.service.cli.HiveSQLException: Couldn't find log associated with operation handle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=77c45738-8337-41cc-bf4c-d018076ce170] at org.apache.hive.service.cli.operation.OperationManager.getOperationLogRowSet(OperationManager.java:302) at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:770) at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:462) at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:691) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1309) at com.sun.proxy.$Proxy25.FetchResults(Unknown Source) at org.apache.hive.jdbc.HiveStatement.getQueryLog(HiveStatement.java:803) at org.apache.hive.jdbc.HiveStatement.getQueryLog(HiveStatement.java:774) at org.apache.hive.beeline.Commands$2.run(Commands.java:1210) at java.lang.Thread.run(Thread.java:745) +--------------+--+ | tab_name | +--------------+--+ | drset | | jj_test | | tpoc_adress | +--------------+--+ 3 rows selected (2.729 seconds) 17/10/31 01:59:33 [main]: WARN thrift.ThriftCLIService: Error fetching results: org.apache.hive.service.cli.HiveSQLException: Couldn't find log associated with operation handle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=77c45738-8337-41cc-bf4c-d018076ce170] at org.apache.hive.service.cli.operation.OperationManager.getOperationLogRowSet(OperationManager.java:302) at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:770) at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:462) at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:691) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1309) at com.sun.proxy.$Proxy25.FetchResults(Unknown Source) at org.apache.hive.jdbc.HiveStatement.getQueryLog(HiveStatement.java:803) at org.apache.hive.jdbc.HiveStatement.getQueryLog(HiveStatement.java:774) at org.apache.hive.beeline.Commands.showRemainingLogsIfAny(Commands.java:1243) at org.apache.hive.beeline.Commands.executeInternal(Commands.java:1010) at org.apache.hive.beeline.Commands.execute(Commands.java:1192) at org.apache.hive.beeline.Commands.sql(Commands.java:1106) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1169) at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1003) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:915) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:511) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:494) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

Highlighted
Explorer
Posts: 9
Registered: ‎04-17-2017

Re: Hive DML commands not executing at all from hive cli as well as HUE

 SELECT COUNT(*) FROM drtest;
NoViableAltException(26@[])
        at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1028)
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:201)
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:466)
        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1278)
        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1265)
        at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:186)
        at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:267)
        at org.apache.hive.service.cli.operation.Operation.run(Operation.java:337)
        at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:439)
        at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:416)
        at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:282)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:501)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1309)
        at com.sun.proxy.$Proxy25.ExecuteStatement(Unknown Source)
        at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:246)
        at org.apache.hive.beeline.Commands.executeInternal(Commands.java:990)
        at org.apache.hive.beeline.Commands.execute(Commands.java:1192)
        at org.apache.hive.beeline.Commands.sql(Commands.java:1106)
        at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1169)
        at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1003)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:915)
        at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:511)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:494)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
FAILED: ParseException line 1:0 cannot recognize input near 'OK' '17' '/'
17/10/31 02:01:10 [main]: ERROR ql.Driver: FAILED: ParseException line 1:0 cannot recognize input near 'OK' '17' '/'
org.apache.hadoop.hive.ql.parse.ParseException: line 1:0 cannot recognize input near 'OK' '17' '/'
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:204)
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:466)
        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1278)
        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1265)
        at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:186)
        at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:267)
        at org.apache.hive.service.cli.operation.Operation.run(Operation.java:337)
        at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:439)
        at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:416)
        at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:282)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:501)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1309)
        at com.sun.proxy.$Proxy25.ExecuteStatement(Unknown Source)
        at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:246)
        at org.apache.hive.beeline.Commands.executeInternal(Commands.java:990)
        at org.apache.hive.beeline.Commands.execute(Commands.java:1192)
        at org.apache.hive.beeline.Commands.sql(Commands.java:1106)
        at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1169)
        at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1003)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:915)
        at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:511)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:494)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

17/10/31 02:01:10 [main]: WARN thrift.ThriftCLIService: Error executing statement:
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'OK' '17' '/'
        at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:400)
        at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:188)
        at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:267)
        at org.apache.hive.service.cli.operation.Operation.run(Operation.java:337)
        at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:439)
        at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:416)
        at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:282)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:501)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1309)
        at com.sun.proxy.$Proxy25.ExecuteStatement(Unknown Source)
        at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:246)
        at org.apache.hive.beeline.Commands.executeInternal(Commands.java:990)
        at org.apache.hive.beeline.Commands.execute(Commands.java:1192)
        at org.apache.hive.beeline.Commands.sql(Commands.java:1106)
        at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1169)
        at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1003)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:915)
        at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:511)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:494)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: org.apache.hadoop.hive.ql.parse.ParseException: line 1:0 cannot recognize input near 'OK' '17' '/'
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:204)
        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:466)
        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1278)
        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1265)
        at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:186)
        ... 27 more
Error: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'OK' '17' '/' (state=42000,code=40000)

Announcements