Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error while running tHiveInput: Required field 'statement' is unset!

I am getting below exception while running tHiveInput. 

 

Exception in component tHiveInput_3
java.sql.SQLException: org.apache.thrift.protocol.TProtocolException: Required field 'statement' is unset! Struct:TExecuteStatementReq(sessionHandle:TSessionHandle(sessionId:THandleIdentifier(guid:0A 1E 83 20 4B 82 49 39 88 34 B6 51 61 17 CE CF, secret:DE D2 53 37 7B EC 40 7C 9C 67 11 3F 36 D2 5D DA)), statement:null, confOverlay:{}, runAsync:true, queryTimeout:0)
	at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:308)
	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:241)
	at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:437)
Caused by: org.apache.thrift.protocol.TProtocolException: Required field 'statement' is unset! Struct:TExecuteStatementReq(sessionHandle:TSessionHandle(sessionId:THandleIdentifier(guid:0A 1E 83 20 4B 82 49 39 88 34 B6 51 61 17 CE CF, secret:DE D2 53 37 7B EC 40 7C 9C 67 11 3F 36 D2 5D DA)), statement:null, confOverlay:{}, runAsync:true, queryTimeout:0)
	at org.apache.hive.service.cli.thrift.TExecuteStatementReq.validate(TExecuteStatementReq.java:633)
	at org.apache.hive.service.cli.thrift.TCLIService$ExecuteStatement_args.validate(TCLIService.java:5063)
	at org.apache.hive.service.cli.thrift.TCLIService$ExecuteStatement_args$ExecuteStatement_argsStandardScheme.write(TCLIService.java:5120)
	at org.apache.hive.service.cli.thrift.TCLIService$ExecuteStatement_args$ExecuteStatement_argsStandardScheme.write(TCLIService.java:5089)
	at org.apache.hive.service.cli.thrift.TCLIService$ExecuteStatement_args.write(TCLIService.java:5040)
	at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:71)
	at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
	at org.apache.hive.service.cli.thrift.TCLIService$Client.send_ExecuteStatement(TCLIService.java:223)
	at org.apache.hive.service.cli.thrift.TCLIService$Client.ExecuteStatement(TCLIService.java:215)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1374)
	at com.sun.proxy.$Proxy0.ExecuteStatement(Unknown Source)
	at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:299)
	... 5 more

I am using: 

Talend Open Studio for Big Data (7.0.1.20180411_1414)

OS: Windows 10 Pro

Hadoop Distribution: 

0683p000009M1B0.png

 

It was working fine for me till yesterday. Not sure what could be the issue ! Please help.

 

Note: I don't have winutils.exe running in my machine. 

 

CC: @xdshi

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Solved. Looks like problem with changing the component from tJavaRow to tJavaFlex. 

 

My desgin was

tFileInputDelimited -> tJavaRow -> tFlowToIterate -> tHiveInput -> tFileOutputDelmited

 

I was passing  ((String)globalMap.get("query")) as a value  to tHiveInput as per above flow. 

 

But as i have changed my design as below. 

 

tFileInputDelimited -> tFlowToIterate -> tJavaFlex -> tHiveInput -> tFileOutputDelimited

And I forgot to change ((String)globalMap.get("query")) to query in tHiveInput, so it didn't recognize the globalMap and was throwing this error. 

 

 

Now I have modified it to query and it is working fine now.

 

Thanks for the source code below, so that i was able to debug through "HiveStatement.java" to find the root cause of issue. 

 

https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hello,

Did you select the good distribuation version for your tHiveInput? Is this connection OK with you?

Best regards

Sabrina

Anonymous
Not applicable
Author

Yes. It was working fine till day-before-yesterday. Anything would've been changed on the server ?

Anonymous
Not applicable
Author

Solved. Looks like problem with changing the component from tJavaRow to tJavaFlex. 

 

My desgin was

tFileInputDelimited -> tJavaRow -> tFlowToIterate -> tHiveInput -> tFileOutputDelmited

 

I was passing  ((String)globalMap.get("query")) as a value  to tHiveInput as per above flow. 

 

But as i have changed my design as below. 

 

tFileInputDelimited -> tFlowToIterate -> tJavaFlex -> tHiveInput -> tFileOutputDelimited

And I forgot to change ((String)globalMap.get("query")) to query in tHiveInput, so it didn't recognize the globalMap and was throwing this error. 

 

 

Now I have modified it to query and it is working fine now.

 

Thanks for the source code below, so that i was able to debug through "HiveStatement.java" to find the root cause of issue. 

 

https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java