http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java index 13e30db..051c1f2 100644 --- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -78,6 +78,8 @@ public class ThriftHiveMetastore { public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; + public void create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException; + public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context) throws NoSuchObjectException, MetaException, org.apache.thrift.TException; @@ -196,6 +198,10 @@ public class ThriftHiveMetastore { public List<String> get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, org.apache.thrift.TException; + public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + + public ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException; + public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; @@ -368,6 +374,8 @@ public class ThriftHiveMetastore { public void create_table_with_environment_context(Table tbl, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -486,6 +494,10 @@ public class ThriftHiveMetastore { public void get_index_names(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void get_primary_keys(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_foreign_keys(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -1172,6 +1184,40 @@ public class ThriftHiveMetastore { return; } + public void create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_create_table_with_constraints(tbl, primaryKeys, foreignKeys); + recv_create_table_with_constraints(); + } + + public void send_create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys) throws org.apache.thrift.TException + { + create_table_with_constraints_args args = new create_table_with_constraints_args(); + args.setTbl(tbl); + args.setPrimaryKeys(primaryKeys); + args.setForeignKeys(foreignKeys); + sendBase("create_table_with_constraints", args); + } + + public void recv_create_table_with_constraints() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException + { + create_table_with_constraints_result result = new create_table_with_constraints_result(); + receiveBase(result, "create_table_with_constraints"); + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + if (result.o4 != null) { + throw result.o4; + } + return; + } + public void drop_table(String dbname, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException { send_drop_table(dbname, name, deleteData); @@ -3018,6 +3064,64 @@ public class ThriftHiveMetastore { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); } + public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_primary_keys(request); + return recv_get_primary_keys(); + } + + public void send_get_primary_keys(PrimaryKeysRequest request) throws org.apache.thrift.TException + { + get_primary_keys_args args = new get_primary_keys_args(); + args.setRequest(request); + sendBase("get_primary_keys", args); + } + + public PrimaryKeysResponse recv_get_primary_keys() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_primary_keys_result result = new get_primary_keys_result(); + receiveBase(result, "get_primary_keys"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_primary_keys failed: unknown result"); + } + + public ForeignKeysResponse get_foreign_keys(ForeignKeysRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + send_get_foreign_keys(request); + return recv_get_foreign_keys(); + } + + public void send_get_foreign_keys(ForeignKeysRequest request) throws org.apache.thrift.TException + { + get_foreign_keys_args args = new get_foreign_keys_args(); + args.setRequest(request); + sendBase("get_foreign_keys", args); + } + + public ForeignKeysResponse recv_get_foreign_keys() throws MetaException, NoSuchObjectException, org.apache.thrift.TException + { + get_foreign_keys_result result = new get_foreign_keys_result(); + receiveBase(result, "get_foreign_keys"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_foreign_keys failed: unknown result"); + } + public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { send_update_table_column_statistics(stats_obj); @@ -5393,6 +5497,44 @@ public class ThriftHiveMetastore { } } + public void create_table_with_constraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + create_table_with_constraints_call method_call = new create_table_with_constraints_call(tbl, primaryKeys, foreignKeys, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class create_table_with_constraints_call extends org.apache.thrift.async.TAsyncMethodCall { + private Table tbl; + private List<SQLPrimaryKey> primaryKeys; + private List<SQLForeignKey> foreignKeys; + public create_table_with_constraints_call(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tbl = tbl; + this.primaryKeys = primaryKeys; + this.foreignKeys = foreignKeys; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_table_with_constraints", org.apache.thrift.protocol.TMessageType.CALL, 0)); + create_table_with_constraints_args args = new create_table_with_constraints_args(); + args.setTbl(tbl); + args.setPrimaryKeys(primaryKeys); + args.setForeignKeys(foreignKeys); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_create_table_with_constraints(); + } + } + public void drop_table(String dbname, String name, boolean deleteData, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); drop_table_call method_call = new drop_table_call(dbname, name, deleteData, resultHandler, this, ___protocolFactory, ___transport); @@ -7659,6 +7801,70 @@ public class ThriftHiveMetastore { } } + public void get_primary_keys(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_primary_keys_call method_call = new get_primary_keys_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_primary_keys_call extends org.apache.thrift.async.TAsyncMethodCall { + private PrimaryKeysRequest request; + public get_primary_keys_call(PrimaryKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_primary_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_primary_keys_args args = new get_primary_keys_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public PrimaryKeysResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_primary_keys(); + } + } + + public void get_foreign_keys(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_foreign_keys_call method_call = new get_foreign_keys_call(request, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_foreign_keys_call extends org.apache.thrift.async.TAsyncMethodCall { + private ForeignKeysRequest request; + public get_foreign_keys_call(ForeignKeysRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.request = request; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_foreign_keys", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_foreign_keys_args args = new get_foreign_keys_args(); + args.setRequest(request); + args.write(prot); + prot.writeMessageEnd(); + } + + public ForeignKeysResponse getResult() throws MetaException, NoSuchObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_foreign_keys(); + } + } + public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); update_table_column_statistics_call method_call = new update_table_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); @@ -9871,6 +10077,7 @@ public class ThriftHiveMetastore { processMap.put("get_schema_with_environment_context", new get_schema_with_environment_context()); processMap.put("create_table", new create_table()); processMap.put("create_table_with_environment_context", new create_table_with_environment_context()); + processMap.put("create_table_with_constraints", new create_table_with_constraints()); processMap.put("drop_table", new drop_table()); processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context()); processMap.put("get_tables", new get_tables()); @@ -9930,6 +10137,8 @@ public class ThriftHiveMetastore { processMap.put("get_index_by_name", new get_index_by_name()); processMap.put("get_indexes", new get_indexes()); processMap.put("get_index_names", new get_index_names()); + processMap.put("get_primary_keys", new get_primary_keys()); + processMap.put("get_foreign_keys", new get_foreign_keys()); processMap.put("update_table_column_statistics", new update_table_column_statistics()); processMap.put("update_partition_column_statistics", new update_partition_column_statistics()); processMap.put("get_table_column_statistics", new get_table_column_statistics()); @@ -10481,6 +10690,36 @@ public class ThriftHiveMetastore { } } + public static class create_table_with_constraints<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_table_with_constraints_args> { + public create_table_with_constraints() { + super("create_table_with_constraints"); + } + + public create_table_with_constraints_args getEmptyArgsInstance() { + return new create_table_with_constraints_args(); + } + + protected boolean isOneway() { + return false; + } + + public create_table_with_constraints_result getResult(I iface, create_table_with_constraints_args args) throws org.apache.thrift.TException { + create_table_with_constraints_result result = new create_table_with_constraints_result(); + try { + iface.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (NoSuchObjectException o4) { + result.o4 = o4; + } + return result; + } + } + public static class drop_table<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_table_args> { public drop_table() { super("drop_table"); @@ -12055,6 +12294,58 @@ public class ThriftHiveMetastore { } } + public static class get_primary_keys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_primary_keys_args> { + public get_primary_keys() { + super("get_primary_keys"); + } + + public get_primary_keys_args getEmptyArgsInstance() { + return new get_primary_keys_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_primary_keys_result getResult(I iface, get_primary_keys_args args) throws org.apache.thrift.TException { + get_primary_keys_result result = new get_primary_keys_result(); + try { + result.success = iface.get_primary_keys(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + + public static class get_foreign_keys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_foreign_keys_args> { + public get_foreign_keys() { + super("get_foreign_keys"); + } + + public get_foreign_keys_args getEmptyArgsInstance() { + return new get_foreign_keys_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_foreign_keys_result getResult(I iface, get_foreign_keys_args args) throws org.apache.thrift.TException { + get_foreign_keys_result result = new get_foreign_keys_result(); + try { + result.success = iface.get_foreign_keys(args.request); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } + return result; + } + } + public static class update_table_column_statistics<I extends Iface> extends org.apache.thrift.ProcessFunction<I, update_table_column_statistics_args> { public update_table_column_statistics() { super("update_table_column_statistics"); @@ -13672,6 +13963,7 @@ public class ThriftHiveMetastore { processMap.put("get_schema_with_environment_context", new get_schema_with_environment_context()); processMap.put("create_table", new create_table()); processMap.put("create_table_with_environment_context", new create_table_with_environment_context()); + processMap.put("create_table_with_constraints", new create_table_with_constraints()); processMap.put("drop_table", new drop_table()); processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context()); processMap.put("get_tables", new get_tables()); @@ -13731,6 +14023,8 @@ public class ThriftHiveMetastore { processMap.put("get_index_by_name", new get_index_by_name()); processMap.put("get_indexes", new get_indexes()); processMap.put("get_index_names", new get_index_names()); + processMap.put("get_primary_keys", new get_primary_keys()); + processMap.put("get_foreign_keys", new get_foreign_keys()); processMap.put("update_table_column_statistics", new update_table_column_statistics()); processMap.put("update_partition_column_statistics", new update_partition_column_statistics()); processMap.put("get_table_column_statistics", new get_table_column_statistics()); @@ -14942,6 +15236,77 @@ public class ThriftHiveMetastore { } } + public static class create_table_with_constraints<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_table_with_constraints_args, Void> { + public create_table_with_constraints() { + super("create_table_with_constraints"); + } + + public create_table_with_constraints_args getEmptyArgsInstance() { + return new create_table_with_constraints_args(); + } + + public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Void>() { + public void onComplete(Void o) { + create_table_with_constraints_result result = new create_table_with_constraints_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + create_table_with_constraints_result result = new create_table_with_constraints_result(); + if (e instanceof AlreadyExistsException) { + result.o1 = (AlreadyExistsException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof InvalidObjectException) { + result.o2 = (InvalidObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else if (e instanceof MetaException) { + result.o3 = (MetaException) e; + result.setO3IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o4 = (NoSuchObjectException) e; + result.setO4IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, create_table_with_constraints_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { + iface.create_table_with_constraints(args.tbl, args.primaryKeys, args.foreignKeys,resultHandler); + } + } + public static class drop_table<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_table_args, Void> { public drop_table() { super("drop_table"); @@ -18673,6 +19038,130 @@ public class ThriftHiveMetastore { } } + public static class get_primary_keys<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_primary_keys_args, PrimaryKeysResponse> { + public get_primary_keys() { + super("get_primary_keys"); + } + + public get_primary_keys_args getEmptyArgsInstance() { + return new get_primary_keys_args(); + } + + public AsyncMethodCallback<PrimaryKeysResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<PrimaryKeysResponse>() { + public void onComplete(PrimaryKeysResponse o) { + get_primary_keys_result result = new get_primary_keys_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_primary_keys_result result = new get_primary_keys_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_primary_keys_args args, org.apache.thrift.async.AsyncMethodCallback<PrimaryKeysResponse> resultHandler) throws TException { + iface.get_primary_keys(args.request,resultHandler); + } + } + + public static class get_foreign_keys<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_foreign_keys_args, ForeignKeysResponse> { + public get_foreign_keys() { + super("get_foreign_keys"); + } + + public get_foreign_keys_args getEmptyArgsInstance() { + return new get_foreign_keys_args(); + } + + public AsyncMethodCallback<ForeignKeysResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<ForeignKeysResponse>() { + public void onComplete(ForeignKeysResponse o) { + get_foreign_keys_result result = new get_foreign_keys_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + get_foreign_keys_result result = new get_foreign_keys_result(); + if (e instanceof MetaException) { + result.o1 = (MetaException) e; + result.setO1IsSet(true); + msg = result; + } + else if (e instanceof NoSuchObjectException) { + result.o2 = (NoSuchObjectException) e; + result.setO2IsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, get_foreign_keys_args args, org.apache.thrift.async.AsyncMethodCallback<ForeignKeysResponse> resultHandler) throws TException { + iface.get_foreign_keys(args.request,resultHandler); + } + } + public static class update_table_column_statistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, update_table_column_statistics_args, Boolean> { public update_table_column_statistics() { super("update_table_column_statistics"); @@ -27891,13 +28380,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list592 = iprot.readListBegin(); - struct.success = new ArrayList<String>(_list592.size); - String _elem593; - for (int _i594 = 0; _i594 < _list592.size; ++_i594) + org.apache.thrift.protocol.TList _list608 = iprot.readListBegin(); + struct.success = new ArrayList<String>(_list608.size); + String _elem609; + for (int _i610 = 0; _i610 < _list608.size; ++_i610) { - _elem593 = iprot.readString(); - struct.success.add(_elem593); + _elem609 = iprot.readString(); + struct.success.add(_elem609); } iprot.readListEnd(); } @@ -27932,9 +28421,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (String _iter595 : struct.success) + for (String _iter611 : struct.success) { - oprot.writeString(_iter595); + oprot.writeString(_iter611); } oprot.writeListEnd(); } @@ -27973,9 +28462,9 @@ public class ThriftHiveMetastore { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (String _iter596 : struct.success) + for (String _iter612 : struct.success) { - oprot.writeString(_iter596); + oprot.writeString(_iter612); } } } @@ -27990,13 +28479,13 @@ public class ThriftHiveMetastore { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list597 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList<String>(_list597.size); - String _elem598; - for (int _i599 = 0; _i599 < _list597.size; ++_i599) + org.apache.thrift.protocol.TList _list613 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList<String>(_list613.size); + String _elem614; + for (int _i615 = 0; _i615 < _list613.size; ++_i615) { - _elem598 = iprot.readString(); - struct.success.add(_elem598); + _elem614 = iprot.readString(); + struct.success.add(_elem614); } } struct.setSuccessIsSet(true); @@ -28650,13 +29139,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list600 = iprot.readListBegin(); - struct.success = new ArrayList<String>(_list600.size); - String _elem601; - for (int _i602 = 0; _i602 < _list600.size; ++_i602) + org.apache.thrift.protocol.TList _list616 = iprot.readListBegin(); + struct.success = new ArrayList<String>(_list616.size); + String _elem617; + for (int _i618 = 0; _i618 < _list616.size; ++_i618) { - _elem601 = iprot.readString(); - struct.success.add(_elem601); + _elem617 = iprot.readString(); + struct.success.add(_elem617); } iprot.readListEnd(); } @@ -28691,9 +29180,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (String _iter603 : struct.success) + for (String _iter619 : struct.success) { - oprot.writeString(_iter603); + oprot.writeString(_iter619); } oprot.writeListEnd(); } @@ -28732,9 +29221,9 @@ public class ThriftHiveMetastore { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (String _iter604 : struct.success) + for (String _iter620 : struct.success) { - oprot.writeString(_iter604); + oprot.writeString(_iter620); } } } @@ -28749,13 +29238,13 @@ public class ThriftHiveMetastore { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list605 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList<String>(_list605.size); - String _elem606; - for (int _i607 = 0; _i607 < _list605.size; ++_i607) + org.apache.thrift.protocol.TList _list621 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList<String>(_list621.size); + String _elem622; + for (int _i623 = 0; _i623 < _list621.size; ++_i623) { - _elem606 = iprot.readString(); - struct.success.add(_elem606); + _elem622 = iprot.readString(); + struct.success.add(_elem622); } } struct.setSuccessIsSet(true); @@ -33362,16 +33851,16 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map608 = iprot.readMapBegin(); - struct.success = new HashMap<String,Type>(2*_map608.size); - String _key609; - Type _val610; - for (int _i611 = 0; _i611 < _map608.size; ++_i611) + org.apache.thrift.protocol.TMap _map624 = iprot.readMapBegin(); + struct.success = new HashMap<String,Type>(2*_map624.size); + String _key625; + Type _val626; + for (int _i627 = 0; _i627 < _map624.size; ++_i627) { - _key609 = iprot.readString(); - _val610 = new Type(); - _val610.read(iprot); - struct.success.put(_key609, _val610); + _key625 = iprot.readString(); + _val626 = new Type(); + _val626.read(iprot); + struct.success.put(_key625, _val626); } iprot.readMapEnd(); } @@ -33406,10 +33895,10 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Map.Entry<String, Type> _iter612 : struct.success.entrySet()) + for (Map.Entry<String, Type> _iter628 : struct.success.entrySet()) { - oprot.writeString(_iter612.getKey()); - _iter612.getValue().write(oprot); + oprot.writeString(_iter628.getKey()); + _iter628.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -33448,10 +33937,10 @@ public class ThriftHiveMetastore { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry<String, Type> _iter613 : struct.success.entrySet()) + for (Map.Entry<String, Type> _iter629 : struct.success.entrySet()) { - oprot.writeString(_iter613.getKey()); - _iter613.getValue().write(oprot); + oprot.writeString(_iter629.getKey()); + _iter629.getValue().write(oprot); } } } @@ -33466,16 +33955,16 @@ public class ThriftHiveMetastore { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map614 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new HashMap<String,Type>(2*_map614.size); - String _key615; - Type _val616; - for (int _i617 = 0; _i617 < _map614.size; ++_i617) + org.apache.thrift.protocol.TMap _map630 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap<String,Type>(2*_map630.size); + String _key631; + Type _val632; + for (int _i633 = 0; _i633 < _map630.size; ++_i633) { - _key615 = iprot.readString(); - _val616 = new Type(); - _val616.read(iprot); - struct.success.put(_key615, _val616); + _key631 = iprot.readString(); + _val632 = new Type(); + _val632.read(iprot); + struct.success.put(_key631, _val632); } } struct.setSuccessIsSet(true); @@ -34510,14 +34999,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list618 = iprot.readListBegin(); - struct.success = new ArrayList<FieldSchema>(_list618.size); - FieldSchema _elem619; - for (int _i620 = 0; _i620 < _list618.size; ++_i620) + org.apache.thrift.protocol.TList _list634 = iprot.readListBegin(); + struct.success = new ArrayList<FieldSchema>(_list634.size); + FieldSchema _elem635; + for (int _i636 = 0; _i636 < _list634.size; ++_i636) { - _elem619 = new FieldSchema(); - _elem619.read(iprot); - struct.success.add(_elem619); + _elem635 = new FieldSchema(); + _elem635.read(iprot); + struct.success.add(_elem635); } iprot.readListEnd(); } @@ -34570,9 +35059,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (FieldSchema _iter621 : struct.success) + for (FieldSchema _iter637 : struct.success) { - _iter621.write(oprot); + _iter637.write(oprot); } oprot.writeListEnd(); } @@ -34627,9 +35116,9 @@ public class ThriftHiveMetastore { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (FieldSchema _iter622 : struct.success) + for (FieldSchema _iter638 : struct.success) { - _iter622.write(oprot); + _iter638.write(oprot); } } } @@ -34650,14 +35139,14 @@ public class ThriftHiveMetastore { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list623 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<FieldSchema>(_list623.size); - FieldSchema _elem624; - for (int _i625 = 0; _i625 < _list623.size; ++_i625) + org.apache.thrift.protocol.TList _list639 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<FieldSchema>(_list639.size); + FieldSchema _elem640; + for (int _i641 = 0; _i641 < _list639.size; ++_i641) { - _elem624 = new FieldSchema(); - _elem624.read(iprot); - struct.success.add(_elem624); + _elem640 = new FieldSchema(); + _elem640.read(iprot); + struct.success.add(_elem640); } } struct.setSuccessIsSet(true); @@ -35811,14 +36300,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list626 = iprot.readListBegin(); - struct.success = new ArrayList<FieldSchema>(_list626.size); - FieldSchema _elem627; - for (int _i628 = 0; _i628 < _list626.size; ++_i628) + org.apache.thrift.protocol.TList _list642 = iprot.readListBegin(); + struct.success = new ArrayList<FieldSchema>(_list642.size); + FieldSchema _elem643; + for (int _i644 = 0; _i644 < _list642.size; ++_i644) { - _elem627 = new FieldSchema(); - _elem627.read(iprot); - struct.success.add(_elem627); + _elem643 = new FieldSchema(); + _elem643.read(iprot); + struct.success.add(_elem643); } iprot.readListEnd(); } @@ -35871,9 +36360,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (FieldSchema _iter629 : struct.success) + for (FieldSchema _iter645 : struct.success) { - _iter629.write(oprot); + _iter645.write(oprot); } oprot.writeListEnd(); } @@ -35928,9 +36417,9 @@ public class ThriftHiveMetastore { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (FieldSchema _iter630 : struct.success) + for (FieldSchema _iter646 : struct.success) { - _iter630.write(oprot); + _iter646.write(oprot); } } } @@ -35951,14 +36440,14 @@ public class ThriftHiveMetastore { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list631 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<FieldSchema>(_list631.size); - FieldSchema _elem632; - for (int _i633 = 0; _i633 < _list631.size; ++_i633) + org.apache.thrift.protocol.TList _list647 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<FieldSchema>(_list647.size); + FieldSchema _elem648; + for (int _i649 = 0; _i649 < _list647.size; ++_i649) { - _elem632 = new FieldSchema(); - _elem632.read(iprot); - struct.success.add(_elem632); + _elem648 = new FieldSchema(); + _elem648.read(iprot); + struct.success.add(_elem648); } } struct.setSuccessIsSet(true); @@ -37003,14 +37492,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list634 = iprot.readListBegin(); - struct.success = new ArrayList<FieldSchema>(_list634.size); - FieldSchema _elem635; - for (int _i636 = 0; _i636 < _list634.size; ++_i636) + org.apache.thrift.protocol.TList _list650 = iprot.readListBegin(); + struct.success = new ArrayList<FieldSchema>(_list650.size); + FieldSchema _elem651; + for (int _i652 = 0; _i652 < _list650.size; ++_i652) { - _elem635 = new FieldSchema(); - _elem635.read(iprot); - struct.success.add(_elem635); + _elem651 = new FieldSchema(); + _elem651.read(iprot); + struct.success.add(_elem651); } iprot.readListEnd(); } @@ -37063,9 +37552,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (FieldSchema _iter637 : struct.success) + for (FieldSchema _iter653 : struct.success) { - _iter637.write(oprot); + _iter653.write(oprot); } oprot.writeListEnd(); } @@ -37120,9 +37609,9 @@ public class ThriftHiveMetastore { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (FieldSchema _iter638 : struct.success) + for (FieldSchema _iter654 : struct.success) { - _iter638.write(oprot); + _iter654.write(oprot); } } } @@ -37143,14 +37632,14 @@ public class ThriftHiveMetastore { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list639 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<FieldSchema>(_list639.size); - FieldSchema _elem640; - for (int _i641 = 0; _i641 < _list639.size; ++_i641) + org.apache.thrift.protocol.TList _list655 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<FieldSchema>(_list655.size); + FieldSchema _elem656; + for (int _i657 = 0; _i657 < _list655.size; ++_i657) { - _elem640 = new FieldSchema(); - _elem640.read(iprot); - struct.success.add(_elem640); + _elem656 = new FieldSchema(); + _elem656.read(iprot); + struct.success.add(_elem656); } } struct.setSuccessIsSet(true); @@ -38304,14 +38793,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list642 = iprot.readListBegin(); - struct.success = new ArrayList<FieldSchema>(_list642.size); - FieldSchema _elem643; - for (int _i644 = 0; _i644 < _list642.size; ++_i644) + org.apache.thrift.protocol.TList _list658 = iprot.readListBegin(); + struct.success = new ArrayList<FieldSchema>(_list658.size); + FieldSchema _elem659; + for (int _i660 = 0; _i660 < _list658.size; ++_i660) { - _elem643 = new FieldSchema(); - _elem643.read(iprot); - struct.success.add(_elem643); + _elem659 = new FieldSchema(); + _elem659.read(iprot); + struct.success.add(_elem659); } iprot.readListEnd(); } @@ -38364,9 +38853,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (FieldSchema _iter645 : struct.success) + for (FieldSchema _iter661 : struct.success) { - _iter645.write(oprot); + _iter661.write(oprot); } oprot.writeListEnd(); } @@ -38421,9 +38910,9 @@ public class ThriftHiveMetastore { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (FieldSchema _iter646 : struct.success) + for (FieldSchema _iter662 : struct.success) { - _iter646.write(oprot); + _iter662.write(oprot); } } } @@ -38444,14 +38933,14 @@ public class ThriftHiveMetastore { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list647 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<FieldSchema>(_list647.size); - FieldSchema _elem648; - for (int _i649 = 0; _i649 < _list647.size; ++_i649) + org.apache.thrift.protocol.TList _list663 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<FieldSchema>(_list663.size); + FieldSchema _elem664; + for (int _i665 = 0; _i665 < _list663.size; ++_i665) { - _elem648 = new FieldSchema(); - _elem648.read(iprot); - struct.success.add(_elem648); + _elem664 = new FieldSchema(); + _elem664.read(iprot); + struct.success.add(_elem664); } } struct.setSuccessIsSet(true); @@ -40667,28 +41156,28 @@ public class ThriftHiveMetastore { } - public static class drop_table_args implements org.apache.thrift.TBase<drop_table_args, drop_table_args._Fields>, java.io.Serializable, Cloneable, Comparable<drop_table_args> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_args"); + public static class create_table_with_constraints_args implements org.apache.thrift.TBase<create_table_with_constraints_args, create_table_with_constraints_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_with_constraints_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_constraints_args"); - private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField PRIMARY_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("primaryKeys", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField FOREIGN_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeys", org.apache.thrift.protocol.TType.LIST, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new drop_table_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_table_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new create_table_with_constraints_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new create_table_with_constraints_argsTupleSchemeFactory()); } - private String dbname; // required - private String name; // required - private boolean deleteData; // required + private Table tbl; // required + private List<SQLPrimaryKey> primaryKeys; // required + private List<SQLForeignKey> foreignKeys; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DBNAME((short)1, "dbname"), - NAME((short)2, "name"), - DELETE_DATA((short)3, "deleteData"); + TBL((short)1, "tbl"), + PRIMARY_KEYS((short)2, "primaryKeys"), + FOREIGN_KEYS((short)3, "foreignKeys"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -40703,12 +41192,12 @@ public class ThriftHiveMetastore { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // NAME - return NAME; - case 3: // DELETE_DATA - return DELETE_DATA; + case 1: // TBL + return TBL; + case 2: // PRIMARY_KEYS + return PRIMARY_KEYS; + case 3: // FOREIGN_KEYS + return FOREIGN_KEYS; default: return null; } @@ -40749,153 +41238,191 @@ public class ThriftHiveMetastore { } // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class))); + tmpMap.put(_Fields.PRIMARY_KEYS, new org.apache.thrift.meta_data.FieldMetaData("primaryKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLPrimaryKey.class)))); + tmpMap.put(_Fields.FOREIGN_KEYS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeys", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLForeignKey.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_table_with_constraints_args.class, metaDataMap); } - public drop_table_args() { + public create_table_with_constraints_args() { } - public drop_table_args( - String dbname, - String name, - boolean deleteData) + public create_table_with_constraints_args( + Table tbl, + List<SQLPrimaryKey> primaryKeys, + List<SQLForeignKey> foreignKeys) { this(); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.tbl = tbl; + this.primaryKeys = primaryKeys; + this.foreignKeys = foreignKeys; } /** * Performs a deep copy on <i>other</i>. */ - public drop_table_args(drop_table_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetDbname()) { - this.dbname = other.dbname; + public create_table_with_constraints_args(create_table_with_constraints_args other) { + if (other.isSetTbl()) { + this.tbl = new Table(other.tbl); } - if (other.isSetName()) { - this.name = other.name; + if (other.isSetPrimaryKeys()) { + List<SQLPrimaryKey> __this__primaryKeys = new ArrayList<SQLPrimaryKey>(other.primaryKeys.size()); + for (SQLPrimaryKey other_element : other.primaryKeys) { + __this__primaryKeys.add(new SQLPrimaryKey(other_element)); + } + this.primaryKeys = __this__primaryKeys; + } + if (other.isSetForeignKeys()) { + List<SQLForeignKey> __this__foreignKeys = new ArrayList<SQLForeignKey>(other.foreignKeys.size()); + for (SQLForeignKey other_element : other.foreignKeys) { + __this__foreignKeys.add(new SQLForeignKey(other_element)); + } + this.foreignKeys = __this__foreignKeys; } - this.deleteData = other.deleteData; } - public drop_table_args deepCopy() { - return new drop_table_args(this); + public create_table_with_constraints_args deepCopy() { + return new create_table_with_constraints_args(this); } @Override public void clear() { - this.dbname = null; - this.name = null; - setDeleteDataIsSet(false); - this.deleteData = false; + this.tbl = null; + this.primaryKeys = null; + this.foreignKeys = null; } - public String getDbname() { - return this.dbname; + public Table getTbl() { + return this.tbl; } - public void setDbname(String dbname) { - this.dbname = dbname; + public void setTbl(Table tbl) { + this.tbl = tbl; } - public void unsetDbname() { - this.dbname = null; + public void unsetTbl() { + this.tbl = null; } - /** Returns true if field dbname is set (has been assigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; + /** Returns true if field tbl is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl() { + return this.tbl != null; } - public void setDbnameIsSet(boolean value) { + public void setTblIsSet(boolean value) { if (!value) { - this.dbname = null; + this.tbl = null; } } - public String getName() { - return this.name; + public int getPrimaryKeysSize() { + return (this.primaryKeys == null) ? 0 : this.primaryKeys.size(); } - public void setName(String name) { - this.name = name; + public java.util.Iterator<SQLPrimaryKey> getPrimaryKeysIterator() { + return (this.primaryKeys == null) ? null : this.primaryKeys.iterator(); } - public void unsetName() { - this.name = null; + public void addToPrimaryKeys(SQLPrimaryKey elem) { + if (this.primaryKeys == null) { + this.primaryKeys = new ArrayList<SQLPrimaryKey>(); + } + this.primaryKeys.add(elem); } - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; + public List<SQLPrimaryKey> getPrimaryKeys() { + return this.primaryKeys; } - public void setNameIsSet(boolean value) { + public void setPrimaryKeys(List<SQLPrimaryKey> primaryKeys) { + this.primaryKeys = primaryKeys; + } + + public void unsetPrimaryKeys() { + this.primaryKeys = null; + } + + /** Returns true if field primaryKeys is set (has been assigned a value) and false otherwise */ + public boolean isSetPrimaryKeys() { + return this.primaryKeys != null; + } + + public void setPrimaryKeysIsSet(boolean value) { if (!value) { - this.name = null; + this.primaryKeys = null; } } - public boolean isDeleteData() { - return this.deleteData; + public int getForeignKeysSize() { + return (this.foreignKeys == null) ? 0 : this.foreignKeys.size(); } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); + public java.util.Iterator<SQLForeignKey> getForeignKeysIterator() { + return (this.foreignKeys == null) ? null : this.foreignKeys.iterator(); } - public void unsetDeleteData() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + public void addToForeignKeys(SQLForeignKey elem) { + if (this.foreignKeys == null) { + this.foreignKeys = new ArrayList<SQLForeignKey>(); + } + this.foreignKeys.add(elem); } - /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ - public boolean isSetDeleteData() { - return EncodingUtils.testBit(__isset_bitfield, __DELETEDATA_ISSET_ID); + public List<SQLForeignKey> getForeignKeys() { + return this.foreignKeys; } - public void setDeleteDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETEDATA_ISSET_ID, value); + public void setForeignKeys(List<SQLForeignKey> foreignKeys) { + this.foreignKeys = foreignKeys; + } + + public void unsetForeignKeys() { + this.foreignKeys = null; + } + + /** Returns true if field foreignKeys is set (has been assigned a value) and false otherwise */ + public boolean isSetForeignKeys() { + return this.foreignKeys != null; + } + + public void setForeignKeysIsSet(boolean value) { + if (!value) { + this.foreignKeys = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DBNAME: + case TBL: if (value == null) { - unsetDbname(); + unsetTbl(); } else { - setDbname((String)value); + setTbl((Table)value); } break; - case NAME: + case PRIMARY_KEYS: if (value == null) { - unsetName(); + unsetPrimaryKeys(); } else { - setName((String)value); + setPrimaryKeys((List<SQLPrimaryKey>)value); } break; - case DELETE_DATA: + case FOREIGN_KEYS: if (value == null) { - unsetDeleteData(); + unsetForeignKeys(); } else { - setDeleteData((Boolean)value); + setForeignKeys((List<SQLForeignKey>)value); } break; @@ -40904,14 +41431,14 @@ public class ThriftHiveMetastore { public Object getFieldValue(_Fields field) { switch (field) { - case DBNAME: - return getDbname(); + case TBL: + return getTbl(); - case NAME: - return getName(); + case PRIMARY_KEYS: + return getPrimaryKeys(); - case DELETE_DATA: - return isDeleteData(); + case FOREIGN_KEYS: + return getForeignKeys(); } throw new IllegalStateException(); @@ -40924,12 +41451,12 @@ public class ThriftHiveMetastore { } switch (field) { - case DBNAME: - return isSetDbname(); - case NAME: - return isSetName(); - case DELETE_DATA: - return isSetDeleteData(); + case TBL: + return isSetTbl(); + case PRIMARY_KEYS: + return isSetPrimaryKeys(); + case FOREIGN_KEYS: + return isSetForeignKeys(); } throw new IllegalStateException(); } @@ -40938,39 +41465,39 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_table_args) - return this.equals((drop_table_args)that); + if (that instanceof create_table_with_constraints_args) + return this.equals((create_table_with_constraints_args)that); return false; } - public boolean equals(drop_table_args that) { + public boolean equals(create_table_with_constraints_args that) { if (that == null) return false; - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) + boolean this_present_tbl = true && this.isSetTbl(); + boolean that_present_tbl = true && that.isSetTbl(); + if (this_present_tbl || that_present_tbl) { + if (!(this_present_tbl && that_present_tbl)) return false; - if (!this.dbname.equals(that.dbname)) + if (!this.tbl.equals(that.tbl)) return false; } - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + boolean this_present_primaryKeys = true && this.isSetPrimaryKeys(); + boolean that_present_primaryKeys = true && that.isSetPrimaryKeys(); + if (this_present_primaryKeys || that_present_primaryKeys) { + if (!(this_present_primaryKeys && that_present_primaryKeys)) return false; - if (!this.name.equals(that.name)) + if (!this.primaryKeys.equals(that.primaryKeys)) return false; } - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + boolean this_present_foreignKeys = true && this.isSetForeignKeys(); + boolean that_present_foreignKeys = true && that.isSetForeignKeys(); + if (this_present_foreignKeys || that_present_foreignKeys) { + if (!(this_present_foreignKeys && that_present_foreignKeys)) return false; - if (this.deleteData != that.deleteData) + if (!this.foreignKeys.equals(that.foreignKeys)) return false; } @@ -40981,58 +41508,58 @@ public class ThriftHiveMetastore { public int hashCode() { List<Object> list = new ArrayList<Object>(); - boolean present_dbname = true && (isSetDbname()); - list.add(present_dbname); - if (present_dbname) - list.add(dbname); + boolean present_tbl = true && (isSetTbl()); + list.add(present_tbl); + if (present_tbl) + list.add(tbl); - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); + boolean present_primaryKeys = true && (isSetPrimaryKeys()); + list.add(present_primaryKeys); + if (present_primaryKeys) + list.add(primaryKeys); - boolean present_deleteData = true; - list.add(present_deleteData); - if (present_deleteData) - list.add(deleteData); + boolean present_foreignKeys = true && (isSetForeignKeys()); + list.add(present_foreignKeys); + if (present_foreignKeys) + list.add(foreignKeys); return list.hashCode(); } @Override - public int compareTo(drop_table_args other) { + public int compareTo(create_table_with_constraints_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname()); + lastComparison = Boolean.valueOf(isSetTbl()).compareTo(other.isSetTbl()); if (lastComparison != 0) { return lastComparison; } - if (isSetDbname()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname); + if (isSetTbl()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + lastComparison = Boolean.valueOf(isSetPrimaryKeys()).compareTo(other.isSetPrimaryKeys()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (isSetPrimaryKeys()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.primaryKeys, other.primaryKeys); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(other.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetForeignKeys()).compareTo(other.isSetForeignKeys()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, other.deleteData); + if (isSetForeignKeys()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeys, other.foreignKeys); if (lastComparison != 0) { return lastComparison; } @@ -41054,27 +41581,31 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_table_args("); + StringBuilder sb = new StringBuilder("create_table_with_constraints_args("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { + sb.append("tbl:"); + if (this.tbl == null) { sb.append("null"); } else { - sb.append(this.dbname); + sb.append(this.tbl); } first = false; if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { + sb.append("primaryKeys:"); + if (this.primaryKeys == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.primaryKeys); } first = false; if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); + sb.append("foreignKeys:"); + if (this.foreignKeys == null) { + sb.append("null"); + } else { + sb.append(this.foreignKeys); + } first = false; sb.append(")"); return sb.toString(); @@ -41083,6 +41614,9 @@ public class ThriftHiveMetastore { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (tbl != null) { + tbl.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -41095,23 +41629,21 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class drop_table_argsStandardSchemeFactory implements SchemeFactory { - public drop_table_argsStandardScheme getScheme() { - return new drop_table_argsStandardScheme(); + private static class create_table_with_constraints_argsStandardSchemeFactory implements SchemeFactory { + public create_table_with_constraints_argsStandardScheme getScheme() { + return new create_table_with_constraints_argsStandardScheme(); } } - private static class drop_table_argsStandardScheme extends StandardScheme<drop_table_args> { + private static class create_table_with_constraints_argsStandardScheme extends StandardScheme<create_table_with_constraints_args> { - public void read(org.apache.thrift.protocol.TProtocol iprot, drop_table_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -41121,26 +41653,49 @@ public class ThriftHiveMetastore { break; } switch (schemeField.id) { - case 1: // DBNAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.dbname = iprot.readString(); - struct.setDbnameIsSet(true); + case 1: // TBL + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); + case 2: // PRIMARY_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list666 = iprot.readListBegin(); + struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list666.size); + SQLPrimaryKey _elem667; + for (int _i668 = 0; _i668 < _list666.size; ++_i668) + { + _elem667 = new SQLPrimaryKey(); + _elem667.read(iprot); + struct.primaryKeys.add(_elem667); + } + iprot.readListEnd(); + } + struct.setPrimaryKeysIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // DELETE_DATA - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.deleteData = iprot.readBool(); - struct.setDeleteDataIsSet(true); + case 3: // FOREIGN_KEYS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list669 = iprot.readListBegin(); + struct.foreignKeys = new ArrayList<SQLForeignKey>(_list669.size); + SQLForeignKey _elem670; + for (int _i671 = 0; _i671 < _list669.size; ++_i671) + { + _elem670 = new SQLForeignKey(); + _elem670.read(iprot); + struct.foreignKeys.add(_elem670); + } + iprot.readListEnd(); + } + struct.setForeignKeysIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -41154,102 +41709,157 @@ public class ThriftHiveMetastore { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, drop_table_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(struct.dbname); + if (struct.tbl != null) { + oprot.writeFieldBegin(TBL_FIELD_DESC); + struct.tbl.write(oprot); oprot.writeFieldEnd(); } - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); + if (struct.primaryKeys != null) { + oprot.writeFieldBegin(PRIMARY_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeys.size())); + for (SQLPrimaryKey _iter672 : struct.primaryKeys) + { + _iter672.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.foreignKeys != null) { + oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size())); + for (SQLForeignKey _iter673 : struct.foreignKeys) + { + _iter673.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(struct.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class drop_table_argsTupleSchemeFactory implements SchemeFactory { - public drop_table_argsTupleScheme getScheme() { - return new drop_table_argsTupleScheme(); + private static class create_table_with_constraints_argsTupleSchemeFactory implements SchemeFactory { + public create_table_with_constraints_argsTupleScheme getScheme() { + return new create_table_with_constraints_argsTupleScheme(); } } - private static class drop_table_argsTupleScheme extends TupleScheme<drop_table_args> { + private static class create_table_with_constraints_argsTupleScheme extends TupleScheme<create_table_with_constraints_args> { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, drop_table_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetDbname()) { + if (struct.isSetTbl()) { optionals.set(0); } - if (struct.isSetName()) { + if (struct.isSetPrimaryKeys()) { optionals.set(1); } - if (struct.isSetDeleteData()) { + if (struct.isSetForeignKeys()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); - if (struct.isSetDbname()) { - oprot.writeString(struct.dbname); + if (struct.isSetTbl()) { + struct.tbl.write(oprot); } - if (struct.isSetName()) { - oprot.writeString(struct.name); + if (struct.isSetPrimaryKeys()) { + { + oprot.writeI32(struct.primaryKeys.size()); + for (SQLPrimaryKey _iter674 : struct.primaryKeys) + { + _iter674.write(oprot); + } + } } - if (struct.isSetDeleteData()) { - oprot.writeBool(struct.deleteData); + if (struct.isSetForeignKeys()) { + { + oprot.writeI32(struct.foreignKeys.size()); + for (SQLForeignKey _iter675 : struct.foreignKeys) + { + _iter675.write(oprot); + } + } } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, drop_table_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, create_table_with_constraints_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - struct.dbname = iprot.readString(); - struct.setDbnameIsSet(true); + struct.tbl = new Table(); + struct.tbl.read(iprot); + struct.setTblIsSet(true); } if (incoming.get(1)) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); + { + org.apache.thrift.protocol.TList _list676 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list676.size); + SQLPrimaryKey _elem677; + for (int _i678 = 0; _i678 < _list676.size; ++_i678) + { + _elem677 = new SQLPrimaryKey(); + _elem677.read(iprot); + struct.primaryKeys.add(_elem677); + } + } + struct.setPrimaryKeysIsSet(true); } if (incoming.get(2)) { - struct.deleteData = iprot.readBool(); - struct.setDeleteDataIsSet(true); + { + org.apache.thrift.protocol.TList _list679 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.foreignKeys = new ArrayList<SQLForeignKey>(_list679.size); + SQLForeignKey _elem680; + for (int _i681 = 0; _i681 < _list679.size; ++_i681) + { + _elem680 = new SQLForeignKey(); + _elem680.read(iprot); + struct.foreignKeys.add(_elem680); + } + } + struct.setForeignKeysIsSet(true); } } } } - public static class drop_table_result implements org.apache.thrift.TBase<drop_table_result, drop_table_result._Fields>, java.io.Serializable, Cloneable, Comparable<drop_table_result> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_table_result"); + public static class create_table_with_constraints_result implements org.apache.thrift.TBase<create_table_with_constraints_result, create_table_with_constraints_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_table_with_constraints_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_table_with_constraints_result"); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new drop_table_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new drop_table_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new
<TRUNCATED>
