You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ga...@apache.org on 2018/03/31 01:25:47 UTC
[28/44] hive git commit: HIVE-18755 Modifications to the metastore
for catalogs (Alan Gates, reviewed by Thejas Nair)
http://git-wip-us.apache.org/repos/asf/hive/blob/ba8a99e1/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
index e824f4a..751eec4 100644
--- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
+++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
@@ -46,6 +46,14 @@ import org.slf4j.LoggerFactory;
public void setMetaConf(String key, String value) throws MetaException, org.apache.thrift.TException;
+ public void create_catalog(CreateCatalogRequest catalog) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException;
+
+ public GetCatalogResponse get_catalog(GetCatalogRequest catName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;
+
+ public GetCatalogsResponse get_catalogs() throws MetaException, org.apache.thrift.TException;
+
+ public void drop_catalog(DropCatalogRequest catName) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException;
+
public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException;
public Database get_database(String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException;
@@ -120,7 +128,7 @@ import org.slf4j.LoggerFactory;
public Map<String,Materialization> get_materialization_invalidation_info(String dbname, List<String> tbl_names) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException;
- public void update_creation_metadata(String dbname, String tbl_name, CreationMetadata creation_metadata) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException;
+ public void update_creation_metadata(String catName, String dbname, String tbl_name, CreationMetadata creation_metadata) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException;
public List<String> get_table_names_by_filter(String dbname, String filter, short max_tables) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException;
@@ -442,6 +450,14 @@ import org.slf4j.LoggerFactory;
public void setMetaConf(String key, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void create_catalog(CreateCatalogRequest catalog, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void get_catalog(GetCatalogRequest catName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void get_catalogs(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void drop_catalog(DropCatalogRequest catName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void get_database(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -516,7 +532,7 @@ import org.slf4j.LoggerFactory;
public void get_materialization_invalidation_info(String dbname, List<String> tbl_names, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void update_creation_metadata(String dbname, String tbl_name, CreationMetadata creation_metadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void update_creation_metadata(String catName, String dbname, String tbl_name, CreationMetadata creation_metadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void get_table_names_by_filter(String dbname, String filter, short max_tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -902,6 +918,118 @@ import org.slf4j.LoggerFactory;
return;
}
+ public void create_catalog(CreateCatalogRequest catalog) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
+ {
+ send_create_catalog(catalog);
+ recv_create_catalog();
+ }
+
+ public void send_create_catalog(CreateCatalogRequest catalog) throws org.apache.thrift.TException
+ {
+ create_catalog_args args = new create_catalog_args();
+ args.setCatalog(catalog);
+ sendBase("create_catalog", args);
+ }
+
+ public void recv_create_catalog() throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
+ {
+ create_catalog_result result = new create_catalog_result();
+ receiveBase(result, "create_catalog");
+ if (result.o1 != null) {
+ throw result.o1;
+ }
+ if (result.o2 != null) {
+ throw result.o2;
+ }
+ if (result.o3 != null) {
+ throw result.o3;
+ }
+ return;
+ }
+
+ public GetCatalogResponse get_catalog(GetCatalogRequest catName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
+ {
+ send_get_catalog(catName);
+ return recv_get_catalog();
+ }
+
+ public void send_get_catalog(GetCatalogRequest catName) throws org.apache.thrift.TException
+ {
+ get_catalog_args args = new get_catalog_args();
+ args.setCatName(catName);
+ sendBase("get_catalog", args);
+ }
+
+ public GetCatalogResponse recv_get_catalog() throws NoSuchObjectException, MetaException, org.apache.thrift.TException
+ {
+ get_catalog_result result = new get_catalog_result();
+ receiveBase(result, "get_catalog");
+ 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_catalog failed: unknown result");
+ }
+
+ public GetCatalogsResponse get_catalogs() throws MetaException, org.apache.thrift.TException
+ {
+ send_get_catalogs();
+ return recv_get_catalogs();
+ }
+
+ public void send_get_catalogs() throws org.apache.thrift.TException
+ {
+ get_catalogs_args args = new get_catalogs_args();
+ sendBase("get_catalogs", args);
+ }
+
+ public GetCatalogsResponse recv_get_catalogs() throws MetaException, org.apache.thrift.TException
+ {
+ get_catalogs_result result = new get_catalogs_result();
+ receiveBase(result, "get_catalogs");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.o1 != null) {
+ throw result.o1;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_catalogs failed: unknown result");
+ }
+
+ public void drop_catalog(DropCatalogRequest catName) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
+ {
+ send_drop_catalog(catName);
+ recv_drop_catalog();
+ }
+
+ public void send_drop_catalog(DropCatalogRequest catName) throws org.apache.thrift.TException
+ {
+ drop_catalog_args args = new drop_catalog_args();
+ args.setCatName(catName);
+ sendBase("drop_catalog", args);
+ }
+
+ public void recv_drop_catalog() throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
+ {
+ drop_catalog_result result = new drop_catalog_result();
+ receiveBase(result, "drop_catalog");
+ if (result.o1 != null) {
+ throw result.o1;
+ }
+ if (result.o2 != null) {
+ throw result.o2;
+ }
+ if (result.o3 != null) {
+ throw result.o3;
+ }
+ return;
+ }
+
public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
{
send_create_database(database);
@@ -1969,15 +2097,16 @@ import org.slf4j.LoggerFactory;
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_materialization_invalidation_info failed: unknown result");
}
- public void update_creation_metadata(String dbname, String tbl_name, CreationMetadata creation_metadata) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException
+ public void update_creation_metadata(String catName, String dbname, String tbl_name, CreationMetadata creation_metadata) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException
{
- send_update_creation_metadata(dbname, tbl_name, creation_metadata);
+ send_update_creation_metadata(catName, dbname, tbl_name, creation_metadata);
recv_update_creation_metadata();
}
- public void send_update_creation_metadata(String dbname, String tbl_name, CreationMetadata creation_metadata) throws org.apache.thrift.TException
+ public void send_update_creation_metadata(String catName, String dbname, String tbl_name, CreationMetadata creation_metadata) throws org.apache.thrift.TException
{
update_creation_metadata_args args = new update_creation_metadata_args();
+ args.setCatName(catName);
args.setDbname(dbname);
args.setTbl_name(tbl_name);
args.setCreation_metadata(creation_metadata);
@@ -6590,6 +6719,131 @@ import org.slf4j.LoggerFactory;
}
}
+ public void create_catalog(CreateCatalogRequest catalog, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ create_catalog_call method_call = new create_catalog_call(catalog, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_catalog_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private CreateCatalogRequest catalog;
+ public create_catalog_call(CreateCatalogRequest catalog, 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.catalog = catalog;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_catalog", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ create_catalog_args args = new create_catalog_args();
+ args.setCatalog(catalog);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, 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_catalog();
+ }
+ }
+
+ public void get_catalog(GetCatalogRequest catName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ get_catalog_call method_call = new get_catalog_call(catName, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_catalog_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private GetCatalogRequest catName;
+ public get_catalog_call(GetCatalogRequest catName, 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.catName = catName;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_catalog", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ get_catalog_args args = new get_catalog_args();
+ args.setCatName(catName);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public GetCatalogResponse getResult() throws NoSuchObjectException, MetaException, 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_catalog();
+ }
+ }
+
+ public void get_catalogs(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ get_catalogs_call method_call = new get_catalogs_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_catalogs_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public get_catalogs_call(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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_catalogs", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ get_catalogs_args args = new get_catalogs_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public GetCatalogsResponse getResult() throws MetaException, 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_catalogs();
+ }
+ }
+
+ public void drop_catalog(DropCatalogRequest catName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ drop_catalog_call method_call = new drop_catalog_call(catName, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class drop_catalog_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private DropCatalogRequest catName;
+ public drop_catalog_call(DropCatalogRequest catName, 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.catName = catName;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drop_catalog", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ drop_catalog_args args = new drop_catalog_args();
+ args.setCatName(catName);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws NoSuchObjectException, InvalidOperationException, MetaException, 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_drop_catalog();
+ }
+ }
+
public void create_database(Database database, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
create_database_call method_call = new create_database_call(database, resultHandler, this, ___protocolFactory, ___transport);
@@ -7864,19 +8118,21 @@ import org.slf4j.LoggerFactory;
}
}
- public void update_creation_metadata(String dbname, String tbl_name, CreationMetadata creation_metadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void update_creation_metadata(String catName, String dbname, String tbl_name, CreationMetadata creation_metadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
- update_creation_metadata_call method_call = new update_creation_metadata_call(dbname, tbl_name, creation_metadata, resultHandler, this, ___protocolFactory, ___transport);
+ update_creation_metadata_call method_call = new update_creation_metadata_call(catName, dbname, tbl_name, creation_metadata, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class update_creation_metadata_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String catName;
private String dbname;
private String tbl_name;
private CreationMetadata creation_metadata;
- public update_creation_metadata_call(String dbname, String tbl_name, CreationMetadata creation_metadata, 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 {
+ public update_creation_metadata_call(String catName, String dbname, String tbl_name, CreationMetadata creation_metadata, 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.catName = catName;
this.dbname = dbname;
this.tbl_name = tbl_name;
this.creation_metadata = creation_metadata;
@@ -7885,6 +8141,7 @@ import org.slf4j.LoggerFactory;
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_creation_metadata", org.apache.thrift.protocol.TMessageType.CALL, 0));
update_creation_metadata_args args = new update_creation_metadata_args();
+ args.setCatName(catName);
args.setDbname(dbname);
args.setTbl_name(tbl_name);
args.setCreation_metadata(creation_metadata);
@@ -13284,6 +13541,10 @@ import org.slf4j.LoggerFactory;
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("getMetaConf", new getMetaConf());
processMap.put("setMetaConf", new setMetaConf());
+ processMap.put("create_catalog", new create_catalog());
+ processMap.put("get_catalog", new get_catalog());
+ processMap.put("get_catalogs", new get_catalogs());
+ processMap.put("drop_catalog", new drop_catalog());
processMap.put("create_database", new create_database());
processMap.put("get_database", new get_database());
processMap.put("drop_database", new drop_database());
@@ -13529,6 +13790,112 @@ import org.slf4j.LoggerFactory;
}
}
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_catalog<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_catalog_args> {
+ public create_catalog() {
+ super("create_catalog");
+ }
+
+ public create_catalog_args getEmptyArgsInstance() {
+ return new create_catalog_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public create_catalog_result getResult(I iface, create_catalog_args args) throws org.apache.thrift.TException {
+ create_catalog_result result = new create_catalog_result();
+ try {
+ iface.create_catalog(args.catalog);
+ } catch (AlreadyExistsException o1) {
+ result.o1 = o1;
+ } catch (InvalidObjectException o2) {
+ result.o2 = o2;
+ } catch (MetaException o3) {
+ result.o3 = o3;
+ }
+ return result;
+ }
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_catalog<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_catalog_args> {
+ public get_catalog() {
+ super("get_catalog");
+ }
+
+ public get_catalog_args getEmptyArgsInstance() {
+ return new get_catalog_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public get_catalog_result getResult(I iface, get_catalog_args args) throws org.apache.thrift.TException {
+ get_catalog_result result = new get_catalog_result();
+ try {
+ result.success = iface.get_catalog(args.catName);
+ } catch (NoSuchObjectException o1) {
+ result.o1 = o1;
+ } catch (MetaException o2) {
+ result.o2 = o2;
+ }
+ return result;
+ }
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_catalogs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_catalogs_args> {
+ public get_catalogs() {
+ super("get_catalogs");
+ }
+
+ public get_catalogs_args getEmptyArgsInstance() {
+ return new get_catalogs_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public get_catalogs_result getResult(I iface, get_catalogs_args args) throws org.apache.thrift.TException {
+ get_catalogs_result result = new get_catalogs_result();
+ try {
+ result.success = iface.get_catalogs();
+ } catch (MetaException o1) {
+ result.o1 = o1;
+ }
+ return result;
+ }
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class drop_catalog<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drop_catalog_args> {
+ public drop_catalog() {
+ super("drop_catalog");
+ }
+
+ public drop_catalog_args getEmptyArgsInstance() {
+ return new drop_catalog_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public drop_catalog_result getResult(I iface, drop_catalog_args args) throws org.apache.thrift.TException {
+ drop_catalog_result result = new drop_catalog_result();
+ try {
+ iface.drop_catalog(args.catName);
+ } catch (NoSuchObjectException o1) {
+ result.o1 = o1;
+ } catch (InvalidOperationException o2) {
+ result.o2 = o2;
+ } catch (MetaException o3) {
+ result.o3 = o3;
+ }
+ return result;
+ }
+ }
+
@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_database<I extends Iface> extends org.apache.thrift.ProcessFunction<I, create_database_args> {
public create_database() {
super("create_database");
@@ -14515,7 +14882,7 @@ import org.slf4j.LoggerFactory;
public update_creation_metadata_result getResult(I iface, update_creation_metadata_args args) throws org.apache.thrift.TException {
update_creation_metadata_result result = new update_creation_metadata_result();
try {
- iface.update_creation_metadata(args.dbname, args.tbl_name, args.creation_metadata);
+ iface.update_creation_metadata(args.catName, args.dbname, args.tbl_name, args.creation_metadata);
} catch (MetaException o1) {
result.o1 = o1;
} catch (InvalidOperationException o2) {
@@ -18539,6 +18906,10 @@ import org.slf4j.LoggerFactory;
private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("getMetaConf", new getMetaConf());
processMap.put("setMetaConf", new setMetaConf());
+ processMap.put("create_catalog", new create_catalog());
+ processMap.put("get_catalog", new get_catalog());
+ processMap.put("get_catalogs", new get_catalogs());
+ processMap.put("drop_catalog", new drop_catalog());
processMap.put("create_database", new create_database());
processMap.put("get_database", new get_database());
processMap.put("drop_database", new drop_database());
@@ -18849,20 +19220,20 @@ import org.slf4j.LoggerFactory;
}
}
- @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_database_args, Void> {
- public create_database() {
- super("create_database");
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_catalog<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_catalog_args, Void> {
+ public create_catalog() {
+ super("create_catalog");
}
- public create_database_args getEmptyArgsInstance() {
- return new create_database_args();
+ public create_catalog_args getEmptyArgsInstance() {
+ return new create_catalog_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_database_result result = new create_database_result();
+ create_catalog_result result = new create_catalog_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
@@ -18874,7 +19245,7 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- create_database_result result = new create_database_result();
+ create_catalog_result result = new create_catalog_result();
if (e instanceof AlreadyExistsException) {
result.o1 = (AlreadyExistsException) e;
result.setO1IsSet(true);
@@ -18910,25 +19281,25 @@ import org.slf4j.LoggerFactory;
return false;
}
- public void start(I iface, create_database_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.create_database(args.database,resultHandler);
+ public void start(I iface, create_catalog_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.create_catalog(args.catalog,resultHandler);
}
}
- @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_database_args, Database> {
- public get_database() {
- super("get_database");
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_catalog<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_catalog_args, GetCatalogResponse> {
+ public get_catalog() {
+ super("get_catalog");
}
- public get_database_args getEmptyArgsInstance() {
- return new get_database_args();
+ public get_catalog_args getEmptyArgsInstance() {
+ return new get_catalog_args();
}
- public AsyncMethodCallback<Database> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<GetCatalogResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Database>() {
- public void onComplete(Database o) {
- get_database_result result = new get_database_result();
+ return new AsyncMethodCallback<GetCatalogResponse>() {
+ public void onComplete(GetCatalogResponse o) {
+ get_catalog_result result = new get_catalog_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -18941,7 +19312,258 @@ import org.slf4j.LoggerFactory;
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
- get_database_result result = new get_database_result();
+ get_catalog_result result = new get_catalog_result();
+ if (e instanceof NoSuchObjectException) {
+ result.o1 = (NoSuchObjectException) e;
+ result.setO1IsSet(true);
+ msg = result;
+ }
+ else if (e instanceof MetaException) {
+ result.o2 = (MetaException) 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_catalog_args args, org.apache.thrift.async.AsyncMethodCallback<GetCatalogResponse> resultHandler) throws TException {
+ iface.get_catalog(args.catName,resultHandler);
+ }
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_catalogs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_catalogs_args, GetCatalogsResponse> {
+ public get_catalogs() {
+ super("get_catalogs");
+ }
+
+ public get_catalogs_args getEmptyArgsInstance() {
+ return new get_catalogs_args();
+ }
+
+ public AsyncMethodCallback<GetCatalogsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<GetCatalogsResponse>() {
+ public void onComplete(GetCatalogsResponse o) {
+ get_catalogs_result result = new get_catalogs_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_catalogs_result result = new get_catalogs_result();
+ if (e instanceof MetaException) {
+ result.o1 = (MetaException) e;
+ result.setO1IsSet(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_catalogs_args args, org.apache.thrift.async.AsyncMethodCallback<GetCatalogsResponse> resultHandler) throws TException {
+ iface.get_catalogs(resultHandler);
+ }
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class drop_catalog<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, drop_catalog_args, Void> {
+ public drop_catalog() {
+ super("drop_catalog");
+ }
+
+ public drop_catalog_args getEmptyArgsInstance() {
+ return new drop_catalog_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) {
+ drop_catalog_result result = new drop_catalog_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;
+ drop_catalog_result result = new drop_catalog_result();
+ if (e instanceof NoSuchObjectException) {
+ result.o1 = (NoSuchObjectException) e;
+ result.setO1IsSet(true);
+ msg = result;
+ }
+ else if (e instanceof InvalidOperationException) {
+ result.o2 = (InvalidOperationException) e;
+ result.setO2IsSet(true);
+ msg = result;
+ }
+ else if (e instanceof MetaException) {
+ result.o3 = (MetaException) e;
+ result.setO3IsSet(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, drop_catalog_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.drop_catalog(args.catName,resultHandler);
+ }
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_database_args, Void> {
+ public create_database() {
+ super("create_database");
+ }
+
+ public create_database_args getEmptyArgsInstance() {
+ return new create_database_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_database_result result = new create_database_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_database_result result = new create_database_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
+ {
+ 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_database_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.create_database(args.database,resultHandler);
+ }
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_database<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_database_args, Database> {
+ public get_database() {
+ super("get_database");
+ }
+
+ public get_database_args getEmptyArgsInstance() {
+ return new get_database_args();
+ }
+
+ public AsyncMethodCallback<Database> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Database>() {
+ public void onComplete(Database o) {
+ get_database_result result = new get_database_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_database_result result = new get_database_result();
if (e instanceof NoSuchObjectException) {
result.o1 = (NoSuchObjectException) e;
result.setO1IsSet(true);
@@ -21210,7 +21832,7 @@ import org.slf4j.LoggerFactory;
}
public void start(I iface, update_creation_metadata_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.update_creation_metadata(args.dbname, args.tbl_name, args.creation_metadata,resultHandler);
+ iface.update_creation_metadata(args.catName, args.dbname, args.tbl_name, args.creation_metadata,resultHandler);
}
}
@@ -31439,7 +32061,3412 @@ import org.slf4j.LoggerFactory;
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getMetaConf_result(");
+ StringBuilder sb = new StringBuilder("getMetaConf_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o1:");
+ if (this.o1 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o1);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ 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 getMetaConf_resultStandardSchemeFactory implements SchemeFactory {
+ public getMetaConf_resultStandardScheme getScheme() {
+ return new getMetaConf_resultStandardScheme();
+ }
+ }
+
+ private static class getMetaConf_resultStandardScheme extends StandardScheme<getMetaConf_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getMetaConf_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // O1
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.o1 = new MetaException();
+ struct.o1.read(iprot);
+ struct.setO1IsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getMetaConf_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.o1 != null) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ struct.o1.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getMetaConf_resultTupleSchemeFactory implements SchemeFactory {
+ public getMetaConf_resultTupleScheme getScheme() {
+ return new getMetaConf_resultTupleScheme();
+ }
+ }
+
+ private static class getMetaConf_resultTupleScheme extends TupleScheme<getMetaConf_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getMetaConf_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetO1()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeString(struct.success);
+ }
+ if (struct.isSetO1()) {
+ struct.o1.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getMetaConf_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.o1 = new MetaException();
+ struct.o1.read(iprot);
+ struct.setO1IsSet(true);
+ }
+ }
+ }
+
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class setMetaConf_args implements org.apache.thrift.TBase<setMetaConf_args, setMetaConf_args._Fields>, java.io.Serializable, Cloneable, Comparable<setMetaConf_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setMetaConf_args");
+
+ private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new setMetaConf_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new setMetaConf_argsTupleSchemeFactory());
+ }
+
+ private String key; // required
+ private String value; // 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 {
+ KEY((short)1, "key"),
+ VALUE((short)2, "value");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // KEY
+ return KEY;
+ case 2: // VALUE
+ return VALUE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ 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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setMetaConf_args.class, metaDataMap);
+ }
+
+ public setMetaConf_args() {
+ }
+
+ public setMetaConf_args(
+ String key,
+ String value)
+ {
+ this();
+ this.key = key;
+ this.value = value;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public setMetaConf_args(setMetaConf_args other) {
+ if (other.isSetKey()) {
+ this.key = other.key;
+ }
+ if (other.isSetValue()) {
+ this.value = other.value;
+ }
+ }
+
+ public setMetaConf_args deepCopy() {
+ return new setMetaConf_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.key = null;
+ this.value = null;
+ }
+
+ public String getKey() {
+ return this.key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public void unsetKey() {
+ this.key = null;
+ }
+
+ /** Returns true if field key is set (has been assigned a value) and false otherwise */
+ public boolean isSetKey() {
+ return this.key != null;
+ }
+
+ public void setKeyIsSet(boolean value) {
+ if (!value) {
+ this.key = null;
+ }
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public void unsetValue() {
+ this.value = null;
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return this.value != null;
+ }
+
+ public void setValueIsSet(boolean value) {
+ if (!value) {
+ this.value = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case KEY:
+ if (value == null) {
+ unsetKey();
+ } else {
+ setKey((String)value);
+ }
+ break;
+
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case KEY:
+ return getKey();
+
+ case VALUE:
+ return getValue();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case KEY:
+ return isSetKey();
+ case VALUE:
+ return isSetValue();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof setMetaConf_args)
+ return this.equals((setMetaConf_args)that);
+ return false;
+ }
+
+ public boolean equals(setMetaConf_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_key = true && this.isSetKey();
+ boolean that_present_key = true && that.isSetKey();
+ if (this_present_key || that_present_key) {
+ if (!(this_present_key && that_present_key))
+ return false;
+ if (!this.key.equals(that.key))
+ return false;
+ }
+
+ boolean this_present_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (!this.value.equals(that.value))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_key = true && (isSetKey());
+ list.add(present_key);
+ if (present_key)
+ list.add(key);
+
+ boolean present_value = true && (isSetValue());
+ list.add(present_value);
+ if (present_value)
+ list.add(value);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(setMetaConf_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetKey()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("setMetaConf_args(");
+ boolean first = true;
+
+ sb.append("key:");
+ if (this.key == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.key);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("value:");
+ if (this.value == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.value);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ 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 setMetaConf_argsStandardSchemeFactory implements SchemeFactory {
+ public setMetaConf_argsStandardScheme getScheme() {
+ return new setMetaConf_argsStandardScheme();
+ }
+ }
+
+ private static class setMetaConf_argsStandardScheme extends StandardScheme<setMetaConf_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, setMetaConf_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // KEY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, setMetaConf_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.key != null) {
+ oprot.writeFieldBegin(KEY_FIELD_DESC);
+ oprot.writeString(struct.key);
+ oprot.writeFieldEnd();
+ }
+ if (struct.value != null) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeString(struct.value);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class setMetaConf_argsTupleSchemeFactory implements SchemeFactory {
+ public setMetaConf_argsTupleScheme getScheme() {
+ return new setMetaConf_argsTupleScheme();
+ }
+ }
+
+ private static class setMetaConf_argsTupleScheme extends TupleScheme<setMetaConf_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, setMetaConf_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetKey()) {
+ optionals.set(0);
+ }
+ if (struct.isSetValue()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetKey()) {
+ oprot.writeString(struct.key);
+ }
+ if (struct.isSetValue()) {
+ oprot.writeString(struct.value);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, setMetaConf_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.key = iprot.readString();
+ struct.setKeyIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class setMetaConf_result implements org.apache.thrift.TBase<setMetaConf_result, setMetaConf_result._Fields>, java.io.Serializable, Cloneable, Comparable<setMetaConf_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setMetaConf_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new setMetaConf_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new setMetaConf_resultTupleSchemeFactory());
+ }
+
+ private MetaException o1; // 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 {
+ O1((short)1, "o1");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // O1
+ return O1;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ 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.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setMetaConf_result.class, metaDataMap);
+ }
+
+ public setMetaConf_result() {
+ }
+
+ public setMetaConf_result(
+ MetaException o1)
+ {
+ this();
+ this.o1 = o1;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public setMetaConf_result(setMetaConf_result other) {
+ if (other.isSetO1()) {
+ this.o1 = new MetaException(other.o1);
+ }
+ }
+
+ public setMetaConf_result deepCopy() {
+ return new setMetaConf_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.o1 = null;
+ }
+
+ public MetaException getO1() {
+ return this.o1;
+ }
+
+ public void setO1(MetaException o1) {
+ this.o1 = o1;
+ }
+
+ public void unsetO1() {
+ this.o1 = null;
+ }
+
+ /** Returns true if field o1 is set (has been assigned a value) and false otherwise */
+ public boolean isSetO1() {
+ return this.o1 != null;
+ }
+
+ public void setO1IsSet(boolean value) {
+ if (!value) {
+ this.o1 = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case O1:
+ if (value == null) {
+ unsetO1();
+ } else {
+ setO1((MetaException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case O1:
+ return getO1();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case O1:
+ return isSetO1();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof setMetaConf_result)
+ return this.equals((setMetaConf_result)that);
+ return false;
+ }
+
+ public boolean equals(setMetaConf_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_o1 = true && this.isSetO1();
+ boolean that_present_o1 = true && that.isSetO1();
+ if (this_present_o1 || that_present_o1) {
+ if (!(this_present_o1 && that_present_o1))
+ return false;
+ if (!this.o1.equals(that.o1))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_o1 = true && (isSetO1());
+ list.add(present_o1);
+ if (present_o1)
+ list.add(o1);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(setMetaConf_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetO1()).compareTo(other.isSetO1());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO1()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, other.o1);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("setMetaConf_result(");
+ boolean first = true;
+
+ sb.append("o1:");
+ if (this.o1 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o1);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ 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 setMetaConf_resultStandardSchemeFactory implements SchemeFactory {
+ public setMetaConf_resultStandardScheme getScheme() {
+ return new setMetaConf_resultStandardScheme();
+ }
+ }
+
+ private static class setMetaConf_resultStandardScheme extends StandardScheme<setMetaConf_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, setMetaConf_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // O1
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.o1 = new MetaException();
+ struct.o1.read(iprot);
+ struct.setO1IsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, setMetaConf_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.o1 != null) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ struct.o1.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class setMetaConf_resultTupleSchemeFactory implements SchemeFactory {
+ public setMetaConf_resultTupleScheme getScheme() {
+ return new setMetaConf_resultTupleScheme();
+ }
+ }
+
+ private static class setMetaConf_resultTupleScheme extends TupleScheme<setMetaConf_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, setMetaConf_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetO1()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetO1()) {
+ struct.o1.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, setMetaConf_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.o1 = new MetaException();
+ struct.o1.read(iprot);
+ struct.setO1IsSet(true);
+ }
+ }
+ }
+
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_catalog_args implements org.apache.thrift.TBase<create_catalog_args, create_catalog_args._Fields>, java.io.Serializable, Cloneable, Comparable<create_catalog_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_catalog_args");
+
+ private static final org.apache.thrift.protocol.TField CATALOG_FIELD_DESC = new org.apache.thrift.protocol.TField("catalog", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new create_catalog_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new create_catalog_argsTupleSchemeFactory());
+ }
+
+ private CreateCatalogRequest catalog; // 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 {
+ CATALOG((short)1, "catalog");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // CATALOG
+ return CATALOG;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ 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.CATALOG, new org.apache.thrift.meta_data.FieldMetaData("catalog", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateCatalogRequest.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_catalog_args.class, metaDataMap);
+ }
+
+ public create_catalog_args() {
+ }
+
+ public create_catalog_args(
+ CreateCatalogRequest catalog)
+ {
+ this();
+ this.catalog = catalog;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public create_catalog_args(create_catalog_args other) {
+ if (other.isSetCatalog()) {
+ this.catalog = new CreateCatalogRequest(other.catalog);
+ }
+ }
+
+ public create_catalog_args deepCopy() {
+ return new create_catalog_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.catalog = null;
+ }
+
+ public CreateCatalogRequest getCatalog() {
+ return this.catalog;
+ }
+
+ public void setCatalog(CreateCatalogRequest catalog) {
+ this.catalog = catalog;
+ }
+
+ public void unsetCatalog() {
+ this.catalog = null;
+ }
+
+ /** Returns true if field catalog is set (has been assigned a value) and false otherwise */
+ public boolean isSetCatalog() {
+ return this.catalog != null;
+ }
+
+ public void setCatalogIsSet(boolean value) {
+ if (!value) {
+ this.catalog = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case CATALOG:
+ if (value == null) {
+ unsetCatalog();
+ } else {
+ setCatalog((CreateCatalogRequest)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case CATALOG:
+ return getCatalog();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case CATALOG:
+ return isSetCatalog();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof create_catalog_args)
+ return this.equals((create_catalog_args)that);
+ return false;
+ }
+
+ public boolean equals(create_catalog_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_catalog = true && this.isSetCatalog();
+ boolean that_present_catalog = true && that.isSetCatalog();
+ if (this_present_catalog || that_present_catalog) {
+ if (!(this_present_catalog && that_present_catalog))
+ return false;
+ if (!this.catalog.equals(that.catalog))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_catalog = true && (isSetCatalog());
+ list.add(present_catalog);
+ if (present_catalog)
+ list.add(catalog);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(create_catalog_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetCatalog()).compareTo(other.isSetCatalog());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCatalog()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalog, other.catalog);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("create_catalog_args(");
+ boolean first = true;
+
+ sb.append("catalog:");
+ if (this.catalog == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.catalog);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (catalog != null) {
+ catalog.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ 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 create_catalog_argsStandardSchemeFactory implements SchemeFactory {
+ public create_catalog_argsStandardScheme getScheme() {
+ return new create_catalog_argsStandardScheme();
+ }
+ }
+
+ private static class create_catalog_argsStandardScheme extends StandardScheme<create_catalog_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, create_catalog_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // CATALOG
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.catalog = new CreateCatalogRequest();
+ struct.catalog.read(iprot);
+ struct.setCatalogIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, create_catalog_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.catalog != null) {
+ oprot.writeFieldBegin(CATALOG_FIELD_DESC);
+ struct.catalog.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class create_catalog_argsTupleSchemeFactory implements SchemeFactory {
+ public create_catalog_argsTupleScheme getScheme() {
+ return new create_catalog_argsTupleScheme();
+ }
+ }
+
+ private static class create_catalog_argsTupleScheme extends TupleScheme<create_catalog_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, create_catalog_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetCatalog()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetCatalog()) {
+ struct.catalog.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, create_catalog_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.catalog = new CreateCatalogRequest();
+ struct.catalog.read(iprot);
+ struct.setCatalogIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class create_catalog_result implements org.apache.thrift.TBase<create_catalog_result, create_catalog_result._Fields>, java.io.Serializable, Cloneable, Comparable<create_catalog_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("create_catalog_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 O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol
<TRUNCATED>