/** * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package org.apache.hadoop.hdfs.fsshellservice; 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; public class FsShellService { public interface Iface { public void copyFromLocal(String src, String dest, boolean validate) throws FsShellException, org.apache.thrift.TException; public void copyToLocal(String src, String dest, boolean validate) throws FsShellException, org.apache.thrift.TException; /** * remove() returns true only if the existing file or directory * was actually removed from the file system. remove() will return * false if the file doesn't exist ... * * @param path * @param recursive * @param skipTrash */ public boolean remove(String path, boolean recursive, boolean skipTrash) throws FsShellException, org.apache.thrift.TException; /** * mkdirs() returns true if the operation succeeds. * This method silently succeeds if the directory already exists. * It will fail if a file by the given name exists. All path * elements in the given directory path will be silently created. * The behavior is similar to the Unix command mkdir -p. * * @param f */ public boolean mkdirs(String f) throws FsShellException, org.apache.thrift.TException; /** * rename() true if successful, or false if the old name does not * exist or if the new name already belongs to the namespace. * * @param src * @param dest */ public boolean rename(String src, String dest) throws FsShellException, org.apache.thrift.TException; public List<DfsFileStatus> listStatus(String path) throws FsShellException, FsShellFileNotFoundException, org.apache.thrift.TException; public DfsFileStatus getFileStatus(String path) throws FsShellException, FsShellFileNotFoundException, org.apache.thrift.TException; public boolean exists(String path) throws FsShellException, org.apache.thrift.TException; /** * CRC32 of a file's data is returned. It works for either HDFS file * or a local file (in the form of file:///foo/foo). Since it's CRC32 * of pure data. The return value for a local file and a remote file * with the same data will be the same. * * Either the path is a directory, or the file doesn't exist, * FsShellException is thrown. * * TODO: improve exception thrown here. Currently it's not easy for * DFSClient to identify different failure cases. * * @param path */ public int getFileCrc(String path) throws FsShellException, org.apache.thrift.TException; } public interface AsyncIface { public void copyFromLocal(String src, String dest, boolean validate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.copyFromLocal_call> resultHandler) throws org.apache.thrift.TException; public void copyToLocal(String src, String dest, boolean validate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.copyToLocal_call> resultHandler) throws org.apache.thrift.TException; public void remove(String path, boolean recursive, boolean skipTrash, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.remove_call> resultHandler) throws org.apache.thrift.TException; public void mkdirs(String f, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.mkdirs_call> resultHandler) throws org.apache.thrift.TException; public void rename(String src, String dest, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.rename_call> resultHandler) throws org.apache.thrift.TException; public void listStatus(String path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.listStatus_call> resultHandler) throws org.apache.thrift.TException; public void getFileStatus(String path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFileStatus_call> resultHandler) throws org.apache.thrift.TException; public void exists(String path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.exists_call> resultHandler) throws org.apache.thrift.TException; public void getFileCrc(String path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFileCrc_call> resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient 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 void copyFromLocal(String src, String dest, boolean validate) throws FsShellException, org.apache.thrift.TException { send_copyFromLocal(src, dest, validate); recv_copyFromLocal(); } public void send_copyFromLocal(String src, String dest, boolean validate) throws org.apache.thrift.TException { copyFromLocal_args args = new copyFromLocal_args(); args.setSrc(src); args.setDest(dest); args.setValidate(validate); sendBase("copyFromLocal", args); } public void recv_copyFromLocal() throws FsShellException, org.apache.thrift.TException { copyFromLocal_result result = new copyFromLocal_result(); receiveBase(result, "copyFromLocal"); if (result.e != null) { throw result.e; } return; } public void copyToLocal(String src, String dest, boolean validate) throws FsShellException, org.apache.thrift.TException { send_copyToLocal(src, dest, validate); recv_copyToLocal(); } public void send_copyToLocal(String src, String dest, boolean validate) throws org.apache.thrift.TException { copyToLocal_args args = new copyToLocal_args(); args.setSrc(src); args.setDest(dest); args.setValidate(validate); sendBase("copyToLocal", args); } public void recv_copyToLocal() throws FsShellException, org.apache.thrift.TException { copyToLocal_result result = new copyToLocal_result(); receiveBase(result, "copyToLocal"); if (result.e != null) { throw result.e; } return; } public boolean remove(String path, boolean recursive, boolean skipTrash) throws FsShellException, org.apache.thrift.TException { send_remove(path, recursive, skipTrash); return recv_remove(); } public void send_remove(String path, boolean recursive, boolean skipTrash) throws org.apache.thrift.TException { remove_args args = new remove_args(); args.setPath(path); args.setRecursive(recursive); args.setSkipTrash(skipTrash); sendBase("remove", args); } public boolean recv_remove() throws FsShellException, org.apache.thrift.TException { remove_result result = new remove_result(); receiveBase(result, "remove"); 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, "remove failed: unknown result"); } public boolean mkdirs(String f) throws FsShellException, org.apache.thrift.TException { send_mkdirs(f); return recv_mkdirs(); } public void send_mkdirs(String f) throws org.apache.thrift.TException { mkdirs_args args = new mkdirs_args(); args.setF(f); sendBase("mkdirs", args); } public boolean recv_mkdirs() throws FsShellException, org.apache.thrift.TException { mkdirs_result result = new mkdirs_result(); receiveBase(result, "mkdirs"); 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, "mkdirs failed: unknown result"); } public boolean rename(String src, String dest) throws FsShellException, org.apache.thrift.TException { send_rename(src, dest); return recv_rename(); } public void send_rename(String src, String dest) throws org.apache.thrift.TException { rename_args args = new rename_args(); args.setSrc(src); args.setDest(dest); sendBase("rename", args); } public boolean recv_rename() throws FsShellException, org.apache.thrift.TException { rename_result result = new rename_result(); receiveBase(result, "rename"); 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, "rename failed: unknown result"); } public List<DfsFileStatus> listStatus(String path) throws FsShellException, FsShellFileNotFoundException, org.apache.thrift.TException { send_listStatus(path); return recv_listStatus(); } public void send_listStatus(String path) throws org.apache.thrift.TException { listStatus_args args = new listStatus_args(); args.setPath(path); sendBase("listStatus", args); } public List<DfsFileStatus> recv_listStatus() throws FsShellException, FsShellFileNotFoundException, org.apache.thrift.TException { listStatus_result result = new listStatus_result(); receiveBase(result, "listStatus"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } if (result.efnf != null) { throw result.efnf; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listStatus failed: unknown result"); } public DfsFileStatus getFileStatus(String path) throws FsShellException, FsShellFileNotFoundException, org.apache.thrift.TException { send_getFileStatus(path); return recv_getFileStatus(); } public void send_getFileStatus(String path) throws org.apache.thrift.TException { getFileStatus_args args = new getFileStatus_args(); args.setPath(path); sendBase("getFileStatus", args); } public DfsFileStatus recv_getFileStatus() throws FsShellException, FsShellFileNotFoundException, org.apache.thrift.TException { getFileStatus_result result = new getFileStatus_result(); receiveBase(result, "getFileStatus"); if (result.isSetSuccess()) { return result.success; } if (result.e != null) { throw result.e; } if (result.efnf != null) { throw result.efnf; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileStatus failed: unknown result"); } public boolean exists(String path) throws FsShellException, org.apache.thrift.TException { send_exists(path); return recv_exists(); } public void send_exists(String path) throws org.apache.thrift.TException { exists_args args = new exists_args(); args.setPath(path); sendBase("exists", args); } public boolean recv_exists() throws FsShellException, org.apache.thrift.TException { exists_result result = new exists_result(); receiveBase(result, "exists"); 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, "exists failed: unknown result"); } public int getFileCrc(String path) throws FsShellException, org.apache.thrift.TException { send_getFileCrc(path); return recv_getFileCrc(); } public void send_getFileCrc(String path) throws org.apache.thrift.TException { getFileCrc_args args = new getFileCrc_args(); args.setPath(path); sendBase("getFileCrc", args); } public int recv_getFileCrc() throws FsShellException, org.apache.thrift.TException { getFileCrc_result result = new getFileCrc_result(); receiveBase(result, "getFileCrc"); 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, "getFileCrc failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient 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 copyFromLocal(String src, String dest, boolean validate, org.apache.thrift.async.AsyncMethodCallback<copyFromLocal_call> resultHandler) throws org.apache.thrift.TException { checkReady(); copyFromLocal_call method_call = new copyFromLocal_call(src, dest, validate, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class copyFromLocal_call extends org.apache.thrift.async.TAsyncMethodCall { private String src; private String dest; private boolean validate; public copyFromLocal_call(String src, String dest, boolean validate, org.apache.thrift.async.AsyncMethodCallback<copyFromLocal_call> 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.src = src; this.dest = dest; this.validate = validate; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("copyFromLocal", org.apache.thrift.protocol.TMessageType.CALL, 0)); copyFromLocal_args args = new copyFromLocal_args(); args.setSrc(src); args.setDest(dest); args.setValidate(validate); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws FsShellException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_copyFromLocal(); } } public void copyToLocal(String src, String dest, boolean validate, org.apache.thrift.async.AsyncMethodCallback<copyToLocal_call> resultHandler) throws org.apache.thrift.TException { checkReady(); copyToLocal_call method_call = new copyToLocal_call(src, dest, validate, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class copyToLocal_call extends org.apache.thrift.async.TAsyncMethodCall { private String src; private String dest; private boolean validate; public copyToLocal_call(String src, String dest, boolean validate, org.apache.thrift.async.AsyncMethodCallback<copyToLocal_call> 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.src = src; this.dest = dest; this.validate = validate; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("copyToLocal", org.apache.thrift.protocol.TMessageType.CALL, 0)); copyToLocal_args args = new copyToLocal_args(); args.setSrc(src); args.setDest(dest); args.setValidate(validate); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws FsShellException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_copyToLocal(); } } public void remove(String path, boolean recursive, boolean skipTrash, org.apache.thrift.async.AsyncMethodCallback<remove_call> resultHandler) throws org.apache.thrift.TException { checkReady(); remove_call method_call = new remove_call(path, recursive, skipTrash, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class remove_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; private boolean recursive; private boolean skipTrash; public remove_call(String path, boolean recursive, boolean skipTrash, org.apache.thrift.async.AsyncMethodCallback<remove_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.path = path; this.recursive = recursive; this.skipTrash = skipTrash; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove", org.apache.thrift.protocol.TMessageType.CALL, 0)); remove_args args = new remove_args(); args.setPath(path); args.setRecursive(recursive); args.setSkipTrash(skipTrash); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws FsShellException, 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_remove(); } } public void mkdirs(String f, org.apache.thrift.async.AsyncMethodCallback<mkdirs_call> resultHandler) throws org.apache.thrift.TException { checkReady(); mkdirs_call method_call = new mkdirs_call(f, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class mkdirs_call extends org.apache.thrift.async.TAsyncMethodCall { private String f; public mkdirs_call(String f, org.apache.thrift.async.AsyncMethodCallback<mkdirs_call> 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.f = f; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mkdirs", org.apache.thrift.protocol.TMessageType.CALL, 0)); mkdirs_args args = new mkdirs_args(); args.setF(f); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws FsShellException, 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_mkdirs(); } } public void rename(String src, String dest, org.apache.thrift.async.AsyncMethodCallback<rename_call> resultHandler) throws org.apache.thrift.TException { checkReady(); rename_call method_call = new rename_call(src, dest, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rename_call extends org.apache.thrift.async.TAsyncMethodCall { private String src; private String dest; public rename_call(String src, String dest, org.apache.thrift.async.AsyncMethodCallback<rename_call> 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.src = src; this.dest = dest; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rename", org.apache.thrift.protocol.TMessageType.CALL, 0)); rename_args args = new rename_args(); args.setSrc(src); args.setDest(dest); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws FsShellException, 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_rename(); } } public void listStatus(String path, org.apache.thrift.async.AsyncMethodCallback<listStatus_call> resultHandler) throws org.apache.thrift.TException { checkReady(); listStatus_call method_call = new listStatus_call(path, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listStatus_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; public listStatus_call(String path, org.apache.thrift.async.AsyncMethodCallback<listStatus_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.path = path; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listStatus", org.apache.thrift.protocol.TMessageType.CALL, 0)); listStatus_args args = new listStatus_args(); args.setPath(path); args.write(prot); prot.writeMessageEnd(); } public List<DfsFileStatus> getResult() throws FsShellException, FsShellFileNotFoundException, 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_listStatus(); } } public void getFileStatus(String path, org.apache.thrift.async.AsyncMethodCallback<getFileStatus_call> resultHandler) throws org.apache.thrift.TException { checkReady(); getFileStatus_call method_call = new getFileStatus_call(path, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getFileStatus_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; public getFileStatus_call(String path, org.apache.thrift.async.AsyncMethodCallback<getFileStatus_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.path = path; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileStatus", org.apache.thrift.protocol.TMessageType.CALL, 0)); getFileStatus_args args = new getFileStatus_args(); args.setPath(path); args.write(prot); prot.writeMessageEnd(); } public DfsFileStatus getResult() throws FsShellException, FsShellFileNotFoundException, 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_getFileStatus(); } } public void exists(String path, org.apache.thrift.async.AsyncMethodCallback<exists_call> resultHandler) throws org.apache.thrift.TException { checkReady(); exists_call method_call = new exists_call(path, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class exists_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; public exists_call(String path, org.apache.thrift.async.AsyncMethodCallback<exists_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.path = path; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exists", org.apache.thrift.protocol.TMessageType.CALL, 0)); exists_args args = new exists_args(); args.setPath(path); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws FsShellException, 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_exists(); } } public void getFileCrc(String path, org.apache.thrift.async.AsyncMethodCallback<getFileCrc_call> resultHandler) throws org.apache.thrift.TException { checkReady(); getFileCrc_call method_call = new getFileCrc_call(path, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getFileCrc_call extends org.apache.thrift.async.TAsyncMethodCall { private String path; public getFileCrc_call(String path, org.apache.thrift.async.AsyncMethodCallback<getFileCrc_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.path = path; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileCrc", org.apache.thrift.protocol.TMessageType.CALL, 0)); getFileCrc_args args = new getFileCrc_args(); args.setPath(path); args.write(prot); prot.writeMessageEnd(); } public int getResult() throws FsShellException, 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_getFileCrc(); } } } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor 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("copyFromLocal", new copyFromLocal()); processMap.put("copyToLocal", new copyToLocal()); processMap.put("remove", new remove()); processMap.put("mkdirs", new mkdirs()); processMap.put("rename", new rename()); processMap.put("listStatus", new listStatus()); processMap.put("getFileStatus", new getFileStatus()); processMap.put("exists", new exists()); processMap.put("getFileCrc", new getFileCrc()); return processMap; } private static class copyFromLocal<I extends Iface> extends org.apache.thrift.ProcessFunction<I, copyFromLocal_args> { public copyFromLocal() { super("copyFromLocal"); } protected copyFromLocal_args getEmptyArgsInstance() { return new copyFromLocal_args(); } protected copyFromLocal_result getResult(I iface, copyFromLocal_args args) throws org.apache.thrift.TException { copyFromLocal_result result = new copyFromLocal_result(); try { iface.copyFromLocal(args.src, args.dest, args.validate); } catch (FsShellException e) { result.e = e; } return result; } } private static class copyToLocal<I extends Iface> extends org.apache.thrift.ProcessFunction<I, copyToLocal_args> { public copyToLocal() { super("copyToLocal"); } protected copyToLocal_args getEmptyArgsInstance() { return new copyToLocal_args(); } protected copyToLocal_result getResult(I iface, copyToLocal_args args) throws org.apache.thrift.TException { copyToLocal_result result = new copyToLocal_result(); try { iface.copyToLocal(args.src, args.dest, args.validate); } catch (FsShellException e) { result.e = e; } return result; } } private static class remove<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_args> { public remove() { super("remove"); } protected remove_args getEmptyArgsInstance() { return new remove_args(); } protected remove_result getResult(I iface, remove_args args) throws org.apache.thrift.TException { remove_result result = new remove_result(); try { result.success = iface.remove(args.path, args.recursive, args.skipTrash); result.setSuccessIsSet(true); } catch (FsShellException e) { result.e = e; } return result; } } private static class mkdirs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, mkdirs_args> { public mkdirs() { super("mkdirs"); } protected mkdirs_args getEmptyArgsInstance() { return new mkdirs_args(); } protected mkdirs_result getResult(I iface, mkdirs_args args) throws org.apache.thrift.TException { mkdirs_result result = new mkdirs_result(); try { result.success = iface.mkdirs(args.f); result.setSuccessIsSet(true); } catch (FsShellException e) { result.e = e; } return result; } } private static class rename<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rename_args> { public rename() { super("rename"); } protected rename_args getEmptyArgsInstance() { return new rename_args(); } protected rename_result getResult(I iface, rename_args args) throws org.apache.thrift.TException { rename_result result = new rename_result(); try { result.success = iface.rename(args.src, args.dest); result.setSuccessIsSet(true); } catch (FsShellException e) { result.e = e; } return result; } } private static class listStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listStatus_args> { public listStatus() { super("listStatus"); } protected listStatus_args getEmptyArgsInstance() { return new listStatus_args(); } protected listStatus_result getResult(I iface, listStatus_args args) throws org.apache.thrift.TException { listStatus_result result = new listStatus_result(); try { result.success = iface.listStatus(args.path); } catch (FsShellException e) { result.e = e; } catch (FsShellFileNotFoundException efnf) { result.efnf = efnf; } return result; } } private static class getFileStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFileStatus_args> { public getFileStatus() { super("getFileStatus"); } protected getFileStatus_args getEmptyArgsInstance() { return new getFileStatus_args(); } protected getFileStatus_result getResult(I iface, getFileStatus_args args) throws org.apache.thrift.TException { getFileStatus_result result = new getFileStatus_result(); try { result.success = iface.getFileStatus(args.path); } catch (FsShellException e) { result.e = e; } catch (FsShellFileNotFoundException efnf) { result.efnf = efnf; } return result; } } private static class exists<I extends Iface> extends org.apache.thrift.ProcessFunction<I, exists_args> { public exists() { super("exists"); } protected exists_args getEmptyArgsInstance() { return new exists_args(); } protected exists_result getResult(I iface, exists_args args) throws org.apache.thrift.TException { exists_result result = new exists_result(); try { result.success = iface.exists(args.path); result.setSuccessIsSet(true); } catch (FsShellException e) { result.e = e; } return result; } } private static class getFileCrc<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFileCrc_args> { public getFileCrc() { super("getFileCrc"); } protected getFileCrc_args getEmptyArgsInstance() { return new getFileCrc_args(); } protected getFileCrc_result getResult(I iface, getFileCrc_args args) throws org.apache.thrift.TException { getFileCrc_result result = new getFileCrc_result(); try { result.success = iface.getFileCrc(args.path); result.setSuccessIsSet(true); } catch (FsShellException e) { result.e = e; } return result; } } } public static class copyFromLocal_args implements org.apache.thrift.TBase<copyFromLocal_args, copyFromLocal_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("copyFromLocal_args"); private static final org.apache.thrift.protocol.TField SRC_FIELD_DESC = new org.apache.thrift.protocol.TField("src", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DEST_FIELD_DESC = new org.apache.thrift.protocol.TField("dest", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField VALIDATE_FIELD_DESC = new org.apache.thrift.protocol.TField("validate", org.apache.thrift.protocol.TType.BOOL, (short)3); public String src; // required public String dest; // required public boolean validate; // 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 { SRC((short)1, "src"), DEST((short)2, "dest"), VALIDATE((short)3, "validate"); 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: // SRC return SRC; case 2: // DEST return DEST; case 3: // VALIDATE return VALIDATE; 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 __VALIDATE_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); 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.SRC, new org.apache.thrift.meta_data.FieldMetaData("src", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DEST, new org.apache.thrift.meta_data.FieldMetaData("dest", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VALIDATE, new org.apache.thrift.meta_data.FieldMetaData("validate", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(copyFromLocal_args.class, metaDataMap); } public copyFromLocal_args() { } public copyFromLocal_args( String src, String dest, boolean validate) { this(); this.src = src; this.dest = dest; this.validate = validate; setValidateIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public copyFromLocal_args(copyFromLocal_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetSrc()) { this.src = other.src; } if (other.isSetDest()) { this.dest = other.dest; } this.validate = other.validate; } public copyFromLocal_args deepCopy() { return new copyFromLocal_args(this); } @Override public void clear() { this.src = null; this.dest = null; setValidateIsSet(false); this.validate = false; } public String getSrc() { return this.src; } public copyFromLocal_args setSrc(String src) { this.src = src; return this; } public void unsetSrc() { this.src = null; } /** Returns true if field src is set (has been assigned a value) and false otherwise */ public boolean isSetSrc() { return this.src != null; } public void setSrcIsSet(boolean value) { if (!value) { this.src = null; } } public String getDest() { return this.dest; } public copyFromLocal_args setDest(String dest) { this.dest = dest; return this; } public void unsetDest() { this.dest = null; } /** Returns true if field dest is set (has been assigned a value) and false otherwise */ public boolean isSetDest() { return this.dest != null; } public void setDestIsSet(boolean value) { if (!value) { this.dest = null; } } public boolean isValidate() { return this.validate; } public copyFromLocal_args setValidate(boolean validate) { this.validate = validate; setValidateIsSet(true); return this; } public void unsetValidate() { __isset_bit_vector.clear(__VALIDATE_ISSET_ID); } /** Returns true if field validate is set (has been assigned a value) and false otherwise */ public boolean isSetValidate() { return __isset_bit_vector.get(__VALIDATE_ISSET_ID); } public void setValidateIsSet(boolean value) { __isset_bit_vector.set(__VALIDATE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SRC: if (value == null) { unsetSrc(); } else { setSrc((String)value); } break; case DEST: if (value == null) { unsetDest(); } else { setDest((String)value); } break; case VALIDATE: if (value == null) { unsetValidate(); } else { setValidate((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SRC: return getSrc(); case DEST: return getDest(); case VALIDATE: return Boolean.valueOf(isValidate()); } 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 SRC: return isSetSrc(); case DEST: return isSetDest(); case VALIDATE: return isSetValidate(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof copyFromLocal_args) return this.equals((copyFromLocal_args)that); return false; } public boolean equals(copyFromLocal_args that) { if (that == null) return false; boolean this_present_src = true && this.isSetSrc(); boolean that_present_src = true && that.isSetSrc(); if (this_present_src || that_present_src) { if (!(this_present_src && that_present_src)) return false; if (!this.src.equals(that.src)) return false; } boolean this_present_dest = true && this.isSetDest(); boolean that_present_dest = true && that.isSetDest(); if (this_present_dest || that_present_dest) { if (!(this_present_dest && that_present_dest)) return false; if (!this.dest.equals(that.dest)) return false; } boolean this_present_validate = true; boolean that_present_validate = true; if (this_present_validate || that_present_validate) { if (!(this_present_validate && that_present_validate)) return false; if (this.validate != that.validate) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(copyFromLocal_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; copyFromLocal_args typedOther = (copyFromLocal_args)other; lastComparison = Boolean.valueOf(isSetSrc()).compareTo(typedOther.isSetSrc()); if (lastComparison != 0) { return lastComparison; } if (isSetSrc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.src, typedOther.src); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDest()).compareTo(typedOther.isSetDest()); if (lastComparison != 0) { return lastComparison; } if (isSetDest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest, typedOther.dest); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetValidate()).compareTo(typedOther.isSetValidate()); if (lastComparison != 0) { return lastComparison; } if (isSetValidate()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate, typedOther.validate); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // SRC if (field.type == org.apache.thrift.protocol.TType.STRING) { this.src = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // DEST if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dest = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // VALIDATE if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.validate = iprot.readBool(); setValidateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.src != null) { oprot.writeFieldBegin(SRC_FIELD_DESC); oprot.writeString(this.src); oprot.writeFieldEnd(); } if (this.dest != null) { oprot.writeFieldBegin(DEST_FIELD_DESC); oprot.writeString(this.dest); oprot.writeFieldEnd(); } oprot.writeFieldBegin(VALIDATE_FIELD_DESC); oprot.writeBool(this.validate); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("copyFromLocal_args("); boolean first = true; sb.append("src:"); if (this.src == null) { sb.append("null"); } else { sb.append(this.src); } first = false; if (!first) sb.append(", "); sb.append("dest:"); if (this.dest == null) { sb.append("null"); } else { sb.append(this.dest); } first = false; if (!first) sb.append(", "); sb.append("validate:"); sb.append(this.validate); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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_bit_vector = new BitSet(1); 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); } } } public static class copyFromLocal_result implements org.apache.thrift.TBase<copyFromLocal_result, copyFromLocal_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("copyFromLocal_result"); 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); public FsShellException 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 { 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 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.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(copyFromLocal_result.class, metaDataMap); } public copyFromLocal_result() { } public copyFromLocal_result( FsShellException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public copyFromLocal_result(copyFromLocal_result other) { if (other.isSetE()) { this.e = new FsShellException(other.e); } } public copyFromLocal_result deepCopy() { return new copyFromLocal_result(this); } @Override public void clear() { this.e = null; } public FsShellException getE() { return this.e; } public copyFromLocal_result setE(FsShellException 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 E: if (value == null) { unsetE(); } else { setE((FsShellException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { 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 E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof copyFromLocal_result) return this.equals((copyFromLocal_result)that); return false; } public boolean equals(copyFromLocal_result that) { if (that == null) 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() { return 0; } public int compareTo(copyFromLocal_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; copyFromLocal_result typedOther = (copyFromLocal_result)other; lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // E if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new FsShellException(); this.e.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetE()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("copyFromLocal_result("); boolean first = true; 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 } 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); } } } public static class copyToLocal_args implements org.apache.thrift.TBase<copyToLocal_args, copyToLocal_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("copyToLocal_args"); private static final org.apache.thrift.protocol.TField SRC_FIELD_DESC = new org.apache.thrift.protocol.TField("src", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DEST_FIELD_DESC = new org.apache.thrift.protocol.TField("dest", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField VALIDATE_FIELD_DESC = new org.apache.thrift.protocol.TField("validate", org.apache.thrift.protocol.TType.BOOL, (short)3); public String src; // required public String dest; // required public boolean validate; // 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 { SRC((short)1, "src"), DEST((short)2, "dest"), VALIDATE((short)3, "validate"); 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: // SRC return SRC; case 2: // DEST return DEST; case 3: // VALIDATE return VALIDATE; 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 __VALIDATE_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); 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.SRC, new org.apache.thrift.meta_data.FieldMetaData("src", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DEST, new org.apache.thrift.meta_data.FieldMetaData("dest", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VALIDATE, new org.apache.thrift.meta_data.FieldMetaData("validate", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(copyToLocal_args.class, metaDataMap); } public copyToLocal_args() { } public copyToLocal_args( String src, String dest, boolean validate) { this(); this.src = src; this.dest = dest; this.validate = validate; setValidateIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public copyToLocal_args(copyToLocal_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetSrc()) { this.src = other.src; } if (other.isSetDest()) { this.dest = other.dest; } this.validate = other.validate; } public copyToLocal_args deepCopy() { return new copyToLocal_args(this); } @Override public void clear() { this.src = null; this.dest = null; setValidateIsSet(false); this.validate = false; } public String getSrc() { return this.src; } public copyToLocal_args setSrc(String src) { this.src = src; return this; } public void unsetSrc() { this.src = null; } /** Returns true if field src is set (has been assigned a value) and false otherwise */ public boolean isSetSrc() { return this.src != null; } public void setSrcIsSet(boolean value) { if (!value) { this.src = null; } } public String getDest() { return this.dest; } public copyToLocal_args setDest(String dest) { this.dest = dest; return this; } public void unsetDest() { this.dest = null; } /** Returns true if field dest is set (has been assigned a value) and false otherwise */ public boolean isSetDest() { return this.dest != null; } public void setDestIsSet(boolean value) { if (!value) { this.dest = null; } } public boolean isValidate() { return this.validate; } public copyToLocal_args setValidate(boolean validate) { this.validate = validate; setValidateIsSet(true); return this; } public void unsetValidate() { __isset_bit_vector.clear(__VALIDATE_ISSET_ID); } /** Returns true if field validate is set (has been assigned a value) and false otherwise */ public boolean isSetValidate() { return __isset_bit_vector.get(__VALIDATE_ISSET_ID); } public void setValidateIsSet(boolean value) { __isset_bit_vector.set(__VALIDATE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SRC: if (value == null) { unsetSrc(); } else { setSrc((String)value); } break; case DEST: if (value == null) { unsetDest(); } else { setDest((String)value); } break; case VALIDATE: if (value == null) { unsetValidate(); } else { setValidate((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SRC: return getSrc(); case DEST: return getDest(); case VALIDATE: return Boolean.valueOf(isValidate()); } 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 SRC: return isSetSrc(); case DEST: return isSetDest(); case VALIDATE: return isSetValidate(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof copyToLocal_args) return this.equals((copyToLocal_args)that); return false; } public boolean equals(copyToLocal_args that) { if (that == null) return false; boolean this_present_src = true && this.isSetSrc(); boolean that_present_src = true && that.isSetSrc(); if (this_present_src || that_present_src) { if (!(this_present_src && that_present_src)) return false; if (!this.src.equals(that.src)) return false; } boolean this_present_dest = true && this.isSetDest(); boolean that_present_dest = true && that.isSetDest(); if (this_present_dest || that_present_dest) { if (!(this_present_dest && that_present_dest)) return false; if (!this.dest.equals(that.dest)) return false; } boolean this_present_validate = true; boolean that_present_validate = true; if (this_present_validate || that_present_validate) { if (!(this_present_validate && that_present_validate)) return false; if (this.validate != that.validate) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(copyToLocal_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; copyToLocal_args typedOther = (copyToLocal_args)other; lastComparison = Boolean.valueOf(isSetSrc()).compareTo(typedOther.isSetSrc()); if (lastComparison != 0) { return lastComparison; } if (isSetSrc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.src, typedOther.src); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDest()).compareTo(typedOther.isSetDest()); if (lastComparison != 0) { return lastComparison; } if (isSetDest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest, typedOther.dest); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetValidate()).compareTo(typedOther.isSetValidate()); if (lastComparison != 0) { return lastComparison; } if (isSetValidate()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate, typedOther.validate); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // SRC if (field.type == org.apache.thrift.protocol.TType.STRING) { this.src = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // DEST if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dest = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // VALIDATE if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.validate = iprot.readBool(); setValidateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.src != null) { oprot.writeFieldBegin(SRC_FIELD_DESC); oprot.writeString(this.src); oprot.writeFieldEnd(); } if (this.dest != null) { oprot.writeFieldBegin(DEST_FIELD_DESC); oprot.writeString(this.dest); oprot.writeFieldEnd(); } oprot.writeFieldBegin(VALIDATE_FIELD_DESC); oprot.writeBool(this.validate); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("copyToLocal_args("); boolean first = true; sb.append("src:"); if (this.src == null) { sb.append("null"); } else { sb.append(this.src); } first = false; if (!first) sb.append(", "); sb.append("dest:"); if (this.dest == null) { sb.append("null"); } else { sb.append(this.dest); } first = false; if (!first) sb.append(", "); sb.append("validate:"); sb.append(this.validate); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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_bit_vector = new BitSet(1); 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); } } } public static class copyToLocal_result implements org.apache.thrift.TBase<copyToLocal_result, copyToLocal_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("copyToLocal_result"); 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); public FsShellException 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 { 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 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.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(copyToLocal_result.class, metaDataMap); } public copyToLocal_result() { } public copyToLocal_result( FsShellException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public copyToLocal_result(copyToLocal_result other) { if (other.isSetE()) { this.e = new FsShellException(other.e); } } public copyToLocal_result deepCopy() { return new copyToLocal_result(this); } @Override public void clear() { this.e = null; } public FsShellException getE() { return this.e; } public copyToLocal_result setE(FsShellException 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 E: if (value == null) { unsetE(); } else { setE((FsShellException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { 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 E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof copyToLocal_result) return this.equals((copyToLocal_result)that); return false; } public boolean equals(copyToLocal_result that) { if (that == null) 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() { return 0; } public int compareTo(copyToLocal_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; copyToLocal_result typedOther = (copyToLocal_result)other; lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // E if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new FsShellException(); this.e.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetE()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("copyToLocal_result("); boolean first = true; 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 } 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); } } } public static class remove_args implements org.apache.thrift.TBase<remove_args, remove_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_args"); private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField RECURSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("recursive", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final org.apache.thrift.protocol.TField SKIP_TRASH_FIELD_DESC = new org.apache.thrift.protocol.TField("skipTrash", org.apache.thrift.protocol.TType.BOOL, (short)3); public String path; // required public boolean recursive; // required public boolean skipTrash; // 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 { PATH((short)1, "path"), RECURSIVE((short)2, "recursive"), SKIP_TRASH((short)3, "skipTrash"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PATH return PATH; case 2: // RECURSIVE return RECURSIVE; case 3: // SKIP_TRASH return SKIP_TRASH; 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 __RECURSIVE_ISSET_ID = 0; private static final int __SKIPTRASH_ISSET_ID = 1; private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RECURSIVE, new org.apache.thrift.meta_data.FieldMetaData("recursive", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.SKIP_TRASH, new org.apache.thrift.meta_data.FieldMetaData("skipTrash", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_args.class, metaDataMap); } public remove_args() { } public remove_args( String path, boolean recursive, boolean skipTrash) { this(); this.path = path; this.recursive = recursive; setRecursiveIsSet(true); this.skipTrash = skipTrash; setSkipTrashIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public remove_args(remove_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetPath()) { this.path = other.path; } this.recursive = other.recursive; this.skipTrash = other.skipTrash; } public remove_args deepCopy() { return new remove_args(this); } @Override public void clear() { this.path = null; setRecursiveIsSet(false); this.recursive = false; setSkipTrashIsSet(false); this.skipTrash = false; } public String getPath() { return this.path; } public remove_args setPath(String path) { this.path = path; return this; } public void unsetPath() { this.path = null; } /** Returns true if field path is set (has been assigned a value) and false otherwise */ public boolean isSetPath() { return this.path != null; } public void setPathIsSet(boolean value) { if (!value) { this.path = null; } } public boolean isRecursive() { return this.recursive; } public remove_args setRecursive(boolean recursive) { this.recursive = recursive; setRecursiveIsSet(true); return this; } public void unsetRecursive() { __isset_bit_vector.clear(__RECURSIVE_ISSET_ID); } /** Returns true if field recursive is set (has been assigned a value) and false otherwise */ public boolean isSetRecursive() { return __isset_bit_vector.get(__RECURSIVE_ISSET_ID); } public void setRecursiveIsSet(boolean value) { __isset_bit_vector.set(__RECURSIVE_ISSET_ID, value); } public boolean isSkipTrash() { return this.skipTrash; } public remove_args setSkipTrash(boolean skipTrash) { this.skipTrash = skipTrash; setSkipTrashIsSet(true); return this; } public void unsetSkipTrash() { __isset_bit_vector.clear(__SKIPTRASH_ISSET_ID); } /** Returns true if field skipTrash is set (has been assigned a value) and false otherwise */ public boolean isSetSkipTrash() { return __isset_bit_vector.get(__SKIPTRASH_ISSET_ID); } public void setSkipTrashIsSet(boolean value) { __isset_bit_vector.set(__SKIPTRASH_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; case RECURSIVE: if (value == null) { unsetRecursive(); } else { setRecursive((Boolean)value); } break; case SKIP_TRASH: if (value == null) { unsetSkipTrash(); } else { setSkipTrash((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); case RECURSIVE: return Boolean.valueOf(isRecursive()); case SKIP_TRASH: return Boolean.valueOf(isSkipTrash()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case PATH: return isSetPath(); case RECURSIVE: return isSetRecursive(); case SKIP_TRASH: return isSetSkipTrash(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof remove_args) return this.equals((remove_args)that); return false; } public boolean equals(remove_args that) { if (that == null) return false; boolean this_present_path = true && this.isSetPath(); boolean that_present_path = true && that.isSetPath(); if (this_present_path || that_present_path) { if (!(this_present_path && that_present_path)) return false; if (!this.path.equals(that.path)) return false; } boolean this_present_recursive = true; boolean that_present_recursive = true; if (this_present_recursive || that_present_recursive) { if (!(this_present_recursive && that_present_recursive)) return false; if (this.recursive != that.recursive) return false; } boolean this_present_skipTrash = true; boolean that_present_skipTrash = true; if (this_present_skipTrash || that_present_skipTrash) { if (!(this_present_skipTrash && that_present_skipTrash)) return false; if (this.skipTrash != that.skipTrash) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(remove_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; remove_args typedOther = (remove_args)other; lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath()); if (lastComparison != 0) { return lastComparison; } if (isSetPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(typedOther.isSetRecursive()); if (lastComparison != 0) { return lastComparison; } if (isSetRecursive()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, typedOther.recursive); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSkipTrash()).compareTo(typedOther.isSetSkipTrash()); if (lastComparison != 0) { return lastComparison; } if (isSetSkipTrash()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skipTrash, typedOther.skipTrash); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PATH if (field.type == org.apache.thrift.protocol.TType.STRING) { this.path = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // RECURSIVE if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.recursive = iprot.readBool(); setRecursiveIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // SKIP_TRASH if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.skipTrash = iprot.readBool(); setSkipTrashIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(this.path); oprot.writeFieldEnd(); } oprot.writeFieldBegin(RECURSIVE_FIELD_DESC); oprot.writeBool(this.recursive); oprot.writeFieldEnd(); oprot.writeFieldBegin(SKIP_TRASH_FIELD_DESC); oprot.writeBool(this.skipTrash); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_args("); boolean first = true; sb.append("path:"); if (this.path == null) { sb.append("null"); } else { sb.append(this.path); } first = false; if (!first) sb.append(", "); sb.append("recursive:"); sb.append(this.recursive); first = false; if (!first) sb.append(", "); sb.append("skipTrash:"); sb.append(this.skipTrash); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } } public static class remove_result implements org.apache.thrift.TBase<remove_result, remove_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remove_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (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); public boolean success; // required public FsShellException 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 private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); 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.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); 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(remove_result.class, metaDataMap); } public remove_result() { } public remove_result( boolean success, FsShellException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public remove_result(remove_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; if (other.isSetE()) { this.e = new FsShellException(other.e); } } public remove_result deepCopy() { return new remove_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.e = null; } public boolean isSuccess() { return this.success; } public remove_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public FsShellException getE() { return this.e; } public remove_result setE(FsShellException 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((Boolean)value); } break; case E: if (value == null) { unsetE(); } else { setE((FsShellException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); 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 remove_result) return this.equals((remove_result)that); return false; } public boolean equals(remove_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != 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() { return 0; } public int compareTo(remove_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; remove_result typedOther = (remove_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new FsShellException(); this.e.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetE()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("remove_result("); boolean first = true; sb.append("success:"); 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 } 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); } } } public static class mkdirs_args implements org.apache.thrift.TBase<mkdirs_args, mkdirs_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mkdirs_args"); private static final org.apache.thrift.protocol.TField F_FIELD_DESC = new org.apache.thrift.protocol.TField("f", org.apache.thrift.protocol.TType.STRING, (short)1); public String f; // 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 { F((short)1, "f"); 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: // F return F; 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.F, new org.apache.thrift.meta_data.FieldMetaData("f", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mkdirs_args.class, metaDataMap); } public mkdirs_args() { } public mkdirs_args( String f) { this(); this.f = f; } /** * Performs a deep copy on <i>other</i>. */ public mkdirs_args(mkdirs_args other) { if (other.isSetF()) { this.f = other.f; } } public mkdirs_args deepCopy() { return new mkdirs_args(this); } @Override public void clear() { this.f = null; } public String getF() { return this.f; } public mkdirs_args setF(String f) { this.f = f; return this; } public void unsetF() { this.f = null; } /** Returns true if field f is set (has been assigned a value) and false otherwise */ public boolean isSetF() { return this.f != null; } public void setFIsSet(boolean value) { if (!value) { this.f = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case F: if (value == null) { unsetF(); } else { setF((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case F: return getF(); } 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 F: return isSetF(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof mkdirs_args) return this.equals((mkdirs_args)that); return false; } public boolean equals(mkdirs_args that) { if (that == null) return false; boolean this_present_f = true && this.isSetF(); boolean that_present_f = true && that.isSetF(); if (this_present_f || that_present_f) { if (!(this_present_f && that_present_f)) return false; if (!this.f.equals(that.f)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(mkdirs_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; mkdirs_args typedOther = (mkdirs_args)other; lastComparison = Boolean.valueOf(isSetF()).compareTo(typedOther.isSetF()); if (lastComparison != 0) { return lastComparison; } if (isSetF()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.f, typedOther.f); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // F if (field.type == org.apache.thrift.protocol.TType.STRING) { this.f = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.f != null) { oprot.writeFieldBegin(F_FIELD_DESC); oprot.writeString(this.f); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("mkdirs_args("); boolean first = true; sb.append("f:"); if (this.f == null) { sb.append("null"); } else { sb.append(this.f); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } } public static class mkdirs_result implements org.apache.thrift.TBase<mkdirs_result, mkdirs_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mkdirs_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (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); public boolean success; // required public FsShellException 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 private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); 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.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); 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(mkdirs_result.class, metaDataMap); } public mkdirs_result() { } public mkdirs_result( boolean success, FsShellException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public mkdirs_result(mkdirs_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; if (other.isSetE()) { this.e = new FsShellException(other.e); } } public mkdirs_result deepCopy() { return new mkdirs_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.e = null; } public boolean isSuccess() { return this.success; } public mkdirs_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public FsShellException getE() { return this.e; } public mkdirs_result setE(FsShellException 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((Boolean)value); } break; case E: if (value == null) { unsetE(); } else { setE((FsShellException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); 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 mkdirs_result) return this.equals((mkdirs_result)that); return false; } public boolean equals(mkdirs_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != 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() { return 0; } public int compareTo(mkdirs_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; mkdirs_result typedOther = (mkdirs_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new FsShellException(); this.e.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetE()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("mkdirs_result("); boolean first = true; sb.append("success:"); 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 } 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); } } } public static class rename_args implements org.apache.thrift.TBase<rename_args, rename_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_args"); private static final org.apache.thrift.protocol.TField SRC_FIELD_DESC = new org.apache.thrift.protocol.TField("src", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DEST_FIELD_DESC = new org.apache.thrift.protocol.TField("dest", org.apache.thrift.protocol.TType.STRING, (short)2); public String src; // required public String dest; // 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 { SRC((short)1, "src"), DEST((short)2, "dest"); 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: // SRC return SRC; case 2: // DEST return DEST; 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.SRC, new org.apache.thrift.meta_data.FieldMetaData("src", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DEST, new org.apache.thrift.meta_data.FieldMetaData("dest", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_args.class, metaDataMap); } public rename_args() { } public rename_args( String src, String dest) { this(); this.src = src; this.dest = dest; } /** * Performs a deep copy on <i>other</i>. */ public rename_args(rename_args other) { if (other.isSetSrc()) { this.src = other.src; } if (other.isSetDest()) { this.dest = other.dest; } } public rename_args deepCopy() { return new rename_args(this); } @Override public void clear() { this.src = null; this.dest = null; } public String getSrc() { return this.src; } public rename_args setSrc(String src) { this.src = src; return this; } public void unsetSrc() { this.src = null; } /** Returns true if field src is set (has been assigned a value) and false otherwise */ public boolean isSetSrc() { return this.src != null; } public void setSrcIsSet(boolean value) { if (!value) { this.src = null; } } public String getDest() { return this.dest; } public rename_args setDest(String dest) { this.dest = dest; return this; } public void unsetDest() { this.dest = null; } /** Returns true if field dest is set (has been assigned a value) and false otherwise */ public boolean isSetDest() { return this.dest != null; } public void setDestIsSet(boolean value) { if (!value) { this.dest = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SRC: if (value == null) { unsetSrc(); } else { setSrc((String)value); } break; case DEST: if (value == null) { unsetDest(); } else { setDest((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SRC: return getSrc(); case DEST: return getDest(); } 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 SRC: return isSetSrc(); case DEST: return isSetDest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof rename_args) return this.equals((rename_args)that); return false; } public boolean equals(rename_args that) { if (that == null) return false; boolean this_present_src = true && this.isSetSrc(); boolean that_present_src = true && that.isSetSrc(); if (this_present_src || that_present_src) { if (!(this_present_src && that_present_src)) return false; if (!this.src.equals(that.src)) return false; } boolean this_present_dest = true && this.isSetDest(); boolean that_present_dest = true && that.isSetDest(); if (this_present_dest || that_present_dest) { if (!(this_present_dest && that_present_dest)) return false; if (!this.dest.equals(that.dest)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(rename_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; rename_args typedOther = (rename_args)other; lastComparison = Boolean.valueOf(isSetSrc()).compareTo(typedOther.isSetSrc()); if (lastComparison != 0) { return lastComparison; } if (isSetSrc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.src, typedOther.src); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDest()).compareTo(typedOther.isSetDest()); if (lastComparison != 0) { return lastComparison; } if (isSetDest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dest, typedOther.dest); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // SRC if (field.type == org.apache.thrift.protocol.TType.STRING) { this.src = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // DEST if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dest = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.src != null) { oprot.writeFieldBegin(SRC_FIELD_DESC); oprot.writeString(this.src); oprot.writeFieldEnd(); } if (this.dest != null) { oprot.writeFieldBegin(DEST_FIELD_DESC); oprot.writeString(this.dest); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("rename_args("); boolean first = true; sb.append("src:"); if (this.src == null) { sb.append("null"); } else { sb.append(this.src); } first = false; if (!first) sb.append(", "); sb.append("dest:"); if (this.dest == null) { sb.append("null"); } else { sb.append(this.dest); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } } public static class rename_result implements org.apache.thrift.TBase<rename_result, rename_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("rename_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (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); public boolean success; // required public FsShellException 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 private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); 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.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); 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(rename_result.class, metaDataMap); } public rename_result() { } public rename_result( boolean success, FsShellException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public rename_result(rename_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; if (other.isSetE()) { this.e = new FsShellException(other.e); } } public rename_result deepCopy() { return new rename_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.e = null; } public boolean isSuccess() { return this.success; } public rename_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public FsShellException getE() { return this.e; } public rename_result setE(FsShellException 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((Boolean)value); } break; case E: if (value == null) { unsetE(); } else { setE((FsShellException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); 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 rename_result) return this.equals((rename_result)that); return false; } public boolean equals(rename_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != 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() { return 0; } public int compareTo(rename_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; rename_result typedOther = (rename_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new FsShellException(); this.e.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetE()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("rename_result("); boolean first = true; sb.append("success:"); 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 } 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); } } } public static class listStatus_args implements org.apache.thrift.TBase<listStatus_args, listStatus_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("listStatus_args"); private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); public String path; // 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 { PATH((short)1, "path"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PATH return PATH; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listStatus_args.class, metaDataMap); } public listStatus_args() { } public listStatus_args( String path) { this(); this.path = path; } /** * Performs a deep copy on <i>other</i>. */ public listStatus_args(listStatus_args other) { if (other.isSetPath()) { this.path = other.path; } } public listStatus_args deepCopy() { return new listStatus_args(this); } @Override public void clear() { this.path = null; } public String getPath() { return this.path; } public listStatus_args setPath(String path) { this.path = path; return this; } public void unsetPath() { this.path = null; } /** Returns true if field path is set (has been assigned a value) and false otherwise */ public boolean isSetPath() { return this.path != null; } public void setPathIsSet(boolean value) { if (!value) { this.path = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case PATH: return isSetPath(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof listStatus_args) return this.equals((listStatus_args)that); return false; } public boolean equals(listStatus_args that) { if (that == null) return false; boolean this_present_path = true && this.isSetPath(); boolean that_present_path = true && that.isSetPath(); if (this_present_path || that_present_path) { if (!(this_present_path && that_present_path)) return false; if (!this.path.equals(that.path)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(listStatus_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; listStatus_args typedOther = (listStatus_args)other; lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath()); if (lastComparison != 0) { return lastComparison; } if (isSetPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PATH if (field.type == org.apache.thrift.protocol.TType.STRING) { this.path = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(this.path); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("listStatus_args("); boolean first = true; sb.append("path:"); if (this.path == null) { sb.append("null"); } else { sb.append(this.path); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } } public static class listStatus_result implements org.apache.thrift.TBase<listStatus_result, listStatus_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("listStatus_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField EFNF_FIELD_DESC = new org.apache.thrift.protocol.TField("efnf", org.apache.thrift.protocol.TType.STRUCT, (short)2); public List<DfsFileStatus> success; // required public FsShellException e; // required public FsShellFileNotFoundException efnf; // 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"), EFNF((short)2, "efnf"); 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; case 2: // EFNF return EFNF; 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DfsFileStatus.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))); tmpMap.put(_Fields.EFNF, new org.apache.thrift.meta_data.FieldMetaData("efnf", 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(listStatus_result.class, metaDataMap); } public listStatus_result() { } public listStatus_result( List<DfsFileStatus> success, FsShellException e, FsShellFileNotFoundException efnf) { this(); this.success = success; this.e = e; this.efnf = efnf; } /** * Performs a deep copy on <i>other</i>. */ public listStatus_result(listStatus_result other) { if (other.isSetSuccess()) { List<DfsFileStatus> __this__success = new ArrayList<DfsFileStatus>(); for (DfsFileStatus other_element : other.success) { __this__success.add(new DfsFileStatus(other_element)); } this.success = __this__success; } if (other.isSetE()) { this.e = new FsShellException(other.e); } if (other.isSetEfnf()) { this.efnf = new FsShellFileNotFoundException(other.efnf); } } public listStatus_result deepCopy() { return new listStatus_result(this); } @Override public void clear() { this.success = null; this.e = null; this.efnf = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<DfsFileStatus> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(DfsFileStatus elem) { if (this.success == null) { this.success = new ArrayList<DfsFileStatus>(); } this.success.add(elem); } public List<DfsFileStatus> getSuccess() { return this.success; } public listStatus_result setSuccess(List<DfsFileStatus> 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 FsShellException getE() { return this.e; } public listStatus_result setE(FsShellException 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 FsShellFileNotFoundException getEfnf() { return this.efnf; } public listStatus_result setEfnf(FsShellFileNotFoundException efnf) { this.efnf = efnf; return this; } public void unsetEfnf() { this.efnf = null; } /** Returns true if field efnf is set (has been assigned a value) and false otherwise */ public boolean isSetEfnf() { return this.efnf != null; } public void setEfnfIsSet(boolean value) { if (!value) { this.efnf = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<DfsFileStatus>)value); } break; case E: if (value == null) { unsetE(); } else { setE((FsShellException)value); } break; case EFNF: if (value == null) { unsetEfnf(); } else { setEfnf((FsShellFileNotFoundException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); case EFNF: return getEfnf(); } 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(); case EFNF: return isSetEfnf(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof listStatus_result) return this.equals((listStatus_result)that); return false; } public boolean equals(listStatus_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; } boolean this_present_efnf = true && this.isSetEfnf(); boolean that_present_efnf = true && that.isSetEfnf(); if (this_present_efnf || that_present_efnf) { if (!(this_present_efnf && that_present_efnf)) return false; if (!this.efnf.equals(that.efnf)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(listStatus_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; listStatus_result typedOther = (listStatus_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEfnf()).compareTo(typedOther.isSetEfnf()); if (lastComparison != 0) { return lastComparison; } if (isSetEfnf()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.efnf, typedOther.efnf); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); this.success = new ArrayList<DfsFileStatus>(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { DfsFileStatus _elem2; // required _elem2 = new DfsFileStatus(); _elem2.read(iprot); this.success.add(_elem2); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new FsShellException(); this.e.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // EFNF if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.efnf = new FsShellFileNotFoundException(); this.efnf.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); for (DfsFileStatus _iter3 : this.success) { _iter3.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } else if (this.isSetE()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetEfnf()) { oprot.writeFieldBegin(EFNF_FIELD_DESC); this.efnf.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("listStatus_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; if (!first) sb.append(", "); sb.append("efnf:"); if (this.efnf == null) { sb.append("null"); } else { sb.append(this.efnf); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } } public static class getFileStatus_args implements org.apache.thrift.TBase<getFileStatus_args, getFileStatus_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileStatus_args"); private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); public String path; // 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 { PATH((short)1, "path"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PATH return PATH; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileStatus_args.class, metaDataMap); } public getFileStatus_args() { } public getFileStatus_args( String path) { this(); this.path = path; } /** * Performs a deep copy on <i>other</i>. */ public getFileStatus_args(getFileStatus_args other) { if (other.isSetPath()) { this.path = other.path; } } public getFileStatus_args deepCopy() { return new getFileStatus_args(this); } @Override public void clear() { this.path = null; } public String getPath() { return this.path; } public getFileStatus_args setPath(String path) { this.path = path; return this; } public void unsetPath() { this.path = null; } /** Returns true if field path is set (has been assigned a value) and false otherwise */ public boolean isSetPath() { return this.path != null; } public void setPathIsSet(boolean value) { if (!value) { this.path = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case PATH: return isSetPath(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getFileStatus_args) return this.equals((getFileStatus_args)that); return false; } public boolean equals(getFileStatus_args that) { if (that == null) return false; boolean this_present_path = true && this.isSetPath(); boolean that_present_path = true && that.isSetPath(); if (this_present_path || that_present_path) { if (!(this_present_path && that_present_path)) return false; if (!this.path.equals(that.path)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(getFileStatus_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; getFileStatus_args typedOther = (getFileStatus_args)other; lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath()); if (lastComparison != 0) { return lastComparison; } if (isSetPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PATH if (field.type == org.apache.thrift.protocol.TType.STRING) { this.path = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(this.path); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("getFileStatus_args("); boolean first = true; sb.append("path:"); if (this.path == null) { sb.append("null"); } else { sb.append(this.path); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } } public static class getFileStatus_result implements org.apache.thrift.TBase<getFileStatus_result, getFileStatus_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileStatus_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 org.apache.thrift.protocol.TField EFNF_FIELD_DESC = new org.apache.thrift.protocol.TField("efnf", org.apache.thrift.protocol.TType.STRUCT, (short)2); public DfsFileStatus success; // required public FsShellException e; // required public FsShellFileNotFoundException efnf; // 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"), EFNF((short)2, "efnf"); 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; case 2: // EFNF return EFNF; 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, DfsFileStatus.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))); tmpMap.put(_Fields.EFNF, new org.apache.thrift.meta_data.FieldMetaData("efnf", 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(getFileStatus_result.class, metaDataMap); } public getFileStatus_result() { } public getFileStatus_result( DfsFileStatus success, FsShellException e, FsShellFileNotFoundException efnf) { this(); this.success = success; this.e = e; this.efnf = efnf; } /** * Performs a deep copy on <i>other</i>. */ public getFileStatus_result(getFileStatus_result other) { if (other.isSetSuccess()) { this.success = new DfsFileStatus(other.success); } if (other.isSetE()) { this.e = new FsShellException(other.e); } if (other.isSetEfnf()) { this.efnf = new FsShellFileNotFoundException(other.efnf); } } public getFileStatus_result deepCopy() { return new getFileStatus_result(this); } @Override public void clear() { this.success = null; this.e = null; this.efnf = null; } public DfsFileStatus getSuccess() { return this.success; } public getFileStatus_result setSuccess(DfsFileStatus 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 FsShellException getE() { return this.e; } public getFileStatus_result setE(FsShellException 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 FsShellFileNotFoundException getEfnf() { return this.efnf; } public getFileStatus_result setEfnf(FsShellFileNotFoundException efnf) { this.efnf = efnf; return this; } public void unsetEfnf() { this.efnf = null; } /** Returns true if field efnf is set (has been assigned a value) and false otherwise */ public boolean isSetEfnf() { return this.efnf != null; } public void setEfnfIsSet(boolean value) { if (!value) { this.efnf = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((DfsFileStatus)value); } break; case E: if (value == null) { unsetE(); } else { setE((FsShellException)value); } break; case EFNF: if (value == null) { unsetEfnf(); } else { setEfnf((FsShellFileNotFoundException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); case EFNF: return getEfnf(); } 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(); case EFNF: return isSetEfnf(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getFileStatus_result) return this.equals((getFileStatus_result)that); return false; } public boolean equals(getFileStatus_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; } boolean this_present_efnf = true && this.isSetEfnf(); boolean that_present_efnf = true && that.isSetEfnf(); if (this_present_efnf || that_present_efnf) { if (!(this_present_efnf && that_present_efnf)) return false; if (!this.efnf.equals(that.efnf)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(getFileStatus_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; getFileStatus_result typedOther = (getFileStatus_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEfnf()).compareTo(typedOther.isSetEfnf()); if (lastComparison != 0) { return lastComparison; } if (isSetEfnf()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.efnf, typedOther.efnf); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new DfsFileStatus(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new FsShellException(); this.e.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // EFNF if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.efnf = new FsShellFileNotFoundException(); this.efnf.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetE()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetEfnf()) { oprot.writeFieldBegin(EFNF_FIELD_DESC); this.efnf.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("getFileStatus_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; if (!first) sb.append(", "); sb.append("efnf:"); if (this.efnf == null) { sb.append("null"); } else { sb.append(this.efnf); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } } public static class exists_args implements org.apache.thrift.TBase<exists_args, exists_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_args"); private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); public String path; // 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 { PATH((short)1, "path"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PATH return PATH; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_args.class, metaDataMap); } public exists_args() { } public exists_args( String path) { this(); this.path = path; } /** * Performs a deep copy on <i>other</i>. */ public exists_args(exists_args other) { if (other.isSetPath()) { this.path = other.path; } } public exists_args deepCopy() { return new exists_args(this); } @Override public void clear() { this.path = null; } public String getPath() { return this.path; } public exists_args setPath(String path) { this.path = path; return this; } public void unsetPath() { this.path = null; } /** Returns true if field path is set (has been assigned a value) and false otherwise */ public boolean isSetPath() { return this.path != null; } public void setPathIsSet(boolean value) { if (!value) { this.path = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case PATH: return isSetPath(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof exists_args) return this.equals((exists_args)that); return false; } public boolean equals(exists_args that) { if (that == null) return false; boolean this_present_path = true && this.isSetPath(); boolean that_present_path = true && that.isSetPath(); if (this_present_path || that_present_path) { if (!(this_present_path && that_present_path)) return false; if (!this.path.equals(that.path)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(exists_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; exists_args typedOther = (exists_args)other; lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath()); if (lastComparison != 0) { return lastComparison; } if (isSetPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PATH if (field.type == org.apache.thrift.protocol.TType.STRING) { this.path = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(this.path); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("exists_args("); boolean first = true; sb.append("path:"); if (this.path == null) { sb.append("null"); } else { sb.append(this.path); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } } public static class exists_result implements org.apache.thrift.TBase<exists_result, exists_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (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); public boolean success; // required public FsShellException 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 private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); 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.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); 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(exists_result.class, metaDataMap); } public exists_result() { } public exists_result( boolean success, FsShellException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public exists_result(exists_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; if (other.isSetE()) { this.e = new FsShellException(other.e); } } public exists_result deepCopy() { return new exists_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.e = null; } public boolean isSuccess() { return this.success; } public exists_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public FsShellException getE() { return this.e; } public exists_result setE(FsShellException 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((Boolean)value); } break; case E: if (value == null) { unsetE(); } else { setE((FsShellException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); 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 exists_result) return this.equals((exists_result)that); return false; } public boolean equals(exists_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != 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() { return 0; } public int compareTo(exists_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; exists_result typedOther = (exists_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.success = iprot.readBool(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new FsShellException(); this.e.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetE()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("exists_result("); boolean first = true; sb.append("success:"); 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 } 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); } } } public static class getFileCrc_args implements org.apache.thrift.TBase<getFileCrc_args, getFileCrc_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileCrc_args"); private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); public String path; // 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 { PATH((short)1, "path"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PATH return PATH; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileCrc_args.class, metaDataMap); } public getFileCrc_args() { } public getFileCrc_args( String path) { this(); this.path = path; } /** * Performs a deep copy on <i>other</i>. */ public getFileCrc_args(getFileCrc_args other) { if (other.isSetPath()) { this.path = other.path; } } public getFileCrc_args deepCopy() { return new getFileCrc_args(this); } @Override public void clear() { this.path = null; } public String getPath() { return this.path; } public getFileCrc_args setPath(String path) { this.path = path; return this; } public void unsetPath() { this.path = null; } /** Returns true if field path is set (has been assigned a value) and false otherwise */ public boolean isSetPath() { return this.path != null; } public void setPathIsSet(boolean value) { if (!value) { this.path = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PATH: if (value == null) { unsetPath(); } else { setPath((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case PATH: return isSetPath(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getFileCrc_args) return this.equals((getFileCrc_args)that); return false; } public boolean equals(getFileCrc_args that) { if (that == null) return false; boolean this_present_path = true && this.isSetPath(); boolean that_present_path = true && that.isSetPath(); if (this_present_path || that_present_path) { if (!(this_present_path && that_present_path)) return false; if (!this.path.equals(that.path)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(getFileCrc_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; getFileCrc_args typedOther = (getFileCrc_args)other; lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath()); if (lastComparison != 0) { return lastComparison; } if (isSetPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path); 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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // PATH if (field.type == org.apache.thrift.protocol.TType.STRING) { this.path = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(this.path); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("getFileCrc_args("); boolean first = true; sb.append("path:"); if (this.path == null) { sb.append("null"); } else { sb.append(this.path); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } 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); } } } public static class getFileCrc_result implements org.apache.thrift.TBase<getFileCrc_result, getFileCrc_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileCrc_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (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); public int success; // required public FsShellException 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 private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); 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.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); 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(getFileCrc_result.class, metaDataMap); } public getFileCrc_result() { } public getFileCrc_result( int success, FsShellException e) { this(); this.success = success; setSuccessIsSet(true); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public getFileCrc_result(getFileCrc_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; if (other.isSetE()) { this.e = new FsShellException(other.e); } } public getFileCrc_result deepCopy() { return new getFileCrc_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.e = null; } public int getSuccess() { return this.success; } public getFileCrc_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public FsShellException getE() { return this.e; } public getFileCrc_result setE(FsShellException 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((Integer)value); } break; case E: if (value == null) { unsetE(); } else { setE((FsShellException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Integer.valueOf(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 getFileCrc_result) return this.equals((getFileCrc_result)that); return false; } public boolean equals(getFileCrc_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != 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() { return 0; } public int compareTo(getFileCrc_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; getFileCrc_result typedOther = (getFileCrc_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.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 { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.I32) { this.success = iprot.readI32(); setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new FsShellException(); this.e.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(this.success); oprot.writeFieldEnd(); } else if (this.isSetE()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("getFileCrc_result("); boolean first = true; sb.append("success:"); 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 } 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); } } } }