Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.db = db;
this.tb = tb;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTable", org.apache.thrift.protocol.TMessageType.CALL, 0));
getTable_args args = new getTable_args();
args.setDb(db);
args.setTb(tb);
args.write(prot);
prot.writeMessageEnd();
}
public Table getResult() throws MetaserverStorageException, NoSuchObjectException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_getTable();
}
}
public void listInstants(java.lang.String db, java.lang.String tb, int num, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException {
checkReady();
listInstants_call method_call = new listInstants_call(db, tb, num, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listInstants_call extends org.apache.thrift.async.TAsyncMethodCall> {
private java.lang.String db;
private java.lang.String tb;
private int num;
public listInstants_call(java.lang.String db, java.lang.String tb, int num, 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.db = db;
this.tb = tb;
this.num = num;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listInstants", org.apache.thrift.protocol.TMessageType.CALL, 0));
listInstants_args args = new listInstants_args();
args.setDb(db);
args.setTb(tb);
args.setNum(num);
args.write(prot);
prot.writeMessageEnd();
}
public java.util.List getResult() throws MetaserverStorageException, NoSuchObjectException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_listInstants();
}
}
public void getInstantMetadata(java.lang.String db, java.lang.String tb, THoodieInstant instant, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getInstantMetadata_call method_call = new getInstantMetadata_call(db, tb, instant, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getInstantMetadata_call extends org.apache.thrift.async.TAsyncMethodCall {
private java.lang.String db;
private java.lang.String tb;
private THoodieInstant instant;
public getInstantMetadata_call(java.lang.String db, java.lang.String tb, THoodieInstant instant, 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.db = db;
this.tb = tb;
this.instant = instant;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInstantMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0));
getInstantMetadata_args args = new getInstantMetadata_args();
args.setDb(db);
args.setTb(tb);
args.setInstant(instant);
args.write(prot);
prot.writeMessageEnd();
}
public java.nio.ByteBuffer getResult() throws MetaserverStorageException, NoSuchObjectException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_getInstantMetadata();
}
}
public void createNewInstantTime(java.lang.String db, java.lang.String tb, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
createNewInstantTime_call method_call = new createNewInstantTime_call(db, tb, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createNewInstantTime_call extends org.apache.thrift.async.TAsyncMethodCall {
private java.lang.String db;
private java.lang.String tb;
public createNewInstantTime_call(java.lang.String db, java.lang.String tb, 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.db = db;
this.tb = tb;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createNewInstantTime", org.apache.thrift.protocol.TMessageType.CALL, 0));
createNewInstantTime_args args = new createNewInstantTime_args();
args.setDb(db);
args.setTb(tb);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.String getResult() throws MetaserverStorageException, NoSuchObjectException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_createNewInstantTime();
}
}
public void createNewInstantWithTime(java.lang.String db, java.lang.String tb, THoodieInstant instant, java.nio.ByteBuffer content, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
createNewInstantWithTime_call method_call = new createNewInstantWithTime_call(db, tb, instant, content, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createNewInstantWithTime_call extends org.apache.thrift.async.TAsyncMethodCall {
private java.lang.String db;
private java.lang.String tb;
private THoodieInstant instant;
private java.nio.ByteBuffer content;
public createNewInstantWithTime_call(java.lang.String db, java.lang.String tb, THoodieInstant instant, java.nio.ByteBuffer content, 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.db = db;
this.tb = tb;
this.instant = instant;
this.content = content;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createNewInstantWithTime", org.apache.thrift.protocol.TMessageType.CALL, 0));
createNewInstantWithTime_args args = new createNewInstantWithTime_args();
args.setDb(db);
args.setTb(tb);
args.setInstant(instant);
args.setContent(content);
args.write(prot);
prot.writeMessageEnd();
}
public HoodieInstantChangeResult getResult() throws MetaserverStorageException, NoSuchObjectException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_createNewInstantWithTime();
}
}
public void transitionInstantState(java.lang.String db, java.lang.String tb, THoodieInstant fromInstant, THoodieInstant toInstant, java.nio.ByteBuffer metadata, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
transitionInstantState_call method_call = new transitionInstantState_call(db, tb, fromInstant, toInstant, metadata, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class transitionInstantState_call extends org.apache.thrift.async.TAsyncMethodCall {
private java.lang.String db;
private java.lang.String tb;
private THoodieInstant fromInstant;
private THoodieInstant toInstant;
private java.nio.ByteBuffer metadata;
public transitionInstantState_call(java.lang.String db, java.lang.String tb, THoodieInstant fromInstant, THoodieInstant toInstant, java.nio.ByteBuffer 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.db = db;
this.tb = tb;
this.fromInstant = fromInstant;
this.toInstant = toInstant;
this.metadata = metadata;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("transitionInstantState", org.apache.thrift.protocol.TMessageType.CALL, 0));
transitionInstantState_args args = new transitionInstantState_args();
args.setDb(db);
args.setTb(tb);
args.setFromInstant(fromInstant);
args.setToInstant(toInstant);
args.setMetadata(metadata);
args.write(prot);
prot.writeMessageEnd();
}
public HoodieInstantChangeResult getResult() throws MetaserverStorageException, NoSuchObjectException, MetaserverException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_transitionInstantState();
}
}
public void deleteInstant(java.lang.String db, java.lang.String tb, THoodieInstant instant, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteInstant_call method_call = new deleteInstant_call(db, tb, instant, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteInstant_call extends org.apache.thrift.async.TAsyncMethodCall {
private java.lang.String db;
private java.lang.String tb;
private THoodieInstant instant;
public deleteInstant_call(java.lang.String db, java.lang.String tb, THoodieInstant instant, 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.db = db;
this.tb = tb;
this.instant = instant;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteInstant", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteInstant_args args = new deleteInstant_args();
args.setDb(db);
args.setTb(tb);
args.setInstant(instant);
args.write(prot);
prot.writeMessageEnd();
}
public HoodieInstantChangeResult getResult() throws MetaserverStorageException, NoSuchObjectException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.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_deleteInstant();
}
}
}
public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new java.util.HashMap>()));
}
protected Processor(I iface, java.util.Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static java.util.Map> getProcessMap(java.util.Map> processMap) {
processMap.put("createDatabase", new createDatabase());
processMap.put("createTable", new createTable());
processMap.put("getTable", new getTable());
processMap.put("listInstants", new listInstants());
processMap.put("getInstantMetadata", new getInstantMetadata());
processMap.put("createNewInstantTime", new createNewInstantTime());
processMap.put("createNewInstantWithTime", new createNewInstantWithTime());
processMap.put("transitionInstantState", new transitionInstantState());
processMap.put("deleteInstant", new deleteInstant());
return processMap;
}
public static class createDatabase extends org.apache.thrift.ProcessFunction {
public createDatabase() {
super("createDatabase");
}
public createDatabase_args getEmptyArgsInstance() {
return new createDatabase_args();
}
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
public createDatabase_result getResult(I iface, createDatabase_args args) throws org.apache.thrift.TException {
createDatabase_result result = new createDatabase_result();
try {
iface.createDatabase(args.db);
} catch (MetaserverStorageException o1) {
result.o1 = o1;
} catch (NoSuchObjectException o2) {
result.o2 = o2;
} catch (AlreadyExistException o3) {
result.o3 = o3;
}
return result;
}
}
public static class createTable extends org.apache.thrift.ProcessFunction {
public createTable() {
super("createTable");
}
public createTable_args getEmptyArgsInstance() {
return new createTable_args();
}
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
public createTable_result getResult(I iface, createTable_args args) throws org.apache.thrift.TException {
createTable_result result = new createTable_result();
try {
iface.createTable(args.table);
} catch (MetaserverStorageException o1) {
result.o1 = o1;
} catch (NoSuchObjectException o2) {
result.o2 = o2;
} catch (AlreadyExistException o3) {
result.o3 = o3;
} catch (MetaserverException o4) {
result.o4 = o4;
}
return result;
}
}
public static class getTable extends org.apache.thrift.ProcessFunction {
public getTable() {
super("getTable");
}
public getTable_args getEmptyArgsInstance() {
return new getTable_args();
}
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
public getTable_result getResult(I iface, getTable_args args) throws org.apache.thrift.TException {
getTable_result result = new getTable_result();
try {
result.success = iface.getTable(args.db, args.tb);
} catch (MetaserverStorageException o1) {
result.o1 = o1;
} catch (NoSuchObjectException o2) {
result.o2 = o2;
}
return result;
}
}
public static class listInstants extends org.apache.thrift.ProcessFunction {
public listInstants() {
super("listInstants");
}
public listInstants_args getEmptyArgsInstance() {
return new listInstants_args();
}
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
public listInstants_result getResult(I iface, listInstants_args args) throws org.apache.thrift.TException {
listInstants_result result = new listInstants_result();
try {
result.success = iface.listInstants(args.db, args.tb, args.num);
} catch (MetaserverStorageException o1) {
result.o1 = o1;
} catch (NoSuchObjectException o2) {
result.o2 = o2;
}
return result;
}
}
public static class getInstantMetadata extends org.apache.thrift.ProcessFunction {
public getInstantMetadata() {
super("getInstantMetadata");
}
public getInstantMetadata_args getEmptyArgsInstance() {
return new getInstantMetadata_args();
}
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
public getInstantMetadata_result getResult(I iface, getInstantMetadata_args args) throws org.apache.thrift.TException {
getInstantMetadata_result result = new getInstantMetadata_result();
try {
result.success = iface.getInstantMetadata(args.db, args.tb, args.instant);
} catch (MetaserverStorageException o1) {
result.o1 = o1;
} catch (NoSuchObjectException o2) {
result.o2 = o2;
}
return result;
}
}
public static class createNewInstantTime extends org.apache.thrift.ProcessFunction {
public createNewInstantTime() {
super("createNewInstantTime");
}
public createNewInstantTime_args getEmptyArgsInstance() {
return new createNewInstantTime_args();
}
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
public createNewInstantTime_result getResult(I iface, createNewInstantTime_args args) throws org.apache.thrift.TException {
createNewInstantTime_result result = new createNewInstantTime_result();
try {
result.success = iface.createNewInstantTime(args.db, args.tb);
} catch (MetaserverStorageException o1) {
result.o1 = o1;
} catch (NoSuchObjectException o2) {
result.o2 = o2;
}
return result;
}
}
public static class createNewInstantWithTime extends org.apache.thrift.ProcessFunction {
public createNewInstantWithTime() {
super("createNewInstantWithTime");
}
public createNewInstantWithTime_args getEmptyArgsInstance() {
return new createNewInstantWithTime_args();
}
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
public createNewInstantWithTime_result getResult(I iface, createNewInstantWithTime_args args) throws org.apache.thrift.TException {
createNewInstantWithTime_result result = new createNewInstantWithTime_result();
try {
result.success = iface.createNewInstantWithTime(args.db, args.tb, args.instant, args.content);
} catch (MetaserverStorageException o1) {
result.o1 = o1;
} catch (NoSuchObjectException o2) {
result.o2 = o2;
}
return result;
}
}
public static class transitionInstantState extends org.apache.thrift.ProcessFunction {
public transitionInstantState() {
super("transitionInstantState");
}
public transitionInstantState_args getEmptyArgsInstance() {
return new transitionInstantState_args();
}
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
public transitionInstantState_result getResult(I iface, transitionInstantState_args args) throws org.apache.thrift.TException {
transitionInstantState_result result = new transitionInstantState_result();
try {
result.success = iface.transitionInstantState(args.db, args.tb, args.fromInstant, args.toInstant, args.metadata);
} catch (MetaserverStorageException o1) {
result.o1 = o1;
} catch (NoSuchObjectException o2) {
result.o2 = o2;
} catch (MetaserverException o3) {
result.o3 = o3;
}
return result;
}
}
public static class deleteInstant extends org.apache.thrift.ProcessFunction {
public deleteInstant() {
super("deleteInstant");
}
public deleteInstant_args getEmptyArgsInstance() {
return new deleteInstant_args();
}
protected boolean isOneway() {
return false;
}
@Override
protected boolean rethrowUnhandledExceptions() {
return false;
}
public deleteInstant_result getResult(I iface, deleteInstant_args args) throws org.apache.thrift.TException {
deleteInstant_result result = new deleteInstant_result();
try {
result.success = iface.deleteInstant(args.db, args.tb, args.instant);
} catch (MetaserverStorageException o1) {
result.o1 = o1;
} catch (NoSuchObjectException o2) {
result.o2 = o2;
}
return result;
}
}
}
public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new java.util.HashMap>()));
}
protected AsyncProcessor(I iface, java.util.Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static java.util.Map> getProcessMap(java.util.Map> processMap) {
processMap.put("createDatabase", new createDatabase());
processMap.put("createTable", new createTable());
processMap.put("getTable", new getTable());
processMap.put("listInstants", new listInstants());
processMap.put("getInstantMetadata", new getInstantMetadata());
processMap.put("createNewInstantTime", new createNewInstantTime());
processMap.put("createNewInstantWithTime", new createNewInstantWithTime());
processMap.put("transitionInstantState", new transitionInstantState());
processMap.put("deleteInstant", new deleteInstant());
return processMap;
}
public static class createDatabase extends org.apache.thrift.AsyncProcessFunction {
public createDatabase() {
super("createDatabase");
}
public createDatabase_args getEmptyArgsInstance() {
return new createDatabase_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(Void o) {
createDatabase_result result = new createDatabase_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
createDatabase_result result = new createDatabase_result();
if (e instanceof MetaserverStorageException) {
result.o1 = (MetaserverStorageException) e;
result.setO1IsSet(true);
msg = result;
} else if (e instanceof NoSuchObjectException) {
result.o2 = (NoSuchObjectException) e;
result.setO2IsSet(true);
msg = result;
} else if (e instanceof AlreadyExistException) {
result.o3 = (AlreadyExistException) e;
result.setO3IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, createDatabase_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.createDatabase(args.db,resultHandler);
}
}
public static class createTable extends org.apache.thrift.AsyncProcessFunction {
public createTable() {
super("createTable");
}
public createTable_args getEmptyArgsInstance() {
return new createTable_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(Void o) {
createTable_result result = new createTable_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
createTable_result result = new createTable_result();
if (e instanceof MetaserverStorageException) {
result.o1 = (MetaserverStorageException) e;
result.setO1IsSet(true);
msg = result;
} else if (e instanceof NoSuchObjectException) {
result.o2 = (NoSuchObjectException) e;
result.setO2IsSet(true);
msg = result;
} else if (e instanceof AlreadyExistException) {
result.o3 = (AlreadyExistException) e;
result.setO3IsSet(true);
msg = result;
} else if (e instanceof MetaserverException) {
result.o4 = (MetaserverException) e;
result.setO4IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, createTable_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.createTable(args.table,resultHandler);
}
}
public static class getTable extends org.apache.thrift.AsyncProcessFunction {
public getTable() {
super("getTable");
}
public getTable_args getEmptyArgsInstance() {
return new getTable_args();
}
public org.apache.thrift.async.AsyncMethodCallback
getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback
() {
public void onComplete(Table o) {
getTable_result result = new getTable_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getTable_result result = new getTable_result();
if (e instanceof MetaserverStorageException) {
result.o1 = (MetaserverStorageException) e;
result.setO1IsSet(true);
msg = result;
} else if (e instanceof NoSuchObjectException) {
result.o2 = (NoSuchObjectException) e;
result.setO2IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getTable_args args, org.apache.thrift.async.AsyncMethodCallback
resultHandler) throws org.apache.thrift.TException {
iface.getTable(args.db, args.tb,resultHandler);
}
}
public static class listInstants extends org.apache.thrift.AsyncProcessFunction> {
public listInstants() {
super("listInstants");
}
public listInstants_args getEmptyArgsInstance() {
return new listInstants_args();
}
public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback>() {
public void onComplete(java.util.List o) {
listInstants_result result = new listInstants_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
listInstants_result result = new listInstants_result();
if (e instanceof MetaserverStorageException) {
result.o1 = (MetaserverStorageException) e;
result.setO1IsSet(true);
msg = result;
} else if (e instanceof NoSuchObjectException) {
result.o2 = (NoSuchObjectException) e;
result.setO2IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, listInstants_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException {
iface.listInstants(args.db, args.tb, args.num,resultHandler);
}
}
public static class getInstantMetadata extends org.apache.thrift.AsyncProcessFunction {
public getInstantMetadata() {
super("getInstantMetadata");
}
public getInstantMetadata_args getEmptyArgsInstance() {
return new getInstantMetadata_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(java.nio.ByteBuffer o) {
getInstantMetadata_result result = new getInstantMetadata_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getInstantMetadata_result result = new getInstantMetadata_result();
if (e instanceof MetaserverStorageException) {
result.o1 = (MetaserverStorageException) e;
result.setO1IsSet(true);
msg = result;
} else if (e instanceof NoSuchObjectException) {
result.o2 = (NoSuchObjectException) e;
result.setO2IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getInstantMetadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.getInstantMetadata(args.db, args.tb, args.instant,resultHandler);
}
}
public static class createNewInstantTime extends org.apache.thrift.AsyncProcessFunction {
public createNewInstantTime() {
super("createNewInstantTime");
}
public createNewInstantTime_args getEmptyArgsInstance() {
return new createNewInstantTime_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(java.lang.String o) {
createNewInstantTime_result result = new createNewInstantTime_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
createNewInstantTime_result result = new createNewInstantTime_result();
if (e instanceof MetaserverStorageException) {
result.o1 = (MetaserverStorageException) e;
result.setO1IsSet(true);
msg = result;
} else if (e instanceof NoSuchObjectException) {
result.o2 = (NoSuchObjectException) e;
result.setO2IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, createNewInstantTime_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.createNewInstantTime(args.db, args.tb,resultHandler);
}
}
public static class createNewInstantWithTime extends org.apache.thrift.AsyncProcessFunction {
public createNewInstantWithTime() {
super("createNewInstantWithTime");
}
public createNewInstantWithTime_args getEmptyArgsInstance() {
return new createNewInstantWithTime_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(HoodieInstantChangeResult o) {
createNewInstantWithTime_result result = new createNewInstantWithTime_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
createNewInstantWithTime_result result = new createNewInstantWithTime_result();
if (e instanceof MetaserverStorageException) {
result.o1 = (MetaserverStorageException) e;
result.setO1IsSet(true);
msg = result;
} else if (e instanceof NoSuchObjectException) {
result.o2 = (NoSuchObjectException) e;
result.setO2IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, createNewInstantWithTime_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.createNewInstantWithTime(args.db, args.tb, args.instant, args.content,resultHandler);
}
}
public static class transitionInstantState extends org.apache.thrift.AsyncProcessFunction {
public transitionInstantState() {
super("transitionInstantState");
}
public transitionInstantState_args getEmptyArgsInstance() {
return new transitionInstantState_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(HoodieInstantChangeResult o) {
transitionInstantState_result result = new transitionInstantState_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
transitionInstantState_result result = new transitionInstantState_result();
if (e instanceof MetaserverStorageException) {
result.o1 = (MetaserverStorageException) e;
result.setO1IsSet(true);
msg = result;
} else if (e instanceof NoSuchObjectException) {
result.o2 = (NoSuchObjectException) e;
result.setO2IsSet(true);
msg = result;
} else if (e instanceof MetaserverException) {
result.o3 = (MetaserverException) e;
result.setO3IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, transitionInstantState_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.transitionInstantState(args.db, args.tb, args.fromInstant, args.toInstant, args.metadata,resultHandler);
}
}
public static class deleteInstant extends org.apache.thrift.AsyncProcessFunction {
public deleteInstant() {
super("deleteInstant");
}
public deleteInstant_args getEmptyArgsInstance() {
return new deleteInstant_args();
}
public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback() {
public void onComplete(HoodieInstantChangeResult o) {
deleteInstant_result result = new deleteInstant_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
deleteInstant_result result = new deleteInstant_result();
if (e instanceof MetaserverStorageException) {
result.o1 = (MetaserverStorageException) e;
result.setO1IsSet(true);
msg = result;
} else if (e instanceof NoSuchObjectException) {
result.o2 = (NoSuchObjectException) e;
result.setO2IsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deleteInstant_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
iface.deleteInstant(args.db, args.tb, args.instant,resultHandler);
}
}
}
public static class createDatabase_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createDatabase_args");
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createDatabase_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createDatabase_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String db; // 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 {
DB((short)1, "db");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DB
return DB;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDatabase_args.class, metaDataMap);
}
public createDatabase_args() {
}
public createDatabase_args(
java.lang.String db)
{
this();
this.db = db;
}
/**
* Performs a deep copy on other.
*/
public createDatabase_args(createDatabase_args other) {
if (other.isSetDb()) {
this.db = other.db;
}
}
public createDatabase_args deepCopy() {
return new createDatabase_args(this);
}
@Override
public void clear() {
this.db = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public createDatabase_args setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DB:
return getDb();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case DB:
return isSetDb();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof createDatabase_args)
return this.equals((createDatabase_args)that);
return false;
}
public boolean equals(createDatabase_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
return hashCode;
}
@Override
public int compareTo(createDatabase_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetDb()).compareTo(other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createDatabase_args(");
boolean first = true;
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
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, java.lang.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 createDatabase_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createDatabase_argsStandardScheme getScheme() {
return new createDatabase_argsStandardScheme();
}
}
private static class createDatabase_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, createDatabase_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: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createDatabase_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createDatabase_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createDatabase_argsTupleScheme getScheme() {
return new createDatabase_argsTupleScheme();
}
}
private static class createDatabase_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createDatabase_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDb()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetDb()) {
oprot.writeString(struct.db);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createDatabase_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class createDatabase_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createDatabase_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.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.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createDatabase_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createDatabase_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable MetaserverStorageException o1; // required
public @org.apache.thrift.annotation.Nullable NoSuchObjectException o2; // required
public @org.apache.thrift.annotation.Nullable AlreadyExistException o3; // 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"),
O2((short)2, "o2"),
O3((short)3, "o3");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // O1
return O1;
case 2: // O2
return O2;
case 3: // O3
return O3;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverStorageException.class)));
tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NoSuchObjectException.class)));
tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AlreadyExistException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDatabase_result.class, metaDataMap);
}
public createDatabase_result() {
}
public createDatabase_result(
MetaserverStorageException o1,
NoSuchObjectException o2,
AlreadyExistException o3)
{
this();
this.o1 = o1;
this.o2 = o2;
this.o3 = o3;
}
/**
* Performs a deep copy on other.
*/
public createDatabase_result(createDatabase_result other) {
if (other.isSetO1()) {
this.o1 = new MetaserverStorageException(other.o1);
}
if (other.isSetO2()) {
this.o2 = new NoSuchObjectException(other.o2);
}
if (other.isSetO3()) {
this.o3 = new AlreadyExistException(other.o3);
}
}
public createDatabase_result deepCopy() {
return new createDatabase_result(this);
}
@Override
public void clear() {
this.o1 = null;
this.o2 = null;
this.o3 = null;
}
@org.apache.thrift.annotation.Nullable
public MetaserverStorageException getO1() {
return this.o1;
}
public createDatabase_result setO1(@org.apache.thrift.annotation.Nullable MetaserverStorageException o1) {
this.o1 = o1;
return this;
}
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;
}
}
@org.apache.thrift.annotation.Nullable
public NoSuchObjectException getO2() {
return this.o2;
}
public createDatabase_result setO2(@org.apache.thrift.annotation.Nullable NoSuchObjectException o2) {
this.o2 = o2;
return this;
}
public void unsetO2() {
this.o2 = null;
}
/** Returns true if field o2 is set (has been assigned a value) and false otherwise */
public boolean isSetO2() {
return this.o2 != null;
}
public void setO2IsSet(boolean value) {
if (!value) {
this.o2 = null;
}
}
@org.apache.thrift.annotation.Nullable
public AlreadyExistException getO3() {
return this.o3;
}
public createDatabase_result setO3(@org.apache.thrift.annotation.Nullable AlreadyExistException o3) {
this.o3 = o3;
return this;
}
public void unsetO3() {
this.o3 = null;
}
/** Returns true if field o3 is set (has been assigned a value) and false otherwise */
public boolean isSetO3() {
return this.o3 != null;
}
public void setO3IsSet(boolean value) {
if (!value) {
this.o3 = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case O1:
if (value == null) {
unsetO1();
} else {
setO1((MetaserverStorageException)value);
}
break;
case O2:
if (value == null) {
unsetO2();
} else {
setO2((NoSuchObjectException)value);
}
break;
case O3:
if (value == null) {
unsetO3();
} else {
setO3((AlreadyExistException)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case O1:
return getO1();
case O2:
return getO2();
case O3:
return getO3();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case O1:
return isSetO1();
case O2:
return isSetO2();
case O3:
return isSetO3();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof createDatabase_result)
return this.equals((createDatabase_result)that);
return false;
}
public boolean equals(createDatabase_result that) {
if (that == null)
return false;
if (this == that)
return true;
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;
}
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
if (!(this_present_o2 && that_present_o2))
return false;
if (!this.o2.equals(that.o2))
return false;
}
boolean this_present_o3 = true && this.isSetO3();
boolean that_present_o3 = true && that.isSetO3();
if (this_present_o3 || that_present_o3) {
if (!(this_present_o3 && that_present_o3))
return false;
if (!this.o3.equals(that.o3))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287);
if (isSetO1())
hashCode = hashCode * 8191 + o1.hashCode();
hashCode = hashCode * 8191 + ((isSetO2()) ? 131071 : 524287);
if (isSetO2())
hashCode = hashCode * 8191 + o2.hashCode();
hashCode = hashCode * 8191 + ((isSetO3()) ? 131071 : 524287);
if (isSetO3())
hashCode = hashCode * 8191 + o3.hashCode();
return hashCode;
}
@Override
public int compareTo(createDatabase_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO2()).compareTo(other.isSetO2());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO2()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO3()).compareTo(other.isSetO3());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO3()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createDatabase_result(");
boolean first = true;
sb.append("o1:");
if (this.o1 == null) {
sb.append("null");
} else {
sb.append(this.o1);
}
first = false;
if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
} else {
sb.append(this.o2);
}
first = false;
if (!first) sb.append(", ");
sb.append("o3:");
if (this.o3 == null) {
sb.append("null");
} else {
sb.append(this.o3);
}
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, java.lang.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 createDatabase_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createDatabase_resultStandardScheme getScheme() {
return new createDatabase_resultStandardScheme();
}
}
private static class createDatabase_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, createDatabase_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 MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // O2
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // O3
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o3 = new AlreadyExistException();
struct.o3.read(iprot);
struct.setO3IsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createDatabase_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();
}
if (struct.o2 != null) {
oprot.writeFieldBegin(O2_FIELD_DESC);
struct.o2.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o3 != null) {
oprot.writeFieldBegin(O3_FIELD_DESC);
struct.o3.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createDatabase_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createDatabase_resultTupleScheme getScheme() {
return new createDatabase_resultTupleScheme();
}
}
private static class createDatabase_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createDatabase_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetO1()) {
optionals.set(0);
}
if (struct.isSetO2()) {
optionals.set(1);
}
if (struct.isSetO3()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetO1()) {
struct.o1.write(oprot);
}
if (struct.isSetO2()) {
struct.o2.write(oprot);
}
if (struct.isSetO3()) {
struct.o3.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createDatabase_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.o1 = new MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
}
if (incoming.get(1)) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
}
if (incoming.get(2)) {
struct.o3 = new AlreadyExistException();
struct.o3.read(iprot);
struct.setO3IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class createTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTable_args");
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTable_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTable_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable Table table; // 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 {
TABLE((short)1, "table");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
return TABLE;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTable_args.class, metaDataMap);
}
public createTable_args() {
}
public createTable_args(
Table table)
{
this();
this.table = table;
}
/**
* Performs a deep copy on other.
*/
public createTable_args(createTable_args other) {
if (other.isSetTable()) {
this.table = new Table(other.table);
}
}
public createTable_args deepCopy() {
return new createTable_args(this);
}
@Override
public void clear() {
this.table = null;
}
@org.apache.thrift.annotation.Nullable
public Table getTable() {
return this.table;
}
public createTable_args setTable(@org.apache.thrift.annotation.Nullable Table table) {
this.table = table;
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((Table)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TABLE:
return isSetTable();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof createTable_args)
return this.equals((createTable_args)that);
return false;
}
public boolean equals(createTable_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
if (isSetTable())
hashCode = hashCode * 8191 + table.hashCode();
return hashCode;
}
@Override
public int compareTo(createTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createTable_args(");
boolean first = true;
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
sb.append(this.table);
}
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 (table != null) {
table.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, java.lang.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 createTable_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createTable_argsStandardScheme getScheme() {
return new createTable_argsStandardScheme();
}
}
private static class createTable_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, createTable_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: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.table = new Table();
struct.table.read(iprot);
struct.setTableIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createTable_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
struct.table.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createTable_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createTable_argsTupleScheme getScheme() {
return new createTable_argsTupleScheme();
}
}
private static class createTable_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createTable_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTable()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTable()) {
struct.table.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createTable_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.table = new Table();
struct.table.read(iprot);
struct.setTableIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class createTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTable_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.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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createTable_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createTable_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable MetaserverStorageException o1; // required
public @org.apache.thrift.annotation.Nullable NoSuchObjectException o2; // required
public @org.apache.thrift.annotation.Nullable AlreadyExistException o3; // required
public @org.apache.thrift.annotation.Nullable MetaserverException o4; // 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"),
O2((short)2, "o2"),
O3((short)3, "o3"),
O4((short)4, "o4");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // O1
return O1;
case 2: // O2
return O2;
case 3: // O3
return O3;
case 4: // O4
return O4;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverStorageException.class)));
tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NoSuchObjectException.class)));
tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AlreadyExistException.class)));
tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTable_result.class, metaDataMap);
}
public createTable_result() {
}
public createTable_result(
MetaserverStorageException o1,
NoSuchObjectException o2,
AlreadyExistException o3,
MetaserverException o4)
{
this();
this.o1 = o1;
this.o2 = o2;
this.o3 = o3;
this.o4 = o4;
}
/**
* Performs a deep copy on other.
*/
public createTable_result(createTable_result other) {
if (other.isSetO1()) {
this.o1 = new MetaserverStorageException(other.o1);
}
if (other.isSetO2()) {
this.o2 = new NoSuchObjectException(other.o2);
}
if (other.isSetO3()) {
this.o3 = new AlreadyExistException(other.o3);
}
if (other.isSetO4()) {
this.o4 = new MetaserverException(other.o4);
}
}
public createTable_result deepCopy() {
return new createTable_result(this);
}
@Override
public void clear() {
this.o1 = null;
this.o2 = null;
this.o3 = null;
this.o4 = null;
}
@org.apache.thrift.annotation.Nullable
public MetaserverStorageException getO1() {
return this.o1;
}
public createTable_result setO1(@org.apache.thrift.annotation.Nullable MetaserverStorageException o1) {
this.o1 = o1;
return this;
}
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;
}
}
@org.apache.thrift.annotation.Nullable
public NoSuchObjectException getO2() {
return this.o2;
}
public createTable_result setO2(@org.apache.thrift.annotation.Nullable NoSuchObjectException o2) {
this.o2 = o2;
return this;
}
public void unsetO2() {
this.o2 = null;
}
/** Returns true if field o2 is set (has been assigned a value) and false otherwise */
public boolean isSetO2() {
return this.o2 != null;
}
public void setO2IsSet(boolean value) {
if (!value) {
this.o2 = null;
}
}
@org.apache.thrift.annotation.Nullable
public AlreadyExistException getO3() {
return this.o3;
}
public createTable_result setO3(@org.apache.thrift.annotation.Nullable AlreadyExistException o3) {
this.o3 = o3;
return this;
}
public void unsetO3() {
this.o3 = null;
}
/** Returns true if field o3 is set (has been assigned a value) and false otherwise */
public boolean isSetO3() {
return this.o3 != null;
}
public void setO3IsSet(boolean value) {
if (!value) {
this.o3 = null;
}
}
@org.apache.thrift.annotation.Nullable
public MetaserverException getO4() {
return this.o4;
}
public createTable_result setO4(@org.apache.thrift.annotation.Nullable MetaserverException o4) {
this.o4 = o4;
return this;
}
public void unsetO4() {
this.o4 = null;
}
/** Returns true if field o4 is set (has been assigned a value) and false otherwise */
public boolean isSetO4() {
return this.o4 != null;
}
public void setO4IsSet(boolean value) {
if (!value) {
this.o4 = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case O1:
if (value == null) {
unsetO1();
} else {
setO1((MetaserverStorageException)value);
}
break;
case O2:
if (value == null) {
unsetO2();
} else {
setO2((NoSuchObjectException)value);
}
break;
case O3:
if (value == null) {
unsetO3();
} else {
setO3((AlreadyExistException)value);
}
break;
case O4:
if (value == null) {
unsetO4();
} else {
setO4((MetaserverException)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case O1:
return getO1();
case O2:
return getO2();
case O3:
return getO3();
case O4:
return getO4();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case O1:
return isSetO1();
case O2:
return isSetO2();
case O3:
return isSetO3();
case O4:
return isSetO4();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof createTable_result)
return this.equals((createTable_result)that);
return false;
}
public boolean equals(createTable_result that) {
if (that == null)
return false;
if (this == that)
return true;
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;
}
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
if (!(this_present_o2 && that_present_o2))
return false;
if (!this.o2.equals(that.o2))
return false;
}
boolean this_present_o3 = true && this.isSetO3();
boolean that_present_o3 = true && that.isSetO3();
if (this_present_o3 || that_present_o3) {
if (!(this_present_o3 && that_present_o3))
return false;
if (!this.o3.equals(that.o3))
return false;
}
boolean this_present_o4 = true && this.isSetO4();
boolean that_present_o4 = true && that.isSetO4();
if (this_present_o4 || that_present_o4) {
if (!(this_present_o4 && that_present_o4))
return false;
if (!this.o4.equals(that.o4))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287);
if (isSetO1())
hashCode = hashCode * 8191 + o1.hashCode();
hashCode = hashCode * 8191 + ((isSetO2()) ? 131071 : 524287);
if (isSetO2())
hashCode = hashCode * 8191 + o2.hashCode();
hashCode = hashCode * 8191 + ((isSetO3()) ? 131071 : 524287);
if (isSetO3())
hashCode = hashCode * 8191 + o3.hashCode();
hashCode = hashCode * 8191 + ((isSetO4()) ? 131071 : 524287);
if (isSetO4())
hashCode = hashCode * 8191 + o4.hashCode();
return hashCode;
}
@Override
public int compareTo(createTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO2()).compareTo(other.isSetO2());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO2()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO3()).compareTo(other.isSetO3());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO3()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO4()).compareTo(other.isSetO4());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO4()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, other.o4);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createTable_result(");
boolean first = true;
sb.append("o1:");
if (this.o1 == null) {
sb.append("null");
} else {
sb.append(this.o1);
}
first = false;
if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
} else {
sb.append(this.o2);
}
first = false;
if (!first) sb.append(", ");
sb.append("o3:");
if (this.o3 == null) {
sb.append("null");
} else {
sb.append(this.o3);
}
first = false;
if (!first) sb.append(", ");
sb.append("o4:");
if (this.o4 == null) {
sb.append("null");
} else {
sb.append(this.o4);
}
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, java.lang.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 createTable_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createTable_resultStandardScheme getScheme() {
return new createTable_resultStandardScheme();
}
}
private static class createTable_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, createTable_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 MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // O2
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // O3
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o3 = new AlreadyExistException();
struct.o3.read(iprot);
struct.setO3IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // O4
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o4 = new MetaserverException();
struct.o4.read(iprot);
struct.setO4IsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createTable_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();
}
if (struct.o2 != null) {
oprot.writeFieldBegin(O2_FIELD_DESC);
struct.o2.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o3 != null) {
oprot.writeFieldBegin(O3_FIELD_DESC);
struct.o3.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o4 != null) {
oprot.writeFieldBegin(O4_FIELD_DESC);
struct.o4.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createTable_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createTable_resultTupleScheme getScheme() {
return new createTable_resultTupleScheme();
}
}
private static class createTable_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createTable_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetO1()) {
optionals.set(0);
}
if (struct.isSetO2()) {
optionals.set(1);
}
if (struct.isSetO3()) {
optionals.set(2);
}
if (struct.isSetO4()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetO1()) {
struct.o1.write(oprot);
}
if (struct.isSetO2()) {
struct.o2.write(oprot);
}
if (struct.isSetO3()) {
struct.o3.write(oprot);
}
if (struct.isSetO4()) {
struct.o4.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createTable_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.o1 = new MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
}
if (incoming.get(1)) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
}
if (incoming.get(2)) {
struct.o3 = new AlreadyExistException();
struct.o3.read(iprot);
struct.setO3IsSet(true);
}
if (incoming.get(3)) {
struct.o4 = new MetaserverException();
struct.o4.read(iprot);
struct.setO4IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTable_args");
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TB_FIELD_DESC = new org.apache.thrift.protocol.TField("tb", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTable_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTable_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
public @org.apache.thrift.annotation.Nullable java.lang.String tb; // 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 {
DB((short)1, "db"),
TB((short)2, "tb");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DB
return DB;
case 2: // TB
return TB;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TB, new org.apache.thrift.meta_data.FieldMetaData("tb", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTable_args.class, metaDataMap);
}
public getTable_args() {
}
public getTable_args(
java.lang.String db,
java.lang.String tb)
{
this();
this.db = db;
this.tb = tb;
}
/**
* Performs a deep copy on other.
*/
public getTable_args(getTable_args other) {
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTb()) {
this.tb = other.tb;
}
}
public getTable_args deepCopy() {
return new getTable_args(this);
}
@Override
public void clear() {
this.db = null;
this.tb = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public getTable_args setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTb() {
return this.tb;
}
public getTable_args setTb(@org.apache.thrift.annotation.Nullable java.lang.String tb) {
this.tb = tb;
return this;
}
public void unsetTb() {
this.tb = null;
}
/** Returns true if field tb is set (has been assigned a value) and false otherwise */
public boolean isSetTb() {
return this.tb != null;
}
public void setTbIsSet(boolean value) {
if (!value) {
this.tb = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TB:
if (value == null) {
unsetTb();
} else {
setTb((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DB:
return getDb();
case TB:
return getTb();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case DB:
return isSetDb();
case TB:
return isSetTb();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getTable_args)
return this.equals((getTable_args)that);
return false;
}
public boolean equals(getTable_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
boolean this_present_tb = true && this.isSetTb();
boolean that_present_tb = true && that.isSetTb();
if (this_present_tb || that_present_tb) {
if (!(this_present_tb && that_present_tb))
return false;
if (!this.tb.equals(that.tb))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTb()) ? 131071 : 524287);
if (isSetTb())
hashCode = hashCode * 8191 + tb.hashCode();
return hashCode;
}
@Override
public int compareTo(getTable_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetDb()).compareTo(other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTb()).compareTo(other.isSetTb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tb, other.tb);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getTable_args(");
boolean first = true;
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
if (!first) sb.append(", ");
sb.append("tb:");
if (this.tb == null) {
sb.append("null");
} else {
sb.append(this.tb);
}
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, java.lang.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 getTable_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getTable_argsStandardScheme getScheme() {
return new getTable_argsStandardScheme();
}
}
private static class getTable_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, getTable_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: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tb = iprot.readString();
struct.setTbIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getTable_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
if (struct.tb != null) {
oprot.writeFieldBegin(TB_FIELD_DESC);
oprot.writeString(struct.tb);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTable_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getTable_argsTupleScheme getScheme() {
return new getTable_argsTupleScheme();
}
}
private static class getTable_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getTable_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDb()) {
optionals.set(0);
}
if (struct.isSetTb()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetDb()) {
oprot.writeString(struct.db);
}
if (struct.isSetTb()) {
oprot.writeString(struct.tb);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getTable_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
}
if (incoming.get(1)) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTable_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
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.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTable_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTable_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable Table success; // required
public @org.apache.thrift.annotation.Nullable MetaserverStorageException o1; // required
public @org.apache.thrift.annotation.Nullable NoSuchObjectException o2; // 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 {
SUCCESS((short)0, "success"),
O1((short)1, "o1"),
O2((short)2, "o2");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // O1
return O1;
case 2: // O2
return O2;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class)));
tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverStorageException.class)));
tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NoSuchObjectException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTable_result.class, metaDataMap);
}
public getTable_result() {
}
public getTable_result(
Table success,
MetaserverStorageException o1,
NoSuchObjectException o2)
{
this();
this.success = success;
this.o1 = o1;
this.o2 = o2;
}
/**
* Performs a deep copy on other.
*/
public getTable_result(getTable_result other) {
if (other.isSetSuccess()) {
this.success = new Table(other.success);
}
if (other.isSetO1()) {
this.o1 = new MetaserverStorageException(other.o1);
}
if (other.isSetO2()) {
this.o2 = new NoSuchObjectException(other.o2);
}
}
public getTable_result deepCopy() {
return new getTable_result(this);
}
@Override
public void clear() {
this.success = null;
this.o1 = null;
this.o2 = null;
}
@org.apache.thrift.annotation.Nullable
public Table getSuccess() {
return this.success;
}
public getTable_result setSuccess(@org.apache.thrift.annotation.Nullable Table success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
@org.apache.thrift.annotation.Nullable
public MetaserverStorageException getO1() {
return this.o1;
}
public getTable_result setO1(@org.apache.thrift.annotation.Nullable MetaserverStorageException o1) {
this.o1 = o1;
return this;
}
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;
}
}
@org.apache.thrift.annotation.Nullable
public NoSuchObjectException getO2() {
return this.o2;
}
public getTable_result setO2(@org.apache.thrift.annotation.Nullable NoSuchObjectException o2) {
this.o2 = o2;
return this;
}
public void unsetO2() {
this.o2 = null;
}
/** Returns true if field o2 is set (has been assigned a value) and false otherwise */
public boolean isSetO2() {
return this.o2 != null;
}
public void setO2IsSet(boolean value) {
if (!value) {
this.o2 = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Table)value);
}
break;
case O1:
if (value == null) {
unsetO1();
} else {
setO1((MetaserverStorageException)value);
}
break;
case O2:
if (value == null) {
unsetO2();
} else {
setO2((NoSuchObjectException)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case O1:
return getO1();
case O2:
return getO2();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case O1:
return isSetO1();
case O2:
return isSetO2();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getTable_result)
return this.equals((getTable_result)that);
return false;
}
public boolean equals(getTable_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
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;
}
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
if (!(this_present_o2 && that_present_o2))
return false;
if (!this.o2.equals(that.o2))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287);
if (isSetO1())
hashCode = hashCode * 8191 + o1.hashCode();
hashCode = hashCode * 8191 + ((isSetO2()) ? 131071 : 524287);
if (isSetO2())
hashCode = hashCode * 8191 + o2.hashCode();
return hashCode;
}
@Override
public int compareTo(getTable_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO2()).compareTo(other.isSetO2());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO2()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getTable_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;
if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
} else {
sb.append(this.o2);
}
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 (success != null) {
success.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, java.lang.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 getTable_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getTable_resultStandardScheme getScheme() {
return new getTable_resultStandardScheme();
}
}
private static class getTable_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, getTable_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.STRUCT) {
struct.success = new Table();
struct.success.read(iprot);
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 MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // O2
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getTable_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o1 != null) {
oprot.writeFieldBegin(O1_FIELD_DESC);
struct.o1.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o2 != null) {
oprot.writeFieldBegin(O2_FIELD_DESC);
struct.o2.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getTable_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getTable_resultTupleScheme getScheme() {
return new getTable_resultTupleScheme();
}
}
private static class getTable_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getTable_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetO1()) {
optionals.set(1);
}
if (struct.isSetO2()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetO1()) {
struct.o1.write(oprot);
}
if (struct.isSetO2()) {
struct.o2.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getTable_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new Table();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.o1 = new MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
}
if (incoming.get(2)) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class listInstants_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("listInstants_args");
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TB_FIELD_DESC = new org.apache.thrift.protocol.TField("tb", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("num", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listInstants_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listInstants_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
public @org.apache.thrift.annotation.Nullable java.lang.String tb; // required
public int num; // 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 {
DB((short)1, "db"),
TB((short)2, "tb"),
NUM((short)3, "num");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DB
return DB;
case 2: // TB
return TB;
case 3: // NUM
return NUM;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __NUM_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TB, new org.apache.thrift.meta_data.FieldMetaData("tb", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NUM, new org.apache.thrift.meta_data.FieldMetaData("num", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listInstants_args.class, metaDataMap);
}
public listInstants_args() {
}
public listInstants_args(
java.lang.String db,
java.lang.String tb,
int num)
{
this();
this.db = db;
this.tb = tb;
this.num = num;
setNumIsSet(true);
}
/**
* Performs a deep copy on other.
*/
public listInstants_args(listInstants_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTb()) {
this.tb = other.tb;
}
this.num = other.num;
}
public listInstants_args deepCopy() {
return new listInstants_args(this);
}
@Override
public void clear() {
this.db = null;
this.tb = null;
setNumIsSet(false);
this.num = 0;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public listInstants_args setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTb() {
return this.tb;
}
public listInstants_args setTb(@org.apache.thrift.annotation.Nullable java.lang.String tb) {
this.tb = tb;
return this;
}
public void unsetTb() {
this.tb = null;
}
/** Returns true if field tb is set (has been assigned a value) and false otherwise */
public boolean isSetTb() {
return this.tb != null;
}
public void setTbIsSet(boolean value) {
if (!value) {
this.tb = null;
}
}
public int getNum() {
return this.num;
}
public listInstants_args setNum(int num) {
this.num = num;
setNumIsSet(true);
return this;
}
public void unsetNum() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_ISSET_ID);
}
/** Returns true if field num is set (has been assigned a value) and false otherwise */
public boolean isSetNum() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_ISSET_ID);
}
public void setNumIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TB:
if (value == null) {
unsetTb();
} else {
setTb((java.lang.String)value);
}
break;
case NUM:
if (value == null) {
unsetNum();
} else {
setNum((java.lang.Integer)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DB:
return getDb();
case TB:
return getTb();
case NUM:
return getNum();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case DB:
return isSetDb();
case TB:
return isSetTb();
case NUM:
return isSetNum();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof listInstants_args)
return this.equals((listInstants_args)that);
return false;
}
public boolean equals(listInstants_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
boolean this_present_tb = true && this.isSetTb();
boolean that_present_tb = true && that.isSetTb();
if (this_present_tb || that_present_tb) {
if (!(this_present_tb && that_present_tb))
return false;
if (!this.tb.equals(that.tb))
return false;
}
boolean this_present_num = true;
boolean that_present_num = true;
if (this_present_num || that_present_num) {
if (!(this_present_num && that_present_num))
return false;
if (this.num != that.num)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTb()) ? 131071 : 524287);
if (isSetTb())
hashCode = hashCode * 8191 + tb.hashCode();
hashCode = hashCode * 8191 + num;
return hashCode;
}
@Override
public int compareTo(listInstants_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetDb()).compareTo(other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTb()).compareTo(other.isSetTb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tb, other.tb);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetNum()).compareTo(other.isSetNum());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNum()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num, other.num);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("listInstants_args(");
boolean first = true;
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
if (!first) sb.append(", ");
sb.append("tb:");
if (this.tb == null) {
sb.append("null");
} else {
sb.append(this.tb);
}
first = false;
if (!first) sb.append(", ");
sb.append("num:");
sb.append(this.num);
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, java.lang.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 listInstants_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public listInstants_argsStandardScheme getScheme() {
return new listInstants_argsStandardScheme();
}
}
private static class listInstants_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, listInstants_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: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // NUM
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.num = iprot.readI32();
struct.setNumIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, listInstants_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
if (struct.tb != null) {
oprot.writeFieldBegin(TB_FIELD_DESC);
oprot.writeString(struct.tb);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(NUM_FIELD_DESC);
oprot.writeI32(struct.num);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listInstants_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public listInstants_argsTupleScheme getScheme() {
return new listInstants_argsTupleScheme();
}
}
private static class listInstants_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, listInstants_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDb()) {
optionals.set(0);
}
if (struct.isSetTb()) {
optionals.set(1);
}
if (struct.isSetNum()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetDb()) {
oprot.writeString(struct.db);
}
if (struct.isSetTb()) {
oprot.writeString(struct.tb);
}
if (struct.isSetNum()) {
oprot.writeI32(struct.num);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, listInstants_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
}
if (incoming.get(1)) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
}
if (incoming.get(2)) {
struct.num = iprot.readI32();
struct.setNumIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class listInstants_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("listInstants_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
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.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listInstants_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listInstants_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.util.List success; // required
public @org.apache.thrift.annotation.Nullable MetaserverStorageException o1; // required
public @org.apache.thrift.annotation.Nullable NoSuchObjectException o2; // 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 {
SUCCESS((short)0, "success"),
O1((short)1, "o1"),
O2((short)2, "o2");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // O1
return O1;
case 2: // O2
return O2;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, THoodieInstant.class))));
tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverStorageException.class)));
tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NoSuchObjectException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listInstants_result.class, metaDataMap);
}
public listInstants_result() {
}
public listInstants_result(
java.util.List success,
MetaserverStorageException o1,
NoSuchObjectException o2)
{
this();
this.success = success;
this.o1 = o1;
this.o2 = o2;
}
/**
* Performs a deep copy on other.
*/
public listInstants_result(listInstants_result other) {
if (other.isSetSuccess()) {
java.util.List __this__success = new java.util.ArrayList(other.success.size());
for (THoodieInstant other_element : other.success) {
__this__success.add(new THoodieInstant(other_element));
}
this.success = __this__success;
}
if (other.isSetO1()) {
this.o1 = new MetaserverStorageException(other.o1);
}
if (other.isSetO2()) {
this.o2 = new NoSuchObjectException(other.o2);
}
}
public listInstants_result deepCopy() {
return new listInstants_result(this);
}
@Override
public void clear() {
this.success = null;
this.o1 = null;
this.o2 = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(THoodieInstant elem) {
if (this.success == null) {
this.success = new java.util.ArrayList();
}
this.success.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getSuccess() {
return this.success;
}
public listInstants_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
@org.apache.thrift.annotation.Nullable
public MetaserverStorageException getO1() {
return this.o1;
}
public listInstants_result setO1(@org.apache.thrift.annotation.Nullable MetaserverStorageException o1) {
this.o1 = o1;
return this;
}
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;
}
}
@org.apache.thrift.annotation.Nullable
public NoSuchObjectException getO2() {
return this.o2;
}
public listInstants_result setO2(@org.apache.thrift.annotation.Nullable NoSuchObjectException o2) {
this.o2 = o2;
return this;
}
public void unsetO2() {
this.o2 = null;
}
/** Returns true if field o2 is set (has been assigned a value) and false otherwise */
public boolean isSetO2() {
return this.o2 != null;
}
public void setO2IsSet(boolean value) {
if (!value) {
this.o2 = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.List)value);
}
break;
case O1:
if (value == null) {
unsetO1();
} else {
setO1((MetaserverStorageException)value);
}
break;
case O2:
if (value == null) {
unsetO2();
} else {
setO2((NoSuchObjectException)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case O1:
return getO1();
case O2:
return getO2();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case O1:
return isSetO1();
case O2:
return isSetO2();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof listInstants_result)
return this.equals((listInstants_result)that);
return false;
}
public boolean equals(listInstants_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
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;
}
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
if (!(this_present_o2 && that_present_o2))
return false;
if (!this.o2.equals(that.o2))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287);
if (isSetO1())
hashCode = hashCode * 8191 + o1.hashCode();
hashCode = hashCode * 8191 + ((isSetO2()) ? 131071 : 524287);
if (isSetO2())
hashCode = hashCode * 8191 + o2.hashCode();
return hashCode;
}
@Override
public int compareTo(listInstants_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO2()).compareTo(other.isSetO2());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO2()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("listInstants_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;
if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
} else {
sb.append(this.o2);
}
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, java.lang.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 listInstants_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public listInstants_resultStandardScheme getScheme() {
return new listInstants_resultStandardScheme();
}
}
private static class listInstants_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, listInstants_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.LIST) {
{
org.apache.thrift.protocol.TList _list18 = iprot.readListBegin();
struct.success = new java.util.ArrayList(_list18.size);
@org.apache.thrift.annotation.Nullable THoodieInstant _elem19;
for (int _i20 = 0; _i20 < _list18.size; ++_i20)
{
_elem19 = new THoodieInstant();
_elem19.read(iprot);
struct.success.add(_elem19);
}
iprot.readListEnd();
}
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 MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // O2
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, listInstants_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
for (THoodieInstant _iter21 : struct.success)
{
_iter21.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.o1 != null) {
oprot.writeFieldBegin(O1_FIELD_DESC);
struct.o1.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o2 != null) {
oprot.writeFieldBegin(O2_FIELD_DESC);
struct.o2.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listInstants_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public listInstants_resultTupleScheme getScheme() {
return new listInstants_resultTupleScheme();
}
}
private static class listInstants_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, listInstants_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetO1()) {
optionals.set(1);
}
if (struct.isSetO2()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (THoodieInstant _iter22 : struct.success)
{
_iter22.write(oprot);
}
}
}
if (struct.isSetO1()) {
struct.o1.write(oprot);
}
if (struct.isSetO2()) {
struct.o2.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, listInstants_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new java.util.ArrayList(_list23.size);
@org.apache.thrift.annotation.Nullable THoodieInstant _elem24;
for (int _i25 = 0; _i25 < _list23.size; ++_i25)
{
_elem24 = new THoodieInstant();
_elem24.read(iprot);
struct.success.add(_elem24);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.o1 = new MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
}
if (incoming.get(2)) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getInstantMetadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInstantMetadata_args");
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TB_FIELD_DESC = new org.apache.thrift.protocol.TField("tb", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField INSTANT_FIELD_DESC = new org.apache.thrift.protocol.TField("instant", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getInstantMetadata_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getInstantMetadata_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
public @org.apache.thrift.annotation.Nullable java.lang.String tb; // required
public @org.apache.thrift.annotation.Nullable THoodieInstant instant; // 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 {
DB((short)1, "db"),
TB((short)2, "tb"),
INSTANT((short)3, "instant");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DB
return DB;
case 2: // TB
return TB;
case 3: // INSTANT
return INSTANT;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TB, new org.apache.thrift.meta_data.FieldMetaData("tb", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.INSTANT, new org.apache.thrift.meta_data.FieldMetaData("instant", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THoodieInstant.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInstantMetadata_args.class, metaDataMap);
}
public getInstantMetadata_args() {
}
public getInstantMetadata_args(
java.lang.String db,
java.lang.String tb,
THoodieInstant instant)
{
this();
this.db = db;
this.tb = tb;
this.instant = instant;
}
/**
* Performs a deep copy on other.
*/
public getInstantMetadata_args(getInstantMetadata_args other) {
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTb()) {
this.tb = other.tb;
}
if (other.isSetInstant()) {
this.instant = new THoodieInstant(other.instant);
}
}
public getInstantMetadata_args deepCopy() {
return new getInstantMetadata_args(this);
}
@Override
public void clear() {
this.db = null;
this.tb = null;
this.instant = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public getInstantMetadata_args setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTb() {
return this.tb;
}
public getInstantMetadata_args setTb(@org.apache.thrift.annotation.Nullable java.lang.String tb) {
this.tb = tb;
return this;
}
public void unsetTb() {
this.tb = null;
}
/** Returns true if field tb is set (has been assigned a value) and false otherwise */
public boolean isSetTb() {
return this.tb != null;
}
public void setTbIsSet(boolean value) {
if (!value) {
this.tb = null;
}
}
@org.apache.thrift.annotation.Nullable
public THoodieInstant getInstant() {
return this.instant;
}
public getInstantMetadata_args setInstant(@org.apache.thrift.annotation.Nullable THoodieInstant instant) {
this.instant = instant;
return this;
}
public void unsetInstant() {
this.instant = null;
}
/** Returns true if field instant is set (has been assigned a value) and false otherwise */
public boolean isSetInstant() {
return this.instant != null;
}
public void setInstantIsSet(boolean value) {
if (!value) {
this.instant = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TB:
if (value == null) {
unsetTb();
} else {
setTb((java.lang.String)value);
}
break;
case INSTANT:
if (value == null) {
unsetInstant();
} else {
setInstant((THoodieInstant)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DB:
return getDb();
case TB:
return getTb();
case INSTANT:
return getInstant();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case DB:
return isSetDb();
case TB:
return isSetTb();
case INSTANT:
return isSetInstant();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getInstantMetadata_args)
return this.equals((getInstantMetadata_args)that);
return false;
}
public boolean equals(getInstantMetadata_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
boolean this_present_tb = true && this.isSetTb();
boolean that_present_tb = true && that.isSetTb();
if (this_present_tb || that_present_tb) {
if (!(this_present_tb && that_present_tb))
return false;
if (!this.tb.equals(that.tb))
return false;
}
boolean this_present_instant = true && this.isSetInstant();
boolean that_present_instant = true && that.isSetInstant();
if (this_present_instant || that_present_instant) {
if (!(this_present_instant && that_present_instant))
return false;
if (!this.instant.equals(that.instant))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTb()) ? 131071 : 524287);
if (isSetTb())
hashCode = hashCode * 8191 + tb.hashCode();
hashCode = hashCode * 8191 + ((isSetInstant()) ? 131071 : 524287);
if (isSetInstant())
hashCode = hashCode * 8191 + instant.hashCode();
return hashCode;
}
@Override
public int compareTo(getInstantMetadata_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetDb()).compareTo(other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTb()).compareTo(other.isSetTb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tb, other.tb);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetInstant()).compareTo(other.isSetInstant());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInstant()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instant, other.instant);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getInstantMetadata_args(");
boolean first = true;
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
if (!first) sb.append(", ");
sb.append("tb:");
if (this.tb == null) {
sb.append("null");
} else {
sb.append(this.tb);
}
first = false;
if (!first) sb.append(", ");
sb.append("instant:");
if (this.instant == null) {
sb.append("null");
} else {
sb.append(this.instant);
}
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 (instant != null) {
instant.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, java.lang.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 getInstantMetadata_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getInstantMetadata_argsStandardScheme getScheme() {
return new getInstantMetadata_argsStandardScheme();
}
}
private static class getInstantMetadata_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, getInstantMetadata_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: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // INSTANT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.instant = new THoodieInstant();
struct.instant.read(iprot);
struct.setInstantIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getInstantMetadata_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
if (struct.tb != null) {
oprot.writeFieldBegin(TB_FIELD_DESC);
oprot.writeString(struct.tb);
oprot.writeFieldEnd();
}
if (struct.instant != null) {
oprot.writeFieldBegin(INSTANT_FIELD_DESC);
struct.instant.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getInstantMetadata_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getInstantMetadata_argsTupleScheme getScheme() {
return new getInstantMetadata_argsTupleScheme();
}
}
private static class getInstantMetadata_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getInstantMetadata_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDb()) {
optionals.set(0);
}
if (struct.isSetTb()) {
optionals.set(1);
}
if (struct.isSetInstant()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetDb()) {
oprot.writeString(struct.db);
}
if (struct.isSetTb()) {
oprot.writeString(struct.tb);
}
if (struct.isSetInstant()) {
struct.instant.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getInstantMetadata_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
}
if (incoming.get(1)) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
}
if (incoming.get(2)) {
struct.instant = new THoodieInstant();
struct.instant.read(iprot);
struct.setInstantIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getInstantMetadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInstantMetadata_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
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.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getInstantMetadata_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getInstantMetadata_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success; // required
public @org.apache.thrift.annotation.Nullable MetaserverStorageException o1; // required
public @org.apache.thrift.annotation.Nullable NoSuchObjectException o2; // 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 {
SUCCESS((short)0, "success"),
O1((short)1, "o1"),
O2((short)2, "o2");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // O1
return O1;
case 2: // O2
return O2;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverStorageException.class)));
tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NoSuchObjectException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInstantMetadata_result.class, metaDataMap);
}
public getInstantMetadata_result() {
}
public getInstantMetadata_result(
java.nio.ByteBuffer success,
MetaserverStorageException o1,
NoSuchObjectException o2)
{
this();
this.success = org.apache.thrift.TBaseHelper.copyBinary(success);
this.o1 = o1;
this.o2 = o2;
}
/**
* Performs a deep copy on other.
*/
public getInstantMetadata_result(getInstantMetadata_result other) {
if (other.isSetSuccess()) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
}
if (other.isSetO1()) {
this.o1 = new MetaserverStorageException(other.o1);
}
if (other.isSetO2()) {
this.o2 = new NoSuchObjectException(other.o2);
}
}
public getInstantMetadata_result deepCopy() {
return new getInstantMetadata_result(this);
}
@Override
public void clear() {
this.success = null;
this.o1 = null;
this.o2 = null;
}
public byte[] getSuccess() {
setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
return success == null ? null : success.array();
}
public java.nio.ByteBuffer bufferForSuccess() {
return org.apache.thrift.TBaseHelper.copyBinary(success);
}
public getInstantMetadata_result setSuccess(byte[] success) {
this.success = success == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(success.clone());
return this;
}
public getInstantMetadata_result setSuccess(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(success);
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
@org.apache.thrift.annotation.Nullable
public MetaserverStorageException getO1() {
return this.o1;
}
public getInstantMetadata_result setO1(@org.apache.thrift.annotation.Nullable MetaserverStorageException o1) {
this.o1 = o1;
return this;
}
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;
}
}
@org.apache.thrift.annotation.Nullable
public NoSuchObjectException getO2() {
return this.o2;
}
public getInstantMetadata_result setO2(@org.apache.thrift.annotation.Nullable NoSuchObjectException o2) {
this.o2 = o2;
return this;
}
public void unsetO2() {
this.o2 = null;
}
/** Returns true if field o2 is set (has been assigned a value) and false otherwise */
public boolean isSetO2() {
return this.o2 != null;
}
public void setO2IsSet(boolean value) {
if (!value) {
this.o2 = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
if (value instanceof byte[]) {
setSuccess((byte[])value);
} else {
setSuccess((java.nio.ByteBuffer)value);
}
}
break;
case O1:
if (value == null) {
unsetO1();
} else {
setO1((MetaserverStorageException)value);
}
break;
case O2:
if (value == null) {
unsetO2();
} else {
setO2((NoSuchObjectException)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case O1:
return getO1();
case O2:
return getO2();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case O1:
return isSetO1();
case O2:
return isSetO2();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getInstantMetadata_result)
return this.equals((getInstantMetadata_result)that);
return false;
}
public boolean equals(getInstantMetadata_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
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;
}
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
if (!(this_present_o2 && that_present_o2))
return false;
if (!this.o2.equals(that.o2))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287);
if (isSetO1())
hashCode = hashCode * 8191 + o1.hashCode();
hashCode = hashCode * 8191 + ((isSetO2()) ? 131071 : 524287);
if (isSetO2())
hashCode = hashCode * 8191 + o2.hashCode();
return hashCode;
}
@Override
public int compareTo(getInstantMetadata_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO2()).compareTo(other.isSetO2());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO2()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getInstantMetadata_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.success, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("o1:");
if (this.o1 == null) {
sb.append("null");
} else {
sb.append(this.o1);
}
first = false;
if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
} else {
sb.append(this.o2);
}
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, java.lang.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 getInstantMetadata_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getInstantMetadata_resultStandardScheme getScheme() {
return new getInstantMetadata_resultStandardScheme();
}
}
private static class getInstantMetadata_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, getInstantMetadata_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.readBinary();
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 MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // O2
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getInstantMetadata_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBinary(struct.success);
oprot.writeFieldEnd();
}
if (struct.o1 != null) {
oprot.writeFieldBegin(O1_FIELD_DESC);
struct.o1.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o2 != null) {
oprot.writeFieldBegin(O2_FIELD_DESC);
struct.o2.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getInstantMetadata_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getInstantMetadata_resultTupleScheme getScheme() {
return new getInstantMetadata_resultTupleScheme();
}
}
private static class getInstantMetadata_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getInstantMetadata_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetO1()) {
optionals.set(1);
}
if (struct.isSetO2()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeBinary(struct.success);
}
if (struct.isSetO1()) {
struct.o1.write(oprot);
}
if (struct.isSetO2()) {
struct.o2.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getInstantMetadata_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.o1 = new MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
}
if (incoming.get(2)) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class createNewInstantTime_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNewInstantTime_args");
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TB_FIELD_DESC = new org.apache.thrift.protocol.TField("tb", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createNewInstantTime_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createNewInstantTime_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
public @org.apache.thrift.annotation.Nullable java.lang.String tb; // 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 {
DB((short)1, "db"),
TB((short)2, "tb");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DB
return DB;
case 2: // TB
return TB;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TB, new org.apache.thrift.meta_data.FieldMetaData("tb", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNewInstantTime_args.class, metaDataMap);
}
public createNewInstantTime_args() {
}
public createNewInstantTime_args(
java.lang.String db,
java.lang.String tb)
{
this();
this.db = db;
this.tb = tb;
}
/**
* Performs a deep copy on other.
*/
public createNewInstantTime_args(createNewInstantTime_args other) {
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTb()) {
this.tb = other.tb;
}
}
public createNewInstantTime_args deepCopy() {
return new createNewInstantTime_args(this);
}
@Override
public void clear() {
this.db = null;
this.tb = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public createNewInstantTime_args setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTb() {
return this.tb;
}
public createNewInstantTime_args setTb(@org.apache.thrift.annotation.Nullable java.lang.String tb) {
this.tb = tb;
return this;
}
public void unsetTb() {
this.tb = null;
}
/** Returns true if field tb is set (has been assigned a value) and false otherwise */
public boolean isSetTb() {
return this.tb != null;
}
public void setTbIsSet(boolean value) {
if (!value) {
this.tb = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TB:
if (value == null) {
unsetTb();
} else {
setTb((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DB:
return getDb();
case TB:
return getTb();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case DB:
return isSetDb();
case TB:
return isSetTb();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof createNewInstantTime_args)
return this.equals((createNewInstantTime_args)that);
return false;
}
public boolean equals(createNewInstantTime_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
boolean this_present_tb = true && this.isSetTb();
boolean that_present_tb = true && that.isSetTb();
if (this_present_tb || that_present_tb) {
if (!(this_present_tb && that_present_tb))
return false;
if (!this.tb.equals(that.tb))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTb()) ? 131071 : 524287);
if (isSetTb())
hashCode = hashCode * 8191 + tb.hashCode();
return hashCode;
}
@Override
public int compareTo(createNewInstantTime_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetDb()).compareTo(other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTb()).compareTo(other.isSetTb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tb, other.tb);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createNewInstantTime_args(");
boolean first = true;
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
if (!first) sb.append(", ");
sb.append("tb:");
if (this.tb == null) {
sb.append("null");
} else {
sb.append(this.tb);
}
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, java.lang.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 createNewInstantTime_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createNewInstantTime_argsStandardScheme getScheme() {
return new createNewInstantTime_argsStandardScheme();
}
}
private static class createNewInstantTime_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, createNewInstantTime_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: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tb = iprot.readString();
struct.setTbIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createNewInstantTime_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
if (struct.tb != null) {
oprot.writeFieldBegin(TB_FIELD_DESC);
oprot.writeString(struct.tb);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createNewInstantTime_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createNewInstantTime_argsTupleScheme getScheme() {
return new createNewInstantTime_argsTupleScheme();
}
}
private static class createNewInstantTime_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createNewInstantTime_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDb()) {
optionals.set(0);
}
if (struct.isSetTb()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetDb()) {
oprot.writeString(struct.db);
}
if (struct.isSetTb()) {
oprot.writeString(struct.tb);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createNewInstantTime_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
}
if (incoming.get(1)) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class createNewInstantTime_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNewInstantTime_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
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.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createNewInstantTime_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createNewInstantTime_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
public @org.apache.thrift.annotation.Nullable MetaserverStorageException o1; // required
public @org.apache.thrift.annotation.Nullable NoSuchObjectException o2; // 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 {
SUCCESS((short)0, "success"),
O1((short)1, "o1"),
O2((short)2, "o2");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // O1
return O1;
case 2: // O2
return O2;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverStorageException.class)));
tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NoSuchObjectException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNewInstantTime_result.class, metaDataMap);
}
public createNewInstantTime_result() {
}
public createNewInstantTime_result(
java.lang.String success,
MetaserverStorageException o1,
NoSuchObjectException o2)
{
this();
this.success = success;
this.o1 = o1;
this.o2 = o2;
}
/**
* Performs a deep copy on other.
*/
public createNewInstantTime_result(createNewInstantTime_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetO1()) {
this.o1 = new MetaserverStorageException(other.o1);
}
if (other.isSetO2()) {
this.o2 = new NoSuchObjectException(other.o2);
}
}
public createNewInstantTime_result deepCopy() {
return new createNewInstantTime_result(this);
}
@Override
public void clear() {
this.success = null;
this.o1 = null;
this.o2 = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getSuccess() {
return this.success;
}
public createNewInstantTime_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
@org.apache.thrift.annotation.Nullable
public MetaserverStorageException getO1() {
return this.o1;
}
public createNewInstantTime_result setO1(@org.apache.thrift.annotation.Nullable MetaserverStorageException o1) {
this.o1 = o1;
return this;
}
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;
}
}
@org.apache.thrift.annotation.Nullable
public NoSuchObjectException getO2() {
return this.o2;
}
public createNewInstantTime_result setO2(@org.apache.thrift.annotation.Nullable NoSuchObjectException o2) {
this.o2 = o2;
return this;
}
public void unsetO2() {
this.o2 = null;
}
/** Returns true if field o2 is set (has been assigned a value) and false otherwise */
public boolean isSetO2() {
return this.o2 != null;
}
public void setO2IsSet(boolean value) {
if (!value) {
this.o2 = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.String)value);
}
break;
case O1:
if (value == null) {
unsetO1();
} else {
setO1((MetaserverStorageException)value);
}
break;
case O2:
if (value == null) {
unsetO2();
} else {
setO2((NoSuchObjectException)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case O1:
return getO1();
case O2:
return getO2();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case O1:
return isSetO1();
case O2:
return isSetO2();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof createNewInstantTime_result)
return this.equals((createNewInstantTime_result)that);
return false;
}
public boolean equals(createNewInstantTime_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
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;
}
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
if (!(this_present_o2 && that_present_o2))
return false;
if (!this.o2.equals(that.o2))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287);
if (isSetO1())
hashCode = hashCode * 8191 + o1.hashCode();
hashCode = hashCode * 8191 + ((isSetO2()) ? 131071 : 524287);
if (isSetO2())
hashCode = hashCode * 8191 + o2.hashCode();
return hashCode;
}
@Override
public int compareTo(createNewInstantTime_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO2()).compareTo(other.isSetO2());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO2()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createNewInstantTime_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;
if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
} else {
sb.append(this.o2);
}
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, java.lang.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 createNewInstantTime_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createNewInstantTime_resultStandardScheme getScheme() {
return new createNewInstantTime_resultStandardScheme();
}
}
private static class createNewInstantTime_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, createNewInstantTime_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 MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // O2
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createNewInstantTime_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();
}
if (struct.o2 != null) {
oprot.writeFieldBegin(O2_FIELD_DESC);
struct.o2.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createNewInstantTime_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createNewInstantTime_resultTupleScheme getScheme() {
return new createNewInstantTime_resultTupleScheme();
}
}
private static class createNewInstantTime_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createNewInstantTime_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetO1()) {
optionals.set(1);
}
if (struct.isSetO2()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetO1()) {
struct.o1.write(oprot);
}
if (struct.isSetO2()) {
struct.o2.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createNewInstantTime_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.o1 = new MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
}
if (incoming.get(2)) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class createNewInstantWithTime_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNewInstantWithTime_args");
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TB_FIELD_DESC = new org.apache.thrift.protocol.TField("tb", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField INSTANT_FIELD_DESC = new org.apache.thrift.protocol.TField("instant", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField CONTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("content", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createNewInstantWithTime_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createNewInstantWithTime_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
public @org.apache.thrift.annotation.Nullable java.lang.String tb; // required
public @org.apache.thrift.annotation.Nullable THoodieInstant instant; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer content; // 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 {
DB((short)1, "db"),
TB((short)2, "tb"),
INSTANT((short)3, "instant"),
CONTENT((short)4, "content");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DB
return DB;
case 2: // TB
return TB;
case 3: // INSTANT
return INSTANT;
case 4: // CONTENT
return CONTENT;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TB, new org.apache.thrift.meta_data.FieldMetaData("tb", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.INSTANT, new org.apache.thrift.meta_data.FieldMetaData("instant", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THoodieInstant.class)));
tmpMap.put(_Fields.CONTENT, new org.apache.thrift.meta_data.FieldMetaData("content", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNewInstantWithTime_args.class, metaDataMap);
}
public createNewInstantWithTime_args() {
}
public createNewInstantWithTime_args(
java.lang.String db,
java.lang.String tb,
THoodieInstant instant,
java.nio.ByteBuffer content)
{
this();
this.db = db;
this.tb = tb;
this.instant = instant;
this.content = org.apache.thrift.TBaseHelper.copyBinary(content);
}
/**
* Performs a deep copy on other.
*/
public createNewInstantWithTime_args(createNewInstantWithTime_args other) {
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTb()) {
this.tb = other.tb;
}
if (other.isSetInstant()) {
this.instant = new THoodieInstant(other.instant);
}
if (other.isSetContent()) {
this.content = org.apache.thrift.TBaseHelper.copyBinary(other.content);
}
}
public createNewInstantWithTime_args deepCopy() {
return new createNewInstantWithTime_args(this);
}
@Override
public void clear() {
this.db = null;
this.tb = null;
this.instant = null;
this.content = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public createNewInstantWithTime_args setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTb() {
return this.tb;
}
public createNewInstantWithTime_args setTb(@org.apache.thrift.annotation.Nullable java.lang.String tb) {
this.tb = tb;
return this;
}
public void unsetTb() {
this.tb = null;
}
/** Returns true if field tb is set (has been assigned a value) and false otherwise */
public boolean isSetTb() {
return this.tb != null;
}
public void setTbIsSet(boolean value) {
if (!value) {
this.tb = null;
}
}
@org.apache.thrift.annotation.Nullable
public THoodieInstant getInstant() {
return this.instant;
}
public createNewInstantWithTime_args setInstant(@org.apache.thrift.annotation.Nullable THoodieInstant instant) {
this.instant = instant;
return this;
}
public void unsetInstant() {
this.instant = null;
}
/** Returns true if field instant is set (has been assigned a value) and false otherwise */
public boolean isSetInstant() {
return this.instant != null;
}
public void setInstantIsSet(boolean value) {
if (!value) {
this.instant = null;
}
}
public byte[] getContent() {
setContent(org.apache.thrift.TBaseHelper.rightSize(content));
return content == null ? null : content.array();
}
public java.nio.ByteBuffer bufferForContent() {
return org.apache.thrift.TBaseHelper.copyBinary(content);
}
public createNewInstantWithTime_args setContent(byte[] content) {
this.content = content == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(content.clone());
return this;
}
public createNewInstantWithTime_args setContent(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer content) {
this.content = org.apache.thrift.TBaseHelper.copyBinary(content);
return this;
}
public void unsetContent() {
this.content = null;
}
/** Returns true if field content is set (has been assigned a value) and false otherwise */
public boolean isSetContent() {
return this.content != null;
}
public void setContentIsSet(boolean value) {
if (!value) {
this.content = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TB:
if (value == null) {
unsetTb();
} else {
setTb((java.lang.String)value);
}
break;
case INSTANT:
if (value == null) {
unsetInstant();
} else {
setInstant((THoodieInstant)value);
}
break;
case CONTENT:
if (value == null) {
unsetContent();
} else {
if (value instanceof byte[]) {
setContent((byte[])value);
} else {
setContent((java.nio.ByteBuffer)value);
}
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DB:
return getDb();
case TB:
return getTb();
case INSTANT:
return getInstant();
case CONTENT:
return getContent();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case DB:
return isSetDb();
case TB:
return isSetTb();
case INSTANT:
return isSetInstant();
case CONTENT:
return isSetContent();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof createNewInstantWithTime_args)
return this.equals((createNewInstantWithTime_args)that);
return false;
}
public boolean equals(createNewInstantWithTime_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
boolean this_present_tb = true && this.isSetTb();
boolean that_present_tb = true && that.isSetTb();
if (this_present_tb || that_present_tb) {
if (!(this_present_tb && that_present_tb))
return false;
if (!this.tb.equals(that.tb))
return false;
}
boolean this_present_instant = true && this.isSetInstant();
boolean that_present_instant = true && that.isSetInstant();
if (this_present_instant || that_present_instant) {
if (!(this_present_instant && that_present_instant))
return false;
if (!this.instant.equals(that.instant))
return false;
}
boolean this_present_content = true && this.isSetContent();
boolean that_present_content = true && that.isSetContent();
if (this_present_content || that_present_content) {
if (!(this_present_content && that_present_content))
return false;
if (!this.content.equals(that.content))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTb()) ? 131071 : 524287);
if (isSetTb())
hashCode = hashCode * 8191 + tb.hashCode();
hashCode = hashCode * 8191 + ((isSetInstant()) ? 131071 : 524287);
if (isSetInstant())
hashCode = hashCode * 8191 + instant.hashCode();
hashCode = hashCode * 8191 + ((isSetContent()) ? 131071 : 524287);
if (isSetContent())
hashCode = hashCode * 8191 + content.hashCode();
return hashCode;
}
@Override
public int compareTo(createNewInstantWithTime_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetDb()).compareTo(other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTb()).compareTo(other.isSetTb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tb, other.tb);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetInstant()).compareTo(other.isSetInstant());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInstant()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instant, other.instant);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetContent()).compareTo(other.isSetContent());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetContent()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.content, other.content);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createNewInstantWithTime_args(");
boolean first = true;
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
if (!first) sb.append(", ");
sb.append("tb:");
if (this.tb == null) {
sb.append("null");
} else {
sb.append(this.tb);
}
first = false;
if (!first) sb.append(", ");
sb.append("instant:");
if (this.instant == null) {
sb.append("null");
} else {
sb.append(this.instant);
}
first = false;
if (!first) sb.append(", ");
sb.append("content:");
if (this.content == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.content, sb);
}
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 (instant != null) {
instant.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, java.lang.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 createNewInstantWithTime_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createNewInstantWithTime_argsStandardScheme getScheme() {
return new createNewInstantWithTime_argsStandardScheme();
}
}
private static class createNewInstantWithTime_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, createNewInstantWithTime_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: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // INSTANT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.instant = new THoodieInstant();
struct.instant.read(iprot);
struct.setInstantIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // CONTENT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.content = iprot.readBinary();
struct.setContentIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createNewInstantWithTime_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
if (struct.tb != null) {
oprot.writeFieldBegin(TB_FIELD_DESC);
oprot.writeString(struct.tb);
oprot.writeFieldEnd();
}
if (struct.instant != null) {
oprot.writeFieldBegin(INSTANT_FIELD_DESC);
struct.instant.write(oprot);
oprot.writeFieldEnd();
}
if (struct.content != null) {
oprot.writeFieldBegin(CONTENT_FIELD_DESC);
oprot.writeBinary(struct.content);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createNewInstantWithTime_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createNewInstantWithTime_argsTupleScheme getScheme() {
return new createNewInstantWithTime_argsTupleScheme();
}
}
private static class createNewInstantWithTime_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createNewInstantWithTime_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDb()) {
optionals.set(0);
}
if (struct.isSetTb()) {
optionals.set(1);
}
if (struct.isSetInstant()) {
optionals.set(2);
}
if (struct.isSetContent()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetDb()) {
oprot.writeString(struct.db);
}
if (struct.isSetTb()) {
oprot.writeString(struct.tb);
}
if (struct.isSetInstant()) {
struct.instant.write(oprot);
}
if (struct.isSetContent()) {
oprot.writeBinary(struct.content);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createNewInstantWithTime_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
}
if (incoming.get(1)) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
}
if (incoming.get(2)) {
struct.instant = new THoodieInstant();
struct.instant.read(iprot);
struct.setInstantIsSet(true);
}
if (incoming.get(3)) {
struct.content = iprot.readBinary();
struct.setContentIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class createNewInstantWithTime_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNewInstantWithTime_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
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.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createNewInstantWithTime_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createNewInstantWithTime_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable HoodieInstantChangeResult success; // required
public @org.apache.thrift.annotation.Nullable MetaserverStorageException o1; // required
public @org.apache.thrift.annotation.Nullable NoSuchObjectException o2; // 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 {
SUCCESS((short)0, "success"),
O1((short)1, "o1"),
O2((short)2, "o2");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // O1
return O1;
case 2: // O2
return O2;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HoodieInstantChangeResult.class)));
tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverStorageException.class)));
tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NoSuchObjectException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNewInstantWithTime_result.class, metaDataMap);
}
public createNewInstantWithTime_result() {
}
public createNewInstantWithTime_result(
HoodieInstantChangeResult success,
MetaserverStorageException o1,
NoSuchObjectException o2)
{
this();
this.success = success;
this.o1 = o1;
this.o2 = o2;
}
/**
* Performs a deep copy on other.
*/
public createNewInstantWithTime_result(createNewInstantWithTime_result other) {
if (other.isSetSuccess()) {
this.success = new HoodieInstantChangeResult(other.success);
}
if (other.isSetO1()) {
this.o1 = new MetaserverStorageException(other.o1);
}
if (other.isSetO2()) {
this.o2 = new NoSuchObjectException(other.o2);
}
}
public createNewInstantWithTime_result deepCopy() {
return new createNewInstantWithTime_result(this);
}
@Override
public void clear() {
this.success = null;
this.o1 = null;
this.o2 = null;
}
@org.apache.thrift.annotation.Nullable
public HoodieInstantChangeResult getSuccess() {
return this.success;
}
public createNewInstantWithTime_result setSuccess(@org.apache.thrift.annotation.Nullable HoodieInstantChangeResult success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
@org.apache.thrift.annotation.Nullable
public MetaserverStorageException getO1() {
return this.o1;
}
public createNewInstantWithTime_result setO1(@org.apache.thrift.annotation.Nullable MetaserverStorageException o1) {
this.o1 = o1;
return this;
}
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;
}
}
@org.apache.thrift.annotation.Nullable
public NoSuchObjectException getO2() {
return this.o2;
}
public createNewInstantWithTime_result setO2(@org.apache.thrift.annotation.Nullable NoSuchObjectException o2) {
this.o2 = o2;
return this;
}
public void unsetO2() {
this.o2 = null;
}
/** Returns true if field o2 is set (has been assigned a value) and false otherwise */
public boolean isSetO2() {
return this.o2 != null;
}
public void setO2IsSet(boolean value) {
if (!value) {
this.o2 = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((HoodieInstantChangeResult)value);
}
break;
case O1:
if (value == null) {
unsetO1();
} else {
setO1((MetaserverStorageException)value);
}
break;
case O2:
if (value == null) {
unsetO2();
} else {
setO2((NoSuchObjectException)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case O1:
return getO1();
case O2:
return getO2();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case O1:
return isSetO1();
case O2:
return isSetO2();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof createNewInstantWithTime_result)
return this.equals((createNewInstantWithTime_result)that);
return false;
}
public boolean equals(createNewInstantWithTime_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
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;
}
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
if (!(this_present_o2 && that_present_o2))
return false;
if (!this.o2.equals(that.o2))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287);
if (isSetO1())
hashCode = hashCode * 8191 + o1.hashCode();
hashCode = hashCode * 8191 + ((isSetO2()) ? 131071 : 524287);
if (isSetO2())
hashCode = hashCode * 8191 + o2.hashCode();
return hashCode;
}
@Override
public int compareTo(createNewInstantWithTime_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO2()).compareTo(other.isSetO2());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO2()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("createNewInstantWithTime_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;
if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
} else {
sb.append(this.o2);
}
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 (success != null) {
success.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, java.lang.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 createNewInstantWithTime_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createNewInstantWithTime_resultStandardScheme getScheme() {
return new createNewInstantWithTime_resultStandardScheme();
}
}
private static class createNewInstantWithTime_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, createNewInstantWithTime_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.STRUCT) {
struct.success = new HoodieInstantChangeResult();
struct.success.read(iprot);
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 MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // O2
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createNewInstantWithTime_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o1 != null) {
oprot.writeFieldBegin(O1_FIELD_DESC);
struct.o1.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o2 != null) {
oprot.writeFieldBegin(O2_FIELD_DESC);
struct.o2.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createNewInstantWithTime_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public createNewInstantWithTime_resultTupleScheme getScheme() {
return new createNewInstantWithTime_resultTupleScheme();
}
}
private static class createNewInstantWithTime_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createNewInstantWithTime_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetO1()) {
optionals.set(1);
}
if (struct.isSetO2()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetO1()) {
struct.o1.write(oprot);
}
if (struct.isSetO2()) {
struct.o2.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createNewInstantWithTime_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new HoodieInstantChangeResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.o1 = new MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
}
if (incoming.get(2)) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class transitionInstantState_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("transitionInstantState_args");
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TB_FIELD_DESC = new org.apache.thrift.protocol.TField("tb", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField FROM_INSTANT_FIELD_DESC = new org.apache.thrift.protocol.TField("fromInstant", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField TO_INSTANT_FIELD_DESC = new org.apache.thrift.protocol.TField("toInstant", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new transitionInstantState_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new transitionInstantState_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
public @org.apache.thrift.annotation.Nullable java.lang.String tb; // required
public @org.apache.thrift.annotation.Nullable THoodieInstant fromInstant; // required
public @org.apache.thrift.annotation.Nullable THoodieInstant toInstant; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer metadata; // 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 {
DB((short)1, "db"),
TB((short)2, "tb"),
FROM_INSTANT((short)3, "fromInstant"),
TO_INSTANT((short)4, "toInstant"),
METADATA((short)5, "metadata");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DB
return DB;
case 2: // TB
return TB;
case 3: // FROM_INSTANT
return FROM_INSTANT;
case 4: // TO_INSTANT
return TO_INSTANT;
case 5: // METADATA
return METADATA;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TB, new org.apache.thrift.meta_data.FieldMetaData("tb", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.FROM_INSTANT, new org.apache.thrift.meta_data.FieldMetaData("fromInstant", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THoodieInstant.class)));
tmpMap.put(_Fields.TO_INSTANT, new org.apache.thrift.meta_data.FieldMetaData("toInstant", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THoodieInstant.class)));
tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(transitionInstantState_args.class, metaDataMap);
}
public transitionInstantState_args() {
}
public transitionInstantState_args(
java.lang.String db,
java.lang.String tb,
THoodieInstant fromInstant,
THoodieInstant toInstant,
java.nio.ByteBuffer metadata)
{
this();
this.db = db;
this.tb = tb;
this.fromInstant = fromInstant;
this.toInstant = toInstant;
this.metadata = org.apache.thrift.TBaseHelper.copyBinary(metadata);
}
/**
* Performs a deep copy on other.
*/
public transitionInstantState_args(transitionInstantState_args other) {
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTb()) {
this.tb = other.tb;
}
if (other.isSetFromInstant()) {
this.fromInstant = new THoodieInstant(other.fromInstant);
}
if (other.isSetToInstant()) {
this.toInstant = new THoodieInstant(other.toInstant);
}
if (other.isSetMetadata()) {
this.metadata = org.apache.thrift.TBaseHelper.copyBinary(other.metadata);
}
}
public transitionInstantState_args deepCopy() {
return new transitionInstantState_args(this);
}
@Override
public void clear() {
this.db = null;
this.tb = null;
this.fromInstant = null;
this.toInstant = null;
this.metadata = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public transitionInstantState_args setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTb() {
return this.tb;
}
public transitionInstantState_args setTb(@org.apache.thrift.annotation.Nullable java.lang.String tb) {
this.tb = tb;
return this;
}
public void unsetTb() {
this.tb = null;
}
/** Returns true if field tb is set (has been assigned a value) and false otherwise */
public boolean isSetTb() {
return this.tb != null;
}
public void setTbIsSet(boolean value) {
if (!value) {
this.tb = null;
}
}
@org.apache.thrift.annotation.Nullable
public THoodieInstant getFromInstant() {
return this.fromInstant;
}
public transitionInstantState_args setFromInstant(@org.apache.thrift.annotation.Nullable THoodieInstant fromInstant) {
this.fromInstant = fromInstant;
return this;
}
public void unsetFromInstant() {
this.fromInstant = null;
}
/** Returns true if field fromInstant is set (has been assigned a value) and false otherwise */
public boolean isSetFromInstant() {
return this.fromInstant != null;
}
public void setFromInstantIsSet(boolean value) {
if (!value) {
this.fromInstant = null;
}
}
@org.apache.thrift.annotation.Nullable
public THoodieInstant getToInstant() {
return this.toInstant;
}
public transitionInstantState_args setToInstant(@org.apache.thrift.annotation.Nullable THoodieInstant toInstant) {
this.toInstant = toInstant;
return this;
}
public void unsetToInstant() {
this.toInstant = null;
}
/** Returns true if field toInstant is set (has been assigned a value) and false otherwise */
public boolean isSetToInstant() {
return this.toInstant != null;
}
public void setToInstantIsSet(boolean value) {
if (!value) {
this.toInstant = null;
}
}
public byte[] getMetadata() {
setMetadata(org.apache.thrift.TBaseHelper.rightSize(metadata));
return metadata == null ? null : metadata.array();
}
public java.nio.ByteBuffer bufferForMetadata() {
return org.apache.thrift.TBaseHelper.copyBinary(metadata);
}
public transitionInstantState_args setMetadata(byte[] metadata) {
this.metadata = metadata == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(metadata.clone());
return this;
}
public transitionInstantState_args setMetadata(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer metadata) {
this.metadata = org.apache.thrift.TBaseHelper.copyBinary(metadata);
return this;
}
public void unsetMetadata() {
this.metadata = null;
}
/** Returns true if field metadata is set (has been assigned a value) and false otherwise */
public boolean isSetMetadata() {
return this.metadata != null;
}
public void setMetadataIsSet(boolean value) {
if (!value) {
this.metadata = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TB:
if (value == null) {
unsetTb();
} else {
setTb((java.lang.String)value);
}
break;
case FROM_INSTANT:
if (value == null) {
unsetFromInstant();
} else {
setFromInstant((THoodieInstant)value);
}
break;
case TO_INSTANT:
if (value == null) {
unsetToInstant();
} else {
setToInstant((THoodieInstant)value);
}
break;
case METADATA:
if (value == null) {
unsetMetadata();
} else {
if (value instanceof byte[]) {
setMetadata((byte[])value);
} else {
setMetadata((java.nio.ByteBuffer)value);
}
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DB:
return getDb();
case TB:
return getTb();
case FROM_INSTANT:
return getFromInstant();
case TO_INSTANT:
return getToInstant();
case METADATA:
return getMetadata();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case DB:
return isSetDb();
case TB:
return isSetTb();
case FROM_INSTANT:
return isSetFromInstant();
case TO_INSTANT:
return isSetToInstant();
case METADATA:
return isSetMetadata();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof transitionInstantState_args)
return this.equals((transitionInstantState_args)that);
return false;
}
public boolean equals(transitionInstantState_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
boolean this_present_tb = true && this.isSetTb();
boolean that_present_tb = true && that.isSetTb();
if (this_present_tb || that_present_tb) {
if (!(this_present_tb && that_present_tb))
return false;
if (!this.tb.equals(that.tb))
return false;
}
boolean this_present_fromInstant = true && this.isSetFromInstant();
boolean that_present_fromInstant = true && that.isSetFromInstant();
if (this_present_fromInstant || that_present_fromInstant) {
if (!(this_present_fromInstant && that_present_fromInstant))
return false;
if (!this.fromInstant.equals(that.fromInstant))
return false;
}
boolean this_present_toInstant = true && this.isSetToInstant();
boolean that_present_toInstant = true && that.isSetToInstant();
if (this_present_toInstant || that_present_toInstant) {
if (!(this_present_toInstant && that_present_toInstant))
return false;
if (!this.toInstant.equals(that.toInstant))
return false;
}
boolean this_present_metadata = true && this.isSetMetadata();
boolean that_present_metadata = true && that.isSetMetadata();
if (this_present_metadata || that_present_metadata) {
if (!(this_present_metadata && that_present_metadata))
return false;
if (!this.metadata.equals(that.metadata))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTb()) ? 131071 : 524287);
if (isSetTb())
hashCode = hashCode * 8191 + tb.hashCode();
hashCode = hashCode * 8191 + ((isSetFromInstant()) ? 131071 : 524287);
if (isSetFromInstant())
hashCode = hashCode * 8191 + fromInstant.hashCode();
hashCode = hashCode * 8191 + ((isSetToInstant()) ? 131071 : 524287);
if (isSetToInstant())
hashCode = hashCode * 8191 + toInstant.hashCode();
hashCode = hashCode * 8191 + ((isSetMetadata()) ? 131071 : 524287);
if (isSetMetadata())
hashCode = hashCode * 8191 + metadata.hashCode();
return hashCode;
}
@Override
public int compareTo(transitionInstantState_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetDb()).compareTo(other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTb()).compareTo(other.isSetTb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tb, other.tb);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetFromInstant()).compareTo(other.isSetFromInstant());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFromInstant()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromInstant, other.fromInstant);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetToInstant()).compareTo(other.isSetToInstant());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetToInstant()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toInstant, other.toInstant);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMetadata()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("transitionInstantState_args(");
boolean first = true;
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
if (!first) sb.append(", ");
sb.append("tb:");
if (this.tb == null) {
sb.append("null");
} else {
sb.append(this.tb);
}
first = false;
if (!first) sb.append(", ");
sb.append("fromInstant:");
if (this.fromInstant == null) {
sb.append("null");
} else {
sb.append(this.fromInstant);
}
first = false;
if (!first) sb.append(", ");
sb.append("toInstant:");
if (this.toInstant == null) {
sb.append("null");
} else {
sb.append(this.toInstant);
}
first = false;
if (!first) sb.append(", ");
sb.append("metadata:");
if (this.metadata == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.metadata, sb);
}
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 (fromInstant != null) {
fromInstant.validate();
}
if (toInstant != null) {
toInstant.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, java.lang.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 transitionInstantState_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public transitionInstantState_argsStandardScheme getScheme() {
return new transitionInstantState_argsStandardScheme();
}
}
private static class transitionInstantState_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, transitionInstantState_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: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // FROM_INSTANT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.fromInstant = new THoodieInstant();
struct.fromInstant.read(iprot);
struct.setFromInstantIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TO_INSTANT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.toInstant = new THoodieInstant();
struct.toInstant.read(iprot);
struct.setToInstantIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.metadata = iprot.readBinary();
struct.setMetadataIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, transitionInstantState_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
if (struct.tb != null) {
oprot.writeFieldBegin(TB_FIELD_DESC);
oprot.writeString(struct.tb);
oprot.writeFieldEnd();
}
if (struct.fromInstant != null) {
oprot.writeFieldBegin(FROM_INSTANT_FIELD_DESC);
struct.fromInstant.write(oprot);
oprot.writeFieldEnd();
}
if (struct.toInstant != null) {
oprot.writeFieldBegin(TO_INSTANT_FIELD_DESC);
struct.toInstant.write(oprot);
oprot.writeFieldEnd();
}
if (struct.metadata != null) {
oprot.writeFieldBegin(METADATA_FIELD_DESC);
oprot.writeBinary(struct.metadata);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class transitionInstantState_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public transitionInstantState_argsTupleScheme getScheme() {
return new transitionInstantState_argsTupleScheme();
}
}
private static class transitionInstantState_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, transitionInstantState_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDb()) {
optionals.set(0);
}
if (struct.isSetTb()) {
optionals.set(1);
}
if (struct.isSetFromInstant()) {
optionals.set(2);
}
if (struct.isSetToInstant()) {
optionals.set(3);
}
if (struct.isSetMetadata()) {
optionals.set(4);
}
oprot.writeBitSet(optionals, 5);
if (struct.isSetDb()) {
oprot.writeString(struct.db);
}
if (struct.isSetTb()) {
oprot.writeString(struct.tb);
}
if (struct.isSetFromInstant()) {
struct.fromInstant.write(oprot);
}
if (struct.isSetToInstant()) {
struct.toInstant.write(oprot);
}
if (struct.isSetMetadata()) {
oprot.writeBinary(struct.metadata);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, transitionInstantState_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
}
if (incoming.get(1)) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
}
if (incoming.get(2)) {
struct.fromInstant = new THoodieInstant();
struct.fromInstant.read(iprot);
struct.setFromInstantIsSet(true);
}
if (incoming.get(3)) {
struct.toInstant = new THoodieInstant();
struct.toInstant.read(iprot);
struct.setToInstantIsSet(true);
}
if (incoming.get(4)) {
struct.metadata = iprot.readBinary();
struct.setMetadataIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class transitionInstantState_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("transitionInstantState_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
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.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.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new transitionInstantState_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new transitionInstantState_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable HoodieInstantChangeResult success; // required
public @org.apache.thrift.annotation.Nullable MetaserverStorageException o1; // required
public @org.apache.thrift.annotation.Nullable NoSuchObjectException o2; // required
public @org.apache.thrift.annotation.Nullable MetaserverException o3; // 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 {
SUCCESS((short)0, "success"),
O1((short)1, "o1"),
O2((short)2, "o2"),
O3((short)3, "o3");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // O1
return O1;
case 2: // O2
return O2;
case 3: // O3
return O3;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HoodieInstantChangeResult.class)));
tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverStorageException.class)));
tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NoSuchObjectException.class)));
tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetaserverException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(transitionInstantState_result.class, metaDataMap);
}
public transitionInstantState_result() {
}
public transitionInstantState_result(
HoodieInstantChangeResult success,
MetaserverStorageException o1,
NoSuchObjectException o2,
MetaserverException o3)
{
this();
this.success = success;
this.o1 = o1;
this.o2 = o2;
this.o3 = o3;
}
/**
* Performs a deep copy on other.
*/
public transitionInstantState_result(transitionInstantState_result other) {
if (other.isSetSuccess()) {
this.success = new HoodieInstantChangeResult(other.success);
}
if (other.isSetO1()) {
this.o1 = new MetaserverStorageException(other.o1);
}
if (other.isSetO2()) {
this.o2 = new NoSuchObjectException(other.o2);
}
if (other.isSetO3()) {
this.o3 = new MetaserverException(other.o3);
}
}
public transitionInstantState_result deepCopy() {
return new transitionInstantState_result(this);
}
@Override
public void clear() {
this.success = null;
this.o1 = null;
this.o2 = null;
this.o3 = null;
}
@org.apache.thrift.annotation.Nullable
public HoodieInstantChangeResult getSuccess() {
return this.success;
}
public transitionInstantState_result setSuccess(@org.apache.thrift.annotation.Nullable HoodieInstantChangeResult success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
@org.apache.thrift.annotation.Nullable
public MetaserverStorageException getO1() {
return this.o1;
}
public transitionInstantState_result setO1(@org.apache.thrift.annotation.Nullable MetaserverStorageException o1) {
this.o1 = o1;
return this;
}
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;
}
}
@org.apache.thrift.annotation.Nullable
public NoSuchObjectException getO2() {
return this.o2;
}
public transitionInstantState_result setO2(@org.apache.thrift.annotation.Nullable NoSuchObjectException o2) {
this.o2 = o2;
return this;
}
public void unsetO2() {
this.o2 = null;
}
/** Returns true if field o2 is set (has been assigned a value) and false otherwise */
public boolean isSetO2() {
return this.o2 != null;
}
public void setO2IsSet(boolean value) {
if (!value) {
this.o2 = null;
}
}
@org.apache.thrift.annotation.Nullable
public MetaserverException getO3() {
return this.o3;
}
public transitionInstantState_result setO3(@org.apache.thrift.annotation.Nullable MetaserverException o3) {
this.o3 = o3;
return this;
}
public void unsetO3() {
this.o3 = null;
}
/** Returns true if field o3 is set (has been assigned a value) and false otherwise */
public boolean isSetO3() {
return this.o3 != null;
}
public void setO3IsSet(boolean value) {
if (!value) {
this.o3 = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((HoodieInstantChangeResult)value);
}
break;
case O1:
if (value == null) {
unsetO1();
} else {
setO1((MetaserverStorageException)value);
}
break;
case O2:
if (value == null) {
unsetO2();
} else {
setO2((NoSuchObjectException)value);
}
break;
case O3:
if (value == null) {
unsetO3();
} else {
setO3((MetaserverException)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case O1:
return getO1();
case O2:
return getO2();
case O3:
return getO3();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case O1:
return isSetO1();
case O2:
return isSetO2();
case O3:
return isSetO3();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof transitionInstantState_result)
return this.equals((transitionInstantState_result)that);
return false;
}
public boolean equals(transitionInstantState_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
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;
}
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
if (!(this_present_o2 && that_present_o2))
return false;
if (!this.o2.equals(that.o2))
return false;
}
boolean this_present_o3 = true && this.isSetO3();
boolean that_present_o3 = true && that.isSetO3();
if (this_present_o3 || that_present_o3) {
if (!(this_present_o3 && that_present_o3))
return false;
if (!this.o3.equals(that.o3))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetO1()) ? 131071 : 524287);
if (isSetO1())
hashCode = hashCode * 8191 + o1.hashCode();
hashCode = hashCode * 8191 + ((isSetO2()) ? 131071 : 524287);
if (isSetO2())
hashCode = hashCode * 8191 + o2.hashCode();
hashCode = hashCode * 8191 + ((isSetO3()) ? 131071 : 524287);
if (isSetO3())
hashCode = hashCode * 8191 + o3.hashCode();
return hashCode;
}
@Override
public int compareTo(transitionInstantState_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO2()).compareTo(other.isSetO2());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO2()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, other.o2);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetO3()).compareTo(other.isSetO3());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetO3()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, other.o3);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("transitionInstantState_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;
if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
} else {
sb.append(this.o2);
}
first = false;
if (!first) sb.append(", ");
sb.append("o3:");
if (this.o3 == null) {
sb.append("null");
} else {
sb.append(this.o3);
}
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 (success != null) {
success.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, java.lang.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 transitionInstantState_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public transitionInstantState_resultStandardScheme getScheme() {
return new transitionInstantState_resultStandardScheme();
}
}
private static class transitionInstantState_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, transitionInstantState_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.STRUCT) {
struct.success = new HoodieInstantChangeResult();
struct.success.read(iprot);
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 MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // O2
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // O3
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.o3 = new MetaserverException();
struct.o3.read(iprot);
struct.setO3IsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, transitionInstantState_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o1 != null) {
oprot.writeFieldBegin(O1_FIELD_DESC);
struct.o1.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o2 != null) {
oprot.writeFieldBegin(O2_FIELD_DESC);
struct.o2.write(oprot);
oprot.writeFieldEnd();
}
if (struct.o3 != null) {
oprot.writeFieldBegin(O3_FIELD_DESC);
struct.o3.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class transitionInstantState_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public transitionInstantState_resultTupleScheme getScheme() {
return new transitionInstantState_resultTupleScheme();
}
}
private static class transitionInstantState_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, transitionInstantState_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetO1()) {
optionals.set(1);
}
if (struct.isSetO2()) {
optionals.set(2);
}
if (struct.isSetO3()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetO1()) {
struct.o1.write(oprot);
}
if (struct.isSetO2()) {
struct.o2.write(oprot);
}
if (struct.isSetO3()) {
struct.o3.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, transitionInstantState_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = new HoodieInstantChangeResult();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.o1 = new MetaserverStorageException();
struct.o1.read(iprot);
struct.setO1IsSet(true);
}
if (incoming.get(2)) {
struct.o2 = new NoSuchObjectException();
struct.o2.read(iprot);
struct.setO2IsSet(true);
}
if (incoming.get(3)) {
struct.o3 = new MetaserverException();
struct.o3.read(iprot);
struct.setO3IsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class deleteInstant_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteInstant_args");
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TB_FIELD_DESC = new org.apache.thrift.protocol.TField("tb", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField INSTANT_FIELD_DESC = new org.apache.thrift.protocol.TField("instant", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteInstant_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteInstant_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
public @org.apache.thrift.annotation.Nullable java.lang.String tb; // required
public @org.apache.thrift.annotation.Nullable THoodieInstant instant; // 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 {
DB((short)1, "db"),
TB((short)2, "tb"),
INSTANT((short)3, "instant");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DB
return DB;
case 2: // TB
return TB;
case 3: // INSTANT
return INSTANT;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TB, new org.apache.thrift.meta_data.FieldMetaData("tb", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.INSTANT, new org.apache.thrift.meta_data.FieldMetaData("instant", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THoodieInstant.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteInstant_args.class, metaDataMap);
}
public deleteInstant_args() {
}
public deleteInstant_args(
java.lang.String db,
java.lang.String tb,
THoodieInstant instant)
{
this();
this.db = db;
this.tb = tb;
this.instant = instant;
}
/**
* Performs a deep copy on other.
*/
public deleteInstant_args(deleteInstant_args other) {
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTb()) {
this.tb = other.tb;
}
if (other.isSetInstant()) {
this.instant = new THoodieInstant(other.instant);
}
}
public deleteInstant_args deepCopy() {
return new deleteInstant_args(this);
}
@Override
public void clear() {
this.db = null;
this.tb = null;
this.instant = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public deleteInstant_args setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTb() {
return this.tb;
}
public deleteInstant_args setTb(@org.apache.thrift.annotation.Nullable java.lang.String tb) {
this.tb = tb;
return this;
}
public void unsetTb() {
this.tb = null;
}
/** Returns true if field tb is set (has been assigned a value) and false otherwise */
public boolean isSetTb() {
return this.tb != null;
}
public void setTbIsSet(boolean value) {
if (!value) {
this.tb = null;
}
}
@org.apache.thrift.annotation.Nullable
public THoodieInstant getInstant() {
return this.instant;
}
public deleteInstant_args setInstant(@org.apache.thrift.annotation.Nullable THoodieInstant instant) {
this.instant = instant;
return this;
}
public void unsetInstant() {
this.instant = null;
}
/** Returns true if field instant is set (has been assigned a value) and false otherwise */
public boolean isSetInstant() {
return this.instant != null;
}
public void setInstantIsSet(boolean value) {
if (!value) {
this.instant = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TB:
if (value == null) {
unsetTb();
} else {
setTb((java.lang.String)value);
}
break;
case INSTANT:
if (value == null) {
unsetInstant();
} else {
setInstant((THoodieInstant)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DB:
return getDb();
case TB:
return getTb();
case INSTANT:
return getInstant();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case DB:
return isSetDb();
case TB:
return isSetTb();
case INSTANT:
return isSetInstant();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof deleteInstant_args)
return this.equals((deleteInstant_args)that);
return false;
}
public boolean equals(deleteInstant_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
boolean this_present_tb = true && this.isSetTb();
boolean that_present_tb = true && that.isSetTb();
if (this_present_tb || that_present_tb) {
if (!(this_present_tb && that_present_tb))
return false;
if (!this.tb.equals(that.tb))
return false;
}
boolean this_present_instant = true && this.isSetInstant();
boolean that_present_instant = true && that.isSetInstant();
if (this_present_instant || that_present_instant) {
if (!(this_present_instant && that_present_instant))
return false;
if (!this.instant.equals(that.instant))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTb()) ? 131071 : 524287);
if (isSetTb())
hashCode = hashCode * 8191 + tb.hashCode();
hashCode = hashCode * 8191 + ((isSetInstant()) ? 131071 : 524287);
if (isSetInstant())
hashCode = hashCode * 8191 + instant.hashCode();
return hashCode;
}
@Override
public int compareTo(deleteInstant_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetDb()).compareTo(other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTb()).compareTo(other.isSetTb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tb, other.tb);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetInstant()).compareTo(other.isSetInstant());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInstant()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instant, other.instant);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteInstant_args(");
boolean first = true;
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
if (!first) sb.append(", ");
sb.append("tb:");
if (this.tb == null) {
sb.append("null");
} else {
sb.append(this.tb);
}
first = false;
if (!first) sb.append(", ");
sb.append("instant:");
if (this.instant == null) {
sb.append("null");
} else {
sb.append(this.instant);
}
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 (instant != null) {
instant.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, java.lang.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 deleteInstant_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteInstant_argsStandardScheme getScheme() {
return new deleteInstant_argsStandardScheme();
}
}
private static class deleteInstant_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteInstant_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: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // INSTANT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.instant = new THoodieInstant();
struct.instant.read(iprot);
struct.setInstantIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteInstant_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
if (struct.tb != null) {
oprot.writeFieldBegin(TB_FIELD_DESC);
oprot.writeString(struct.tb);
oprot.writeFieldEnd();
}
if (struct.instant != null) {
oprot.writeFieldBegin(INSTANT_FIELD_DESC);
struct.instant.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteInstant_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public deleteInstant_argsTupleScheme getScheme() {
return new deleteInstant_argsTupleScheme();
}
}
private static class deleteInstant_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteInstant_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDb()) {
optionals.set(0);
}
if (struct.isSetTb()) {
optionals.set(1);
}
if (struct.isSetInstant()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetDb()) {
oprot.writeString(struct.db);
}
if (struct.isSetTb()) {
oprot.writeString(struct.tb);
}
if (struct.isSetInstant()) {
struct.instant.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteInstant_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
}
if (incoming.get(1)) {
struct.tb = iprot.readString();
struct.setTbIsSet(true);
}
if (incoming.get(2)) {
struct.instant = new THoodieInstant();
struct.instant.read(iprot);
struct.setInstantIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class deleteInstant_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable