hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1455646 [22/25] - in /hive/trunk/service/src/gen/thrift: gen-cpp/ gen-javabean/org/apache/hive/ gen-javabean/org/apache/hive/service/ gen-javabean/org/apache/hive/service/cli/ gen-javabean/org/apache/hive/service/cli/thrift/ gen-php/ gen-p...
Date Tue, 12 Mar 2013 17:45:12 GMT
Added: hive/trunk/service/src/gen/thrift/gen-py/TCLIService/TCLIService-remote
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/TCLIService/TCLIService-remote?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/TCLIService/TCLIService-remote (added)
+++ hive/trunk/service/src/gen/thrift/gen-py/TCLIService/TCLIService-remote Tue Mar 12 17:45:10
2013
@@ -0,0 +1,193 @@
+#!/usr/bin/env python
+#
+# Autogenerated by Thrift Compiler (0.9.0)
+#
+# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+#
+#  options string: py
+#
+
+import sys
+import pprint
+from urlparse import urlparse
+from thrift.transport import TTransport
+from thrift.transport import TSocket
+from thrift.transport import THttpClient
+from thrift.protocol import TBinaryProtocol
+
+import TCLIService
+from ttypes import *
+
+if len(sys.argv) <= 1 or sys.argv[1] == '--help':
+  print ''
+  print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1
[arg2...]]'
+  print ''
+  print 'Functions:'
+  print '  TOpenSessionResp OpenSession(TOpenSessionReq req)'
+  print '  TCloseSessionResp CloseSession(TCloseSessionReq req)'
+  print '  TGetInfoResp GetInfo(TGetInfoReq req)'
+  print '  TExecuteStatementResp ExecuteStatement(TExecuteStatementReq req)'
+  print '  TGetTypeInfoResp GetTypeInfo(TGetTypeInfoReq req)'
+  print '  TGetCatalogsResp GetCatalogs(TGetCatalogsReq req)'
+  print '  TGetSchemasResp GetSchemas(TGetSchemasReq req)'
+  print '  TGetTablesResp GetTables(TGetTablesReq req)'
+  print '  TGetTableTypesResp GetTableTypes(TGetTableTypesReq req)'
+  print '  TGetColumnsResp GetColumns(TGetColumnsReq req)'
+  print '  TGetFunctionsResp GetFunctions(TGetFunctionsReq req)'
+  print '  TGetOperationStatusResp GetOperationStatus(TGetOperationStatusReq req)'
+  print '  TCancelOperationResp CancelOperation(TCancelOperationReq req)'
+  print '  TCloseOperationResp CloseOperation(TCloseOperationReq req)'
+  print '  TGetResultSetMetadataResp GetResultSetMetadata(TGetResultSetMetadataReq req)'
+  print '  TFetchResultsResp FetchResults(TFetchResultsReq req)'
+  print ''
+  sys.exit(0)
+
+pp = pprint.PrettyPrinter(indent = 2)
+host = 'localhost'
+port = 9090
+uri = ''
+framed = False
+http = False
+argi = 1
+
+if sys.argv[argi] == '-h':
+  parts = sys.argv[argi+1].split(':')
+  host = parts[0]
+  if len(parts) > 1:
+    port = int(parts[1])
+  argi += 2
+
+if sys.argv[argi] == '-u':
+  url = urlparse(sys.argv[argi+1])
+  parts = url[1].split(':')
+  host = parts[0]
+  if len(parts) > 1:
+    port = int(parts[1])
+  else:
+    port = 80
+  uri = url[2]
+  if url[4]:
+    uri += '?%s' % url[4]
+  http = True
+  argi += 2
+
+if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
+  framed = True
+  argi += 1
+
+cmd = sys.argv[argi]
+args = sys.argv[argi+1:]
+
+if http:
+  transport = THttpClient.THttpClient(host, port, uri)
+else:
+  socket = TSocket.TSocket(host, port)
+  if framed:
+    transport = TTransport.TFramedTransport(socket)
+  else:
+    transport = TTransport.TBufferedTransport(socket)
+protocol = TBinaryProtocol.TBinaryProtocol(transport)
+client = TCLIService.Client(protocol)
+transport.open()
+
+if cmd == 'OpenSession':
+  if len(args) != 1:
+    print 'OpenSession requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.OpenSession(eval(args[0]),))
+
+elif cmd == 'CloseSession':
+  if len(args) != 1:
+    print 'CloseSession requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.CloseSession(eval(args[0]),))
+
+elif cmd == 'GetInfo':
+  if len(args) != 1:
+    print 'GetInfo requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetInfo(eval(args[0]),))
+
+elif cmd == 'ExecuteStatement':
+  if len(args) != 1:
+    print 'ExecuteStatement requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.ExecuteStatement(eval(args[0]),))
+
+elif cmd == 'GetTypeInfo':
+  if len(args) != 1:
+    print 'GetTypeInfo requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetTypeInfo(eval(args[0]),))
+
+elif cmd == 'GetCatalogs':
+  if len(args) != 1:
+    print 'GetCatalogs requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetCatalogs(eval(args[0]),))
+
+elif cmd == 'GetSchemas':
+  if len(args) != 1:
+    print 'GetSchemas requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetSchemas(eval(args[0]),))
+
+elif cmd == 'GetTables':
+  if len(args) != 1:
+    print 'GetTables requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetTables(eval(args[0]),))
+
+elif cmd == 'GetTableTypes':
+  if len(args) != 1:
+    print 'GetTableTypes requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetTableTypes(eval(args[0]),))
+
+elif cmd == 'GetColumns':
+  if len(args) != 1:
+    print 'GetColumns requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetColumns(eval(args[0]),))
+
+elif cmd == 'GetFunctions':
+  if len(args) != 1:
+    print 'GetFunctions requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetFunctions(eval(args[0]),))
+
+elif cmd == 'GetOperationStatus':
+  if len(args) != 1:
+    print 'GetOperationStatus requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetOperationStatus(eval(args[0]),))
+
+elif cmd == 'CancelOperation':
+  if len(args) != 1:
+    print 'CancelOperation requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.CancelOperation(eval(args[0]),))
+
+elif cmd == 'CloseOperation':
+  if len(args) != 1:
+    print 'CloseOperation requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.CloseOperation(eval(args[0]),))
+
+elif cmd == 'GetResultSetMetadata':
+  if len(args) != 1:
+    print 'GetResultSetMetadata requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.GetResultSetMetadata(eval(args[0]),))
+
+elif cmd == 'FetchResults':
+  if len(args) != 1:
+    print 'FetchResults requires 1 args'
+    sys.exit(1)
+  pp.pprint(client.FetchResults(eval(args[0]),))
+
+else:
+  print 'Unrecognized method %s' % cmd
+  sys.exit(1)
+
+transport.close()



Mime
View raw message