You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by nz...@apache.org on 2010/12/09 19:31:09 UTC
svn commit: r1044070 [29/29] - in /hive/trunk: ./ eclipse-templates/ ivy/
lib/ metastore/ metastore/if/ metastore/src/gen-cpp/
metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/
metastore/src/gen-php/ metastore/src/gen-py/hive_metastore/ ...
Added: hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive.py?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive.py (added)
+++ hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive.py Thu Dec 9 18:30:58 2010
@@ -0,0 +1,1363 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+from thrift.Thrift import *
+import hive_metastore.ThriftHiveMetastore
+from ttypes import *
+from thrift.Thrift import TProcessor
+from thrift.transport import TTransport
+from thrift.protocol import TBinaryProtocol, TProtocol
+try:
+ from thrift.protocol import fastbinary
+except:
+ fastbinary = None
+
+
+class Iface(hive_metastore.ThriftHiveMetastore.Iface):
+ def execute(self, query):
+ """
+ Parameters:
+ - query
+ """
+ pass
+
+ def fetchOne(self, ):
+ pass
+
+ def fetchN(self, numRows):
+ """
+ Parameters:
+ - numRows
+ """
+ pass
+
+ def fetchAll(self, ):
+ pass
+
+ def getSchema(self, ):
+ pass
+
+ def getThriftSchema(self, ):
+ pass
+
+ def getClusterStatus(self, ):
+ pass
+
+ def getQueryPlan(self, ):
+ pass
+
+
+class Client(hive_metastore.ThriftHiveMetastore.Client, Iface):
+ def __init__(self, iprot, oprot=None):
+ hive_metastore.ThriftHiveMetastore.Client.__init__(self, iprot, oprot)
+
+ def execute(self, query):
+ """
+ Parameters:
+ - query
+ """
+ self.send_execute(query)
+ self.recv_execute()
+
+ def send_execute(self, query):
+ self._oprot.writeMessageBegin('execute', TMessageType.CALL, self._seqid)
+ args = execute_args()
+ args.query = query
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_execute(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = execute_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.ex != None:
+ raise result.ex
+ return
+
+ def fetchOne(self, ):
+ self.send_fetchOne()
+ return self.recv_fetchOne()
+
+ def send_fetchOne(self, ):
+ self._oprot.writeMessageBegin('fetchOne', TMessageType.CALL, self._seqid)
+ args = fetchOne_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_fetchOne(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = fetchOne_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success != None:
+ return result.success
+ if result.ex != None:
+ raise result.ex
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchOne failed: unknown result");
+
+ def fetchN(self, numRows):
+ """
+ Parameters:
+ - numRows
+ """
+ self.send_fetchN(numRows)
+ return self.recv_fetchN()
+
+ def send_fetchN(self, numRows):
+ self._oprot.writeMessageBegin('fetchN', TMessageType.CALL, self._seqid)
+ args = fetchN_args()
+ args.numRows = numRows
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_fetchN(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = fetchN_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success != None:
+ return result.success
+ if result.ex != None:
+ raise result.ex
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchN failed: unknown result");
+
+ def fetchAll(self, ):
+ self.send_fetchAll()
+ return self.recv_fetchAll()
+
+ def send_fetchAll(self, ):
+ self._oprot.writeMessageBegin('fetchAll', TMessageType.CALL, self._seqid)
+ args = fetchAll_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_fetchAll(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = fetchAll_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success != None:
+ return result.success
+ if result.ex != None:
+ raise result.ex
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchAll failed: unknown result");
+
+ def getSchema(self, ):
+ self.send_getSchema()
+ return self.recv_getSchema()
+
+ def send_getSchema(self, ):
+ self._oprot.writeMessageBegin('getSchema', TMessageType.CALL, self._seqid)
+ args = getSchema_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getSchema(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = getSchema_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success != None:
+ return result.success
+ if result.ex != None:
+ raise result.ex
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getSchema failed: unknown result");
+
+ def getThriftSchema(self, ):
+ self.send_getThriftSchema()
+ return self.recv_getThriftSchema()
+
+ def send_getThriftSchema(self, ):
+ self._oprot.writeMessageBegin('getThriftSchema', TMessageType.CALL, self._seqid)
+ args = getThriftSchema_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getThriftSchema(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = getThriftSchema_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success != None:
+ return result.success
+ if result.ex != None:
+ raise result.ex
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getThriftSchema failed: unknown result");
+
+ def getClusterStatus(self, ):
+ self.send_getClusterStatus()
+ return self.recv_getClusterStatus()
+
+ def send_getClusterStatus(self, ):
+ self._oprot.writeMessageBegin('getClusterStatus', TMessageType.CALL, self._seqid)
+ args = getClusterStatus_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getClusterStatus(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = getClusterStatus_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success != None:
+ return result.success
+ if result.ex != None:
+ raise result.ex
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getClusterStatus failed: unknown result");
+
+ def getQueryPlan(self, ):
+ self.send_getQueryPlan()
+ return self.recv_getQueryPlan()
+
+ def send_getQueryPlan(self, ):
+ self._oprot.writeMessageBegin('getQueryPlan', TMessageType.CALL, self._seqid)
+ args = getQueryPlan_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getQueryPlan(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = getQueryPlan_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success != None:
+ return result.success
+ if result.ex != None:
+ raise result.ex
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getQueryPlan failed: unknown result");
+
+
+class Processor(hive_metastore.ThriftHiveMetastore.Processor, Iface, TProcessor):
+ def __init__(self, handler):
+ hive_metastore.ThriftHiveMetastore.Processor.__init__(self, handler)
+ self._processMap["execute"] = Processor.process_execute
+ self._processMap["fetchOne"] = Processor.process_fetchOne
+ self._processMap["fetchN"] = Processor.process_fetchN
+ self._processMap["fetchAll"] = Processor.process_fetchAll
+ self._processMap["getSchema"] = Processor.process_getSchema
+ self._processMap["getThriftSchema"] = Processor.process_getThriftSchema
+ self._processMap["getClusterStatus"] = Processor.process_getClusterStatus
+ self._processMap["getQueryPlan"] = Processor.process_getQueryPlan
+
+ def process(self, iprot, oprot):
+ (name, type, seqid) = iprot.readMessageBegin()
+ if name not in self._processMap:
+ iprot.skip(TType.STRUCT)
+ iprot.readMessageEnd()
+ x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
+ oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
+ x.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+ return
+ else:
+ self._processMap[name](self, seqid, iprot, oprot)
+ return True
+
+ def process_execute(self, seqid, iprot, oprot):
+ args = execute_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = execute_result()
+ try:
+ self._handler.execute(args.query)
+ except HiveServerException, ex:
+ result.ex = ex
+ oprot.writeMessageBegin("execute", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_fetchOne(self, seqid, iprot, oprot):
+ args = fetchOne_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = fetchOne_result()
+ try:
+ result.success = self._handler.fetchOne()
+ except HiveServerException, ex:
+ result.ex = ex
+ oprot.writeMessageBegin("fetchOne", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_fetchN(self, seqid, iprot, oprot):
+ args = fetchN_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = fetchN_result()
+ try:
+ result.success = self._handler.fetchN(args.numRows)
+ except HiveServerException, ex:
+ result.ex = ex
+ oprot.writeMessageBegin("fetchN", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_fetchAll(self, seqid, iprot, oprot):
+ args = fetchAll_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = fetchAll_result()
+ try:
+ result.success = self._handler.fetchAll()
+ except HiveServerException, ex:
+ result.ex = ex
+ oprot.writeMessageBegin("fetchAll", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getSchema(self, seqid, iprot, oprot):
+ args = getSchema_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getSchema_result()
+ try:
+ result.success = self._handler.getSchema()
+ except HiveServerException, ex:
+ result.ex = ex
+ oprot.writeMessageBegin("getSchema", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getThriftSchema(self, seqid, iprot, oprot):
+ args = getThriftSchema_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getThriftSchema_result()
+ try:
+ result.success = self._handler.getThriftSchema()
+ except HiveServerException, ex:
+ result.ex = ex
+ oprot.writeMessageBegin("getThriftSchema", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getClusterStatus(self, seqid, iprot, oprot):
+ args = getClusterStatus_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getClusterStatus_result()
+ try:
+ result.success = self._handler.getClusterStatus()
+ except HiveServerException, ex:
+ result.ex = ex
+ oprot.writeMessageBegin("getClusterStatus", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getQueryPlan(self, seqid, iprot, oprot):
+ args = getQueryPlan_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getQueryPlan_result()
+ try:
+ result.success = self._handler.getQueryPlan()
+ except HiveServerException, ex:
+ result.ex = ex
+ oprot.writeMessageBegin("getQueryPlan", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+
+# HELPER FUNCTIONS AND STRUCTURES
+
+class execute_args:
+ """
+ Attributes:
+ - query
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'query', None, None, ), # 1
+ )
+
+ def __init__(self, query=None,):
+ self.query = query
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.query = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('execute_args')
+ if self.query != None:
+ oprot.writeFieldBegin('query', TType.STRING, 1)
+ oprot.writeString(self.query)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class execute_result:
+ """
+ Attributes:
+ - ex
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, ex=None,):
+ self.ex = ex
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRUCT:
+ self.ex = HiveServerException()
+ self.ex.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('execute_result')
+ if self.ex != None:
+ oprot.writeFieldBegin('ex', TType.STRUCT, 1)
+ self.ex.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class fetchOne_args:
+
+ thrift_spec = (
+ )
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('fetchOne_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class fetchOne_result:
+ """
+ Attributes:
+ - success
+ - ex
+ """
+
+ thrift_spec = (
+ (0, TType.STRING, 'success', None, None, ), # 0
+ (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, ex=None,):
+ self.success = success
+ self.ex = ex
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRING:
+ self.success = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ex = HiveServerException()
+ self.ex.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('fetchOne_result')
+ if self.success != None:
+ oprot.writeFieldBegin('success', TType.STRING, 0)
+ oprot.writeString(self.success)
+ oprot.writeFieldEnd()
+ if self.ex != None:
+ oprot.writeFieldBegin('ex', TType.STRUCT, 1)
+ self.ex.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class fetchN_args:
+ """
+ Attributes:
+ - numRows
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I32, 'numRows', None, None, ), # 1
+ )
+
+ def __init__(self, numRows=None,):
+ self.numRows = numRows
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.I32:
+ self.numRows = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('fetchN_args')
+ if self.numRows != None:
+ oprot.writeFieldBegin('numRows', TType.I32, 1)
+ oprot.writeI32(self.numRows)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class fetchN_result:
+ """
+ Attributes:
+ - success
+ - ex
+ """
+
+ thrift_spec = (
+ (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
+ (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, ex=None,):
+ self.success = success
+ self.ex = ex
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.LIST:
+ self.success = []
+ (_etype3, _size0) = iprot.readListBegin()
+ for _i4 in xrange(_size0):
+ _elem5 = iprot.readString();
+ self.success.append(_elem5)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ex = HiveServerException()
+ self.ex.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('fetchN_result')
+ if self.success != None:
+ oprot.writeFieldBegin('success', TType.LIST, 0)
+ oprot.writeListBegin(TType.STRING, len(self.success))
+ for iter6 in self.success:
+ oprot.writeString(iter6)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ if self.ex != None:
+ oprot.writeFieldBegin('ex', TType.STRUCT, 1)
+ self.ex.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class fetchAll_args:
+
+ thrift_spec = (
+ )
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('fetchAll_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class fetchAll_result:
+ """
+ Attributes:
+ - success
+ - ex
+ """
+
+ thrift_spec = (
+ (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
+ (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, ex=None,):
+ self.success = success
+ self.ex = ex
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.LIST:
+ self.success = []
+ (_etype10, _size7) = iprot.readListBegin()
+ for _i11 in xrange(_size7):
+ _elem12 = iprot.readString();
+ self.success.append(_elem12)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ex = HiveServerException()
+ self.ex.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('fetchAll_result')
+ if self.success != None:
+ oprot.writeFieldBegin('success', TType.LIST, 0)
+ oprot.writeListBegin(TType.STRING, len(self.success))
+ for iter13 in self.success:
+ oprot.writeString(iter13)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ if self.ex != None:
+ oprot.writeFieldBegin('ex', TType.STRUCT, 1)
+ self.ex.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class getSchema_args:
+
+ thrift_spec = (
+ )
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getSchema_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class getSchema_result:
+ """
+ Attributes:
+ - success
+ - ex
+ """
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (hive_metastore.ttypes.Schema, hive_metastore.ttypes.Schema.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, ex=None,):
+ self.success = success
+ self.ex = ex
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRUCT:
+ self.success = hive_metastore.ttypes.Schema()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ex = HiveServerException()
+ self.ex.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getSchema_result')
+ if self.success != None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ex != None:
+ oprot.writeFieldBegin('ex', TType.STRUCT, 1)
+ self.ex.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class getThriftSchema_args:
+
+ thrift_spec = (
+ )
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getThriftSchema_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class getThriftSchema_result:
+ """
+ Attributes:
+ - success
+ - ex
+ """
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (hive_metastore.ttypes.Schema, hive_metastore.ttypes.Schema.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, ex=None,):
+ self.success = success
+ self.ex = ex
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRUCT:
+ self.success = hive_metastore.ttypes.Schema()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ex = HiveServerException()
+ self.ex.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getThriftSchema_result')
+ if self.success != None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ex != None:
+ oprot.writeFieldBegin('ex', TType.STRUCT, 1)
+ self.ex.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class getClusterStatus_args:
+
+ thrift_spec = (
+ )
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getClusterStatus_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class getClusterStatus_result:
+ """
+ Attributes:
+ - success
+ - ex
+ """
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (HiveClusterStatus, HiveClusterStatus.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, ex=None,):
+ self.success = success
+ self.ex = ex
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRUCT:
+ self.success = HiveClusterStatus()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ex = HiveServerException()
+ self.ex.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getClusterStatus_result')
+ if self.success != None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ex != None:
+ oprot.writeFieldBegin('ex', TType.STRUCT, 1)
+ self.ex.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class getQueryPlan_args:
+
+ thrift_spec = (
+ )
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getQueryPlan_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class getQueryPlan_result:
+ """
+ Attributes:
+ - success
+ - ex
+ """
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (queryplan.ttypes.QueryPlan, queryplan.ttypes.QueryPlan.thrift_spec), None, ), # 0
+ (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, ex=None,):
+ self.success = success
+ self.ex = ex
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRUCT:
+ self.success = queryplan.ttypes.QueryPlan()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.ex = HiveServerException()
+ self.ex.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getQueryPlan_result')
+ if self.success != None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ if self.ex != None:
+ oprot.writeFieldBegin('ex', TType.STRUCT, 1)
+ self.ex.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
Added: hive/trunk/service/src/gen/thrift/gen-py/hive_service/__init__.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/hive_service/__init__.py?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/hive_service/__init__.py (added)
+++ hive/trunk/service/src/gen/thrift/gen-py/hive_service/__init__.py Thu Dec 9 18:30:58 2010
@@ -0,0 +1 @@
+__all__ = ['ttypes', 'constants', 'ThriftHive']
Added: hive/trunk/service/src/gen/thrift/gen-py/hive_service/constants.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/hive_service/constants.py?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/hive_service/constants.py (added)
+++ hive/trunk/service/src/gen/thrift/gen-py/hive_service/constants.py Thu Dec 9 18:30:58 2010
@@ -0,0 +1,9 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+from thrift.Thrift import *
+from ttypes import *
+
Added: hive/trunk/service/src/gen/thrift/gen-py/hive_service/ttypes.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/hive_service/ttypes.py?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/hive_service/ttypes.py (added)
+++ hive/trunk/service/src/gen/thrift/gen-py/hive_service/ttypes.py Thu Dec 9 18:30:58 2010
@@ -0,0 +1,239 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+from thrift.Thrift import *
+import fb303.ttypes
+import hive_metastore.ttypes
+import queryplan.ttypes
+
+
+from thrift.transport import TTransport
+from thrift.protocol import TBinaryProtocol, TProtocol
+try:
+ from thrift.protocol import fastbinary
+except:
+ fastbinary = None
+
+
+class JobTrackerState:
+ INITIALIZING = 1
+ RUNNING = 2
+
+ _VALUES_TO_NAMES = {
+ 1: "INITIALIZING",
+ 2: "RUNNING",
+ }
+
+ _NAMES_TO_VALUES = {
+ "INITIALIZING": 1,
+ "RUNNING": 2,
+ }
+
+
+class HiveClusterStatus:
+ """
+ Attributes:
+ - taskTrackers
+ - mapTasks
+ - reduceTasks
+ - maxMapTasks
+ - maxReduceTasks
+ - state
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I32, 'taskTrackers', None, None, ), # 1
+ (2, TType.I32, 'mapTasks', None, None, ), # 2
+ (3, TType.I32, 'reduceTasks', None, None, ), # 3
+ (4, TType.I32, 'maxMapTasks', None, None, ), # 4
+ (5, TType.I32, 'maxReduceTasks', None, None, ), # 5
+ (6, TType.I32, 'state', None, None, ), # 6
+ )
+
+ def __init__(self, taskTrackers=None, mapTasks=None, reduceTasks=None, maxMapTasks=None, maxReduceTasks=None, state=None,):
+ self.taskTrackers = taskTrackers
+ self.mapTasks = mapTasks
+ self.reduceTasks = reduceTasks
+ self.maxMapTasks = maxMapTasks
+ self.maxReduceTasks = maxReduceTasks
+ self.state = state
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.I32:
+ self.taskTrackers = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I32:
+ self.mapTasks = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I32:
+ self.reduceTasks = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.I32:
+ self.maxMapTasks = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 5:
+ if ftype == TType.I32:
+ self.maxReduceTasks = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 6:
+ if ftype == TType.I32:
+ self.state = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('HiveClusterStatus')
+ if self.taskTrackers != None:
+ oprot.writeFieldBegin('taskTrackers', TType.I32, 1)
+ oprot.writeI32(self.taskTrackers)
+ oprot.writeFieldEnd()
+ if self.mapTasks != None:
+ oprot.writeFieldBegin('mapTasks', TType.I32, 2)
+ oprot.writeI32(self.mapTasks)
+ oprot.writeFieldEnd()
+ if self.reduceTasks != None:
+ oprot.writeFieldBegin('reduceTasks', TType.I32, 3)
+ oprot.writeI32(self.reduceTasks)
+ oprot.writeFieldEnd()
+ if self.maxMapTasks != None:
+ oprot.writeFieldBegin('maxMapTasks', TType.I32, 4)
+ oprot.writeI32(self.maxMapTasks)
+ oprot.writeFieldEnd()
+ if self.maxReduceTasks != None:
+ oprot.writeFieldBegin('maxReduceTasks', TType.I32, 5)
+ oprot.writeI32(self.maxReduceTasks)
+ oprot.writeFieldEnd()
+ if self.state != None:
+ oprot.writeFieldBegin('state', TType.I32, 6)
+ oprot.writeI32(self.state)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class HiveServerException(Exception):
+ """
+ Attributes:
+ - message
+ - errorCode
+ - SQLState
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'message', None, None, ), # 1
+ (2, TType.I32, 'errorCode', None, None, ), # 2
+ (3, TType.STRING, 'SQLState', None, None, ), # 3
+ )
+
+ def __init__(self, message=None, errorCode=None, SQLState=None,):
+ self.message = message
+ self.errorCode = errorCode
+ self.SQLState = SQLState
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.message = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I32:
+ self.errorCode = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRING:
+ self.SQLState = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('HiveServerException')
+ if self.message != None:
+ oprot.writeFieldBegin('message', TType.STRING, 1)
+ oprot.writeString(self.message)
+ oprot.writeFieldEnd()
+ if self.errorCode != None:
+ oprot.writeFieldBegin('errorCode', TType.I32, 2)
+ oprot.writeI32(self.errorCode)
+ oprot.writeFieldEnd()
+ if self.SQLState != None:
+ oprot.writeFieldBegin('SQLState', TType.STRING, 3)
+ oprot.writeString(self.SQLState)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+ def validate(self):
+ return
+
+
+ def __str__(self):
+ return repr(self)
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
Added: hive/trunk/service/src/gen/thrift/gen-rb/hive_service_constants.rb
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-rb/hive_service_constants.rb?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-rb/hive_service_constants.rb (added)
+++ hive/trunk/service/src/gen/thrift/gen-rb/hive_service_constants.rb Thu Dec 9 18:30:58 2010
@@ -0,0 +1,8 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+require 'hive_service_types'
+
Added: hive/trunk/service/src/gen/thrift/gen-rb/hive_service_types.rb
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-rb/hive_service_types.rb?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-rb/hive_service_types.rb (added)
+++ hive/trunk/service/src/gen/thrift/gen-rb/hive_service_types.rb Thu Dec 9 18:30:58 2010
@@ -0,0 +1,67 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+require 'fb303_types'
+require 'hive_metastore_types'
+require 'queryplan_types'
+
+
+module JobTrackerState
+ INITIALIZING = 1
+ RUNNING = 2
+ VALUE_MAP = {1 => "INITIALIZING", 2 => "RUNNING"}
+ VALID_VALUES = Set.new([INITIALIZING, RUNNING]).freeze
+end
+
+class HiveClusterStatus
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ TASKTRACKERS = 1
+ MAPTASKS = 2
+ REDUCETASKS = 3
+ MAXMAPTASKS = 4
+ MAXREDUCETASKS = 5
+ STATE = 6
+
+ FIELDS = {
+ TASKTRACKERS => {:type => ::Thrift::Types::I32, :name => 'taskTrackers'},
+ MAPTASKS => {:type => ::Thrift::Types::I32, :name => 'mapTasks'},
+ REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'},
+ MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'},
+ MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'},
+ STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => JobTrackerState}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ unless @state.nil? || JobTrackerState::VALID_VALUES.include?(@state)
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
+ end
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class HiveServerException < ::Thrift::Exception
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ MESSAGE = 1
+ ERRORCODE = 2
+ SQLSTATE = 3
+
+ FIELDS = {
+ MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'},
+ ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode'},
+ SQLSTATE => {:type => ::Thrift::Types::STRING, :name => 'SQLState'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
Added: hive/trunk/service/src/gen/thrift/gen-rb/thrift_hive.rb
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-rb/thrift_hive.rb?rev=1044070&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-rb/thrift_hive.rb (added)
+++ hive/trunk/service/src/gen/thrift/gen-rb/thrift_hive.rb Thu Dec 9 18:30:58 2010
@@ -0,0 +1,504 @@
+#
+# Autogenerated by Thrift
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+
+require 'thrift'
+require 'thrift_hive_metastore'
+require 'hive_service_types'
+
+module ThriftHive
+ class Client < ThriftHiveMetastore::Client
+ include ::Thrift::Client
+
+ def execute(query)
+ send_execute(query)
+ recv_execute()
+ end
+
+ def send_execute(query)
+ send_message('execute', Execute_args, :query => query)
+ end
+
+ def recv_execute()
+ result = receive_message(Execute_result)
+ raise result.ex unless result.ex.nil?
+ return
+ end
+
+ def fetchOne()
+ send_fetchOne()
+ return recv_fetchOne()
+ end
+
+ def send_fetchOne()
+ send_message('fetchOne', FetchOne_args)
+ end
+
+ def recv_fetchOne()
+ result = receive_message(FetchOne_result)
+ return result.success unless result.success.nil?
+ raise result.ex unless result.ex.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchOne failed: unknown result')
+ end
+
+ def fetchN(numRows)
+ send_fetchN(numRows)
+ return recv_fetchN()
+ end
+
+ def send_fetchN(numRows)
+ send_message('fetchN', FetchN_args, :numRows => numRows)
+ end
+
+ def recv_fetchN()
+ result = receive_message(FetchN_result)
+ return result.success unless result.success.nil?
+ raise result.ex unless result.ex.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchN failed: unknown result')
+ end
+
+ def fetchAll()
+ send_fetchAll()
+ return recv_fetchAll()
+ end
+
+ def send_fetchAll()
+ send_message('fetchAll', FetchAll_args)
+ end
+
+ def recv_fetchAll()
+ result = receive_message(FetchAll_result)
+ return result.success unless result.success.nil?
+ raise result.ex unless result.ex.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchAll failed: unknown result')
+ end
+
+ def getSchema()
+ send_getSchema()
+ return recv_getSchema()
+ end
+
+ def send_getSchema()
+ send_message('getSchema', GetSchema_args)
+ end
+
+ def recv_getSchema()
+ result = receive_message(GetSchema_result)
+ return result.success unless result.success.nil?
+ raise result.ex unless result.ex.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getSchema failed: unknown result')
+ end
+
+ def getThriftSchema()
+ send_getThriftSchema()
+ return recv_getThriftSchema()
+ end
+
+ def send_getThriftSchema()
+ send_message('getThriftSchema', GetThriftSchema_args)
+ end
+
+ def recv_getThriftSchema()
+ result = receive_message(GetThriftSchema_result)
+ return result.success unless result.success.nil?
+ raise result.ex unless result.ex.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getThriftSchema failed: unknown result')
+ end
+
+ def getClusterStatus()
+ send_getClusterStatus()
+ return recv_getClusterStatus()
+ end
+
+ def send_getClusterStatus()
+ send_message('getClusterStatus', GetClusterStatus_args)
+ end
+
+ def recv_getClusterStatus()
+ result = receive_message(GetClusterStatus_result)
+ return result.success unless result.success.nil?
+ raise result.ex unless result.ex.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getClusterStatus failed: unknown result')
+ end
+
+ def getQueryPlan()
+ send_getQueryPlan()
+ return recv_getQueryPlan()
+ end
+
+ def send_getQueryPlan()
+ send_message('getQueryPlan', GetQueryPlan_args)
+ end
+
+ def recv_getQueryPlan()
+ result = receive_message(GetQueryPlan_result)
+ return result.success unless result.success.nil?
+ raise result.ex unless result.ex.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getQueryPlan failed: unknown result')
+ end
+
+ end
+
+ class Processor < ThriftHiveMetastore::Processor
+ include ::Thrift::Processor
+
+ def process_execute(seqid, iprot, oprot)
+ args = read_args(iprot, Execute_args)
+ result = Execute_result.new()
+ begin
+ @handler.execute(args.query)
+ rescue HiveServerException => ex
+ result.ex = ex
+ end
+ write_result(result, oprot, 'execute', seqid)
+ end
+
+ def process_fetchOne(seqid, iprot, oprot)
+ args = read_args(iprot, FetchOne_args)
+ result = FetchOne_result.new()
+ begin
+ result.success = @handler.fetchOne()
+ rescue HiveServerException => ex
+ result.ex = ex
+ end
+ write_result(result, oprot, 'fetchOne', seqid)
+ end
+
+ def process_fetchN(seqid, iprot, oprot)
+ args = read_args(iprot, FetchN_args)
+ result = FetchN_result.new()
+ begin
+ result.success = @handler.fetchN(args.numRows)
+ rescue HiveServerException => ex
+ result.ex = ex
+ end
+ write_result(result, oprot, 'fetchN', seqid)
+ end
+
+ def process_fetchAll(seqid, iprot, oprot)
+ args = read_args(iprot, FetchAll_args)
+ result = FetchAll_result.new()
+ begin
+ result.success = @handler.fetchAll()
+ rescue HiveServerException => ex
+ result.ex = ex
+ end
+ write_result(result, oprot, 'fetchAll', seqid)
+ end
+
+ def process_getSchema(seqid, iprot, oprot)
+ args = read_args(iprot, GetSchema_args)
+ result = GetSchema_result.new()
+ begin
+ result.success = @handler.getSchema()
+ rescue HiveServerException => ex
+ result.ex = ex
+ end
+ write_result(result, oprot, 'getSchema', seqid)
+ end
+
+ def process_getThriftSchema(seqid, iprot, oprot)
+ args = read_args(iprot, GetThriftSchema_args)
+ result = GetThriftSchema_result.new()
+ begin
+ result.success = @handler.getThriftSchema()
+ rescue HiveServerException => ex
+ result.ex = ex
+ end
+ write_result(result, oprot, 'getThriftSchema', seqid)
+ end
+
+ def process_getClusterStatus(seqid, iprot, oprot)
+ args = read_args(iprot, GetClusterStatus_args)
+ result = GetClusterStatus_result.new()
+ begin
+ result.success = @handler.getClusterStatus()
+ rescue HiveServerException => ex
+ result.ex = ex
+ end
+ write_result(result, oprot, 'getClusterStatus', seqid)
+ end
+
+ def process_getQueryPlan(seqid, iprot, oprot)
+ args = read_args(iprot, GetQueryPlan_args)
+ result = GetQueryPlan_result.new()
+ begin
+ result.success = @handler.getQueryPlan()
+ rescue HiveServerException => ex
+ result.ex = ex
+ end
+ write_result(result, oprot, 'getQueryPlan', seqid)
+ end
+
+ end
+
+ # HELPER FUNCTIONS AND STRUCTURES
+
+ class Execute_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ QUERY = 1
+
+ FIELDS = {
+ QUERY => {:type => ::Thrift::Types::STRING, :name => 'query'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Execute_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ EX = 1
+
+ FIELDS = {
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class FetchOne_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class FetchOne_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ EX = 1
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class FetchN_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ NUMROWS = 1
+
+ FIELDS = {
+ NUMROWS => {:type => ::Thrift::Types::I32, :name => 'numRows'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class FetchN_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ EX = 1
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class FetchAll_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class FetchAll_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ EX = 1
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetSchema_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetSchema_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ EX = 1
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetThriftSchema_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetThriftSchema_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ EX = 1
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetClusterStatus_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetClusterStatus_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ EX = 1
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => HiveClusterStatus},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetQueryPlan_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+
+ FIELDS = {
+
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetQueryPlan_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ EX = 1
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => QueryPlan},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+end
+
Modified: hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java?rev=1044070&r1=1044069&r2=1044070&view=diff
==============================================================================
--- hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java (original)
+++ hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java Thu Dec 9 18:30:58 2010
@@ -22,6 +22,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import com.facebook.fb303.fb_status;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hive.conf.HiveConf;
@@ -145,7 +146,7 @@ public class HiveServer extends ThriftHi
JobTracker.State jbs = cs.getJobTrackerState();
// Convert the ClusterStatus to its Thrift equivalent: HiveClusterStatus
- int state;
+ JobTrackerState state;
switch (jbs) {
case INITIALIZING:
state = JobTrackerState.INITIALIZING;
@@ -321,8 +322,8 @@ public class HiveServer extends ThriftHi
* Return the status of the server.
*/
@Override
- public int getStatus() {
- return 0;
+ public fb_status getStatus() {
+ return fb_status.ALIVE;
}
/**