/** * 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 FileSystemMasterWorkerService { /** * This interface contains file system master service endpoints for Alluxio workers. */ public interface Iface extends alluxio.thrift.AlluxioService.Iface { /** * Periodic file system worker heartbeat. Returns the command for persisting * the blocks of a file. * * @param workerId the id of the worker * * @param persistedFiles the list of persisted files * * @param options the method options */ public FileSystemHeartbeatTResponse fileSystemHeartbeat(long workerId, List<Long> persistedFiles, FileSystemHeartbeatTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException; public GetFileInfoTResponse getFileInfo(long fileId, GetFileInfoTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException; /** * Returns the set of pinned file ids. * * @param options the method options */ public GetPinnedFileIdsTResponse getPinnedFileIds(GetPinnedFileIdsTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException; /** * Returns the UFS information for the given mount point identified by its id. * * * @param mountId the id of the ufs * * @param options the method options */ public GetUfsInfoTResponse getUfsInfo(long mountId, GetUfsInfoTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException; } public interface AsyncIface extends alluxio.thrift.AlluxioService .AsyncIface { public void fileSystemHeartbeat(long workerId, List<Long> persistedFiles, FileSystemHeartbeatTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getFileInfo(long fileId, GetFileInfoTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getPinnedFileIds(GetPinnedFileIdsTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getUfsInfo(long mountId, GetUfsInfoTOptions 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 FileSystemHeartbeatTResponse fileSystemHeartbeat(long workerId, List<Long> persistedFiles, FileSystemHeartbeatTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { send_fileSystemHeartbeat(workerId, persistedFiles, options); return recv_fileSystemHeartbeat(); } public void send_fileSystemHeartbeat(long workerId, List<Long> persistedFiles, FileSystemHeartbeatTOptions options) throws org.apache.thrift.TException { fileSystemHeartbeat_args args = new fileSystemHeartbeat_args(); args.setWorkerId(workerId); args.setPersistedFiles(persistedFiles); args.setOptions(options); sendBase("fileSystemHeartbeat", args); } public FileSystemHeartbeatTResponse recv_fileSystemHeartbeat() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { fileSystemHeartbeat_result result = new fileSystemHeartbeat_result(); receiveBase(result, "fileSystemHeartbeat"); 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, "fileSystemHeartbeat failed: unknown result"); } public GetFileInfoTResponse getFileInfo(long fileId, GetFileInfoTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { send_getFileInfo(fileId, options); return recv_getFileInfo(); } public void send_getFileInfo(long fileId, GetFileInfoTOptions options) throws org.apache.thrift.TException { getFileInfo_args args = new getFileInfo_args(); args.setFileId(fileId); args.setOptions(options); sendBase("getFileInfo", args); } public GetFileInfoTResponse recv_getFileInfo() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { getFileInfo_result result = new getFileInfo_result(); receiveBase(result, "getFileInfo"); 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, "getFileInfo failed: unknown result"); } public GetPinnedFileIdsTResponse getPinnedFileIds(GetPinnedFileIdsTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { send_getPinnedFileIds(options); return recv_getPinnedFileIds(); } public void send_getPinnedFileIds(GetPinnedFileIdsTOptions options) throws org.apache.thrift.TException { getPinnedFileIds_args args = new getPinnedFileIds_args(); args.setOptions(options); sendBase("getPinnedFileIds", args); } public GetPinnedFileIdsTResponse recv_getPinnedFileIds() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { getPinnedFileIds_result result = new getPinnedFileIds_result(); receiveBase(result, "getPinnedFileIds"); 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, "getPinnedFileIds failed: unknown result"); } public GetUfsInfoTResponse getUfsInfo(long mountId, GetUfsInfoTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { send_getUfsInfo(mountId, options); return recv_getUfsInfo(); } public void send_getUfsInfo(long mountId, GetUfsInfoTOptions options) throws org.apache.thrift.TException { getUfsInfo_args args = new getUfsInfo_args(); args.setMountId(mountId); args.setOptions(options); sendBase("getUfsInfo", args); } public GetUfsInfoTResponse recv_getUfsInfo() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException { getUfsInfo_result result = new getUfsInfo_result(); receiveBase(result, "getUfsInfo"); 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, "getUfsInfo 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 fileSystemHeartbeat(long workerId, List<Long> persistedFiles, FileSystemHeartbeatTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); fileSystemHeartbeat_call method_call = new fileSystemHeartbeat_call(workerId, persistedFiles, options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class fileSystemHeartbeat_call extends org.apache.thrift.async.TAsyncMethodCall { private long workerId; private List<Long> persistedFiles; private FileSystemHeartbeatTOptions options; public fileSystemHeartbeat_call(long workerId, List<Long> persistedFiles, FileSystemHeartbeatTOptions 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.workerId = workerId; this.persistedFiles = persistedFiles; 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("fileSystemHeartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0)); fileSystemHeartbeat_args args = new fileSystemHeartbeat_args(); args.setWorkerId(workerId); args.setPersistedFiles(persistedFiles); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } public FileSystemHeartbeatTResponse 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_fileSystemHeartbeat(); } } public void getFileInfo(long fileId, GetFileInfoTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getFileInfo_call method_call = new getFileInfo_call(fileId, options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getFileInfo_call extends org.apache.thrift.async.TAsyncMethodCall { private long fileId; private GetFileInfoTOptions options; public getFileInfo_call(long fileId, GetFileInfoTOptions 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.fileId = fileId; 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("getFileInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); getFileInfo_args args = new getFileInfo_args(); args.setFileId(fileId); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } public GetFileInfoTResponse 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_getFileInfo(); } } public void getPinnedFileIds(GetPinnedFileIdsTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getPinnedFileIds_call method_call = new getPinnedFileIds_call(options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getPinnedFileIds_call extends org.apache.thrift.async.TAsyncMethodCall { private GetPinnedFileIdsTOptions options; public getPinnedFileIds_call(GetPinnedFileIdsTOptions 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("getPinnedFileIds", org.apache.thrift.protocol.TMessageType.CALL, 0)); getPinnedFileIds_args args = new getPinnedFileIds_args(); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } public GetPinnedFileIdsTResponse 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_getPinnedFileIds(); } } public void getUfsInfo(long mountId, GetUfsInfoTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getUfsInfo_call method_call = new getUfsInfo_call(mountId, options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUfsInfo_call extends org.apache.thrift.async.TAsyncMethodCall { private long mountId; private GetUfsInfoTOptions options; public getUfsInfo_call(long mountId, GetUfsInfoTOptions 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.mountId = mountId; 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("getUfsInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); getUfsInfo_args args = new getUfsInfo_args(); args.setMountId(mountId); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } public GetUfsInfoTResponse 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_getUfsInfo(); } } } 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("fileSystemHeartbeat", new fileSystemHeartbeat()); processMap.put("getFileInfo", new getFileInfo()); processMap.put("getPinnedFileIds", new getPinnedFileIds()); processMap.put("getUfsInfo", new getUfsInfo()); return processMap; } public static class fileSystemHeartbeat<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fileSystemHeartbeat_args> { public fileSystemHeartbeat() { super("fileSystemHeartbeat"); } public fileSystemHeartbeat_args getEmptyArgsInstance() { return new fileSystemHeartbeat_args(); } protected boolean isOneway() { return false; } public fileSystemHeartbeat_result getResult(I iface, fileSystemHeartbeat_args args) throws org.apache.thrift.TException { fileSystemHeartbeat_result result = new fileSystemHeartbeat_result(); try { result.success = iface.fileSystemHeartbeat(args.workerId, args.persistedFiles, args.options); } catch (alluxio.thrift.AlluxioTException e) { result.e = e; } return result; } } public static class getFileInfo<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFileInfo_args> { public getFileInfo() { super("getFileInfo"); } public getFileInfo_args getEmptyArgsInstance() { return new getFileInfo_args(); } protected boolean isOneway() { return false; } public getFileInfo_result getResult(I iface, getFileInfo_args args) throws org.apache.thrift.TException { getFileInfo_result result = new getFileInfo_result(); try { result.success = iface.getFileInfo(args.fileId, args.options); } catch (alluxio.thrift.AlluxioTException e) { result.e = e; } return result; } } public static class getPinnedFileIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPinnedFileIds_args> { public getPinnedFileIds() { super("getPinnedFileIds"); } public getPinnedFileIds_args getEmptyArgsInstance() { return new getPinnedFileIds_args(); } protected boolean isOneway() { return false; } public getPinnedFileIds_result getResult(I iface, getPinnedFileIds_args args) throws org.apache.thrift.TException { getPinnedFileIds_result result = new getPinnedFileIds_result(); try { result.success = iface.getPinnedFileIds(args.options); } catch (alluxio.thrift.AlluxioTException e) { result.e = e; } return result; } } public static class getUfsInfo<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUfsInfo_args> { public getUfsInfo() { super("getUfsInfo"); } public getUfsInfo_args getEmptyArgsInstance() { return new getUfsInfo_args(); } protected boolean isOneway() { return false; } public getUfsInfo_result getResult(I iface, getUfsInfo_args args) throws org.apache.thrift.TException { getUfsInfo_result result = new getUfsInfo_result(); try { result.success = iface.getUfsInfo(args.mountId, 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("fileSystemHeartbeat", new fileSystemHeartbeat()); processMap.put("getFileInfo", new getFileInfo()); processMap.put("getPinnedFileIds", new getPinnedFileIds()); processMap.put("getUfsInfo", new getUfsInfo()); return processMap; } public static class fileSystemHeartbeat<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, fileSystemHeartbeat_args, FileSystemHeartbeatTResponse> { public fileSystemHeartbeat() { super("fileSystemHeartbeat"); } public fileSystemHeartbeat_args getEmptyArgsInstance() { return new fileSystemHeartbeat_args(); } public AsyncMethodCallback<FileSystemHeartbeatTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<FileSystemHeartbeatTResponse>() { public void onComplete(FileSystemHeartbeatTResponse o) { fileSystemHeartbeat_result result = new fileSystemHeartbeat_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; fileSystemHeartbeat_result result = new fileSystemHeartbeat_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, fileSystemHeartbeat_args args, org.apache.thrift.async.AsyncMethodCallback<FileSystemHeartbeatTResponse> resultHandler) throws TException { iface.fileSystemHeartbeat(args.workerId, args.persistedFiles, args.options,resultHandler); } } public static class getFileInfo<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getFileInfo_args, GetFileInfoTResponse> { public getFileInfo() { super("getFileInfo"); } public getFileInfo_args getEmptyArgsInstance() { return new getFileInfo_args(); } public AsyncMethodCallback<GetFileInfoTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetFileInfoTResponse>() { public void onComplete(GetFileInfoTResponse o) { getFileInfo_result result = new getFileInfo_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; getFileInfo_result result = new getFileInfo_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, getFileInfo_args args, org.apache.thrift.async.AsyncMethodCallback<GetFileInfoTResponse> resultHandler) throws TException { iface.getFileInfo(args.fileId, args.options,resultHandler); } } public static class getPinnedFileIds<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPinnedFileIds_args, GetPinnedFileIdsTResponse> { public getPinnedFileIds() { super("getPinnedFileIds"); } public getPinnedFileIds_args getEmptyArgsInstance() { return new getPinnedFileIds_args(); } public AsyncMethodCallback<GetPinnedFileIdsTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetPinnedFileIdsTResponse>() { public void onComplete(GetPinnedFileIdsTResponse o) { getPinnedFileIds_result result = new getPinnedFileIds_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; getPinnedFileIds_result result = new getPinnedFileIds_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, getPinnedFileIds_args args, org.apache.thrift.async.AsyncMethodCallback<GetPinnedFileIdsTResponse> resultHandler) throws TException { iface.getPinnedFileIds(args.options,resultHandler); } } public static class getUfsInfo<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUfsInfo_args, GetUfsInfoTResponse> { public getUfsInfo() { super("getUfsInfo"); } public getUfsInfo_args getEmptyArgsInstance() { return new getUfsInfo_args(); } public AsyncMethodCallback<GetUfsInfoTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<GetUfsInfoTResponse>() { public void onComplete(GetUfsInfoTResponse o) { getUfsInfo_result result = new getUfsInfo_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; getUfsInfo_result result = new getUfsInfo_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, getUfsInfo_args args, org.apache.thrift.async.AsyncMethodCallback<GetUfsInfoTResponse> resultHandler) throws TException { iface.getUfsInfo(args.mountId, args.options,resultHandler); } } } public static class fileSystemHeartbeat_args implements org.apache.thrift.TBase<fileSystemHeartbeat_args, fileSystemHeartbeat_args._Fields>, java.io.Serializable, Cloneable, Comparable<fileSystemHeartbeat_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fileSystemHeartbeat_args"); private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.I64, (short)1); private static final org.apache.thrift.protocol.TField PERSISTED_FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedFiles", org.apache.thrift.protocol.TType.LIST, (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 fileSystemHeartbeat_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new fileSystemHeartbeat_argsTupleSchemeFactory()); } private long workerId; // required private List<Long> persistedFiles; // required private FileSystemHeartbeatTOptions 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 id of the worker */ WORKER_ID((short)1, "workerId"), /** * the list of persisted files */ PERSISTED_FILES((short)2, "persistedFiles"), /** * 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: // WORKER_ID return WORKER_ID; case 2: // PERSISTED_FILES return PERSISTED_FILES; 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 __WORKERID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.PERSISTED_FILES, new org.apache.thrift.meta_data.FieldMetaData("persistedFiles", 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.I64)))); 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, FileSystemHeartbeatTOptions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fileSystemHeartbeat_args.class, metaDataMap); } public fileSystemHeartbeat_args() { } public fileSystemHeartbeat_args( long workerId, List<Long> persistedFiles, FileSystemHeartbeatTOptions options) { this(); this.workerId = workerId; setWorkerIdIsSet(true); this.persistedFiles = persistedFiles; this.options = options; } /** * Performs a deep copy on <i>other</i>. */ public fileSystemHeartbeat_args(fileSystemHeartbeat_args other) { __isset_bitfield = other.__isset_bitfield; this.workerId = other.workerId; if (other.isSetPersistedFiles()) { List<Long> __this__persistedFiles = new ArrayList<Long>(other.persistedFiles); this.persistedFiles = __this__persistedFiles; } if (other.isSetOptions()) { this.options = new FileSystemHeartbeatTOptions(other.options); } } public fileSystemHeartbeat_args deepCopy() { return new fileSystemHeartbeat_args(this); } @Override public void clear() { setWorkerIdIsSet(false); this.workerId = 0; this.persistedFiles = null; this.options = null; } /** * the id of the worker */ public long getWorkerId() { return this.workerId; } /** * the id of the worker */ public fileSystemHeartbeat_args setWorkerId(long workerId) { this.workerId = workerId; setWorkerIdIsSet(true); return this; } public void unsetWorkerId() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WORKERID_ISSET_ID); } /** Returns true if field workerId is set (has been assigned a value) and false otherwise */ public boolean isSetWorkerId() { return EncodingUtils.testBit(__isset_bitfield, __WORKERID_ISSET_ID); } public void setWorkerIdIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WORKERID_ISSET_ID, value); } public int getPersistedFilesSize() { return (this.persistedFiles == null) ? 0 : this.persistedFiles.size(); } public java.util.Iterator<Long> getPersistedFilesIterator() { return (this.persistedFiles == null) ? null : this.persistedFiles.iterator(); } public void addToPersistedFiles(long elem) { if (this.persistedFiles == null) { this.persistedFiles = new ArrayList<Long>(); } this.persistedFiles.add(elem); } /** * the list of persisted files */ public List<Long> getPersistedFiles() { return this.persistedFiles; } /** * the list of persisted files */ public fileSystemHeartbeat_args setPersistedFiles(List<Long> persistedFiles) { this.persistedFiles = persistedFiles; return this; } public void unsetPersistedFiles() { this.persistedFiles = null; } /** Returns true if field persistedFiles is set (has been assigned a value) and false otherwise */ public boolean isSetPersistedFiles() { return this.persistedFiles != null; } public void setPersistedFilesIsSet(boolean value) { if (!value) { this.persistedFiles = null; } } /** * the method options */ public FileSystemHeartbeatTOptions getOptions() { return this.options; } /** * the method options */ public fileSystemHeartbeat_args setOptions(FileSystemHeartbeatTOptions 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 WORKER_ID: if (value == null) { unsetWorkerId(); } else { setWorkerId((Long)value); } break; case PERSISTED_FILES: if (value == null) { unsetPersistedFiles(); } else { setPersistedFiles((List<Long>)value); } break; case OPTIONS: if (value == null) { unsetOptions(); } else { setOptions((FileSystemHeartbeatTOptions)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case WORKER_ID: return getWorkerId(); case PERSISTED_FILES: return getPersistedFiles(); 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 WORKER_ID: return isSetWorkerId(); case PERSISTED_FILES: return isSetPersistedFiles(); case OPTIONS: return isSetOptions(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof fileSystemHeartbeat_args) return this.equals((fileSystemHeartbeat_args)that); return false; } public boolean equals(fileSystemHeartbeat_args that) { if (that == null) return false; boolean this_present_workerId = true; boolean that_present_workerId = true; if (this_present_workerId || that_present_workerId) { if (!(this_present_workerId && that_present_workerId)) return false; if (this.workerId != that.workerId) return false; } boolean this_present_persistedFiles = true && this.isSetPersistedFiles(); boolean that_present_persistedFiles = true && that.isSetPersistedFiles(); if (this_present_persistedFiles || that_present_persistedFiles) { if (!(this_present_persistedFiles && that_present_persistedFiles)) return false; if (!this.persistedFiles.equals(that.persistedFiles)) 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_workerId = true; list.add(present_workerId); if (present_workerId) list.add(workerId); boolean present_persistedFiles = true && (isSetPersistedFiles()); list.add(present_persistedFiles); if (present_persistedFiles) list.add(persistedFiles); boolean present_options = true && (isSetOptions()); list.add(present_options); if (present_options) list.add(options); return list.hashCode(); } @Override public int compareTo(fileSystemHeartbeat_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId()); if (lastComparison != 0) { return lastComparison; } if (isSetWorkerId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPersistedFiles()).compareTo(other.isSetPersistedFiles()); if (lastComparison != 0) { return lastComparison; } if (isSetPersistedFiles()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistedFiles, other.persistedFiles); 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("fileSystemHeartbeat_args("); boolean first = true; sb.append("workerId:"); sb.append(this.workerId); first = false; if (!first) sb.append(", "); sb.append("persistedFiles:"); if (this.persistedFiles == null) { sb.append("null"); } else { sb.append(this.persistedFiles); } 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 fileSystemHeartbeat_argsStandardSchemeFactory implements SchemeFactory { public fileSystemHeartbeat_argsStandardScheme getScheme() { return new fileSystemHeartbeat_argsStandardScheme(); } } private static class fileSystemHeartbeat_argsStandardScheme extends StandardScheme<fileSystemHeartbeat_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, fileSystemHeartbeat_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: // WORKER_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.workerId = iprot.readI64(); struct.setWorkerIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PERSISTED_FILES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list82 = iprot.readListBegin(); struct.persistedFiles = new ArrayList<Long>(_list82.size); long _elem83; for (int _i84 = 0; _i84 < _list82.size; ++_i84) { _elem83 = iprot.readI64(); struct.persistedFiles.add(_elem83); } iprot.readListEnd(); } struct.setPersistedFilesIsSet(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 FileSystemHeartbeatTOptions(); 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, fileSystemHeartbeat_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(WORKER_ID_FIELD_DESC); oprot.writeI64(struct.workerId); oprot.writeFieldEnd(); if (struct.persistedFiles != null) { oprot.writeFieldBegin(PERSISTED_FILES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.persistedFiles.size())); for (long _iter85 : struct.persistedFiles) { oprot.writeI64(_iter85); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.options != null) { oprot.writeFieldBegin(OPTIONS_FIELD_DESC); struct.options.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class fileSystemHeartbeat_argsTupleSchemeFactory implements SchemeFactory { public fileSystemHeartbeat_argsTupleScheme getScheme() { return new fileSystemHeartbeat_argsTupleScheme(); } } private static class fileSystemHeartbeat_argsTupleScheme extends TupleScheme<fileSystemHeartbeat_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, fileSystemHeartbeat_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetWorkerId()) { optionals.set(0); } if (struct.isSetPersistedFiles()) { optionals.set(1); } if (struct.isSetOptions()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetWorkerId()) { oprot.writeI64(struct.workerId); } if (struct.isSetPersistedFiles()) { { oprot.writeI32(struct.persistedFiles.size()); for (long _iter86 : struct.persistedFiles) { oprot.writeI64(_iter86); } } } if (struct.isSetOptions()) { struct.options.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, fileSystemHeartbeat_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.workerId = iprot.readI64(); struct.setWorkerIdIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.persistedFiles = new ArrayList<Long>(_list87.size); long _elem88; for (int _i89 = 0; _i89 < _list87.size; ++_i89) { _elem88 = iprot.readI64(); struct.persistedFiles.add(_elem88); } } struct.setPersistedFilesIsSet(true); } if (incoming.get(2)) { struct.options = new FileSystemHeartbeatTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } } public static class fileSystemHeartbeat_result implements org.apache.thrift.TBase<fileSystemHeartbeat_result, fileSystemHeartbeat_result._Fields>, java.io.Serializable, Cloneable, Comparable<fileSystemHeartbeat_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fileSystemHeartbeat_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 fileSystemHeartbeat_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new fileSystemHeartbeat_resultTupleSchemeFactory()); } private FileSystemHeartbeatTResponse 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, FileSystemHeartbeatTResponse.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(fileSystemHeartbeat_result.class, metaDataMap); } public fileSystemHeartbeat_result() { } public fileSystemHeartbeat_result( FileSystemHeartbeatTResponse success, alluxio.thrift.AlluxioTException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public fileSystemHeartbeat_result(fileSystemHeartbeat_result other) { if (other.isSetSuccess()) { this.success = new FileSystemHeartbeatTResponse(other.success); } if (other.isSetE()) { this.e = new alluxio.thrift.AlluxioTException(other.e); } } public fileSystemHeartbeat_result deepCopy() { return new fileSystemHeartbeat_result(this); } @Override public void clear() { this.success = null; this.e = null; } public FileSystemHeartbeatTResponse getSuccess() { return this.success; } public fileSystemHeartbeat_result setSuccess(FileSystemHeartbeatTResponse 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 fileSystemHeartbeat_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((FileSystemHeartbeatTResponse)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 fileSystemHeartbeat_result) return this.equals((fileSystemHeartbeat_result)that); return false; } public boolean equals(fileSystemHeartbeat_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(fileSystemHeartbeat_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("fileSystemHeartbeat_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 fileSystemHeartbeat_resultStandardSchemeFactory implements SchemeFactory { public fileSystemHeartbeat_resultStandardScheme getScheme() { return new fileSystemHeartbeat_resultStandardScheme(); } } private static class fileSystemHeartbeat_resultStandardScheme extends StandardScheme<fileSystemHeartbeat_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, fileSystemHeartbeat_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 FileSystemHeartbeatTResponse(); 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, fileSystemHeartbeat_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 fileSystemHeartbeat_resultTupleSchemeFactory implements SchemeFactory { public fileSystemHeartbeat_resultTupleScheme getScheme() { return new fileSystemHeartbeat_resultTupleScheme(); } } private static class fileSystemHeartbeat_resultTupleScheme extends TupleScheme<fileSystemHeartbeat_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, fileSystemHeartbeat_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, fileSystemHeartbeat_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new FileSystemHeartbeatTResponse(); 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 getFileInfo_args implements org.apache.thrift.TBase<getFileInfo_args, getFileInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFileInfo_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileInfo_args"); private static final org.apache.thrift.protocol.TField FILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fileId", org.apache.thrift.protocol.TType.I64, (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)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getFileInfo_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getFileInfo_argsTupleSchemeFactory()); } private long fileId; // required private GetFileInfoTOptions 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 id of the file */ FILE_ID((short)1, "fileId"), /** * the method options */ OPTIONS((short)2, "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: // FILE_ID return FILE_ID; case 2: // 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 __FILEID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.FILE_ID, new org.apache.thrift.meta_data.FieldMetaData("fileId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); 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, GetFileInfoTOptions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileInfo_args.class, metaDataMap); } public getFileInfo_args() { } public getFileInfo_args( long fileId, GetFileInfoTOptions options) { this(); this.fileId = fileId; setFileIdIsSet(true); this.options = options; } /** * Performs a deep copy on <i>other</i>. */ public getFileInfo_args(getFileInfo_args other) { __isset_bitfield = other.__isset_bitfield; this.fileId = other.fileId; if (other.isSetOptions()) { this.options = new GetFileInfoTOptions(other.options); } } public getFileInfo_args deepCopy() { return new getFileInfo_args(this); } @Override public void clear() { setFileIdIsSet(false); this.fileId = 0; this.options = null; } /** * the id of the file */ public long getFileId() { return this.fileId; } /** * the id of the file */ public getFileInfo_args setFileId(long fileId) { this.fileId = fileId; setFileIdIsSet(true); return this; } public void unsetFileId() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID); } /** Returns true if field fileId is set (has been assigned a value) and false otherwise */ public boolean isSetFileId() { return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID); } public void setFileIdIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value); } /** * the method options */ public GetFileInfoTOptions getOptions() { return this.options; } /** * the method options */ public getFileInfo_args setOptions(GetFileInfoTOptions 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 FILE_ID: if (value == null) { unsetFileId(); } else { setFileId((Long)value); } break; case OPTIONS: if (value == null) { unsetOptions(); } else { setOptions((GetFileInfoTOptions)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case FILE_ID: return getFileId(); 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 FILE_ID: return isSetFileId(); case OPTIONS: return isSetOptions(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getFileInfo_args) return this.equals((getFileInfo_args)that); return false; } public boolean equals(getFileInfo_args that) { if (that == null) return false; boolean this_present_fileId = true; boolean that_present_fileId = true; if (this_present_fileId || that_present_fileId) { if (!(this_present_fileId && that_present_fileId)) return false; if (this.fileId != that.fileId) 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_fileId = true; list.add(present_fileId); if (present_fileId) list.add(fileId); boolean present_options = true && (isSetOptions()); list.add(present_options); if (present_options) list.add(options); return list.hashCode(); } @Override public int compareTo(getFileInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId()); if (lastComparison != 0) { return lastComparison; } if (isSetFileId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId); 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("getFileInfo_args("); boolean first = true; sb.append("fileId:"); sb.append(this.fileId); 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 getFileInfo_argsStandardSchemeFactory implements SchemeFactory { public getFileInfo_argsStandardScheme getScheme() { return new getFileInfo_argsStandardScheme(); } } private static class getFileInfo_argsStandardScheme extends StandardScheme<getFileInfo_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_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: // FILE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.fileId = iprot.readI64(); struct.setFileIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // OPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.options = new GetFileInfoTOptions(); 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, getFileInfo_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(FILE_ID_FIELD_DESC); oprot.writeI64(struct.fileId); oprot.writeFieldEnd(); if (struct.options != null) { oprot.writeFieldBegin(OPTIONS_FIELD_DESC); struct.options.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getFileInfo_argsTupleSchemeFactory implements SchemeFactory { public getFileInfo_argsTupleScheme getScheme() { return new getFileInfo_argsTupleScheme(); } } private static class getFileInfo_argsTupleScheme extends TupleScheme<getFileInfo_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetFileId()) { optionals.set(0); } if (struct.isSetOptions()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetFileId()) { oprot.writeI64(struct.fileId); } if (struct.isSetOptions()) { struct.options.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.fileId = iprot.readI64(); struct.setFileIdIsSet(true); } if (incoming.get(1)) { struct.options = new GetFileInfoTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } } public static class getFileInfo_result implements org.apache.thrift.TBase<getFileInfo_result, getFileInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getFileInfo_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileInfo_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 getFileInfo_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getFileInfo_resultTupleSchemeFactory()); } private GetFileInfoTResponse 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, GetFileInfoTResponse.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(getFileInfo_result.class, metaDataMap); } public getFileInfo_result() { } public getFileInfo_result( GetFileInfoTResponse success, alluxio.thrift.AlluxioTException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public getFileInfo_result(getFileInfo_result other) { if (other.isSetSuccess()) { this.success = new GetFileInfoTResponse(other.success); } if (other.isSetE()) { this.e = new alluxio.thrift.AlluxioTException(other.e); } } public getFileInfo_result deepCopy() { return new getFileInfo_result(this); } @Override public void clear() { this.success = null; this.e = null; } public GetFileInfoTResponse getSuccess() { return this.success; } public getFileInfo_result setSuccess(GetFileInfoTResponse 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 getFileInfo_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((GetFileInfoTResponse)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 getFileInfo_result) return this.equals((getFileInfo_result)that); return false; } public boolean equals(getFileInfo_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(getFileInfo_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("getFileInfo_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 getFileInfo_resultStandardSchemeFactory implements SchemeFactory { public getFileInfo_resultStandardScheme getScheme() { return new getFileInfo_resultStandardScheme(); } } private static class getFileInfo_resultStandardScheme extends StandardScheme<getFileInfo_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_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 GetFileInfoTResponse(); 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, getFileInfo_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 getFileInfo_resultTupleSchemeFactory implements SchemeFactory { public getFileInfo_resultTupleScheme getScheme() { return new getFileInfo_resultTupleScheme(); } } private static class getFileInfo_resultTupleScheme extends TupleScheme<getFileInfo_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfo_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, getFileInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GetFileInfoTResponse(); 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 getPinnedFileIds_args implements org.apache.thrift.TBase<getPinnedFileIds_args, getPinnedFileIds_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPinnedFileIds_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPinnedFileIds_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 getPinnedFileIds_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getPinnedFileIds_argsTupleSchemeFactory()); } private GetPinnedFileIdsTOptions 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, GetPinnedFileIdsTOptions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPinnedFileIds_args.class, metaDataMap); } public getPinnedFileIds_args() { } public getPinnedFileIds_args( GetPinnedFileIdsTOptions options) { this(); this.options = options; } /** * Performs a deep copy on <i>other</i>. */ public getPinnedFileIds_args(getPinnedFileIds_args other) { if (other.isSetOptions()) { this.options = new GetPinnedFileIdsTOptions(other.options); } } public getPinnedFileIds_args deepCopy() { return new getPinnedFileIds_args(this); } @Override public void clear() { this.options = null; } /** * the method options */ public GetPinnedFileIdsTOptions getOptions() { return this.options; } /** * the method options */ public getPinnedFileIds_args setOptions(GetPinnedFileIdsTOptions 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((GetPinnedFileIdsTOptions)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 getPinnedFileIds_args) return this.equals((getPinnedFileIds_args)that); return false; } public boolean equals(getPinnedFileIds_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(getPinnedFileIds_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("getPinnedFileIds_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 getPinnedFileIds_argsStandardSchemeFactory implements SchemeFactory { public getPinnedFileIds_argsStandardScheme getScheme() { return new getPinnedFileIds_argsStandardScheme(); } } private static class getPinnedFileIds_argsStandardScheme extends StandardScheme<getPinnedFileIds_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getPinnedFileIds_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 GetPinnedFileIdsTOptions(); 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, getPinnedFileIds_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 getPinnedFileIds_argsTupleSchemeFactory implements SchemeFactory { public getPinnedFileIds_argsTupleScheme getScheme() { return new getPinnedFileIds_argsTupleScheme(); } } private static class getPinnedFileIds_argsTupleScheme extends TupleScheme<getPinnedFileIds_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getPinnedFileIds_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, getPinnedFileIds_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.options = new GetPinnedFileIdsTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } } public static class getPinnedFileIds_result implements org.apache.thrift.TBase<getPinnedFileIds_result, getPinnedFileIds_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPinnedFileIds_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPinnedFileIds_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 getPinnedFileIds_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getPinnedFileIds_resultTupleSchemeFactory()); } private GetPinnedFileIdsTResponse 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, GetPinnedFileIdsTResponse.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(getPinnedFileIds_result.class, metaDataMap); } public getPinnedFileIds_result() { } public getPinnedFileIds_result( GetPinnedFileIdsTResponse success, alluxio.thrift.AlluxioTException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public getPinnedFileIds_result(getPinnedFileIds_result other) { if (other.isSetSuccess()) { this.success = new GetPinnedFileIdsTResponse(other.success); } if (other.isSetE()) { this.e = new alluxio.thrift.AlluxioTException(other.e); } } public getPinnedFileIds_result deepCopy() { return new getPinnedFileIds_result(this); } @Override public void clear() { this.success = null; this.e = null; } public GetPinnedFileIdsTResponse getSuccess() { return this.success; } public getPinnedFileIds_result setSuccess(GetPinnedFileIdsTResponse 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 getPinnedFileIds_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((GetPinnedFileIdsTResponse)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 getPinnedFileIds_result) return this.equals((getPinnedFileIds_result)that); return false; } public boolean equals(getPinnedFileIds_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(getPinnedFileIds_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("getPinnedFileIds_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 getPinnedFileIds_resultStandardSchemeFactory implements SchemeFactory { public getPinnedFileIds_resultStandardScheme getScheme() { return new getPinnedFileIds_resultStandardScheme(); } } private static class getPinnedFileIds_resultStandardScheme extends StandardScheme<getPinnedFileIds_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getPinnedFileIds_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 GetPinnedFileIdsTResponse(); 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, getPinnedFileIds_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 getPinnedFileIds_resultTupleSchemeFactory implements SchemeFactory { public getPinnedFileIds_resultTupleScheme getScheme() { return new getPinnedFileIds_resultTupleScheme(); } } private static class getPinnedFileIds_resultTupleScheme extends TupleScheme<getPinnedFileIds_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getPinnedFileIds_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, getPinnedFileIds_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GetPinnedFileIdsTResponse(); 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 getUfsInfo_args implements org.apache.thrift.TBase<getUfsInfo_args, getUfsInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUfsInfo_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUfsInfo_args"); private static final org.apache.thrift.protocol.TField MOUNT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("mountId", org.apache.thrift.protocol.TType.I64, (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)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getUfsInfo_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getUfsInfo_argsTupleSchemeFactory()); } private long mountId; // required private GetUfsInfoTOptions 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 id of the ufs */ MOUNT_ID((short)1, "mountId"), /** * the method options */ OPTIONS((short)2, "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: // MOUNT_ID return MOUNT_ID; case 2: // 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 __MOUNTID_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MOUNT_ID, new org.apache.thrift.meta_data.FieldMetaData("mountId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); 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, GetUfsInfoTOptions.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUfsInfo_args.class, metaDataMap); } public getUfsInfo_args() { } public getUfsInfo_args( long mountId, GetUfsInfoTOptions options) { this(); this.mountId = mountId; setMountIdIsSet(true); this.options = options; } /** * Performs a deep copy on <i>other</i>. */ public getUfsInfo_args(getUfsInfo_args other) { __isset_bitfield = other.__isset_bitfield; this.mountId = other.mountId; if (other.isSetOptions()) { this.options = new GetUfsInfoTOptions(other.options); } } public getUfsInfo_args deepCopy() { return new getUfsInfo_args(this); } @Override public void clear() { setMountIdIsSet(false); this.mountId = 0; this.options = null; } /** * the id of the ufs */ public long getMountId() { return this.mountId; } /** * the id of the ufs */ public getUfsInfo_args setMountId(long mountId) { this.mountId = mountId; setMountIdIsSet(true); return this; } public void unsetMountId() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MOUNTID_ISSET_ID); } /** Returns true if field mountId is set (has been assigned a value) and false otherwise */ public boolean isSetMountId() { return EncodingUtils.testBit(__isset_bitfield, __MOUNTID_ISSET_ID); } public void setMountIdIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MOUNTID_ISSET_ID, value); } /** * the method options */ public GetUfsInfoTOptions getOptions() { return this.options; } /** * the method options */ public getUfsInfo_args setOptions(GetUfsInfoTOptions 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 MOUNT_ID: if (value == null) { unsetMountId(); } else { setMountId((Long)value); } break; case OPTIONS: if (value == null) { unsetOptions(); } else { setOptions((GetUfsInfoTOptions)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case MOUNT_ID: return getMountId(); 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 MOUNT_ID: return isSetMountId(); case OPTIONS: return isSetOptions(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getUfsInfo_args) return this.equals((getUfsInfo_args)that); return false; } public boolean equals(getUfsInfo_args that) { if (that == null) return false; boolean this_present_mountId = true; boolean that_present_mountId = true; if (this_present_mountId || that_present_mountId) { if (!(this_present_mountId && that_present_mountId)) return false; if (this.mountId != that.mountId) 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_mountId = true; list.add(present_mountId); if (present_mountId) list.add(mountId); boolean present_options = true && (isSetOptions()); list.add(present_options); if (present_options) list.add(options); return list.hashCode(); } @Override public int compareTo(getUfsInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetMountId()).compareTo(other.isSetMountId()); if (lastComparison != 0) { return lastComparison; } if (isSetMountId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mountId, other.mountId); 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("getUfsInfo_args("); boolean first = true; sb.append("mountId:"); sb.append(this.mountId); 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 getUfsInfo_argsStandardSchemeFactory implements SchemeFactory { public getUfsInfo_argsStandardScheme getScheme() { return new getUfsInfo_argsStandardScheme(); } } private static class getUfsInfo_argsStandardScheme extends StandardScheme<getUfsInfo_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsInfo_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: // MOUNT_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.mountId = iprot.readI64(); struct.setMountIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // OPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.options = new GetUfsInfoTOptions(); 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, getUfsInfo_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(MOUNT_ID_FIELD_DESC); oprot.writeI64(struct.mountId); oprot.writeFieldEnd(); if (struct.options != null) { oprot.writeFieldBegin(OPTIONS_FIELD_DESC); struct.options.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUfsInfo_argsTupleSchemeFactory implements SchemeFactory { public getUfsInfo_argsTupleScheme getScheme() { return new getUfsInfo_argsTupleScheme(); } } private static class getUfsInfo_argsTupleScheme extends TupleScheme<getUfsInfo_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUfsInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMountId()) { optionals.set(0); } if (struct.isSetOptions()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetMountId()) { oprot.writeI64(struct.mountId); } if (struct.isSetOptions()) { struct.options.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUfsInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.mountId = iprot.readI64(); struct.setMountIdIsSet(true); } if (incoming.get(1)) { struct.options = new GetUfsInfoTOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } } public static class getUfsInfo_result implements org.apache.thrift.TBase<getUfsInfo_result, getUfsInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUfsInfo_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUfsInfo_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 getUfsInfo_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getUfsInfo_resultTupleSchemeFactory()); } private GetUfsInfoTResponse 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, GetUfsInfoTResponse.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(getUfsInfo_result.class, metaDataMap); } public getUfsInfo_result() { } public getUfsInfo_result( GetUfsInfoTResponse success, alluxio.thrift.AlluxioTException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public getUfsInfo_result(getUfsInfo_result other) { if (other.isSetSuccess()) { this.success = new GetUfsInfoTResponse(other.success); } if (other.isSetE()) { this.e = new alluxio.thrift.AlluxioTException(other.e); } } public getUfsInfo_result deepCopy() { return new getUfsInfo_result(this); } @Override public void clear() { this.success = null; this.e = null; } public GetUfsInfoTResponse getSuccess() { return this.success; } public getUfsInfo_result setSuccess(GetUfsInfoTResponse 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 getUfsInfo_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((GetUfsInfoTResponse)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 getUfsInfo_result) return this.equals((getUfsInfo_result)that); return false; } public boolean equals(getUfsInfo_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(getUfsInfo_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("getUfsInfo_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 getUfsInfo_resultStandardSchemeFactory implements SchemeFactory { public getUfsInfo_resultStandardScheme getScheme() { return new getUfsInfo_resultStandardScheme(); } } private static class getUfsInfo_resultStandardScheme extends StandardScheme<getUfsInfo_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsInfo_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 GetUfsInfoTResponse(); 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, getUfsInfo_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 getUfsInfo_resultTupleSchemeFactory implements SchemeFactory { public getUfsInfo_resultTupleScheme getScheme() { return new getUfsInfo_resultTupleScheme(); } } private static class getUfsInfo_resultTupleScheme extends TupleScheme<getUfsInfo_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUfsInfo_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, getUfsInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new GetUfsInfoTResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new alluxio.thrift.AlluxioTException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } }