Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

hive interactive server (HSI) queries are failing with java null pointer exception[Error: Error while compiling statement: FAILED: NullPointerException null (state=42000,code=40000)]

avatar
Super Collaborator

Found the below exception in hiveserve2interactive.log :

018-10-23T11:59:59,592 ERROR [5bde2168-8b13-4637-b788-2b66ed960e43 HiveServer2-Handler-Pool: Thread-104]: ql.Driver (SessionState.java:printError(1247)) - FAILED: NullPointerException null java.lang.NullPointerException at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.checkResultsCache(SemanticAnalyzer.java:14849) at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12155) at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:330) at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:285) at org.apache.hadoop.h

2018-10-23T11:59:59,608 WARN [HiveServer2-Handler-Pool: Thread-104]: thrift.ThriftCLIService (ThriftCLIService.java:ExecuteStatement(571)) - Error executing statement: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: NullPointerException null at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:335) ~[hive-service-3.1.0.3.0.0.0-1634.jar:3.1.0.3.0.0.0-1634] at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:199) ~[hive-service-3.1.0.3.0.0.0-1634.jar:3.1.0.3.0.0.0-1634] at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:260) ~[hive-service-3.1.0.3.0.0.0-1634.jar:3.1.0.3.0.0.0-1634] at org.apache.hive.service.cli.operation.Operation.run(Operation.java:247) ~[hive-service-3.1.0.3.0.0.0-1634.jar:3.1.0.3.0.0.0-1634] at org.apache.hive.service.cli.session.HiveSe

Caused by: java.lang.NullPointerException at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.checkResultsCache(SemanticAnalyzer.java:14849) ~[hive-exec-3.1.0.3.0.0.0-1634.jar:3.1.0.3.0.0.0-1634] at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12155) ~[hive-exec-3.1.0.3.0.0.0-1634.jar:3.1.0.3.0.0.0-1634] at org.apache.hadoop.hive.ql.parse

2 REPLIES 2

avatar
Super Collaborator

Hive metric system not started due to /tmp/hive permission issue. we have given full permissions for /tmp/hive resolved the issue.

avatar
New Contributor

Just to clarify, we had this same issue and resolved it by recursively setting the permissions correctly on the folders below /tmp/hive in HDFS (not the filesystem of your Hive Server) and then restarting the Hive services in Ambari.

Generally the folders below /tmp/hive/ required 700, apart from "_resultscache_" which needed 733.