/** * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package alluxio.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") public class LineageMasterClientService { /** * This interface contains lineage master service endpoints for Alluxio clients. */ public interface Iface extends alluxio.thrift.AlluxioService.Iface { /** * Creates a lineage and returns the lineage id. * * @param inputFiles the list of input files * * @param outputFiles the list of output files * * @param job the command line job info * * @param options the method options */ public CreateLineageTResponse createLineage(List<String> inputFiles, List<String> outputFiles, CommandLineJobInfo job, CreateLineageTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException; /** * Deletes a lineage and returns whether the deletion succeeded. * * @param lineageId the lineage id * * @param cascade whether to delete the lineage in cascade * * @param options the method options */ public DeleteLineageTResponse deleteLineage(long lineageId, boolean cascade, DeleteLineageTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException; /** * Returns a list of existing lineages. * * @param options the method options */ public GetLineageInfoListTResponse getLineageInfoList(GetLineageInfoListTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException; /** * Reinitializes a file. Returns the id of the reinitialized file when the * file is lost or not completed, -1 otherwise. * * @param path the path of the file * * @param blockSizeBytes block size in bytes * * @param ttl time to live * * @param ttlAction expiry action * * @param options the method options */ public ReinitializeFileTResponse reinitializeFile(String path, long blockSizeBytes, long ttl, alluxio.thrift.TTtlAction ttlAction, ReinitializeFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException; /** * Reports file as lost. * * @param path the path of the file * * @param options the method options */ public ReportLostFileTResponse reportLostFile(String path, ReportLostFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException; } public interface AsyncIface extends alluxio.thrift.AlluxioService .AsyncIface { public void createLineage(List<String> inputFiles, List<String> outputFiles, CommandLineJobInfo job, CreateLineageTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deleteLineage(long lineageId, boolean cascade, DeleteLineageTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getLineageInfoList(GetLineageInfoListTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void reinitializeFile(String path, long blockSizeBytes, long ttl, alluxio.thrift.TTtlAction ttlAction, ReinitializeFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void reportLostFile(String path, ReportLostFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends alluxio.thrift.AlluxioService.Client implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public CreateLineageTResponse createLineage(List<String> inputFiles, List<String> outputFiles, CommandLineJobInfo job, CreateLineageTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { send_createLineage(inputFiles, outputFiles, job, options); return recv_createLineage(); } public void send_createLineage(List<String> inputFiles, List<String> outputFiles, CommandLineJobInfo job, CreateLineageTOptions options) throws org.apache.thrift.TException { createLineage_args args = new createLineage_args(); args.setInputFiles(inputFiles); args.setOutputFiles(outputFiles); args.setJob(job); args.setOptions(options); sendBase("createLineage", args); } public CreateLineageTResponse recv_createLineage() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { createLineage_result result = new createLineage_result(); receiveBase(result, "createLineage"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createLineage failed: unknown result"); } public DeleteLineageTResponse deleteLineage(long lineageId, boolean cascade, DeleteLineageTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { send_deleteLineage(lineageId, cascade, options); return recv_deleteLineage(); } public void send_deleteLineage(long lineageId, boolean cascade, DeleteLineageTOptions options) throws org.apache.thrift.TException { deleteLineage_args args = new deleteLineage_args(); args.setLineageId(lineageId); args.setCascade(cascade); args.setOptions(options); sendBase("deleteLineage", args); } public DeleteLineageTResponse recv_deleteLineage() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { deleteLineage_result result = new deleteLineage_result(); receiveBase(result, "deleteLineage"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteLineage failed: unknown result"); } public GetLineageInfoListTResponse getLineageInfoList(GetLineageInfoListTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { send_getLineageInfoList(options); return recv_getLineageInfoList(); } public void send_getLineageInfoList(GetLineageInfoListTOptions options) throws org.apache.thrift.TException { getLineageInfoList_args args = new getLineageInfoList_args(); args.setOptions(options); sendBase("getLineageInfoList", args); } public GetLineageInfoListTResponse recv_getLineageInfoList() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { getLineageInfoList_result result = new getLineageInfoList_result(); receiveBase(result, "getLineageInfoList"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLineageInfoList failed: unknown result"); } public ReinitializeFileTResponse reinitializeFile(String path, long blockSizeBytes, long ttl, alluxio.thrift.TTtlAction ttlAction, ReinitializeFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { send_reinitializeFile(path, blockSizeBytes, ttl, ttlAction, options); return recv_reinitializeFile(); } public void send_reinitializeFile(String path, long blockSizeBytes, long ttl, alluxio.thrift.TTtlAction ttlAction, ReinitializeFileTOptions options) throws org.apache.thrift.TException { reinitializeFile_args args = new reinitializeFile_args(); args.setPath(path); args.setBlockSizeBytes(blockSizeBytes); args.setTtl(ttl); args.setTtlAction(ttlAction); args.setOptions(options); sendBase("reinitializeFile", args); } public ReinitializeFileTResponse recv_reinitializeFile() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { reinitializeFile_result result = new reinitializeFile_result(); receiveBase(result, "reinitializeFile"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "reinitializeFile failed: unknown result"); } public ReportLostFileTResponse reportLostFile(String path, ReportLostFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { send_reportLostFile(path, options); return recv_reportLostFile(); } public void send_reportLostFile(String path, ReportLostFileTOptions options) throws org.apache.thrift.TException { reportLostFile_args args = new reportLostFile_args(); args.setPath(path); args.setOptions(options); sendBase("reportLostFile", args); } public ReportLostFileTResponse recv_reportLostFile() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { reportLostFile_result result = new reportLostFile_result(); receiveBase(result, "reportLostFile"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "reportLostFile failed: unknown result"); } } public static class AsyncClient extends alluxio.thrift.AlluxioService.AsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void createLineage(List<String> inputFiles, List<String> outputFiles, CommandLineJobInfo job, CreateLineageTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); createLineage_call method_call = new createLineage_call(inputFiles, outputFiles, job, options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createLineage_call extends org.apache.thrift.async.TAsyncMethodCall { private List<String> inputFiles; private List<String> outputFiles; private CommandLineJobInfo job; private CreateLineageTOptions options; public createLineage_call(List<String> inputFiles, List<String> outputFiles, CommandLineJobInfo job, CreateLineageTOptions options, 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.inputFiles = inputFiles; this.outputFiles = outputFiles; this.job = job; this.options = options; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createLineage", org.apache.thrift.protocol.TMessageType.CALL, 0)); createLineage_args args = new createLineage_args(); args.setInputFiles(inputFiles); args.setOutputFiles(outputFiles); args.setJob(job); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } public CreateLineageTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_createLineage(); } } public void deleteLineage(long lineageId, boolean cascade, DeleteLineageTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); deleteLineage_call method_call = new deleteLineage_call(lineageId, cascade, options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteLineage_call extends org.apache.thrift.async.TAsyncMethodCall { private long lineageId; private boolean cascade; private DeleteLineageTOptions options; public deleteLineage_call(long lineageId, boolean cascade, DeleteLineageTOptions options, 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.lineageId = lineageId; this.cascade = cascade; this.options = options; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteLineage", org.apache.thrift.protocol.TMessageType.CALL, 0)); deleteLineage_args args = new deleteLineage_args(); args.setLineageId(lineageId); args.setCascade(cascade); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } public DeleteLineageTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_deleteLineage(); } } public void getLineageInfoList(GetLineageInfoListTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getLineageInfoList_call method_call = new getLineageInfoList_call(options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getLineageInfoList_call extends org.apache.thrift.async.TAsyncMethodCall { private GetLineageInfoListTOptions options; public getLineageInfoList_call(GetLineageInfoListTOptions options, 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.options = options; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLineageInfoList", org.apache.thrift.protocol.TMessageType.CALL, 0)); getLineageInfoList_args args = new getLineageInfoList_args(); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } public GetLineageInfoListTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getLineageInfoList(); } } public void reinitializeFile(String path, long blockSizeBytes, long ttl, alluxio.thrift.TTtlAction ttlAction, ReinitializeFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); reinitializeFile_call method_call = new reinitializeFile_call(path, blockSizeBytes, ttl, ttlAction, options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class reinitializeFile_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; private long blockSizeBytes; private long ttl; private alluxio.thrift.TTtlAction ttlAction; private ReinitializeFileTOptions options; public reinitializeFile_call(String path, long blockSizeBytes, long ttl, alluxio.thrift.TTtlAction ttlAction, ReinitializeFileTOptions options, 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.path = path; this.blockSizeBytes = blockSizeBytes; this.ttl = ttl; this.ttlAction = ttlAction; this.options = options; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reinitializeFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); reinitializeFile_args args = new reinitializeFile_args(); args.setPath(path); args.setBlockSizeBytes(blockSizeBytes); args.setTtl(ttl); args.setTtlAction(ttlAction); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } public ReinitializeFileTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_reinitializeFile(); } } public void reportLostFile(String path, ReportLostFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); reportLostFile_call method_call = new reportLostFile_call(path, options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class reportLostFile_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; private ReportLostFileTOptions options; public reportLostFile_call(String path, ReportLostFileTOptions options, 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.path = path; this.options = options; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reportLostFile", org.apache.thrift.protocol.TMessageType.CALL, 0)); reportLostFile_args args = new reportLostFile_args(); args.setPath(path); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } public ReportLostFileTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_reportLostFile(); } } } public static class Processor<I extends Iface> extends alluxio.thrift.AlluxioService.Processor<I> implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); } protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { processMap.put("createLineage", new createLineage()); processMap.put("deleteLineage", new deleteLineage()); processMap.put("getLineageInfoList", new getLineageInfoList()); processMap.put("reinitializeFile", new reinitializeFile()); processMap.put("reportLostFile", new reportLostFile()); return processMap; } public static class createLineage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createLineage_args> { public createLineage() { super("createLineage"); } public createLineage_args getEmptyArgsInstance() { return new createLineage_args(); } protected boolean isOneway() { return false; } public createLineage_result getResult(I iface, createLineage_args args) throws org.apache.thrift.TException { createLineage_result result = new createLineage_result(); try { result.success = iface.createLineage(args.inputFiles, args.outputFiles, args.job, args.options); } catch (alluxio.thrift.AlluxioTException e) { result.e = e; } return result; } } public static class deleteLineage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteLineage_args> { public deleteLineage() { super("deleteLineage"); } public deleteLineage_args getEmptyArgsInstance() { return new deleteLineage_args(); } protected boolean isOneway() { return false; } public deleteLineage_result getResult(I iface, deleteLineage_args args) throws org.apache.thrift.TException { deleteLineage_result result = new deleteLineage_result(); try { result.success = iface.deleteLineage(args.lineageId, args.cascade, args.options); } catch (alluxio.thrift.AlluxioTException e) { result.e = e; } return result; } } public static class getLineageInfoList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLineageInfoList_args> { public getLineageInfoList() { super("getLineageInfoList"); } public getLineageInfoList_args getEmptyArgsInstance() { return new getLineageInfoList_args(); } protected boolean isOneway() { return false; } public getLineageInfoList_result getResult(I iface, getLineageInfoList_args args) throws org.apache.thrift.TException { getLineageInfoList_result result = new getLineageInfoList_result(); try { result.success = iface.getLineageInfoList(args.options); } catch (alluxio.thrift.AlluxioTException e) { result.e = e; } return result; } } public static class reinitializeFile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, reinitializeFile_args> { public reinitializeFile() { super("reinitializeFile"); } public reinitializeFile_args getEmptyArgsInstance() { return new reinitializeFile_args(); } protected boolean isOneway() { return false; } public reinitializeFile_result getResult(I iface, reinitializeFile_args args) throws org.apache.thrift.TException { reinitializeFile_result result = new reinitializeFile_result(); try { result.success = iface.reinitializeFile(args.path, args.blockSizeBytes, args.ttl, args.ttlAction, args.options); } catch (alluxio.thrift.AlluxioTException e) { result.e = e; } return result; } } public static class reportLostFile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, reportLostFile_args> { public reportLostFile() { super("reportLostFile"); } public reportLostFile_args getEmptyArgsInstance() { return new reportLostFile_args(); } protected boolean isOneway() { return false; } public reportLostFile_result getResult(I iface, reportLostFile_args args) throws org.apache.thrift.TException { reportLostFile_result result = new reportLostFile_result(); try { result.success = iface.reportLostFile(args.path, args.options); } catch (alluxio.thrift.AlluxioTException e) { result.e = e; } return result; } } } public static class AsyncProcessor<I extends AsyncIface> extends alluxio.thrift.AlluxioService.AsyncProcessor<I> { private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); } protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { processMap.put("createLineage", new createLineage()); processMap.put("deleteLineage", new deleteLineage()); processMap.put("getLineageInfoList", new getLineageInfoList()); processMap.put("reinitializeFile", new reinitializeFile()); processMap.put("reportLostFile", new reportLostFile()); return processMap; } public static class createLineage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createLineage_args, CreateLineageTResponse> { public createLineage() { super("createLineage"); } public createLineage_args getEmptyArgsInstance() { return new createLineage_args(); } public AsyncMethodCallback<CreateLineageTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<CreateLineageTResponse>() { public void onComplete(CreateLineageTResponse o) { createLineage_result result = new createLineage_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; createLineage_result result = new createLineage_result(); if (e instanceof alluxio.thrift.AlluxioTException) { result.e = (alluxio.thrift.AlluxioTException) e; result.setEIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, createLineage_args args, org.apache.thrift.async.AsyncMethodCallback<CreateLineageTResponse> resultHandler) throws TException { iface.createLineage(args.inputFiles, args.outputFiles, args.job, args.options,resultHandler); } } public static class deleteLineage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteLineage_args, DeleteLineageTResponse> { public deleteLineage() { super("deleteLineage"); } public deleteLineage_args getEmptyArgsInstance() { return new deleteLineage_args(); } public AsyncMethodCallback<DeleteLineageTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<DeleteLineageTResponse>() { public void onComplete(DeleteLineageTResponse o) { deleteLineage_result result = new deleteLineage_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; deleteLineage_result result = new deleteLineage_result(); if (e instanceof alluxio.thrift.AlluxioTException) { result.e = (alluxio.thrift.AlluxioTException) e; result.setEIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, deleteLineage_args args, org.apache.thrift.async.AsyncMethodCallback<DeleteLineageTResponse> resultHandler) throws TException { iface.deleteLineage(args.lineageId, args.cascade, args.options,resultHandler); } } public static class getLineageInfoList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLineageInfoList_args, GetLineageInfoListTResponse> { public getLineageInfoList() { super("getLineageInfoList"); } public getLineageInfoList_args getEmptyArgsInstance() { return new getLineageInfoList_args(); } public AsyncMethodCallback<GetLineageInfoListTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetLineageInfoListTResponse>() { public void onComplete(GetLineageInfoListTResponse o) { getLineageInfoList_result result = new getLineageInfoList_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getLineageInfoList_result result = new getLineageInfoList_result(); if (e instanceof alluxio.thrift.AlluxioTException) { result.e = (alluxio.thrift.AlluxioTException) e; result.setEIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getLineageInfoList_args args, org.apache.thrift.async.AsyncMethodCallback<GetLineageInfoListTResponse> resultHandler) throws TException { iface.getLineageInfoList(args.options,resultHandler); } } public static class reinitializeFile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, reinitializeFile_args, ReinitializeFileTResponse> { public reinitializeFile() { super("reinitializeFile"); } public reinitializeFile_args getEmptyArgsInstance() { return new reinitializeFile_args(); } public AsyncMethodCallback<ReinitializeFileTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ReinitializeFileTResponse>() { public void onComplete(ReinitializeFileTResponse o) { reinitializeFile_result result = new reinitializeFile_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; reinitializeFile_result result = new reinitializeFile_result(); if (e instanceof alluxio.thrift.AlluxioTException) { result.e = (alluxio.thrift.AlluxioTException) e; result.setEIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, reinitializeFile_args args, org.apache.thrift.async.AsyncMethodCallback<ReinitializeFileTResponse> resultHandler) throws TException { iface.reinitializeFile(args.path, args.blockSizeBytes, args.ttl, args.ttlAction, args.options,resultHandler); } } public static class reportLostFile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, reportLostFile_args, ReportLostFileTResponse> { public reportLostFile() { super("reportLostFile"); } public reportLostFile_args getEmptyArgsInstance() { return new reportLostFile_args(); } public AsyncMethodCallback<ReportLostFileTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ReportLostFileTResponse>() { public void onComplete(ReportLostFileTResponse o) { reportLostFile_result result = new reportLostFile_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; reportLostFile_result result = new reportLostFile_result(); if (e instanceof alluxio.thrift.AlluxioTException) { result.e = (alluxio.thrift.AlluxioTException) e; result.setEIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, reportLostFile_args args, org.apache.thrift.async.AsyncMethodCallback<ReportLostFileTResponse> resultHandler) throws TException { iface.reportLostFile(args.path, args.options,resultHandler); } } } public static class createLineage_args implements org.apache.thrift.TBase<createLineage_args, createLineage_args._Fields>, java.io.Serializable, Cloneable, Comparable<createLineage_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLineage_args"); private static final org.apache.thrift.protocol.TField INPUT_FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("inputFiles", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField OUTPUT_FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("outputFiles", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField JOB_FIELD_DESC = new org.apache.thrift.protocol.TField("job", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new createLineage_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new createLineage_argsTupleSchemeFactory()); } private List<String> inputFiles; // required private List<String> outputFiles; // required private CommandLineJobInfo job; // required private CreateLineageTOptions options; // 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 { /** * the list of input files */ INPUT_FILES((short)1, "inputFiles"), /** * the list of output files */ OUTPUT_FILES((short)2, "outputFiles"), /** * the command line job info */ JOB((short)3, "job"), /** * the method options */ OPTIONS((short)4, "options"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // INPUT_FILES return INPUT_FILES; case 2: // OUTPUT_FILES return OUTPUT_FILES; case 3: // JOB return JOB; case 4: // OPTIONS return OPTIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.INPUT_FILES, new org.apache.thrift.meta_data.FieldMetaData("inputFiles", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.OUTPUT_FILES, new org.apache.thrift.meta_data.FieldMetaData("outputFiles", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.JOB, new org.apache.thrift.meta_data.FieldMetaData("job", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CommandLineJobInfo.class))); tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateLineageTOptions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLineage_args.class, metaDataMap); } public createLineage_args() { } public createLineage_args( List<String> inputFiles, List<String> outputFiles, CommandLineJobInfo job, CreateLineageTOptions options) { this(); this.inputFiles = inputFiles; this.outputFiles = outputFiles; this.job = job; this.options = options; } /** * Performs a deep copy on <i>other</i>. */ public createLineage_args(createLineage_args other) { if (other.isSetInputFiles()) { List<String> __this__inputFiles = new ArrayList<String>(other.inputFiles); this.inputFiles = __this__inputFiles; } if (other.isSetOutputFiles()) { List<String> __this__outputFiles = new ArrayList<String>(other.outputFiles); this.outputFiles = __this__outputFiles; } if (other.isSetJob()) { this.job = new CommandLineJobInfo(other.job); } if (other.isSetOptions()) { this.options = new CreateLineageTOptions(other.options); } } public createLineage_args deepCopy() { return new createLineage_args(this); } @Override public void clear() { this.inputFiles = null; this.outputFiles = null; this.job = null; this.options = null; } public int getInputFilesSize() { return (this.inputFiles == null) ? 0 : this.inputFiles.size(); } public java.util.Iterator<String> getInputFilesIterator() { return (this.inputFiles == null) ? null : this.inputFiles.iterator(); } public void addToInputFiles(String elem) { if (this.inputFiles == null) { this.inputFiles = new ArrayList<String>(); } this.inputFiles.add(elem); } /** * the list of input files */ public List<String> getInputFiles() { return this.inputFiles; } /** * the list of input files */ public createLineage_args setInputFiles(List<String> inputFiles) { this.inputFiles = inputFiles; return this; } public void unsetInputFiles() { this.inputFiles = null; } /** Returns true if field inputFiles is set (has been assigned a value) and false otherwise */ public boolean isSetInputFiles() { return this.inputFiles != null; } public void setInputFilesIsSet(boolean value) { if (!value) { this.inputFiles = null; } } public int getOutputFilesSize() { return (this.outputFiles == null) ? 0 : this.outputFiles.size(); } public java.util.Iterator<String> getOutputFilesIterator() { return (this.outputFiles == null) ? null : this.outputFiles.iterator(); } public void addToOutputFiles(String elem) { if (this.outputFiles == null) { this.outputFiles = new ArrayList<String>(); } this.outputFiles.add(elem); } /** * the list of output files */ public List<String> getOutputFiles() { return this.outputFiles; } /** * the list of output files */ public createLineage_args setOutputFiles(List<String> outputFiles) { this.outputFiles = outputFiles; return this; } public void unsetOutputFiles() { this.outputFiles = null; } /** Returns true if field outputFiles is set (has been assigned a value) and false otherwise */ public boolean isSetOutputFiles() { return this.outputFiles != null; } public void setOutputFilesIsSet(boolean value) { if (!value) { this.outputFiles = null; } } /** * the command line job info */ public CommandLineJobInfo getJob() { return this.job; } /** * the command line job info */ public createLineage_args setJob(CommandLineJobInfo job) { this.job = job; return this; } public void unsetJob() { this.job = null; } /** Returns true if field job is set (has been assigned a value) and false otherwise */ public boolean isSetJob() { return this.job != null; } public void setJobIsSet(boolean value) { if (!value) { this.job = null; } } /** * the method options */ public CreateLineageTOptions getOptions() { return this.options; } /** * the method options */ public createLineage_args setOptions(CreateLineageTOptions options) { this.options = options; return this; } public void unsetOptions() { this.options = null; } /** Returns true if field options is set (has been assigned a value) and false otherwise */ public boolean isSetOptions() { return this.options != null; } public void setOptionsIsSet(boolean value) { if (!value) { this.options = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case INPUT_FILES: if (value == null) { unsetInputFiles(); } else { setInputFiles((List<String>)value); } break; case OUTPUT_FILES: if (value == null) { unsetOutputFiles(); } else { setOutputFiles((List<String>)value); } break; case JOB: if (value == null) { unsetJob(); } else { setJob((CommandLineJobInfo)value); } break; case OPTIONS: if (value == null) { unsetOptions(); } else { setOptions((CreateLineageTOptions)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case INPUT_FILES: return getInputFiles(); case OUTPUT_FILES: return getOutputFiles(); case JOB: return getJob(); case OPTIONS: return getOptions(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case INPUT_FILES: return isSetInputFiles(); case OUTPUT_FILES: return isSetOutputFiles(); case JOB: return isSetJob(); case OPTIONS: return isSetOptions(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof createLineage_args) return this.equals((createLineage_args)that); return false; } public boolean equals(createLineage_args that) { if (that == null) return false; boolean this_present_inputFiles = true && this.isSetInputFiles(); boolean that_present_inputFiles = true && that.isSetInputFiles(); if (this_present_inputFiles || that_present_inputFiles) { if (!(this_present_inputFiles && that_present_inputFiles)) return false; if (!this.inputFiles.equals(that.inputFiles)) return false; } boolean this_present_outputFiles = true && this.isSetOutputFiles(); boolean that_present_outputFiles = true && that.isSetOutputFiles(); if (this_present_outputFiles || that_present_outputFiles) { if (!(this_present_outputFiles && that_present_outputFiles)) return false; if (!this.outputFiles.equals(that.outputFiles)) return false; } boolean this_present_job = true && this.isSetJob(); boolean that_present_job = true && that.isSetJob(); if (this_present_job || that_present_job) { if (!(this_present_job && that_present_job)) return false; if (!this.job.equals(that.job)) return false; } boolean this_present_options = true && this.isSetOptions(); boolean that_present_options = true && that.isSetOptions(); if (this_present_options || that_present_options) { if (!(this_present_options && that_present_options)) return false; if (!this.options.equals(that.options)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_inputFiles = true && (isSetInputFiles()); list.add(present_inputFiles); if (present_inputFiles) list.add(inputFiles); boolean present_outputFiles = true && (isSetOutputFiles()); list.add(present_outputFiles); if (present_outputFiles) list.add(outputFiles); boolean present_job = true && (isSetJob()); list.add(present_job); if (present_job) list.add(job); boolean present_options = true && (isSetOptions()); list.add(present_options); if (present_options) list.add(options); return list.hashCode(); } @Override public int compareTo(createLineage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetInputFiles()).compareTo(other.isSetInputFiles()); if (lastComparison != 0) { return lastComparison; } if (isSetInputFiles()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inputFiles, other.inputFiles); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOutputFiles()).compareTo(other.isSetOutputFiles()); if (lastComparison != 0) { return lastComparison; } if (isSetOutputFiles()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputFiles, other.outputFiles); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetJob()).compareTo(other.isSetJob()); if (lastComparison != 0) { return lastComparison; } if (isSetJob()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job, other.job); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions()); if (lastComparison != 0) { return lastComparison; } if (isSetOptions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("createLineage_args("); boolean first = true; sb.append("inputFiles:"); if (this.inputFiles == null) { sb.append("null"); } else { sb.append(this.inputFiles); } first = false; if (!first) sb.append(", "); sb.append("outputFiles:"); if (this.outputFiles == null) { sb.append("null"); } else { sb.append(this.outputFiles); } first = false; if (!first) sb.append(", "); sb.append("job:"); if (this.job == null) { sb.append("null"); } else { sb.append(this.job); } first = false; if (!first) sb.append(", "); sb.append("options:"); if (this.options == null) { sb.append("null"); } else { sb.append(this.options); } 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 (job != null) { job.validate(); } if (options != null) { options.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class createLineage_argsStandardSchemeFactory implements SchemeFactory { public createLineage_argsStandardScheme getScheme() { return new createLineage_argsStandardScheme(); } } private static class createLineage_argsStandardScheme extends StandardScheme<createLineage_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, createLineage_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: // INPUT_FILES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list40 = iprot.readListBegin(); struct.inputFiles = new ArrayList<String>(_list40.size); String _elem41; for (int _i42 = 0; _i42 < _list40.size; ++_i42) { _elem41 = iprot.readString(); struct.inputFiles.add(_elem41); } iprot.readListEnd(); } struct.setInputFilesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // OUTPUT_FILES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list43 = iprot.readListBegin(); struct.outputFiles = new ArrayList<String>(_list43.size); String _elem44; for (int _i45 = 0; _i45 < _list43.size; ++_i45) { _elem44 = iprot.readString(); struct.outputFiles.add(_elem44); } iprot.readListEnd(); } struct.setOutputFilesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // JOB if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.job = new CommandLineJobInfo(); struct.job.read(iprot); struct.setJobIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // OPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.options = new CreateLineageTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(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, createLineage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.inputFiles != null) { oprot.writeFieldBegin(INPUT_FILES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.inputFiles.size())); for (String _iter46 : struct.inputFiles) { oprot.writeString(_iter46); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.outputFiles != null) { oprot.writeFieldBegin(OUTPUT_FILES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.outputFiles.size())); for (String _iter47 : struct.outputFiles) { oprot.writeString(_iter47); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.job != null) { oprot.writeFieldBegin(JOB_FIELD_DESC); struct.job.write(oprot); oprot.writeFieldEnd(); } if (struct.options != null) { oprot.writeFieldBegin(OPTIONS_FIELD_DESC); struct.options.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class createLineage_argsTupleSchemeFactory implements SchemeFactory { public createLineage_argsTupleScheme getScheme() { return new createLineage_argsTupleScheme(); } } private static class createLineage_argsTupleScheme extends TupleScheme<createLineage_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, createLineage_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetInputFiles()) { optionals.set(0); } if (struct.isSetOutputFiles()) { optionals.set(1); } if (struct.isSetJob()) { optionals.set(2); } if (struct.isSetOptions()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetInputFiles()) { { oprot.writeI32(struct.inputFiles.size()); for (String _iter48 : struct.inputFiles) { oprot.writeString(_iter48); } } } if (struct.isSetOutputFiles()) { { oprot.writeI32(struct.outputFiles.size()); for (String _iter49 : struct.outputFiles) { oprot.writeString(_iter49); } } } if (struct.isSetJob()) { struct.job.write(oprot); } if (struct.isSetOptions()) { struct.options.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, createLineage_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list50 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.inputFiles = new ArrayList<String>(_list50.size); String _elem51; for (int _i52 = 0; _i52 < _list50.size; ++_i52) { _elem51 = iprot.readString(); struct.inputFiles.add(_elem51); } } struct.setInputFilesIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.outputFiles = new ArrayList<String>(_list53.size); String _elem54; for (int _i55 = 0; _i55 < _list53.size; ++_i55) { _elem54 = iprot.readString(); struct.outputFiles.add(_elem54); } } struct.setOutputFilesIsSet(true); } if (incoming.get(2)) { struct.job = new CommandLineJobInfo(); struct.job.read(iprot); struct.setJobIsSet(true); } if (incoming.get(3)) { struct.options = new CreateLineageTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } } public static class createLineage_result implements org.apache.thrift.TBase<createLineage_result, createLineage_result._Fields>, java.io.Serializable, Cloneable, Comparable<createLineage_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLineage_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 E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new createLineage_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new createLineage_resultTupleSchemeFactory()); } private CreateLineageTResponse success; // required private alluxio.thrift.AlluxioTException e; // 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"), E((short)1, "e"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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, CreateLineageTResponse.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLineage_result.class, metaDataMap); } public createLineage_result() { } public createLineage_result( CreateLineageTResponse success, alluxio.thrift.AlluxioTException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public createLineage_result(createLineage_result other) { if (other.isSetSuccess()) { this.success = new CreateLineageTResponse(other.success); } if (other.isSetE()) { this.e = new alluxio.thrift.AlluxioTException(other.e); } } public createLineage_result deepCopy() { return new createLineage_result(this); } @Override public void clear() { this.success = null; this.e = null; } public CreateLineageTResponse getSuccess() { return this.success; } public createLineage_result setSuccess(CreateLineageTResponse 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; } } public alluxio.thrift.AlluxioTException getE() { return this.e; } public createLineage_result setE(alluxio.thrift.AlluxioTException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((CreateLineageTResponse)value); } break; case E: if (value == null) { unsetE(); } else { setE((alluxio.thrift.AlluxioTException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof createLineage_result) return this.equals((createLineage_result)that); return false; } public boolean equals(createLineage_result that) { if (that == null) return false; 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_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(createLineage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = 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 = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("createLineage_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("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } 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, 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 createLineage_resultStandardSchemeFactory implements SchemeFactory { public createLineage_resultStandardScheme getScheme() { return new createLineage_resultStandardScheme(); } } private static class createLineage_resultStandardScheme extends StandardScheme<createLineage_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, createLineage_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 CreateLineageTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(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, createLineage_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.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class createLineage_resultTupleSchemeFactory implements SchemeFactory { public createLineage_resultTupleScheme getScheme() { return new createLineage_resultTupleScheme(); } } private static class createLineage_resultTupleScheme extends TupleScheme<createLineage_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, createLineage_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, createLineage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new CreateLineageTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } public static class deleteLineage_args implements org.apache.thrift.TBase<deleteLineage_args, deleteLineage_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteLineage_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLineage_args"); private static final org.apache.thrift.protocol.TField LINEAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lineageId", org.apache.thrift.protocol.TType.I64, (short)1); private static final org.apache.thrift.protocol.TField CASCADE_FIELD_DESC = new org.apache.thrift.protocol.TField("cascade", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deleteLineage_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new deleteLineage_argsTupleSchemeFactory()); } private long lineageId; // required private boolean cascade; // required private DeleteLineageTOptions options; // 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 { /** * the lineage id */ LINEAGE_ID((short)1, "lineageId"), /** * whether to delete the lineage in cascade */ CASCADE((short)2, "cascade"), /** * the method options */ OPTIONS((short)3, "options"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // LINEAGE_ID return LINEAGE_ID; case 2: // CASCADE return CASCADE; case 3: // OPTIONS return OPTIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __LINEAGEID_ISSET_ID = 0; private static final int __CASCADE_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.LINEAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("lineageId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CASCADE, new org.apache.thrift.meta_data.FieldMetaData("cascade", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeleteLineageTOptions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLineage_args.class, metaDataMap); } public deleteLineage_args() { } public deleteLineage_args( long lineageId, boolean cascade, DeleteLineageTOptions options) { this(); this.lineageId = lineageId; setLineageIdIsSet(true); this.cascade = cascade; setCascadeIsSet(true); this.options = options; } /** * Performs a deep copy on <i>other</i>. */ public deleteLineage_args(deleteLineage_args other) { __isset_bitfield = other.__isset_bitfield; this.lineageId = other.lineageId; this.cascade = other.cascade; if (other.isSetOptions()) { this.options = new DeleteLineageTOptions(other.options); } } public deleteLineage_args deepCopy() { return new deleteLineage_args(this); } @Override public void clear() { setLineageIdIsSet(false); this.lineageId = 0; setCascadeIsSet(false); this.cascade = false; this.options = null; } /** * the lineage id */ public long getLineageId() { return this.lineageId; } /** * the lineage id */ public deleteLineage_args setLineageId(long lineageId) { this.lineageId = lineageId; setLineageIdIsSet(true); return this; } public void unsetLineageId() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LINEAGEID_ISSET_ID); } /** Returns true if field lineageId is set (has been assigned a value) and false otherwise */ public boolean isSetLineageId() { return EncodingUtils.testBit(__isset_bitfield, __LINEAGEID_ISSET_ID); } public void setLineageIdIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LINEAGEID_ISSET_ID, value); } /** * whether to delete the lineage in cascade */ public boolean isCascade() { return this.cascade; } /** * whether to delete the lineage in cascade */ public deleteLineage_args setCascade(boolean cascade) { this.cascade = cascade; setCascadeIsSet(true); return this; } public void unsetCascade() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CASCADE_ISSET_ID); } /** Returns true if field cascade is set (has been assigned a value) and false otherwise */ public boolean isSetCascade() { return EncodingUtils.testBit(__isset_bitfield, __CASCADE_ISSET_ID); } public void setCascadeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CASCADE_ISSET_ID, value); } /** * the method options */ public DeleteLineageTOptions getOptions() { return this.options; } /** * the method options */ public deleteLineage_args setOptions(DeleteLineageTOptions options) { this.options = options; return this; } public void unsetOptions() { this.options = null; } /** Returns true if field options is set (has been assigned a value) and false otherwise */ public boolean isSetOptions() { return this.options != null; } public void setOptionsIsSet(boolean value) { if (!value) { this.options = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case LINEAGE_ID: if (value == null) { unsetLineageId(); } else { setLineageId((Long)value); } break; case CASCADE: if (value == null) { unsetCascade(); } else { setCascade((Boolean)value); } break; case OPTIONS: if (value == null) { unsetOptions(); } else { setOptions((DeleteLineageTOptions)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case LINEAGE_ID: return getLineageId(); case CASCADE: return isCascade(); case OPTIONS: return getOptions(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case LINEAGE_ID: return isSetLineageId(); case CASCADE: return isSetCascade(); case OPTIONS: return isSetOptions(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deleteLineage_args) return this.equals((deleteLineage_args)that); return false; } public boolean equals(deleteLineage_args that) { if (that == null) return false; boolean this_present_lineageId = true; boolean that_present_lineageId = true; if (this_present_lineageId || that_present_lineageId) { if (!(this_present_lineageId && that_present_lineageId)) return false; if (this.lineageId != that.lineageId) return false; } boolean this_present_cascade = true; boolean that_present_cascade = true; if (this_present_cascade || that_present_cascade) { if (!(this_present_cascade && that_present_cascade)) return false; if (this.cascade != that.cascade) return false; } boolean this_present_options = true && this.isSetOptions(); boolean that_present_options = true && that.isSetOptions(); if (this_present_options || that_present_options) { if (!(this_present_options && that_present_options)) return false; if (!this.options.equals(that.options)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_lineageId = true; list.add(present_lineageId); if (present_lineageId) list.add(lineageId); boolean present_cascade = true; list.add(present_cascade); if (present_cascade) list.add(cascade); boolean present_options = true && (isSetOptions()); list.add(present_options); if (present_options) list.add(options); return list.hashCode(); } @Override public int compareTo(deleteLineage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetLineageId()).compareTo(other.isSetLineageId()); if (lastComparison != 0) { return lastComparison; } if (isSetLineageId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lineageId, other.lineageId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCascade()).compareTo(other.isSetCascade()); if (lastComparison != 0) { return lastComparison; } if (isSetCascade()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cascade, other.cascade); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions()); if (lastComparison != 0) { return lastComparison; } if (isSetOptions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deleteLineage_args("); boolean first = true; sb.append("lineageId:"); sb.append(this.lineageId); first = false; if (!first) sb.append(", "); sb.append("cascade:"); sb.append(this.cascade); first = false; if (!first) sb.append(", "); sb.append("options:"); if (this.options == null) { sb.append("null"); } else { sb.append(this.options); } 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 (options != null) { options.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // 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 deleteLineage_argsStandardSchemeFactory implements SchemeFactory { public deleteLineage_argsStandardScheme getScheme() { return new deleteLineage_argsStandardScheme(); } } private static class deleteLineage_argsStandardScheme extends StandardScheme<deleteLineage_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLineage_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: // LINEAGE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.lineageId = iprot.readI64(); struct.setLineageIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // CASCADE if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.cascade = iprot.readBool(); struct.setCascadeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // OPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.options = new DeleteLineageTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(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, deleteLineage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(LINEAGE_ID_FIELD_DESC); oprot.writeI64(struct.lineageId); oprot.writeFieldEnd(); oprot.writeFieldBegin(CASCADE_FIELD_DESC); oprot.writeBool(struct.cascade); oprot.writeFieldEnd(); if (struct.options != null) { oprot.writeFieldBegin(OPTIONS_FIELD_DESC); struct.options.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteLineage_argsTupleSchemeFactory implements SchemeFactory { public deleteLineage_argsTupleScheme getScheme() { return new deleteLineage_argsTupleScheme(); } } private static class deleteLineage_argsTupleScheme extends TupleScheme<deleteLineage_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteLineage_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetLineageId()) { optionals.set(0); } if (struct.isSetCascade()) { optionals.set(1); } if (struct.isSetOptions()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetLineageId()) { oprot.writeI64(struct.lineageId); } if (struct.isSetCascade()) { oprot.writeBool(struct.cascade); } if (struct.isSetOptions()) { struct.options.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteLineage_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.lineageId = iprot.readI64(); struct.setLineageIdIsSet(true); } if (incoming.get(1)) { struct.cascade = iprot.readBool(); struct.setCascadeIsSet(true); } if (incoming.get(2)) { struct.options = new DeleteLineageTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } } public static class deleteLineage_result implements org.apache.thrift.TBase<deleteLineage_result, deleteLineage_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteLineage_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLineage_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 E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deleteLineage_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new deleteLineage_resultTupleSchemeFactory()); } private DeleteLineageTResponse success; // required private alluxio.thrift.AlluxioTException e; // 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"), E((short)1, "e"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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, DeleteLineageTResponse.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLineage_result.class, metaDataMap); } public deleteLineage_result() { } public deleteLineage_result( DeleteLineageTResponse success, alluxio.thrift.AlluxioTException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public deleteLineage_result(deleteLineage_result other) { if (other.isSetSuccess()) { this.success = new DeleteLineageTResponse(other.success); } if (other.isSetE()) { this.e = new alluxio.thrift.AlluxioTException(other.e); } } public deleteLineage_result deepCopy() { return new deleteLineage_result(this); } @Override public void clear() { this.success = null; this.e = null; } public DeleteLineageTResponse getSuccess() { return this.success; } public deleteLineage_result setSuccess(DeleteLineageTResponse 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; } } public alluxio.thrift.AlluxioTException getE() { return this.e; } public deleteLineage_result setE(alluxio.thrift.AlluxioTException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((DeleteLineageTResponse)value); } break; case E: if (value == null) { unsetE(); } else { setE((alluxio.thrift.AlluxioTException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deleteLineage_result) return this.equals((deleteLineage_result)that); return false; } public boolean equals(deleteLineage_result that) { if (that == null) return false; 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_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(deleteLineage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = 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 = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deleteLineage_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("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } 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, 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 deleteLineage_resultStandardSchemeFactory implements SchemeFactory { public deleteLineage_resultStandardScheme getScheme() { return new deleteLineage_resultStandardScheme(); } } private static class deleteLineage_resultStandardScheme extends StandardScheme<deleteLineage_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLineage_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 DeleteLineageTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(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, deleteLineage_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.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteLineage_resultTupleSchemeFactory implements SchemeFactory { public deleteLineage_resultTupleScheme getScheme() { return new deleteLineage_resultTupleScheme(); } } private static class deleteLineage_resultTupleScheme extends TupleScheme<deleteLineage_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteLineage_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteLineage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new DeleteLineageTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } public static class getLineageInfoList_args implements org.apache.thrift.TBase<getLineageInfoList_args, getLineageInfoList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineageInfoList_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLineageInfoList_args"); private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getLineageInfoList_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getLineageInfoList_argsTupleSchemeFactory()); } private GetLineageInfoListTOptions options; // 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 { /** * the method options */ OPTIONS((short)1, "options"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // OPTIONS return OPTIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetLineageInfoListTOptions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLineageInfoList_args.class, metaDataMap); } public getLineageInfoList_args() { } public getLineageInfoList_args( GetLineageInfoListTOptions options) { this(); this.options = options; } /** * Performs a deep copy on <i>other</i>. */ public getLineageInfoList_args(getLineageInfoList_args other) { if (other.isSetOptions()) { this.options = new GetLineageInfoListTOptions(other.options); } } public getLineageInfoList_args deepCopy() { return new getLineageInfoList_args(this); } @Override public void clear() { this.options = null; } /** * the method options */ public GetLineageInfoListTOptions getOptions() { return this.options; } /** * the method options */ public getLineageInfoList_args setOptions(GetLineageInfoListTOptions options) { this.options = options; return this; } public void unsetOptions() { this.options = null; } /** Returns true if field options is set (has been assigned a value) and false otherwise */ public boolean isSetOptions() { return this.options != null; } public void setOptionsIsSet(boolean value) { if (!value) { this.options = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case OPTIONS: if (value == null) { unsetOptions(); } else { setOptions((GetLineageInfoListTOptions)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case OPTIONS: return getOptions(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case OPTIONS: return isSetOptions(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getLineageInfoList_args) return this.equals((getLineageInfoList_args)that); return false; } public boolean equals(getLineageInfoList_args that) { if (that == null) return false; boolean this_present_options = true && this.isSetOptions(); boolean that_present_options = true && that.isSetOptions(); if (this_present_options || that_present_options) { if (!(this_present_options && that_present_options)) return false; if (!this.options.equals(that.options)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_options = true && (isSetOptions()); list.add(present_options); if (present_options) list.add(options); return list.hashCode(); } @Override public int compareTo(getLineageInfoList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions()); if (lastComparison != 0) { return lastComparison; } if (isSetOptions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getLineageInfoList_args("); boolean first = true; sb.append("options:"); if (this.options == null) { sb.append("null"); } else { sb.append(this.options); } 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 (options != null) { options.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getLineageInfoList_argsStandardSchemeFactory implements SchemeFactory { public getLineageInfoList_argsStandardScheme getScheme() { return new getLineageInfoList_argsStandardScheme(); } } private static class getLineageInfoList_argsStandardScheme extends StandardScheme<getLineageInfoList_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getLineageInfoList_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: // OPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.options = new GetLineageInfoListTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(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, getLineageInfoList_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.options != null) { oprot.writeFieldBegin(OPTIONS_FIELD_DESC); struct.options.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getLineageInfoList_argsTupleSchemeFactory implements SchemeFactory { public getLineageInfoList_argsTupleScheme getScheme() { return new getLineageInfoList_argsTupleScheme(); } } private static class getLineageInfoList_argsTupleScheme extends TupleScheme<getLineageInfoList_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLineageInfoList_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetOptions()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetOptions()) { struct.options.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getLineageInfoList_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.options = new GetLineageInfoListTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } } public static class getLineageInfoList_result implements org.apache.thrift.TBase<getLineageInfoList_result, getLineageInfoList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineageInfoList_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLineageInfoList_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 E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getLineageInfoList_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getLineageInfoList_resultTupleSchemeFactory()); } private GetLineageInfoListTResponse success; // required private alluxio.thrift.AlluxioTException e; // 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"), E((short)1, "e"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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, GetLineageInfoListTResponse.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLineageInfoList_result.class, metaDataMap); } public getLineageInfoList_result() { } public getLineageInfoList_result( GetLineageInfoListTResponse success, alluxio.thrift.AlluxioTException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public getLineageInfoList_result(getLineageInfoList_result other) { if (other.isSetSuccess()) { this.success = new GetLineageInfoListTResponse(other.success); } if (other.isSetE()) { this.e = new alluxio.thrift.AlluxioTException(other.e); } } public getLineageInfoList_result deepCopy() { return new getLineageInfoList_result(this); } @Override public void clear() { this.success = null; this.e = null; } public GetLineageInfoListTResponse getSuccess() { return this.success; } public getLineageInfoList_result setSuccess(GetLineageInfoListTResponse 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; } } public alluxio.thrift.AlluxioTException getE() { return this.e; } public getLineageInfoList_result setE(alluxio.thrift.AlluxioTException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((GetLineageInfoListTResponse)value); } break; case E: if (value == null) { unsetE(); } else { setE((alluxio.thrift.AlluxioTException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getLineageInfoList_result) return this.equals((getLineageInfoList_result)that); return false; } public boolean equals(getLineageInfoList_result that) { if (that == null) return false; 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_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(getLineageInfoList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = 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 = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getLineageInfoList_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("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } 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, 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 getLineageInfoList_resultStandardSchemeFactory implements SchemeFactory { public getLineageInfoList_resultStandardScheme getScheme() { return new getLineageInfoList_resultStandardScheme(); } } private static class getLineageInfoList_resultStandardScheme extends StandardScheme<getLineageInfoList_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getLineageInfoList_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 GetLineageInfoListTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(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, getLineageInfoList_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.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getLineageInfoList_resultTupleSchemeFactory implements SchemeFactory { public getLineageInfoList_resultTupleScheme getScheme() { return new getLineageInfoList_resultTupleScheme(); } } private static class getLineageInfoList_resultTupleScheme extends TupleScheme<getLineageInfoList_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLineageInfoList_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getLineageInfoList_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GetLineageInfoListTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } public static class reinitializeFile_args implements org.apache.thrift.TBase<reinitializeFile_args, reinitializeFile_args._Fields>, java.io.Serializable, Cloneable, Comparable<reinitializeFile_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reinitializeFile_args"); private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField BLOCK_SIZE_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockSizeBytes", org.apache.thrift.protocol.TType.I64, (short)2); private static final org.apache.thrift.protocol.TField TTL_FIELD_DESC = new org.apache.thrift.protocol.TField("ttl", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.protocol.TField TTL_ACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("ttlAction", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)5); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new reinitializeFile_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new reinitializeFile_argsTupleSchemeFactory()); } private String path; // required private long blockSizeBytes; // required private long ttl; // required private alluxio.thrift.TTtlAction ttlAction; // required private ReinitializeFileTOptions options; // 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 { /** * the path of the file */ PATH((short)1, "path"), /** * block size in bytes */ BLOCK_SIZE_BYTES((short)2, "blockSizeBytes"), /** * time to live */ TTL((short)3, "ttl"), /** * expiry action * * @see alluxio.thrift.TTtlAction */ TTL_ACTION((short)4, "ttlAction"), /** * the method options */ OPTIONS((short)5, "options"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PATH return PATH; case 2: // BLOCK_SIZE_BYTES return BLOCK_SIZE_BYTES; case 3: // TTL return TTL; case 4: // TTL_ACTION return TTL_ACTION; case 5: // OPTIONS return OPTIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __BLOCKSIZEBYTES_ISSET_ID = 0; private static final int __TTL_ISSET_ID = 1; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.BLOCK_SIZE_BYTES, new org.apache.thrift.meta_data.FieldMetaData("blockSizeBytes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.TTL, new org.apache.thrift.meta_data.FieldMetaData("ttl", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.TTL_ACTION, new org.apache.thrift.meta_data.FieldMetaData("ttlAction", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, alluxio.thrift.TTtlAction.class))); tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ReinitializeFileTOptions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reinitializeFile_args.class, metaDataMap); } public reinitializeFile_args() { } public reinitializeFile_args( String path, long blockSizeBytes, long ttl, alluxio.thrift.TTtlAction ttlAction, ReinitializeFileTOptions options) { this(); this.path = path; this.blockSizeBytes = blockSizeBytes; setBlockSizeBytesIsSet(true); this.ttl = ttl; setTtlIsSet(true); this.ttlAction = ttlAction; this.options = options; } /** * Performs a deep copy on <i>other</i>. */ public reinitializeFile_args(reinitializeFile_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetPath()) { this.path = other.path; } this.blockSizeBytes = other.blockSizeBytes; this.ttl = other.ttl; if (other.isSetTtlAction()) { this.ttlAction = other.ttlAction; } if (other.isSetOptions()) { this.options = new ReinitializeFileTOptions(other.options); } } public reinitializeFile_args deepCopy() { return new reinitializeFile_args(this); } @Override public void clear() { this.path = null; setBlockSizeBytesIsSet(false); this.blockSizeBytes = 0; setTtlIsSet(false); this.ttl = 0; this.ttlAction = null; this.options = null; } /** * the path of the file */ public String getPath() { return this.path; } /** * the path of the file */ public reinitializeFile_args setPath(String path) { this.path = path; return this; } public void unsetPath() { this.path = null; } /** Returns true if field path is set (has been assigned a value) and false otherwise */ public boolean isSetPath() { return this.path != null; } public void setPathIsSet(boolean value) { if (!value) { this.path = null; } } /** * block size in bytes */ public long getBlockSizeBytes() { return this.blockSizeBytes; } /** * block size in bytes */ public reinitializeFile_args setBlockSizeBytes(long blockSizeBytes) { this.blockSizeBytes = blockSizeBytes; setBlockSizeBytesIsSet(true); return this; } public void unsetBlockSizeBytes() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID); } /** Returns true if field blockSizeBytes is set (has been assigned a value) and false otherwise */ public boolean isSetBlockSizeBytes() { return EncodingUtils.testBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID); } public void setBlockSizeBytesIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKSIZEBYTES_ISSET_ID, value); } /** * time to live */ public long getTtl() { return this.ttl; } /** * time to live */ public reinitializeFile_args setTtl(long ttl) { this.ttl = ttl; setTtlIsSet(true); return this; } public void unsetTtl() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TTL_ISSET_ID); } /** Returns true if field ttl is set (has been assigned a value) and false otherwise */ public boolean isSetTtl() { return EncodingUtils.testBit(__isset_bitfield, __TTL_ISSET_ID); } public void setTtlIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TTL_ISSET_ID, value); } /** * expiry action * * @see alluxio.thrift.TTtlAction */ public alluxio.thrift.TTtlAction getTtlAction() { return this.ttlAction; } /** * expiry action * * @see alluxio.thrift.TTtlAction */ public reinitializeFile_args setTtlAction(alluxio.thrift.TTtlAction ttlAction) { this.ttlAction = ttlAction; return this; } public void unsetTtlAction() { this.ttlAction = null; } /** Returns true if field ttlAction is set (has been assigned a value) and false otherwise */ public boolean isSetTtlAction() { return this.ttlAction != null; } public void setTtlActionIsSet(boolean value) { if (!value) { this.ttlAction = null; } } /** * the method options */ public ReinitializeFileTOptions getOptions() { return this.options; } /** * the method options */ public reinitializeFile_args setOptions(ReinitializeFileTOptions options) { this.options = options; return this; } public void unsetOptions() { this.options = null; } /** Returns true if field options is set (has been assigned a value) and false otherwise */ public boolean isSetOptions() { return this.options != null; } public void setOptionsIsSet(boolean value) { if (!value) { this.options = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; case BLOCK_SIZE_BYTES: if (value == null) { unsetBlockSizeBytes(); } else { setBlockSizeBytes((Long)value); } break; case TTL: if (value == null) { unsetTtl(); } else { setTtl((Long)value); } break; case TTL_ACTION: if (value == null) { unsetTtlAction(); } else { setTtlAction((alluxio.thrift.TTtlAction)value); } break; case OPTIONS: if (value == null) { unsetOptions(); } else { setOptions((ReinitializeFileTOptions)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); case BLOCK_SIZE_BYTES: return getBlockSizeBytes(); case TTL: return getTtl(); case TTL_ACTION: return getTtlAction(); case OPTIONS: return getOptions(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case PATH: return isSetPath(); case BLOCK_SIZE_BYTES: return isSetBlockSizeBytes(); case TTL: return isSetTtl(); case TTL_ACTION: return isSetTtlAction(); case OPTIONS: return isSetOptions(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof reinitializeFile_args) return this.equals((reinitializeFile_args)that); return false; } public boolean equals(reinitializeFile_args that) { if (that == null) return false; boolean this_present_path = true && this.isSetPath(); boolean that_present_path = true && that.isSetPath(); if (this_present_path || that_present_path) { if (!(this_present_path && that_present_path)) return false; if (!this.path.equals(that.path)) return false; } boolean this_present_blockSizeBytes = true; boolean that_present_blockSizeBytes = true; if (this_present_blockSizeBytes || that_present_blockSizeBytes) { if (!(this_present_blockSizeBytes && that_present_blockSizeBytes)) return false; if (this.blockSizeBytes != that.blockSizeBytes) return false; } boolean this_present_ttl = true; boolean that_present_ttl = true; if (this_present_ttl || that_present_ttl) { if (!(this_present_ttl && that_present_ttl)) return false; if (this.ttl != that.ttl) return false; } boolean this_present_ttlAction = true && this.isSetTtlAction(); boolean that_present_ttlAction = true && that.isSetTtlAction(); if (this_present_ttlAction || that_present_ttlAction) { if (!(this_present_ttlAction && that_present_ttlAction)) return false; if (!this.ttlAction.equals(that.ttlAction)) return false; } boolean this_present_options = true && this.isSetOptions(); boolean that_present_options = true && that.isSetOptions(); if (this_present_options || that_present_options) { if (!(this_present_options && that_present_options)) return false; if (!this.options.equals(that.options)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_path = true && (isSetPath()); list.add(present_path); if (present_path) list.add(path); boolean present_blockSizeBytes = true; list.add(present_blockSizeBytes); if (present_blockSizeBytes) list.add(blockSizeBytes); boolean present_ttl = true; list.add(present_ttl); if (present_ttl) list.add(ttl); boolean present_ttlAction = true && (isSetTtlAction()); list.add(present_ttlAction); if (present_ttlAction) list.add(ttlAction.getValue()); boolean present_options = true && (isSetOptions()); list.add(present_options); if (present_options) list.add(options); return list.hashCode(); } @Override public int compareTo(reinitializeFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); if (lastComparison != 0) { return lastComparison; } if (isSetPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBlockSizeBytes()).compareTo(other.isSetBlockSizeBytes()); if (lastComparison != 0) { return lastComparison; } if (isSetBlockSizeBytes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockSizeBytes, other.blockSizeBytes); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTtl()).compareTo(other.isSetTtl()); if (lastComparison != 0) { return lastComparison; } if (isSetTtl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ttl, other.ttl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTtlAction()).compareTo(other.isSetTtlAction()); if (lastComparison != 0) { return lastComparison; } if (isSetTtlAction()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ttlAction, other.ttlAction); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions()); if (lastComparison != 0) { return lastComparison; } if (isSetOptions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("reinitializeFile_args("); boolean first = true; sb.append("path:"); if (this.path == null) { sb.append("null"); } else { sb.append(this.path); } first = false; if (!first) sb.append(", "); sb.append("blockSizeBytes:"); sb.append(this.blockSizeBytes); first = false; if (!first) sb.append(", "); sb.append("ttl:"); sb.append(this.ttl); first = false; if (!first) sb.append(", "); sb.append("ttlAction:"); if (this.ttlAction == null) { sb.append("null"); } else { sb.append(this.ttlAction); } first = false; if (!first) sb.append(", "); sb.append("options:"); if (this.options == null) { sb.append("null"); } else { sb.append(this.options); } 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 (options != null) { options.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // 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 reinitializeFile_argsStandardSchemeFactory implements SchemeFactory { public reinitializeFile_argsStandardScheme getScheme() { return new reinitializeFile_argsStandardScheme(); } } private static class reinitializeFile_argsStandardScheme extends StandardScheme<reinitializeFile_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, reinitializeFile_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: // PATH if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.path = iprot.readString(); struct.setPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // BLOCK_SIZE_BYTES if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.blockSizeBytes = iprot.readI64(); struct.setBlockSizeBytesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TTL if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.ttl = iprot.readI64(); struct.setTtlIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // TTL_ACTION if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.ttlAction = alluxio.thrift.TTtlAction.findByValue(iprot.readI32()); struct.setTtlActionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // OPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.options = new ReinitializeFileTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(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, reinitializeFile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(struct.path); oprot.writeFieldEnd(); } oprot.writeFieldBegin(BLOCK_SIZE_BYTES_FIELD_DESC); oprot.writeI64(struct.blockSizeBytes); oprot.writeFieldEnd(); oprot.writeFieldBegin(TTL_FIELD_DESC); oprot.writeI64(struct.ttl); oprot.writeFieldEnd(); if (struct.ttlAction != null) { oprot.writeFieldBegin(TTL_ACTION_FIELD_DESC); oprot.writeI32(struct.ttlAction.getValue()); oprot.writeFieldEnd(); } if (struct.options != null) { oprot.writeFieldBegin(OPTIONS_FIELD_DESC); struct.options.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class reinitializeFile_argsTupleSchemeFactory implements SchemeFactory { public reinitializeFile_argsTupleScheme getScheme() { return new reinitializeFile_argsTupleScheme(); } } private static class reinitializeFile_argsTupleScheme extends TupleScheme<reinitializeFile_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, reinitializeFile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPath()) { optionals.set(0); } if (struct.isSetBlockSizeBytes()) { optionals.set(1); } if (struct.isSetTtl()) { optionals.set(2); } if (struct.isSetTtlAction()) { optionals.set(3); } if (struct.isSetOptions()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetPath()) { oprot.writeString(struct.path); } if (struct.isSetBlockSizeBytes()) { oprot.writeI64(struct.blockSizeBytes); } if (struct.isSetTtl()) { oprot.writeI64(struct.ttl); } if (struct.isSetTtlAction()) { oprot.writeI32(struct.ttlAction.getValue()); } if (struct.isSetOptions()) { struct.options.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, reinitializeFile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.path = iprot.readString(); struct.setPathIsSet(true); } if (incoming.get(1)) { struct.blockSizeBytes = iprot.readI64(); struct.setBlockSizeBytesIsSet(true); } if (incoming.get(2)) { struct.ttl = iprot.readI64(); struct.setTtlIsSet(true); } if (incoming.get(3)) { struct.ttlAction = alluxio.thrift.TTtlAction.findByValue(iprot.readI32()); struct.setTtlActionIsSet(true); } if (incoming.get(4)) { struct.options = new ReinitializeFileTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } } public static class reinitializeFile_result implements org.apache.thrift.TBase<reinitializeFile_result, reinitializeFile_result._Fields>, java.io.Serializable, Cloneable, Comparable<reinitializeFile_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reinitializeFile_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 E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new reinitializeFile_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new reinitializeFile_resultTupleSchemeFactory()); } private ReinitializeFileTResponse success; // required private alluxio.thrift.AlluxioTException e; // 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"), E((short)1, "e"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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, ReinitializeFileTResponse.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reinitializeFile_result.class, metaDataMap); } public reinitializeFile_result() { } public reinitializeFile_result( ReinitializeFileTResponse success, alluxio.thrift.AlluxioTException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public reinitializeFile_result(reinitializeFile_result other) { if (other.isSetSuccess()) { this.success = new ReinitializeFileTResponse(other.success); } if (other.isSetE()) { this.e = new alluxio.thrift.AlluxioTException(other.e); } } public reinitializeFile_result deepCopy() { return new reinitializeFile_result(this); } @Override public void clear() { this.success = null; this.e = null; } public ReinitializeFileTResponse getSuccess() { return this.success; } public reinitializeFile_result setSuccess(ReinitializeFileTResponse 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; } } public alluxio.thrift.AlluxioTException getE() { return this.e; } public reinitializeFile_result setE(alluxio.thrift.AlluxioTException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((ReinitializeFileTResponse)value); } break; case E: if (value == null) { unsetE(); } else { setE((alluxio.thrift.AlluxioTException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof reinitializeFile_result) return this.equals((reinitializeFile_result)that); return false; } public boolean equals(reinitializeFile_result that) { if (that == null) return false; 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_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(reinitializeFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = 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 = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("reinitializeFile_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("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } 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, 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 reinitializeFile_resultStandardSchemeFactory implements SchemeFactory { public reinitializeFile_resultStandardScheme getScheme() { return new reinitializeFile_resultStandardScheme(); } } private static class reinitializeFile_resultStandardScheme extends StandardScheme<reinitializeFile_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, reinitializeFile_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 ReinitializeFileTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(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, reinitializeFile_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.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class reinitializeFile_resultTupleSchemeFactory implements SchemeFactory { public reinitializeFile_resultTupleScheme getScheme() { return new reinitializeFile_resultTupleScheme(); } } private static class reinitializeFile_resultTupleScheme extends TupleScheme<reinitializeFile_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, reinitializeFile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, reinitializeFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new ReinitializeFileTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } public static class reportLostFile_args implements org.apache.thrift.TBase<reportLostFile_args, reportLostFile_args._Fields>, java.io.Serializable, Cloneable, Comparable<reportLostFile_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reportLostFile_args"); private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new reportLostFile_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new reportLostFile_argsTupleSchemeFactory()); } private String path; // required private ReportLostFileTOptions options; // 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 { /** * the path of the file */ PATH((short)1, "path"), /** * the method options */ OPTIONS((short)4, "options"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PATH return PATH; case 4: // OPTIONS return OPTIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ReportLostFileTOptions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reportLostFile_args.class, metaDataMap); } public reportLostFile_args() { } public reportLostFile_args( String path, ReportLostFileTOptions options) { this(); this.path = path; this.options = options; } /** * Performs a deep copy on <i>other</i>. */ public reportLostFile_args(reportLostFile_args other) { if (other.isSetPath()) { this.path = other.path; } if (other.isSetOptions()) { this.options = new ReportLostFileTOptions(other.options); } } public reportLostFile_args deepCopy() { return new reportLostFile_args(this); } @Override public void clear() { this.path = null; this.options = null; } /** * the path of the file */ public String getPath() { return this.path; } /** * the path of the file */ public reportLostFile_args setPath(String path) { this.path = path; return this; } public void unsetPath() { this.path = null; } /** Returns true if field path is set (has been assigned a value) and false otherwise */ public boolean isSetPath() { return this.path != null; } public void setPathIsSet(boolean value) { if (!value) { this.path = null; } } /** * the method options */ public ReportLostFileTOptions getOptions() { return this.options; } /** * the method options */ public reportLostFile_args setOptions(ReportLostFileTOptions options) { this.options = options; return this; } public void unsetOptions() { this.options = null; } /** Returns true if field options is set (has been assigned a value) and false otherwise */ public boolean isSetOptions() { return this.options != null; } public void setOptionsIsSet(boolean value) { if (!value) { this.options = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; case OPTIONS: if (value == null) { unsetOptions(); } else { setOptions((ReportLostFileTOptions)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); case OPTIONS: return getOptions(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case PATH: return isSetPath(); case OPTIONS: return isSetOptions(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof reportLostFile_args) return this.equals((reportLostFile_args)that); return false; } public boolean equals(reportLostFile_args that) { if (that == null) return false; boolean this_present_path = true && this.isSetPath(); boolean that_present_path = true && that.isSetPath(); if (this_present_path || that_present_path) { if (!(this_present_path && that_present_path)) return false; if (!this.path.equals(that.path)) return false; } boolean this_present_options = true && this.isSetOptions(); boolean that_present_options = true && that.isSetOptions(); if (this_present_options || that_present_options) { if (!(this_present_options && that_present_options)) return false; if (!this.options.equals(that.options)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_path = true && (isSetPath()); list.add(present_path); if (present_path) list.add(path); boolean present_options = true && (isSetOptions()); list.add(present_options); if (present_options) list.add(options); return list.hashCode(); } @Override public int compareTo(reportLostFile_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); if (lastComparison != 0) { return lastComparison; } if (isSetPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions()); if (lastComparison != 0) { return lastComparison; } if (isSetOptions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("reportLostFile_args("); boolean first = true; sb.append("path:"); if (this.path == null) { sb.append("null"); } else { sb.append(this.path); } first = false; if (!first) sb.append(", "); sb.append("options:"); if (this.options == null) { sb.append("null"); } else { sb.append(this.options); } 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 (options != null) { options.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class reportLostFile_argsStandardSchemeFactory implements SchemeFactory { public reportLostFile_argsStandardScheme getScheme() { return new reportLostFile_argsStandardScheme(); } } private static class reportLostFile_argsStandardScheme extends StandardScheme<reportLostFile_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_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: // PATH if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.path = iprot.readString(); struct.setPathIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // OPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.options = new ReportLostFileTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(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, reportLostFile_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(struct.path); oprot.writeFieldEnd(); } if (struct.options != null) { oprot.writeFieldBegin(OPTIONS_FIELD_DESC); struct.options.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class reportLostFile_argsTupleSchemeFactory implements SchemeFactory { public reportLostFile_argsTupleScheme getScheme() { return new reportLostFile_argsTupleScheme(); } } private static class reportLostFile_argsTupleScheme extends TupleScheme<reportLostFile_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, reportLostFile_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetPath()) { optionals.set(0); } if (struct.isSetOptions()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetPath()) { oprot.writeString(struct.path); } if (struct.isSetOptions()) { struct.options.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, reportLostFile_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.path = iprot.readString(); struct.setPathIsSet(true); } if (incoming.get(1)) { struct.options = new ReportLostFileTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } } public static class reportLostFile_result implements org.apache.thrift.TBase<reportLostFile_result, reportLostFile_result._Fields>, java.io.Serializable, Cloneable, Comparable<reportLostFile_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reportLostFile_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 E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new reportLostFile_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new reportLostFile_resultTupleSchemeFactory()); } private ReportLostFileTResponse success; // required private alluxio.thrift.AlluxioTException e; // 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"), E((short)1, "e"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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, ReportLostFileTResponse.class))); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reportLostFile_result.class, metaDataMap); } public reportLostFile_result() { } public reportLostFile_result( ReportLostFileTResponse success, alluxio.thrift.AlluxioTException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public reportLostFile_result(reportLostFile_result other) { if (other.isSetSuccess()) { this.success = new ReportLostFileTResponse(other.success); } if (other.isSetE()) { this.e = new alluxio.thrift.AlluxioTException(other.e); } } public reportLostFile_result deepCopy() { return new reportLostFile_result(this); } @Override public void clear() { this.success = null; this.e = null; } public ReportLostFileTResponse getSuccess() { return this.success; } public reportLostFile_result setSuccess(ReportLostFileTResponse 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; } } public alluxio.thrift.AlluxioTException getE() { return this.e; } public reportLostFile_result setE(alluxio.thrift.AlluxioTException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((ReportLostFileTResponse)value); } break; case E: if (value == null) { unsetE(); } else { setE((alluxio.thrift.AlluxioTException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof reportLostFile_result) return this.equals((reportLostFile_result)that); return false; } public boolean equals(reportLostFile_result that) { if (that == null) return false; 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_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(reportLostFile_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = 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 = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("reportLostFile_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("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } 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, 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 reportLostFile_resultStandardSchemeFactory implements SchemeFactory { public reportLostFile_resultStandardScheme getScheme() { return new reportLostFile_resultStandardScheme(); } } private static class reportLostFile_resultStandardScheme extends StandardScheme<reportLostFile_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, reportLostFile_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 ReportLostFileTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(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, reportLostFile_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.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class reportLostFile_resultTupleSchemeFactory implements SchemeFactory { public reportLostFile_resultTupleScheme getScheme() { return new reportLostFile_resultTupleScheme(); } } private static class reportLostFile_resultTupleScheme extends TupleScheme<reportLostFile_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, reportLostFile_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, reportLostFile_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new ReportLostFileTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } }