hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajkumar Singh <rkstech.j...@gmail.com>
Subject thrift.TApplicationException: Invalid method name: 'execute'
Date Mon, 09 Nov 2015 09:55:22 GMT
I am trying to get the query result from thrift api using a java program
which use thrifthive client to execute a query but I am getting exception

org.apache.thrift.TApplicationException: Invalid method name: 'execute'
at
org.apache.thrift.TApplicationException.read(TApplicationException.java:111)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
at
org.apache.hadoop.hive.service.ThriftHive$Client.recv_execute(ThriftHive.java:116)
at
org.apache.hadoop.hive.service.ThriftHive$Client.execute(ThriftHive.java:103)
at
com.rajkrrsingh.thrift.test.HiveThriftClientExample.main(HiveThriftClientExample.java:23)

this is the snippet of the program

      TSocket tSocket = new TSocket("hostname",10000);
TProtocol tProtocol = new TBinaryProtocol(tSocket);
Client client = new Client(tProtocol);
try {
tSocket.open();
System.out.println(tSocket.isOpen());
client.execute("use default");
client.execute("show tables");
List<String> rs = client.fetchAll();

Any Idea what going wrong here

Mime
View raw message