/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package alluxio.thrift;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class FileSystemMasterClientService {
/**
* This interface contains file system master service endpoints for Alluxio clients.
*/
public interface Iface extends alluxio.thrift.AlluxioService.Iface {
/**
* Checks the consistency of the files and directores with the path as the root of the subtree
*
* @param path the root of the subtree to check
*
* @param options the method options
*/
public CheckConsistencyTResponse checkConsistency(String path, CheckConsistencyTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Marks a file as completed.
*
* @param path the path of the file
*
* @param options the method options
*/
public CompleteFileTResponse completeFile(String path, CompleteFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Creates a directory.
*
* @param path the path of the directory
*
* @param options the method options
*/
public CreateDirectoryTResponse createDirectory(String path, CreateDirectoryTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Creates a file.
*
* @param path the path of the file
*
* @param options the options for creating the file
*/
public CreateFileTResponse createFile(String path, CreateFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Frees the given file or directory from Alluxio.
*
* @param path the path of the file or directory
*
* @param recursive whether to free recursively
*
* @param options the options for freeing a path
*/
public FreeTResponse free(String path, boolean recursive, FreeTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Returns the status of the file or directory.
*
* @param path the path of the file or directory
*
* @param options the method options
*/
public GetStatusTResponse getStatus(String path, GetStatusTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Generates a new block id for the given file.
*
* @param path the path of the file
*
* @param options the method options
*/
public GetNewBlockIdForFileTResponse getNewBlockIdForFile(String path, GetNewBlockIdForFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* If the path points to a file, the method returns a singleton with its file information.
* If the path points to a directory, the method returns a list with file information for the
* directory contents.
*
* @param path the path of the file or directory
*
* @param options listStatus options
*/
public ListStatusTResponse listStatus(String path, ListStatusTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Loads metadata for the object identified by the given Alluxio path from UFS into Alluxio.
*
* THIS METHOD IS DEPRECATED SINCE VERSION 1.1 AND WILL BE REMOVED IN VERSION 2.0.
*
* @param ufsPath the path of the under file system
*
* @param recursive whether to load metadata recursively
*
* @param options the method options
*/
public LoadMetadataTResponse loadMetadata(String ufsPath, boolean recursive, LoadMetadataTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Creates a new "mount point", mounts the given UFS path in the Alluxio namespace at the given
* path. The path should not exist and should not be nested under any existing mount point.
*
* @param alluxioPath the path of alluxio mount point
*
* @param ufsPath the path of the under file system
*
* @param options the options for creating the mount point
*/
public MountTResponse mount(String alluxioPath, String ufsPath, MountTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Deletes a file or a directory and returns whether the remove operation succeeded.
* NOTE: Unfortunately, the method cannot be called "delete" as that is a reserved Thrift keyword.
*
* @param path the path of the file or directory
*
* @param recursive whether to remove recursively
*
* @param options the options for deleting the file
*/
public DeleteTResponse remove(String path, boolean recursive, DeleteTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Renames a file or a directory.
*
* @param path the source path of the file or directory
*
* @param dstPath the desination path of the file
*
* @param options the method options
*/
public RenameTResponse rename(String path, String dstPath, RenameTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Sets file or directory attributes.
*
* @param path the path of the file or directory
*
* @param options the method options
*/
public SetAttributeTResponse setAttribute(String path, SetAttributeTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Schedules async persistence.
*
* @param path the path of the file
*
* @param options the method options
*/
public ScheduleAsyncPersistenceTResponse scheduleAsyncPersistence(String path, ScheduleAsyncPersistenceTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Deletes an existing "mount point", voiding the Alluxio namespace at the given path. The path
* should correspond to an existing mount point. Any files in its subtree that are backed by UFS
* will be persisted before they are removed from the Alluxio namespace.
*
* @param alluxioPath the path of the alluxio mount point
*
* @param options the method options
*/
public UnmountTResponse unmount(String alluxioPath, UnmountTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
}
public interface AsyncIface extends alluxio.thrift.AlluxioService .AsyncIface {
public void checkConsistency(String path, CheckConsistencyTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void completeFile(String path, CompleteFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void createDirectory(String path, CreateDirectoryTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void createFile(String path, CreateFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void free(String path, boolean recursive, FreeTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getStatus(String path, GetStatusTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getNewBlockIdForFile(String path, GetNewBlockIdForFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void listStatus(String path, ListStatusTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void loadMetadata(String ufsPath, boolean recursive, LoadMetadataTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void mount(String alluxioPath, String ufsPath, MountTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void remove(String path, boolean recursive, DeleteTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void rename(String path, String dstPath, RenameTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void setAttribute(String path, SetAttributeTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void scheduleAsyncPersistence(String path, ScheduleAsyncPersistenceTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void unmount(String alluxioPath, UnmountTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends alluxio.thrift.AlluxioService.Client implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public CheckConsistencyTResponse checkConsistency(String path, CheckConsistencyTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_checkConsistency(path, options);
return recv_checkConsistency();
}
public void send_checkConsistency(String path, CheckConsistencyTOptions options) throws org.apache.thrift.TException
{
checkConsistency_args args = new checkConsistency_args();
args.setPath(path);
args.setOptions(options);
sendBase("checkConsistency", args);
}
public CheckConsistencyTResponse recv_checkConsistency() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
checkConsistency_result result = new checkConsistency_result();
receiveBase(result, "checkConsistency");
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, "checkConsistency failed: unknown result");
}
public CompleteFileTResponse completeFile(String path, CompleteFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_completeFile(path, options);
return recv_completeFile();
}
public void send_completeFile(String path, CompleteFileTOptions options) throws org.apache.thrift.TException
{
completeFile_args args = new completeFile_args();
args.setPath(path);
args.setOptions(options);
sendBase("completeFile", args);
}
public CompleteFileTResponse recv_completeFile() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
completeFile_result result = new completeFile_result();
receiveBase(result, "completeFile");
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, "completeFile failed: unknown result");
}
public CreateDirectoryTResponse createDirectory(String path, CreateDirectoryTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_createDirectory(path, options);
return recv_createDirectory();
}
public void send_createDirectory(String path, CreateDirectoryTOptions options) throws org.apache.thrift.TException
{
createDirectory_args args = new createDirectory_args();
args.setPath(path);
args.setOptions(options);
sendBase("createDirectory", args);
}
public CreateDirectoryTResponse recv_createDirectory() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
createDirectory_result result = new createDirectory_result();
receiveBase(result, "createDirectory");
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, "createDirectory failed: unknown result");
}
public CreateFileTResponse createFile(String path, CreateFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_createFile(path, options);
return recv_createFile();
}
public void send_createFile(String path, CreateFileTOptions options) throws org.apache.thrift.TException
{
createFile_args args = new createFile_args();
args.setPath(path);
args.setOptions(options);
sendBase("createFile", args);
}
public CreateFileTResponse recv_createFile() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
createFile_result result = new createFile_result();
receiveBase(result, "createFile");
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, "createFile failed: unknown result");
}
public FreeTResponse free(String path, boolean recursive, FreeTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_free(path, recursive, options);
return recv_free();
}
public void send_free(String path, boolean recursive, FreeTOptions options) throws org.apache.thrift.TException
{
free_args args = new free_args();
args.setPath(path);
args.setRecursive(recursive);
args.setOptions(options);
sendBase("free", args);
}
public FreeTResponse recv_free() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
free_result result = new free_result();
receiveBase(result, "free");
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, "free failed: unknown result");
}
public GetStatusTResponse getStatus(String path, GetStatusTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_getStatus(path, options);
return recv_getStatus();
}
public void send_getStatus(String path, GetStatusTOptions options) throws org.apache.thrift.TException
{
getStatus_args args = new getStatus_args();
args.setPath(path);
args.setOptions(options);
sendBase("getStatus", args);
}
public GetStatusTResponse recv_getStatus() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
getStatus_result result = new getStatus_result();
receiveBase(result, "getStatus");
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, "getStatus failed: unknown result");
}
public GetNewBlockIdForFileTResponse getNewBlockIdForFile(String path, GetNewBlockIdForFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_getNewBlockIdForFile(path, options);
return recv_getNewBlockIdForFile();
}
public void send_getNewBlockIdForFile(String path, GetNewBlockIdForFileTOptions options) throws org.apache.thrift.TException
{
getNewBlockIdForFile_args args = new getNewBlockIdForFile_args();
args.setPath(path);
args.setOptions(options);
sendBase("getNewBlockIdForFile", args);
}
public GetNewBlockIdForFileTResponse recv_getNewBlockIdForFile() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
getNewBlockIdForFile_result result = new getNewBlockIdForFile_result();
receiveBase(result, "getNewBlockIdForFile");
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, "getNewBlockIdForFile failed: unknown result");
}
public ListStatusTResponse listStatus(String path, ListStatusTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_listStatus(path, options);
return recv_listStatus();
}
public void send_listStatus(String path, ListStatusTOptions options) throws org.apache.thrift.TException
{
listStatus_args args = new listStatus_args();
args.setPath(path);
args.setOptions(options);
sendBase("listStatus", args);
}
public ListStatusTResponse recv_listStatus() throws alluxio.thrift.AlluxioTException, 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;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listStatus failed: unknown result");
}
public LoadMetadataTResponse loadMetadata(String ufsPath, boolean recursive, LoadMetadataTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_loadMetadata(ufsPath, recursive, options);
return recv_loadMetadata();
}
public void send_loadMetadata(String ufsPath, boolean recursive, LoadMetadataTOptions options) throws org.apache.thrift.TException
{
loadMetadata_args args = new loadMetadata_args();
args.setUfsPath(ufsPath);
args.setRecursive(recursive);
args.setOptions(options);
sendBase("loadMetadata", args);
}
public LoadMetadataTResponse recv_loadMetadata() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
loadMetadata_result result = new loadMetadata_result();
receiveBase(result, "loadMetadata");
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, "loadMetadata failed: unknown result");
}
public MountTResponse mount(String alluxioPath, String ufsPath, MountTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_mount(alluxioPath, ufsPath, options);
return recv_mount();
}
public void send_mount(String alluxioPath, String ufsPath, MountTOptions options) throws org.apache.thrift.TException
{
mount_args args = new mount_args();
args.setAlluxioPath(alluxioPath);
args.setUfsPath(ufsPath);
args.setOptions(options);
sendBase("mount", args);
}
public MountTResponse recv_mount() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
mount_result result = new mount_result();
receiveBase(result, "mount");
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, "mount failed: unknown result");
}
public DeleteTResponse remove(String path, boolean recursive, DeleteTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_remove(path, recursive, options);
return recv_remove();
}
public void send_remove(String path, boolean recursive, DeleteTOptions options) throws org.apache.thrift.TException
{
remove_args args = new remove_args();
args.setPath(path);
args.setRecursive(recursive);
args.setOptions(options);
sendBase("remove", args);
}
public DeleteTResponse recv_remove() throws alluxio.thrift.AlluxioTException, 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 RenameTResponse rename(String path, String dstPath, RenameTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_rename(path, dstPath, options);
return recv_rename();
}
public void send_rename(String path, String dstPath, RenameTOptions options) throws org.apache.thrift.TException
{
rename_args args = new rename_args();
args.setPath(path);
args.setDstPath(dstPath);
args.setOptions(options);
sendBase("rename", args);
}
public RenameTResponse recv_rename() throws alluxio.thrift.AlluxioTException, 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 SetAttributeTResponse setAttribute(String path, SetAttributeTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_setAttribute(path, options);
return recv_setAttribute();
}
public void send_setAttribute(String path, SetAttributeTOptions options) throws org.apache.thrift.TException
{
setAttribute_args args = new setAttribute_args();
args.setPath(path);
args.setOptions(options);
sendBase("setAttribute", args);
}
public SetAttributeTResponse recv_setAttribute() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
setAttribute_result result = new setAttribute_result();
receiveBase(result, "setAttribute");
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, "setAttribute failed: unknown result");
}
public ScheduleAsyncPersistenceTResponse scheduleAsyncPersistence(String path, ScheduleAsyncPersistenceTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_scheduleAsyncPersistence(path, options);
return recv_scheduleAsyncPersistence();
}
public void send_scheduleAsyncPersistence(String path, ScheduleAsyncPersistenceTOptions options) throws org.apache.thrift.TException
{
scheduleAsyncPersistence_args args = new scheduleAsyncPersistence_args();
args.setPath(path);
args.setOptions(options);
sendBase("scheduleAsyncPersistence", args);
}
public ScheduleAsyncPersistenceTResponse recv_scheduleAsyncPersistence() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
scheduleAsyncPersistence_result result = new scheduleAsyncPersistence_result();
receiveBase(result, "scheduleAsyncPersistence");
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, "scheduleAsyncPersistence failed: unknown result");
}
public UnmountTResponse unmount(String alluxioPath, UnmountTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_unmount(alluxioPath, options);
return recv_unmount();
}
public void send_unmount(String alluxioPath, UnmountTOptions options) throws org.apache.thrift.TException
{
unmount_args args = new unmount_args();
args.setAlluxioPath(alluxioPath);
args.setOptions(options);
sendBase("unmount", args);
}
public UnmountTResponse recv_unmount() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
unmount_result result = new unmount_result();
receiveBase(result, "unmount");
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, "unmount failed: unknown result");
}
}
public static class AsyncClient extends alluxio.thrift.AlluxioService.AsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void checkConsistency(String path, CheckConsistencyTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
checkConsistency_call method_call = new checkConsistency_call(path, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class checkConsistency_call extends org.apache.thrift.async.TAsyncMethodCall {
private String path;
private CheckConsistencyTOptions options;
public checkConsistency_call(String path, CheckConsistencyTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("checkConsistency", org.apache.thrift.protocol.TMessageType.CALL, 0));
checkConsistency_args args = new checkConsistency_args();
args.setPath(path);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public CheckConsistencyTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_checkConsistency();
}
}
public void completeFile(String path, CompleteFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
completeFile_call method_call = new completeFile_call(path, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class completeFile_call extends org.apache.thrift.async.TAsyncMethodCall {
private String path;
private CompleteFileTOptions options;
public completeFile_call(String path, CompleteFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("completeFile", org.apache.thrift.protocol.TMessageType.CALL, 0));
completeFile_args args = new completeFile_args();
args.setPath(path);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public CompleteFileTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_completeFile();
}
}
public void createDirectory(String path, CreateDirectoryTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
createDirectory_call method_call = new createDirectory_call(path, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createDirectory_call extends org.apache.thrift.async.TAsyncMethodCall {
private String path;
private CreateDirectoryTOptions options;
public createDirectory_call(String path, CreateDirectoryTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createDirectory", org.apache.thrift.protocol.TMessageType.CALL, 0));
createDirectory_args args = new createDirectory_args();
args.setPath(path);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public CreateDirectoryTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_createDirectory();
}
}
public void createFile(String path, CreateFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
createFile_call method_call = new createFile_call(path, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class createFile_call extends org.apache.thrift.async.TAsyncMethodCall {
private String path;
private CreateFileTOptions options;
public createFile_call(String path, CreateFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createFile", org.apache.thrift.protocol.TMessageType.CALL, 0));
createFile_args args = new createFile_args();
args.setPath(path);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public CreateFileTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_createFile();
}
}
public void free(String path, boolean recursive, FreeTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
free_call method_call = new free_call(path, recursive, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class free_call extends org.apache.thrift.async.TAsyncMethodCall {
private String path;
private boolean recursive;
private FreeTOptions options;
public free_call(String path, boolean recursive, FreeTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.recursive = recursive;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("free", org.apache.thrift.protocol.TMessageType.CALL, 0));
free_args args = new free_args();
args.setPath(path);
args.setRecursive(recursive);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public FreeTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_free();
}
}
public void getStatus(String path, GetStatusTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getStatus_call method_call = new getStatus_call(path, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
private String path;
private GetStatusTOptions options;
public getStatus_call(String path, GetStatusTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
getStatus_args args = new getStatus_args();
args.setPath(path);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public GetStatusTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getStatus();
}
}
public void getNewBlockIdForFile(String path, GetNewBlockIdForFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getNewBlockIdForFile_call method_call = new getNewBlockIdForFile_call(path, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getNewBlockIdForFile_call extends org.apache.thrift.async.TAsyncMethodCall {
private String path;
private GetNewBlockIdForFileTOptions options;
public getNewBlockIdForFile_call(String path, GetNewBlockIdForFileTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNewBlockIdForFile", org.apache.thrift.protocol.TMessageType.CALL, 0));
getNewBlockIdForFile_args args = new getNewBlockIdForFile_args();
args.setPath(path);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public GetNewBlockIdForFileTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getNewBlockIdForFile();
}
}
public void listStatus(String path, ListStatusTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
listStatus_call method_call = new listStatus_call(path, options, 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;
private ListStatusTOptions options;
public listStatus_call(String path, ListStatusTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
listStatus_args args = new listStatus_args();
args.setPath(path);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public ListStatusTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_listStatus();
}
}
public void loadMetadata(String ufsPath, boolean recursive, LoadMetadataTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
loadMetadata_call method_call = new loadMetadata_call(ufsPath, recursive, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class loadMetadata_call extends org.apache.thrift.async.TAsyncMethodCall {
private String ufsPath;
private boolean recursive;
private LoadMetadataTOptions options;
public loadMetadata_call(String ufsPath, boolean recursive, LoadMetadataTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.ufsPath = ufsPath;
this.recursive = recursive;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("loadMetadata", org.apache.thrift.protocol.TMessageType.CALL, 0));
loadMetadata_args args = new loadMetadata_args();
args.setUfsPath(ufsPath);
args.setRecursive(recursive);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public LoadMetadataTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_loadMetadata();
}
}
public void mount(String alluxioPath, String ufsPath, MountTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
mount_call method_call = new mount_call(alluxioPath, ufsPath, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class mount_call extends org.apache.thrift.async.TAsyncMethodCall {
private String alluxioPath;
private String ufsPath;
private MountTOptions options;
public mount_call(String alluxioPath, String ufsPath, MountTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.alluxioPath = alluxioPath;
this.ufsPath = ufsPath;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mount", org.apache.thrift.protocol.TMessageType.CALL, 0));
mount_args args = new mount_args();
args.setAlluxioPath(alluxioPath);
args.setUfsPath(ufsPath);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public MountTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_mount();
}
}
public void remove(String path, boolean recursive, DeleteTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
remove_call method_call = new remove_call(path, recursive, options, 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 DeleteTOptions options;
public remove_call(String path, boolean recursive, DeleteTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.recursive = recursive;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove", org.apache.thrift.protocol.TMessageType.CALL, 0));
remove_args args = new remove_args();
args.setPath(path);
args.setRecursive(recursive);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public DeleteTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_remove();
}
}
public void rename(String path, String dstPath, RenameTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
rename_call method_call = new rename_call(path, dstPath, options, 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 path;
private String dstPath;
private RenameTOptions options;
public rename_call(String path, String dstPath, RenameTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.dstPath = dstPath;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rename", org.apache.thrift.protocol.TMessageType.CALL, 0));
rename_args args = new rename_args();
args.setPath(path);
args.setDstPath(dstPath);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public RenameTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_rename();
}
}
public void setAttribute(String path, SetAttributeTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
setAttribute_call method_call = new setAttribute_call(path, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class setAttribute_call extends org.apache.thrift.async.TAsyncMethodCall {
private String path;
private SetAttributeTOptions options;
public setAttribute_call(String path, SetAttributeTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setAttribute", org.apache.thrift.protocol.TMessageType.CALL, 0));
setAttribute_args args = new setAttribute_args();
args.setPath(path);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public SetAttributeTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_setAttribute();
}
}
public void scheduleAsyncPersistence(String path, ScheduleAsyncPersistenceTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
scheduleAsyncPersistence_call method_call = new scheduleAsyncPersistence_call(path, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scheduleAsyncPersistence_call extends org.apache.thrift.async.TAsyncMethodCall {
private String path;
private ScheduleAsyncPersistenceTOptions options;
public scheduleAsyncPersistence_call(String path, ScheduleAsyncPersistenceTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.path = path;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scheduleAsyncPersistence", org.apache.thrift.protocol.TMessageType.CALL, 0));
scheduleAsyncPersistence_args args = new scheduleAsyncPersistence_args();
args.setPath(path);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public ScheduleAsyncPersistenceTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_scheduleAsyncPersistence();
}
}
public void unmount(String alluxioPath, UnmountTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
unmount_call method_call = new unmount_call(alluxioPath, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class unmount_call extends org.apache.thrift.async.TAsyncMethodCall {
private String alluxioPath;
private UnmountTOptions options;
public unmount_call(String alluxioPath, UnmountTOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.alluxioPath = alluxioPath;
this.options = options;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unmount", org.apache.thrift.protocol.TMessageType.CALL, 0));
unmount_args args = new unmount_args();
args.setAlluxioPath(alluxioPath);
args.setOptions(options);
args.write(prot);
prot.writeMessageEnd();
}
public UnmountTResponse getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_unmount();
}
}
}
public static class Processor<I extends Iface> extends alluxio.thrift.AlluxioService.Processor<I> implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("checkConsistency", new checkConsistency());
processMap.put("completeFile", new completeFile());
processMap.put("createDirectory", new createDirectory());
processMap.put("createFile", new createFile());
processMap.put("free", new free());
processMap.put("getStatus", new getStatus());
processMap.put("getNewBlockIdForFile", new getNewBlockIdForFile());
processMap.put("listStatus", new listStatus());
processMap.put("loadMetadata", new loadMetadata());
processMap.put("mount", new mount());
processMap.put("remove", new remove());
processMap.put("rename", new rename());
processMap.put("setAttribute", new setAttribute());
processMap.put("scheduleAsyncPersistence", new scheduleAsyncPersistence());
processMap.put("unmount", new unmount());
return processMap;
}
public static class checkConsistency<I extends Iface> extends org.apache.thrift.ProcessFunction<I, checkConsistency_args> {
public checkConsistency() {
super("checkConsistency");
}
public checkConsistency_args getEmptyArgsInstance() {
return new checkConsistency_args();
}
protected boolean isOneway() {
return false;
}
public checkConsistency_result getResult(I iface, checkConsistency_args args) throws org.apache.thrift.TException {
checkConsistency_result result = new checkConsistency_result();
try {
result.success = iface.checkConsistency(args.path, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class completeFile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, completeFile_args> {
public completeFile() {
super("completeFile");
}
public completeFile_args getEmptyArgsInstance() {
return new completeFile_args();
}
protected boolean isOneway() {
return false;
}
public completeFile_result getResult(I iface, completeFile_args args) throws org.apache.thrift.TException {
completeFile_result result = new completeFile_result();
try {
result.success = iface.completeFile(args.path, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class createDirectory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createDirectory_args> {
public createDirectory() {
super("createDirectory");
}
public createDirectory_args getEmptyArgsInstance() {
return new createDirectory_args();
}
protected boolean isOneway() {
return false;
}
public createDirectory_result getResult(I iface, createDirectory_args args) throws org.apache.thrift.TException {
createDirectory_result result = new createDirectory_result();
try {
result.success = iface.createDirectory(args.path, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class createFile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createFile_args> {
public createFile() {
super("createFile");
}
public createFile_args getEmptyArgsInstance() {
return new createFile_args();
}
protected boolean isOneway() {
return false;
}
public createFile_result getResult(I iface, createFile_args args) throws org.apache.thrift.TException {
createFile_result result = new createFile_result();
try {
result.success = iface.createFile(args.path, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class free<I extends Iface> extends org.apache.thrift.ProcessFunction<I, free_args> {
public free() {
super("free");
}
public free_args getEmptyArgsInstance() {
return new free_args();
}
protected boolean isOneway() {
return false;
}
public free_result getResult(I iface, free_args args) throws org.apache.thrift.TException {
free_result result = new free_result();
try {
result.success = iface.free(args.path, args.recursive, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class getStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getStatus_args> {
public getStatus() {
super("getStatus");
}
public getStatus_args getEmptyArgsInstance() {
return new getStatus_args();
}
protected boolean isOneway() {
return false;
}
public getStatus_result getResult(I iface, getStatus_args args) throws org.apache.thrift.TException {
getStatus_result result = new getStatus_result();
try {
result.success = iface.getStatus(args.path, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class getNewBlockIdForFile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNewBlockIdForFile_args> {
public getNewBlockIdForFile() {
super("getNewBlockIdForFile");
}
public getNewBlockIdForFile_args getEmptyArgsInstance() {
return new getNewBlockIdForFile_args();
}
protected boolean isOneway() {
return false;
}
public getNewBlockIdForFile_result getResult(I iface, getNewBlockIdForFile_args args) throws org.apache.thrift.TException {
getNewBlockIdForFile_result result = new getNewBlockIdForFile_result();
try {
result.success = iface.getNewBlockIdForFile(args.path, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class listStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listStatus_args> {
public listStatus() {
super("listStatus");
}
public listStatus_args getEmptyArgsInstance() {
return new listStatus_args();
}
protected boolean isOneway() {
return false;
}
public 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, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class loadMetadata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, loadMetadata_args> {
public loadMetadata() {
super("loadMetadata");
}
public loadMetadata_args getEmptyArgsInstance() {
return new loadMetadata_args();
}
protected boolean isOneway() {
return false;
}
public loadMetadata_result getResult(I iface, loadMetadata_args args) throws org.apache.thrift.TException {
loadMetadata_result result = new loadMetadata_result();
try {
result.success = iface.loadMetadata(args.ufsPath, args.recursive, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class mount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, mount_args> {
public mount() {
super("mount");
}
public mount_args getEmptyArgsInstance() {
return new mount_args();
}
protected boolean isOneway() {
return false;
}
public mount_result getResult(I iface, mount_args args) throws org.apache.thrift.TException {
mount_result result = new mount_result();
try {
result.success = iface.mount(args.alluxioPath, args.ufsPath, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class remove<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remove_args> {
public remove() {
super("remove");
}
public remove_args getEmptyArgsInstance() {
return new remove_args();
}
protected boolean isOneway() {
return false;
}
public 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.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class rename<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rename_args> {
public rename() {
super("rename");
}
public rename_args getEmptyArgsInstance() {
return new rename_args();
}
protected boolean isOneway() {
return false;
}
public 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.path, args.dstPath, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class setAttribute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setAttribute_args> {
public setAttribute() {
super("setAttribute");
}
public setAttribute_args getEmptyArgsInstance() {
return new setAttribute_args();
}
protected boolean isOneway() {
return false;
}
public setAttribute_result getResult(I iface, setAttribute_args args) throws org.apache.thrift.TException {
setAttribute_result result = new setAttribute_result();
try {
result.success = iface.setAttribute(args.path, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class scheduleAsyncPersistence<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scheduleAsyncPersistence_args> {
public scheduleAsyncPersistence() {
super("scheduleAsyncPersistence");
}
public scheduleAsyncPersistence_args getEmptyArgsInstance() {
return new scheduleAsyncPersistence_args();
}
protected boolean isOneway() {
return false;
}
public scheduleAsyncPersistence_result getResult(I iface, scheduleAsyncPersistence_args args) throws org.apache.thrift.TException {
scheduleAsyncPersistence_result result = new scheduleAsyncPersistence_result();
try {
result.success = iface.scheduleAsyncPersistence(args.path, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class unmount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unmount_args> {
public unmount() {
super("unmount");
}
public unmount_args getEmptyArgsInstance() {
return new unmount_args();
}
protected boolean isOneway() {
return false;
}
public unmount_result getResult(I iface, unmount_args args) throws org.apache.thrift.TException {
unmount_result result = new unmount_result();
try {
result.success = iface.unmount(args.alluxioPath, args.options);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends alluxio.thrift.AlluxioService.AsyncProcessor<I> {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("checkConsistency", new checkConsistency());
processMap.put("completeFile", new completeFile());
processMap.put("createDirectory", new createDirectory());
processMap.put("createFile", new createFile());
processMap.put("free", new free());
processMap.put("getStatus", new getStatus());
processMap.put("getNewBlockIdForFile", new getNewBlockIdForFile());
processMap.put("listStatus", new listStatus());
processMap.put("loadMetadata", new loadMetadata());
processMap.put("mount", new mount());
processMap.put("remove", new remove());
processMap.put("rename", new rename());
processMap.put("setAttribute", new setAttribute());
processMap.put("scheduleAsyncPersistence", new scheduleAsyncPersistence());
processMap.put("unmount", new unmount());
return processMap;
}
public static class checkConsistency<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, checkConsistency_args, CheckConsistencyTResponse> {
public checkConsistency() {
super("checkConsistency");
}
public checkConsistency_args getEmptyArgsInstance() {
return new checkConsistency_args();
}
public AsyncMethodCallback<CheckConsistencyTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<CheckConsistencyTResponse>() {
public void onComplete(CheckConsistencyTResponse o) {
checkConsistency_result result = new checkConsistency_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
checkConsistency_result result = new checkConsistency_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, checkConsistency_args args, org.apache.thrift.async.AsyncMethodCallback<CheckConsistencyTResponse> resultHandler) throws TException {
iface.checkConsistency(args.path, args.options,resultHandler);
}
}
public static class completeFile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, completeFile_args, CompleteFileTResponse> {
public completeFile() {
super("completeFile");
}
public completeFile_args getEmptyArgsInstance() {
return new completeFile_args();
}
public AsyncMethodCallback<CompleteFileTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<CompleteFileTResponse>() {
public void onComplete(CompleteFileTResponse o) {
completeFile_result result = new completeFile_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
completeFile_result result = new completeFile_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, completeFile_args args, org.apache.thrift.async.AsyncMethodCallback<CompleteFileTResponse> resultHandler) throws TException {
iface.completeFile(args.path, args.options,resultHandler);
}
}
public static class createDirectory<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createDirectory_args, CreateDirectoryTResponse> {
public createDirectory() {
super("createDirectory");
}
public createDirectory_args getEmptyArgsInstance() {
return new createDirectory_args();
}
public AsyncMethodCallback<CreateDirectoryTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<CreateDirectoryTResponse>() {
public void onComplete(CreateDirectoryTResponse o) {
createDirectory_result result = new createDirectory_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
createDirectory_result result = new createDirectory_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, createDirectory_args args, org.apache.thrift.async.AsyncMethodCallback<CreateDirectoryTResponse> resultHandler) throws TException {
iface.createDirectory(args.path, args.options,resultHandler);
}
}
public static class createFile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createFile_args, CreateFileTResponse> {
public createFile() {
super("createFile");
}
public createFile_args getEmptyArgsInstance() {
return new createFile_args();
}
public AsyncMethodCallback<CreateFileTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<CreateFileTResponse>() {
public void onComplete(CreateFileTResponse o) {
createFile_result result = new createFile_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
createFile_result result = new createFile_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, createFile_args args, org.apache.thrift.async.AsyncMethodCallback<CreateFileTResponse> resultHandler) throws TException {
iface.createFile(args.path, args.options,resultHandler);
}
}
public static class free<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, free_args, FreeTResponse> {
public free() {
super("free");
}
public free_args getEmptyArgsInstance() {
return new free_args();
}
public AsyncMethodCallback<FreeTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<FreeTResponse>() {
public void onComplete(FreeTResponse o) {
free_result result = new free_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
free_result result = new free_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, free_args args, org.apache.thrift.async.AsyncMethodCallback<FreeTResponse> resultHandler) throws TException {
iface.free(args.path, args.recursive, args.options,resultHandler);
}
}
public static class getStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getStatus_args, GetStatusTResponse> {
public getStatus() {
super("getStatus");
}
public getStatus_args getEmptyArgsInstance() {
return new getStatus_args();
}
public AsyncMethodCallback<GetStatusTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<GetStatusTResponse>() {
public void onComplete(GetStatusTResponse o) {
getStatus_result result = new getStatus_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
getStatus_result result = new getStatus_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getStatus_args args, org.apache.thrift.async.AsyncMethodCallback<GetStatusTResponse> resultHandler) throws TException {
iface.getStatus(args.path, args.options,resultHandler);
}
}
public static class getNewBlockIdForFile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getNewBlockIdForFile_args, GetNewBlockIdForFileTResponse> {
public getNewBlockIdForFile() {
super("getNewBlockIdForFile");
}
public getNewBlockIdForFile_args getEmptyArgsInstance() {
return new getNewBlockIdForFile_args();
}
public AsyncMethodCallback<GetNewBlockIdForFileTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<GetNewBlockIdForFileTResponse>() {
public void onComplete(GetNewBlockIdForFileTResponse o) {
getNewBlockIdForFile_result result = new getNewBlockIdForFile_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
getNewBlockIdForFile_result result = new getNewBlockIdForFile_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getNewBlockIdForFile_args args, org.apache.thrift.async.AsyncMethodCallback<GetNewBlockIdForFileTResponse> resultHandler) throws TException {
iface.getNewBlockIdForFile(args.path, args.options,resultHandler);
}
}
public static class listStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listStatus_args, ListStatusTResponse> {
public listStatus() {
super("listStatus");
}
public listStatus_args getEmptyArgsInstance() {
return new listStatus_args();
}
public AsyncMethodCallback<ListStatusTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<ListStatusTResponse>() {
public void onComplete(ListStatusTResponse o) {
listStatus_result result = new listStatus_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
listStatus_result result = new listStatus_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, listStatus_args args, org.apache.thrift.async.AsyncMethodCallback<ListStatusTResponse> resultHandler) throws TException {
iface.listStatus(args.path, args.options,resultHandler);
}
}
public static class loadMetadata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, loadMetadata_args, LoadMetadataTResponse> {
public loadMetadata() {
super("loadMetadata");
}
public loadMetadata_args getEmptyArgsInstance() {
return new loadMetadata_args();
}
public AsyncMethodCallback<LoadMetadataTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<LoadMetadataTResponse>() {
public void onComplete(LoadMetadataTResponse o) {
loadMetadata_result result = new loadMetadata_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
loadMetadata_result result = new loadMetadata_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, loadMetadata_args args, org.apache.thrift.async.AsyncMethodCallback<LoadMetadataTResponse> resultHandler) throws TException {
iface.loadMetadata(args.ufsPath, args.recursive, args.options,resultHandler);
}
}
public static class mount<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, mount_args, MountTResponse> {
public mount() {
super("mount");
}
public mount_args getEmptyArgsInstance() {
return new mount_args();
}
public AsyncMethodCallback<MountTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<MountTResponse>() {
public void onComplete(MountTResponse o) {
mount_result result = new mount_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
mount_result result = new mount_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, mount_args args, org.apache.thrift.async.AsyncMethodCallback<MountTResponse> resultHandler) throws TException {
iface.mount(args.alluxioPath, args.ufsPath, args.options,resultHandler);
}
}
public static class remove<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, remove_args, DeleteTResponse> {
public remove() {
super("remove");
}
public remove_args getEmptyArgsInstance() {
return new remove_args();
}
public AsyncMethodCallback<DeleteTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<DeleteTResponse>() {
public void onComplete(DeleteTResponse o) {
remove_result result = new remove_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
remove_result result = new remove_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, remove_args args, org.apache.thrift.async.AsyncMethodCallback<DeleteTResponse> resultHandler) throws TException {
iface.remove(args.path, args.recursive, args.options,resultHandler);
}
}
public static class rename<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, rename_args, RenameTResponse> {
public rename() {
super("rename");
}
public rename_args getEmptyArgsInstance() {
return new rename_args();
}
public AsyncMethodCallback<RenameTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<RenameTResponse>() {
public void onComplete(RenameTResponse o) {
rename_result result = new rename_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
rename_result result = new rename_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, rename_args args, org.apache.thrift.async.AsyncMethodCallback<RenameTResponse> resultHandler) throws TException {
iface.rename(args.path, args.dstPath, args.options,resultHandler);
}
}
public static class setAttribute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setAttribute_args, SetAttributeTResponse> {
public setAttribute() {
super("setAttribute");
}
public setAttribute_args getEmptyArgsInstance() {
return new setAttribute_args();
}
public AsyncMethodCallback<SetAttributeTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<SetAttributeTResponse>() {
public void onComplete(SetAttributeTResponse o) {
setAttribute_result result = new setAttribute_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
setAttribute_result result = new setAttribute_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, setAttribute_args args, org.apache.thrift.async.AsyncMethodCallback<SetAttributeTResponse> resultHandler) throws TException {
iface.setAttribute(args.path, args.options,resultHandler);
}
}
public static class scheduleAsyncPersistence<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, scheduleAsyncPersistence_args, ScheduleAsyncPersistenceTResponse> {
public scheduleAsyncPersistence() {
super("scheduleAsyncPersistence");
}
public scheduleAsyncPersistence_args getEmptyArgsInstance() {
return new scheduleAsyncPersistence_args();
}
public AsyncMethodCallback<ScheduleAsyncPersistenceTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<ScheduleAsyncPersistenceTResponse>() {
public void onComplete(ScheduleAsyncPersistenceTResponse o) {
scheduleAsyncPersistence_result result = new scheduleAsyncPersistence_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
scheduleAsyncPersistence_result result = new scheduleAsyncPersistence_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, scheduleAsyncPersistence_args args, org.apache.thrift.async.AsyncMethodCallback<ScheduleAsyncPersistenceTResponse> resultHandler) throws TException {
iface.scheduleAsyncPersistence(args.path, args.options,resultHandler);
}
}
public static class unmount<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unmount_args, UnmountTResponse> {
public unmount() {
super("unmount");
}
public unmount_args getEmptyArgsInstance() {
return new unmount_args();
}
public AsyncMethodCallback<UnmountTResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<UnmountTResponse>() {
public void onComplete(UnmountTResponse o) {
unmount_result result = new unmount_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
unmount_result result = new unmount_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, unmount_args args, org.apache.thrift.async.AsyncMethodCallback<UnmountTResponse> resultHandler) throws TException {
iface.unmount(args.alluxioPath, args.options,resultHandler);
}
}
}
public static class checkConsistency_args implements org.apache.thrift.TBase<checkConsistency_args, checkConsistency_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkConsistency_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkConsistency_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new checkConsistency_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new checkConsistency_argsTupleSchemeFactory());
}
private String path; // required
private CheckConsistencyTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the root of the subtree to check
*/
PATH((short)1, "path"),
/**
* the method options
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CheckConsistencyTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkConsistency_args.class, metaDataMap);
}
public checkConsistency_args() {
}
public checkConsistency_args(
String path,
CheckConsistencyTOptions options)
{
this();
this.path = path;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public checkConsistency_args(checkConsistency_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetOptions()) {
this.options = new CheckConsistencyTOptions(other.options);
}
}
public checkConsistency_args deepCopy() {
return new checkConsistency_args(this);
}
@Override
public void clear() {
this.path = null;
this.options = null;
}
/**
* the root of the subtree to check
*/
public String getPath() {
return this.path;
}
/**
* the root of the subtree to check
*/
public checkConsistency_args setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
/**
* the method options
*/
public CheckConsistencyTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public checkConsistency_args setOptions(CheckConsistencyTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((CheckConsistencyTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof checkConsistency_args)
return this.equals((checkConsistency_args)that);
return false;
}
public boolean equals(checkConsistency_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(checkConsistency_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("checkConsistency_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class checkConsistency_argsStandardSchemeFactory implements SchemeFactory {
public checkConsistency_argsStandardScheme getScheme() {
return new checkConsistency_argsStandardScheme();
}
}
private static class checkConsistency_argsStandardScheme extends StandardScheme<checkConsistency_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkConsistency_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new CheckConsistencyTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, checkConsistency_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class checkConsistency_argsTupleSchemeFactory implements SchemeFactory {
public checkConsistency_argsTupleScheme getScheme() {
return new checkConsistency_argsTupleScheme();
}
}
private static class checkConsistency_argsTupleScheme extends TupleScheme<checkConsistency_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkConsistency_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkConsistency_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new CheckConsistencyTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class checkConsistency_result implements org.apache.thrift.TBase<checkConsistency_result, checkConsistency_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkConsistency_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkConsistency_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new checkConsistency_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new checkConsistency_resultTupleSchemeFactory());
}
private CheckConsistencyTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CheckConsistencyTResponse.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(checkConsistency_result.class, metaDataMap);
}
public checkConsistency_result() {
}
public checkConsistency_result(
CheckConsistencyTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public checkConsistency_result(checkConsistency_result other) {
if (other.isSetSuccess()) {
this.success = new CheckConsistencyTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public checkConsistency_result deepCopy() {
return new checkConsistency_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public CheckConsistencyTResponse getSuccess() {
return this.success;
}
public checkConsistency_result setSuccess(CheckConsistencyTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public checkConsistency_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((CheckConsistencyTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof checkConsistency_result)
return this.equals((checkConsistency_result)that);
return false;
}
public boolean equals(checkConsistency_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(checkConsistency_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("checkConsistency_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class checkConsistency_resultStandardSchemeFactory implements SchemeFactory {
public checkConsistency_resultStandardScheme getScheme() {
return new checkConsistency_resultStandardScheme();
}
}
private static class checkConsistency_resultStandardScheme extends StandardScheme<checkConsistency_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkConsistency_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new CheckConsistencyTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, checkConsistency_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class checkConsistency_resultTupleSchemeFactory implements SchemeFactory {
public checkConsistency_resultTupleScheme getScheme() {
return new checkConsistency_resultTupleScheme();
}
}
private static class checkConsistency_resultTupleScheme extends TupleScheme<checkConsistency_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkConsistency_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkConsistency_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new CheckConsistencyTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class completeFile_args implements org.apache.thrift.TBase<completeFile_args, completeFile_args._Fields>, java.io.Serializable, Cloneable, Comparable<completeFile_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("completeFile_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new completeFile_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new completeFile_argsTupleSchemeFactory());
}
private String path; // required
private CompleteFileTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the file
*/
PATH((short)1, "path"),
/**
* the method options
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompleteFileTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(completeFile_args.class, metaDataMap);
}
public completeFile_args() {
}
public completeFile_args(
String path,
CompleteFileTOptions options)
{
this();
this.path = path;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public completeFile_args(completeFile_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetOptions()) {
this.options = new CompleteFileTOptions(other.options);
}
}
public completeFile_args deepCopy() {
return new completeFile_args(this);
}
@Override
public void clear() {
this.path = null;
this.options = null;
}
/**
* the path of the file
*/
public String getPath() {
return this.path;
}
/**
* the path of the file
*/
public completeFile_args setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
/**
* the method options
*/
public CompleteFileTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public completeFile_args setOptions(CompleteFileTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((CompleteFileTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof completeFile_args)
return this.equals((completeFile_args)that);
return false;
}
public boolean equals(completeFile_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(completeFile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("completeFile_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class completeFile_argsStandardSchemeFactory implements SchemeFactory {
public completeFile_argsStandardScheme getScheme() {
return new completeFile_argsStandardScheme();
}
}
private static class completeFile_argsStandardScheme extends StandardScheme<completeFile_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new CompleteFileTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, completeFile_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class completeFile_argsTupleSchemeFactory implements SchemeFactory {
public completeFile_argsTupleScheme getScheme() {
return new completeFile_argsTupleScheme();
}
}
private static class completeFile_argsTupleScheme extends TupleScheme<completeFile_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, completeFile_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, completeFile_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new CompleteFileTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class completeFile_result implements org.apache.thrift.TBase<completeFile_result, completeFile_result._Fields>, java.io.Serializable, Cloneable, Comparable<completeFile_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("completeFile_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new completeFile_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new completeFile_resultTupleSchemeFactory());
}
private CompleteFileTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompleteFileTResponse.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(completeFile_result.class, metaDataMap);
}
public completeFile_result() {
}
public completeFile_result(
CompleteFileTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public completeFile_result(completeFile_result other) {
if (other.isSetSuccess()) {
this.success = new CompleteFileTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public completeFile_result deepCopy() {
return new completeFile_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public CompleteFileTResponse getSuccess() {
return this.success;
}
public completeFile_result setSuccess(CompleteFileTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public completeFile_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((CompleteFileTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof completeFile_result)
return this.equals((completeFile_result)that);
return false;
}
public boolean equals(completeFile_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(completeFile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("completeFile_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class completeFile_resultStandardSchemeFactory implements SchemeFactory {
public completeFile_resultStandardScheme getScheme() {
return new completeFile_resultStandardScheme();
}
}
private static class completeFile_resultStandardScheme extends StandardScheme<completeFile_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, completeFile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new CompleteFileTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, completeFile_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class completeFile_resultTupleSchemeFactory implements SchemeFactory {
public completeFile_resultTupleScheme getScheme() {
return new completeFile_resultTupleScheme();
}
}
private static class completeFile_resultTupleScheme extends TupleScheme<completeFile_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, completeFile_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, completeFile_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new CompleteFileTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class createDirectory_args implements org.apache.thrift.TBase<createDirectory_args, createDirectory_args._Fields>, java.io.Serializable, Cloneable, Comparable<createDirectory_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createDirectory_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new createDirectory_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new createDirectory_argsTupleSchemeFactory());
}
private String path; // required
private CreateDirectoryTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the directory
*/
PATH((short)1, "path"),
/**
* the method options
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateDirectoryTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createDirectory_args.class, metaDataMap);
}
public createDirectory_args() {
}
public createDirectory_args(
String path,
CreateDirectoryTOptions options)
{
this();
this.path = path;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createDirectory_args(createDirectory_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetOptions()) {
this.options = new CreateDirectoryTOptions(other.options);
}
}
public createDirectory_args deepCopy() {
return new createDirectory_args(this);
}
@Override
public void clear() {
this.path = null;
this.options = null;
}
/**
* the path of the directory
*/
public String getPath() {
return this.path;
}
/**
* the path of the directory
*/
public createDirectory_args setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
/**
* the method options
*/
public CreateDirectoryTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public createDirectory_args setOptions(CreateDirectoryTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((CreateDirectoryTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createDirectory_args)
return this.equals((createDirectory_args)that);
return false;
}
public boolean equals(createDirectory_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(createDirectory_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("createDirectory_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class createDirectory_argsStandardSchemeFactory implements SchemeFactory {
public createDirectory_argsStandardScheme getScheme() {
return new createDirectory_argsStandardScheme();
}
}
private static class createDirectory_argsStandardScheme extends StandardScheme<createDirectory_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new CreateDirectoryTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createDirectory_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createDirectory_argsTupleSchemeFactory implements SchemeFactory {
public createDirectory_argsTupleScheme getScheme() {
return new createDirectory_argsTupleScheme();
}
}
private static class createDirectory_argsTupleScheme extends TupleScheme<createDirectory_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createDirectory_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createDirectory_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new CreateDirectoryTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class createDirectory_result implements org.apache.thrift.TBase<createDirectory_result, createDirectory_result._Fields>, java.io.Serializable, Cloneable, Comparable<createDirectory_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createDirectory_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new createDirectory_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new createDirectory_resultTupleSchemeFactory());
}
private CreateDirectoryTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateDirectoryTResponse.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(createDirectory_result.class, metaDataMap);
}
public createDirectory_result() {
}
public createDirectory_result(
CreateDirectoryTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createDirectory_result(createDirectory_result other) {
if (other.isSetSuccess()) {
this.success = new CreateDirectoryTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public createDirectory_result deepCopy() {
return new createDirectory_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public CreateDirectoryTResponse getSuccess() {
return this.success;
}
public createDirectory_result setSuccess(CreateDirectoryTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public createDirectory_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((CreateDirectoryTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createDirectory_result)
return this.equals((createDirectory_result)that);
return false;
}
public boolean equals(createDirectory_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(createDirectory_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("createDirectory_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class createDirectory_resultStandardSchemeFactory implements SchemeFactory {
public createDirectory_resultStandardScheme getScheme() {
return new createDirectory_resultStandardScheme();
}
}
private static class createDirectory_resultStandardScheme extends StandardScheme<createDirectory_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, createDirectory_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new CreateDirectoryTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createDirectory_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createDirectory_resultTupleSchemeFactory implements SchemeFactory {
public createDirectory_resultTupleScheme getScheme() {
return new createDirectory_resultTupleScheme();
}
}
private static class createDirectory_resultTupleScheme extends TupleScheme<createDirectory_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createDirectory_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createDirectory_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new CreateDirectoryTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class createFile_args implements org.apache.thrift.TBase<createFile_args, createFile_args._Fields>, java.io.Serializable, Cloneable, Comparable<createFile_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createFile_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new createFile_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new createFile_argsTupleSchemeFactory());
}
private String path; // required
private CreateFileTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the file
*/
PATH((short)1, "path"),
/**
* the options for creating the file
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateFileTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createFile_args.class, metaDataMap);
}
public createFile_args() {
}
public createFile_args(
String path,
CreateFileTOptions options)
{
this();
this.path = path;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createFile_args(createFile_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetOptions()) {
this.options = new CreateFileTOptions(other.options);
}
}
public createFile_args deepCopy() {
return new createFile_args(this);
}
@Override
public void clear() {
this.path = null;
this.options = null;
}
/**
* the path of the file
*/
public String getPath() {
return this.path;
}
/**
* the path of the file
*/
public createFile_args setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
/**
* the options for creating the file
*/
public CreateFileTOptions getOptions() {
return this.options;
}
/**
* the options for creating the file
*/
public createFile_args setOptions(CreateFileTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((CreateFileTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createFile_args)
return this.equals((createFile_args)that);
return false;
}
public boolean equals(createFile_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(createFile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("createFile_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class createFile_argsStandardSchemeFactory implements SchemeFactory {
public createFile_argsStandardScheme getScheme() {
return new createFile_argsStandardScheme();
}
}
private static class createFile_argsStandardScheme extends StandardScheme<createFile_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new CreateFileTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createFile_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createFile_argsTupleSchemeFactory implements SchemeFactory {
public createFile_argsTupleScheme getScheme() {
return new createFile_argsTupleScheme();
}
}
private static class createFile_argsTupleScheme extends TupleScheme<createFile_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createFile_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createFile_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new CreateFileTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class createFile_result implements org.apache.thrift.TBase<createFile_result, createFile_result._Fields>, java.io.Serializable, Cloneable, Comparable<createFile_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createFile_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new createFile_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new createFile_resultTupleSchemeFactory());
}
private CreateFileTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateFileTResponse.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(createFile_result.class, metaDataMap);
}
public createFile_result() {
}
public createFile_result(
CreateFileTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public createFile_result(createFile_result other) {
if (other.isSetSuccess()) {
this.success = new CreateFileTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public createFile_result deepCopy() {
return new createFile_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public CreateFileTResponse getSuccess() {
return this.success;
}
public createFile_result setSuccess(CreateFileTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public createFile_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((CreateFileTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof createFile_result)
return this.equals((createFile_result)that);
return false;
}
public boolean equals(createFile_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(createFile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("createFile_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class createFile_resultStandardSchemeFactory implements SchemeFactory {
public createFile_resultStandardScheme getScheme() {
return new createFile_resultStandardScheme();
}
}
private static class createFile_resultStandardScheme extends StandardScheme<createFile_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, createFile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new CreateFileTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, createFile_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class createFile_resultTupleSchemeFactory implements SchemeFactory {
public createFile_resultTupleScheme getScheme() {
return new createFile_resultTupleScheme();
}
}
private static class createFile_resultTupleScheme extends TupleScheme<createFile_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createFile_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createFile_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new CreateFileTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class free_args implements org.apache.thrift.TBase<free_args, free_args._Fields>, java.io.Serializable, Cloneable, Comparable<free_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("free_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 OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new free_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new free_argsTupleSchemeFactory());
}
private String path; // required
private boolean recursive; // required
private FreeTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the file or directory
*/
PATH((short)1, "path"),
/**
* whether to free recursively
*/
RECURSIVE((short)2, "recursive"),
/**
* the options for freeing a path
*/
OPTIONS((short)3, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // RECURSIVE
return RECURSIVE;
case 3: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __RECURSIVE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FreeTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(free_args.class, metaDataMap);
}
public free_args() {
}
public free_args(
String path,
boolean recursive,
FreeTOptions options)
{
this();
this.path = path;
this.recursive = recursive;
setRecursiveIsSet(true);
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public free_args(free_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetPath()) {
this.path = other.path;
}
this.recursive = other.recursive;
if (other.isSetOptions()) {
this.options = new FreeTOptions(other.options);
}
}
public free_args deepCopy() {
return new free_args(this);
}
@Override
public void clear() {
this.path = null;
setRecursiveIsSet(false);
this.recursive = false;
this.options = null;
}
/**
* the path of the file or directory
*/
public String getPath() {
return this.path;
}
/**
* the path of the file or directory
*/
public free_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;
}
}
/**
* whether to free recursively
*/
public boolean isRecursive() {
return this.recursive;
}
/**
* whether to free recursively
*/
public free_args setRecursive(boolean recursive) {
this.recursive = recursive;
setRecursiveIsSet(true);
return this;
}
public void unsetRecursive() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID);
}
/** Returns true if field recursive is set (has been assigned a value) and false otherwise */
public boolean isSetRecursive() {
return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID);
}
public void setRecursiveIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value);
}
/**
* the options for freeing a path
*/
public FreeTOptions getOptions() {
return this.options;
}
/**
* the options for freeing a path
*/
public free_args setOptions(FreeTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case RECURSIVE:
if (value == null) {
unsetRecursive();
} else {
setRecursive((Boolean)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((FreeTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case RECURSIVE:
return isRecursive();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case RECURSIVE:
return isSetRecursive();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof free_args)
return this.equals((free_args)that);
return false;
}
public boolean equals(free_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_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_recursive = true;
list.add(present_recursive);
if (present_recursive)
list.add(recursive);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(free_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRecursive()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("free_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("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class free_argsStandardSchemeFactory implements SchemeFactory {
public free_argsStandardScheme getScheme() {
return new free_argsStandardScheme();
}
}
private static class free_argsStandardScheme extends StandardScheme<free_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, free_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // RECURSIVE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.recursive = iprot.readBool();
struct.setRecursiveIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new FreeTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, free_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(RECURSIVE_FIELD_DESC);
oprot.writeBool(struct.recursive);
oprot.writeFieldEnd();
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class free_argsTupleSchemeFactory implements SchemeFactory {
public free_argsTupleScheme getScheme() {
return new free_argsTupleScheme();
}
}
private static class free_argsTupleScheme extends TupleScheme<free_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, free_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetRecursive()) {
optionals.set(1);
}
if (struct.isSetOptions()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetRecursive()) {
oprot.writeBool(struct.recursive);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, free_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.recursive = iprot.readBool();
struct.setRecursiveIsSet(true);
}
if (incoming.get(2)) {
struct.options = new FreeTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class free_result implements org.apache.thrift.TBase<free_result, free_result._Fields>, java.io.Serializable, Cloneable, Comparable<free_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("free_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new free_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new free_resultTupleSchemeFactory());
}
private FreeTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FreeTResponse.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(free_result.class, metaDataMap);
}
public free_result() {
}
public free_result(
FreeTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public free_result(free_result other) {
if (other.isSetSuccess()) {
this.success = new FreeTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public free_result deepCopy() {
return new free_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public FreeTResponse getSuccess() {
return this.success;
}
public free_result setSuccess(FreeTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public free_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((FreeTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof free_result)
return this.equals((free_result)that);
return false;
}
public boolean equals(free_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(free_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("free_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class free_resultStandardSchemeFactory implements SchemeFactory {
public free_resultStandardScheme getScheme() {
return new free_resultStandardScheme();
}
}
private static class free_resultStandardScheme extends StandardScheme<free_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, free_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new FreeTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, free_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class free_resultTupleSchemeFactory implements SchemeFactory {
public free_resultTupleScheme getScheme() {
return new free_resultTupleScheme();
}
}
private static class free_resultTupleScheme extends TupleScheme<free_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, free_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, free_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new FreeTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class getStatus_args implements org.apache.thrift.TBase<getStatus_args, getStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getStatus_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStatus_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getStatus_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getStatus_argsTupleSchemeFactory());
}
private String path; // required
private GetStatusTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the file or directory
*/
PATH((short)1, "path"),
/**
* the method options
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetStatusTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_args.class, metaDataMap);
}
public getStatus_args() {
}
public getStatus_args(
String path,
GetStatusTOptions options)
{
this();
this.path = path;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getStatus_args(getStatus_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetOptions()) {
this.options = new GetStatusTOptions(other.options);
}
}
public getStatus_args deepCopy() {
return new getStatus_args(this);
}
@Override
public void clear() {
this.path = null;
this.options = null;
}
/**
* the path of the file or directory
*/
public String getPath() {
return this.path;
}
/**
* the path of the file or directory
*/
public getStatus_args setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
/**
* the method options
*/
public GetStatusTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public getStatus_args setOptions(GetStatusTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((GetStatusTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getStatus_args)
return this.equals((getStatus_args)that);
return false;
}
public boolean equals(getStatus_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(getStatus_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getStatus_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getStatus_argsStandardSchemeFactory implements SchemeFactory {
public getStatus_argsStandardScheme getScheme() {
return new getStatus_argsStandardScheme();
}
}
private static class getStatus_argsStandardScheme extends StandardScheme<getStatus_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new GetStatusTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getStatus_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getStatus_argsTupleSchemeFactory implements SchemeFactory {
public getStatus_argsTupleScheme getScheme() {
return new getStatus_argsTupleScheme();
}
}
private static class getStatus_argsTupleScheme extends TupleScheme<getStatus_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new GetStatusTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class getStatus_result implements org.apache.thrift.TBase<getStatus_result, getStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getStatus_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStatus_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getStatus_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getStatus_resultTupleSchemeFactory());
}
private GetStatusTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetStatusTResponse.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(getStatus_result.class, metaDataMap);
}
public getStatus_result() {
}
public getStatus_result(
GetStatusTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getStatus_result(getStatus_result other) {
if (other.isSetSuccess()) {
this.success = new GetStatusTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public getStatus_result deepCopy() {
return new getStatus_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public GetStatusTResponse getSuccess() {
return this.success;
}
public getStatus_result setSuccess(GetStatusTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public getStatus_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((GetStatusTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getStatus_result)
return this.equals((getStatus_result)that);
return false;
}
public boolean equals(getStatus_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(getStatus_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getStatus_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getStatus_resultStandardSchemeFactory implements SchemeFactory {
public getStatus_resultStandardScheme getScheme() {
return new getStatus_resultStandardScheme();
}
}
private static class getStatus_resultStandardScheme extends StandardScheme<getStatus_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new GetStatusTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getStatus_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getStatus_resultTupleSchemeFactory implements SchemeFactory {
public getStatus_resultTupleScheme getScheme() {
return new getStatus_resultTupleScheme();
}
}
private static class getStatus_resultTupleScheme extends TupleScheme<getStatus_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new GetStatusTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class getNewBlockIdForFile_args implements org.apache.thrift.TBase<getNewBlockIdForFile_args, getNewBlockIdForFile_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNewBlockIdForFile_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNewBlockIdForFile_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getNewBlockIdForFile_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getNewBlockIdForFile_argsTupleSchemeFactory());
}
private String path; // required
private GetNewBlockIdForFileTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the file
*/
PATH((short)1, "path"),
/**
* the method options
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetNewBlockIdForFileTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNewBlockIdForFile_args.class, metaDataMap);
}
public getNewBlockIdForFile_args() {
}
public getNewBlockIdForFile_args(
String path,
GetNewBlockIdForFileTOptions options)
{
this();
this.path = path;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getNewBlockIdForFile_args(getNewBlockIdForFile_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetOptions()) {
this.options = new GetNewBlockIdForFileTOptions(other.options);
}
}
public getNewBlockIdForFile_args deepCopy() {
return new getNewBlockIdForFile_args(this);
}
@Override
public void clear() {
this.path = null;
this.options = null;
}
/**
* the path of the file
*/
public String getPath() {
return this.path;
}
/**
* the path of the file
*/
public getNewBlockIdForFile_args setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
/**
* the method options
*/
public GetNewBlockIdForFileTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public getNewBlockIdForFile_args setOptions(GetNewBlockIdForFileTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((GetNewBlockIdForFileTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getNewBlockIdForFile_args)
return this.equals((getNewBlockIdForFile_args)that);
return false;
}
public boolean equals(getNewBlockIdForFile_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(getNewBlockIdForFile_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getNewBlockIdForFile_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getNewBlockIdForFile_argsStandardSchemeFactory implements SchemeFactory {
public getNewBlockIdForFile_argsStandardScheme getScheme() {
return new getNewBlockIdForFile_argsStandardScheme();
}
}
private static class getNewBlockIdForFile_argsStandardScheme extends StandardScheme<getNewBlockIdForFile_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new GetNewBlockIdForFileTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getNewBlockIdForFile_argsTupleSchemeFactory implements SchemeFactory {
public getNewBlockIdForFile_argsTupleScheme getScheme() {
return new getNewBlockIdForFile_argsTupleScheme();
}
}
private static class getNewBlockIdForFile_argsTupleScheme extends TupleScheme<getNewBlockIdForFile_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new GetNewBlockIdForFileTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class getNewBlockIdForFile_result implements org.apache.thrift.TBase<getNewBlockIdForFile_result, getNewBlockIdForFile_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNewBlockIdForFile_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNewBlockIdForFile_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getNewBlockIdForFile_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getNewBlockIdForFile_resultTupleSchemeFactory());
}
private GetNewBlockIdForFileTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetNewBlockIdForFileTResponse.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(getNewBlockIdForFile_result.class, metaDataMap);
}
public getNewBlockIdForFile_result() {
}
public getNewBlockIdForFile_result(
GetNewBlockIdForFileTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getNewBlockIdForFile_result(getNewBlockIdForFile_result other) {
if (other.isSetSuccess()) {
this.success = new GetNewBlockIdForFileTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public getNewBlockIdForFile_result deepCopy() {
return new getNewBlockIdForFile_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public GetNewBlockIdForFileTResponse getSuccess() {
return this.success;
}
public getNewBlockIdForFile_result setSuccess(GetNewBlockIdForFileTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public getNewBlockIdForFile_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((GetNewBlockIdForFileTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getNewBlockIdForFile_result)
return this.equals((getNewBlockIdForFile_result)that);
return false;
}
public boolean equals(getNewBlockIdForFile_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(getNewBlockIdForFile_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getNewBlockIdForFile_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getNewBlockIdForFile_resultStandardSchemeFactory implements SchemeFactory {
public getNewBlockIdForFile_resultStandardScheme getScheme() {
return new getNewBlockIdForFile_resultStandardScheme();
}
}
private static class getNewBlockIdForFile_resultStandardScheme extends StandardScheme<getNewBlockIdForFile_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new GetNewBlockIdForFileTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getNewBlockIdForFile_resultTupleSchemeFactory implements SchemeFactory {
public getNewBlockIdForFile_resultTupleScheme getScheme() {
return new getNewBlockIdForFile_resultTupleScheme();
}
}
private static class getNewBlockIdForFile_resultTupleScheme extends TupleScheme<getNewBlockIdForFile_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getNewBlockIdForFile_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new GetNewBlockIdForFileTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class listStatus_args implements org.apache.thrift.TBase<listStatus_args, listStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<listStatus_args> {
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);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listStatus_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new listStatus_argsTupleSchemeFactory());
}
private String path; // required
private ListStatusTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the file or directory
*/
PATH((short)1, "path"),
/**
* listStatus options
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ListStatusTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listStatus_args.class, metaDataMap);
}
public listStatus_args() {
}
public listStatus_args(
String path,
ListStatusTOptions options)
{
this();
this.path = path;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listStatus_args(listStatus_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetOptions()) {
this.options = new ListStatusTOptions(other.options);
}
}
public listStatus_args deepCopy() {
return new listStatus_args(this);
}
@Override
public void clear() {
this.path = null;
this.options = null;
}
/**
* the path of the file or directory
*/
public String getPath() {
return this.path;
}
/**
* the path of the file or directory
*/
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;
}
}
/**
* listStatus options
*/
public ListStatusTOptions getOptions() {
return this.options;
}
/**
* listStatus options
*/
public listStatus_args setOptions(ListStatusTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((ListStatusTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof 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;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(listStatus_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("listStatus_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class listStatus_argsStandardSchemeFactory implements SchemeFactory {
public listStatus_argsStandardScheme getScheme() {
return new listStatus_argsStandardScheme();
}
}
private static class listStatus_argsStandardScheme extends StandardScheme<listStatus_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, listStatus_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new ListStatusTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, listStatus_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listStatus_argsTupleSchemeFactory implements SchemeFactory {
public listStatus_argsTupleScheme getScheme() {
return new listStatus_argsTupleScheme();
}
}
private static class listStatus_argsTupleScheme extends TupleScheme<listStatus_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, listStatus_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, listStatus_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new ListStatusTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class listStatus_result implements org.apache.thrift.TBase<listStatus_result, listStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<listStatus_result> {
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.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new listStatus_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new listStatus_resultTupleSchemeFactory());
}
private ListStatusTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ListStatusTResponse.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(listStatus_result.class, metaDataMap);
}
public listStatus_result() {
}
public listStatus_result(
ListStatusTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public listStatus_result(listStatus_result other) {
if (other.isSetSuccess()) {
this.success = new ListStatusTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public listStatus_result deepCopy() {
return new listStatus_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public ListStatusTResponse getSuccess() {
return this.success;
}
public listStatus_result setSuccess(ListStatusTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public listStatus_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ListStatusTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof 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;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(listStatus_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("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;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class listStatus_resultStandardSchemeFactory implements SchemeFactory {
public listStatus_resultStandardScheme getScheme() {
return new listStatus_resultStandardScheme();
}
}
private static class listStatus_resultStandardScheme extends StandardScheme<listStatus_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, listStatus_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new ListStatusTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, listStatus_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class listStatus_resultTupleSchemeFactory implements SchemeFactory {
public listStatus_resultTupleScheme getScheme() {
return new listStatus_resultTupleScheme();
}
}
private static class listStatus_resultTupleScheme extends TupleScheme<listStatus_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, listStatus_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, listStatus_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new ListStatusTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class loadMetadata_args implements org.apache.thrift.TBase<loadMetadata_args, loadMetadata_args._Fields>, java.io.Serializable, Cloneable, Comparable<loadMetadata_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("loadMetadata_args");
private static final org.apache.thrift.protocol.TField UFS_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("ufsPath", 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 OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new loadMetadata_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new loadMetadata_argsTupleSchemeFactory());
}
private String ufsPath; // required
private boolean recursive; // required
private LoadMetadataTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the under file system
*/
UFS_PATH((short)1, "ufsPath"),
/**
* whether to load metadata recursively
*/
RECURSIVE((short)2, "recursive"),
/**
* the method options
*/
OPTIONS((short)3, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // UFS_PATH
return UFS_PATH;
case 2: // RECURSIVE
return RECURSIVE;
case 3: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __RECURSIVE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.UFS_PATH, new org.apache.thrift.meta_data.FieldMetaData("ufsPath", 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.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LoadMetadataTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(loadMetadata_args.class, metaDataMap);
}
public loadMetadata_args() {
}
public loadMetadata_args(
String ufsPath,
boolean recursive,
LoadMetadataTOptions options)
{
this();
this.ufsPath = ufsPath;
this.recursive = recursive;
setRecursiveIsSet(true);
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public loadMetadata_args(loadMetadata_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetUfsPath()) {
this.ufsPath = other.ufsPath;
}
this.recursive = other.recursive;
if (other.isSetOptions()) {
this.options = new LoadMetadataTOptions(other.options);
}
}
public loadMetadata_args deepCopy() {
return new loadMetadata_args(this);
}
@Override
public void clear() {
this.ufsPath = null;
setRecursiveIsSet(false);
this.recursive = false;
this.options = null;
}
/**
* the path of the under file system
*/
public String getUfsPath() {
return this.ufsPath;
}
/**
* the path of the under file system
*/
public loadMetadata_args setUfsPath(String ufsPath) {
this.ufsPath = ufsPath;
return this;
}
public void unsetUfsPath() {
this.ufsPath = null;
}
/** Returns true if field ufsPath is set (has been assigned a value) and false otherwise */
public boolean isSetUfsPath() {
return this.ufsPath != null;
}
public void setUfsPathIsSet(boolean value) {
if (!value) {
this.ufsPath = null;
}
}
/**
* whether to load metadata recursively
*/
public boolean isRecursive() {
return this.recursive;
}
/**
* whether to load metadata recursively
*/
public loadMetadata_args setRecursive(boolean recursive) {
this.recursive = recursive;
setRecursiveIsSet(true);
return this;
}
public void unsetRecursive() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID);
}
/** Returns true if field recursive is set (has been assigned a value) and false otherwise */
public boolean isSetRecursive() {
return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID);
}
public void setRecursiveIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value);
}
/**
* the method options
*/
public LoadMetadataTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public loadMetadata_args setOptions(LoadMetadataTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case UFS_PATH:
if (value == null) {
unsetUfsPath();
} else {
setUfsPath((String)value);
}
break;
case RECURSIVE:
if (value == null) {
unsetRecursive();
} else {
setRecursive((Boolean)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((LoadMetadataTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case UFS_PATH:
return getUfsPath();
case RECURSIVE:
return isRecursive();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case UFS_PATH:
return isSetUfsPath();
case RECURSIVE:
return isSetRecursive();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof loadMetadata_args)
return this.equals((loadMetadata_args)that);
return false;
}
public boolean equals(loadMetadata_args that) {
if (that == null)
return false;
boolean this_present_ufsPath = true && this.isSetUfsPath();
boolean that_present_ufsPath = true && that.isSetUfsPath();
if (this_present_ufsPath || that_present_ufsPath) {
if (!(this_present_ufsPath && that_present_ufsPath))
return false;
if (!this.ufsPath.equals(that.ufsPath))
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_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_ufsPath = true && (isSetUfsPath());
list.add(present_ufsPath);
if (present_ufsPath)
list.add(ufsPath);
boolean present_recursive = true;
list.add(present_recursive);
if (present_recursive)
list.add(recursive);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(loadMetadata_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetUfsPath()).compareTo(other.isSetUfsPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUfsPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ufsPath, other.ufsPath);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRecursive()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("loadMetadata_args(");
boolean first = true;
sb.append("ufsPath:");
if (this.ufsPath == null) {
sb.append("null");
} else {
sb.append(this.ufsPath);
}
first = false;
if (!first) sb.append(", ");
sb.append("recursive:");
sb.append(this.recursive);
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class loadMetadata_argsStandardSchemeFactory implements SchemeFactory {
public loadMetadata_argsStandardScheme getScheme() {
return new loadMetadata_argsStandardScheme();
}
}
private static class loadMetadata_argsStandardScheme extends StandardScheme<loadMetadata_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, loadMetadata_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // UFS_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.ufsPath = iprot.readString();
struct.setUfsPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // RECURSIVE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.recursive = iprot.readBool();
struct.setRecursiveIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new LoadMetadataTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, loadMetadata_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.ufsPath != null) {
oprot.writeFieldBegin(UFS_PATH_FIELD_DESC);
oprot.writeString(struct.ufsPath);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(RECURSIVE_FIELD_DESC);
oprot.writeBool(struct.recursive);
oprot.writeFieldEnd();
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class loadMetadata_argsTupleSchemeFactory implements SchemeFactory {
public loadMetadata_argsTupleScheme getScheme() {
return new loadMetadata_argsTupleScheme();
}
}
private static class loadMetadata_argsTupleScheme extends TupleScheme<loadMetadata_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, loadMetadata_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUfsPath()) {
optionals.set(0);
}
if (struct.isSetRecursive()) {
optionals.set(1);
}
if (struct.isSetOptions()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetUfsPath()) {
oprot.writeString(struct.ufsPath);
}
if (struct.isSetRecursive()) {
oprot.writeBool(struct.recursive);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, loadMetadata_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.ufsPath = iprot.readString();
struct.setUfsPathIsSet(true);
}
if (incoming.get(1)) {
struct.recursive = iprot.readBool();
struct.setRecursiveIsSet(true);
}
if (incoming.get(2)) {
struct.options = new LoadMetadataTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class loadMetadata_result implements org.apache.thrift.TBase<loadMetadata_result, loadMetadata_result._Fields>, java.io.Serializable, Cloneable, Comparable<loadMetadata_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("loadMetadata_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new loadMetadata_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new loadMetadata_resultTupleSchemeFactory());
}
private LoadMetadataTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LoadMetadataTResponse.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(loadMetadata_result.class, metaDataMap);
}
public loadMetadata_result() {
}
public loadMetadata_result(
LoadMetadataTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public loadMetadata_result(loadMetadata_result other) {
if (other.isSetSuccess()) {
this.success = new LoadMetadataTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public loadMetadata_result deepCopy() {
return new loadMetadata_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public LoadMetadataTResponse getSuccess() {
return this.success;
}
public loadMetadata_result setSuccess(LoadMetadataTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public loadMetadata_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((LoadMetadataTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof loadMetadata_result)
return this.equals((loadMetadata_result)that);
return false;
}
public boolean equals(loadMetadata_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(loadMetadata_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("loadMetadata_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class loadMetadata_resultStandardSchemeFactory implements SchemeFactory {
public loadMetadata_resultStandardScheme getScheme() {
return new loadMetadata_resultStandardScheme();
}
}
private static class loadMetadata_resultStandardScheme extends StandardScheme<loadMetadata_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, loadMetadata_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new LoadMetadataTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, loadMetadata_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class loadMetadata_resultTupleSchemeFactory implements SchemeFactory {
public loadMetadata_resultTupleScheme getScheme() {
return new loadMetadata_resultTupleScheme();
}
}
private static class loadMetadata_resultTupleScheme extends TupleScheme<loadMetadata_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, loadMetadata_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, loadMetadata_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new LoadMetadataTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class mount_args implements org.apache.thrift.TBase<mount_args, mount_args._Fields>, java.io.Serializable, Cloneable, Comparable<mount_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mount_args");
private static final org.apache.thrift.protocol.TField ALLUXIO_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("alluxioPath", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField UFS_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("ufsPath", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new mount_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new mount_argsTupleSchemeFactory());
}
private String alluxioPath; // required
private String ufsPath; // required
private MountTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of alluxio mount point
*/
ALLUXIO_PATH((short)1, "alluxioPath"),
/**
* the path of the under file system
*/
UFS_PATH((short)2, "ufsPath"),
/**
* the options for creating the mount point
*/
OPTIONS((short)3, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ALLUXIO_PATH
return ALLUXIO_PATH;
case 2: // UFS_PATH
return UFS_PATH;
case 3: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
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.ALLUXIO_PATH, new org.apache.thrift.meta_data.FieldMetaData("alluxioPath", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.UFS_PATH, new org.apache.thrift.meta_data.FieldMetaData("ufsPath", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MountTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mount_args.class, metaDataMap);
}
public mount_args() {
}
public mount_args(
String alluxioPath,
String ufsPath,
MountTOptions options)
{
this();
this.alluxioPath = alluxioPath;
this.ufsPath = ufsPath;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mount_args(mount_args other) {
if (other.isSetAlluxioPath()) {
this.alluxioPath = other.alluxioPath;
}
if (other.isSetUfsPath()) {
this.ufsPath = other.ufsPath;
}
if (other.isSetOptions()) {
this.options = new MountTOptions(other.options);
}
}
public mount_args deepCopy() {
return new mount_args(this);
}
@Override
public void clear() {
this.alluxioPath = null;
this.ufsPath = null;
this.options = null;
}
/**
* the path of alluxio mount point
*/
public String getAlluxioPath() {
return this.alluxioPath;
}
/**
* the path of alluxio mount point
*/
public mount_args setAlluxioPath(String alluxioPath) {
this.alluxioPath = alluxioPath;
return this;
}
public void unsetAlluxioPath() {
this.alluxioPath = null;
}
/** Returns true if field alluxioPath is set (has been assigned a value) and false otherwise */
public boolean isSetAlluxioPath() {
return this.alluxioPath != null;
}
public void setAlluxioPathIsSet(boolean value) {
if (!value) {
this.alluxioPath = null;
}
}
/**
* the path of the under file system
*/
public String getUfsPath() {
return this.ufsPath;
}
/**
* the path of the under file system
*/
public mount_args setUfsPath(String ufsPath) {
this.ufsPath = ufsPath;
return this;
}
public void unsetUfsPath() {
this.ufsPath = null;
}
/** Returns true if field ufsPath is set (has been assigned a value) and false otherwise */
public boolean isSetUfsPath() {
return this.ufsPath != null;
}
public void setUfsPathIsSet(boolean value) {
if (!value) {
this.ufsPath = null;
}
}
/**
* the options for creating the mount point
*/
public MountTOptions getOptions() {
return this.options;
}
/**
* the options for creating the mount point
*/
public mount_args setOptions(MountTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ALLUXIO_PATH:
if (value == null) {
unsetAlluxioPath();
} else {
setAlluxioPath((String)value);
}
break;
case UFS_PATH:
if (value == null) {
unsetUfsPath();
} else {
setUfsPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((MountTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ALLUXIO_PATH:
return getAlluxioPath();
case UFS_PATH:
return getUfsPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case ALLUXIO_PATH:
return isSetAlluxioPath();
case UFS_PATH:
return isSetUfsPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof mount_args)
return this.equals((mount_args)that);
return false;
}
public boolean equals(mount_args that) {
if (that == null)
return false;
boolean this_present_alluxioPath = true && this.isSetAlluxioPath();
boolean that_present_alluxioPath = true && that.isSetAlluxioPath();
if (this_present_alluxioPath || that_present_alluxioPath) {
if (!(this_present_alluxioPath && that_present_alluxioPath))
return false;
if (!this.alluxioPath.equals(that.alluxioPath))
return false;
}
boolean this_present_ufsPath = true && this.isSetUfsPath();
boolean that_present_ufsPath = true && that.isSetUfsPath();
if (this_present_ufsPath || that_present_ufsPath) {
if (!(this_present_ufsPath && that_present_ufsPath))
return false;
if (!this.ufsPath.equals(that.ufsPath))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_alluxioPath = true && (isSetAlluxioPath());
list.add(present_alluxioPath);
if (present_alluxioPath)
list.add(alluxioPath);
boolean present_ufsPath = true && (isSetUfsPath());
list.add(present_ufsPath);
if (present_ufsPath)
list.add(ufsPath);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(mount_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetAlluxioPath()).compareTo(other.isSetAlluxioPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAlluxioPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alluxioPath, other.alluxioPath);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetUfsPath()).compareTo(other.isSetUfsPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUfsPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ufsPath, other.ufsPath);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("mount_args(");
boolean first = true;
sb.append("alluxioPath:");
if (this.alluxioPath == null) {
sb.append("null");
} else {
sb.append(this.alluxioPath);
}
first = false;
if (!first) sb.append(", ");
sb.append("ufsPath:");
if (this.ufsPath == null) {
sb.append("null");
} else {
sb.append(this.ufsPath);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class mount_argsStandardSchemeFactory implements SchemeFactory {
public mount_argsStandardScheme getScheme() {
return new mount_argsStandardScheme();
}
}
private static class mount_argsStandardScheme extends StandardScheme<mount_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mount_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // ALLUXIO_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.alluxioPath = iprot.readString();
struct.setAlluxioPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // UFS_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.ufsPath = iprot.readString();
struct.setUfsPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new MountTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, mount_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.alluxioPath != null) {
oprot.writeFieldBegin(ALLUXIO_PATH_FIELD_DESC);
oprot.writeString(struct.alluxioPath);
oprot.writeFieldEnd();
}
if (struct.ufsPath != null) {
oprot.writeFieldBegin(UFS_PATH_FIELD_DESC);
oprot.writeString(struct.ufsPath);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class mount_argsTupleSchemeFactory implements SchemeFactory {
public mount_argsTupleScheme getScheme() {
return new mount_argsTupleScheme();
}
}
private static class mount_argsTupleScheme extends TupleScheme<mount_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mount_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetAlluxioPath()) {
optionals.set(0);
}
if (struct.isSetUfsPath()) {
optionals.set(1);
}
if (struct.isSetOptions()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetAlluxioPath()) {
oprot.writeString(struct.alluxioPath);
}
if (struct.isSetUfsPath()) {
oprot.writeString(struct.ufsPath);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, mount_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.alluxioPath = iprot.readString();
struct.setAlluxioPathIsSet(true);
}
if (incoming.get(1)) {
struct.ufsPath = iprot.readString();
struct.setUfsPathIsSet(true);
}
if (incoming.get(2)) {
struct.options = new MountTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class mount_result implements org.apache.thrift.TBase<mount_result, mount_result._Fields>, java.io.Serializable, Cloneable, Comparable<mount_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mount_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new mount_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new mount_resultTupleSchemeFactory());
}
private MountTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MountTResponse.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(mount_result.class, metaDataMap);
}
public mount_result() {
}
public mount_result(
MountTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public mount_result(mount_result other) {
if (other.isSetSuccess()) {
this.success = new MountTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public mount_result deepCopy() {
return new mount_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public MountTResponse getSuccess() {
return this.success;
}
public mount_result setSuccess(MountTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public mount_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((MountTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof mount_result)
return this.equals((mount_result)that);
return false;
}
public boolean equals(mount_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(mount_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("mount_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class mount_resultStandardSchemeFactory implements SchemeFactory {
public mount_resultStandardScheme getScheme() {
return new mount_resultStandardScheme();
}
}
private static class mount_resultStandardScheme extends StandardScheme<mount_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, mount_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new MountTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, mount_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class mount_resultTupleSchemeFactory implements SchemeFactory {
public mount_resultTupleScheme getScheme() {
return new mount_resultTupleScheme();
}
}
private static class mount_resultTupleScheme extends TupleScheme<mount_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, mount_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, mount_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new MountTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class remove_args implements org.apache.thrift.TBase<remove_args, remove_args._Fields>, java.io.Serializable, Cloneable, Comparable<remove_args> {
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 OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new remove_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new remove_argsTupleSchemeFactory());
}
private String path; // required
private boolean recursive; // required
private DeleteTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the file or directory
*/
PATH((short)1, "path"),
/**
* whether to remove recursively
*/
RECURSIVE((short)2, "recursive"),
/**
* the options for deleting the file
*/
OPTIONS((short)3, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // RECURSIVE
return RECURSIVE;
case 3: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __RECURSIVE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeleteTOptions.class)));
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,
DeleteTOptions options)
{
this();
this.path = path;
this.recursive = recursive;
setRecursiveIsSet(true);
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public remove_args(remove_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetPath()) {
this.path = other.path;
}
this.recursive = other.recursive;
if (other.isSetOptions()) {
this.options = new DeleteTOptions(other.options);
}
}
public remove_args deepCopy() {
return new remove_args(this);
}
@Override
public void clear() {
this.path = null;
setRecursiveIsSet(false);
this.recursive = false;
this.options = null;
}
/**
* the path of the file or directory
*/
public String getPath() {
return this.path;
}
/**
* the path of the file or directory
*/
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;
}
}
/**
* whether to remove recursively
*/
public boolean isRecursive() {
return this.recursive;
}
/**
* whether to remove recursively
*/
public remove_args setRecursive(boolean recursive) {
this.recursive = recursive;
setRecursiveIsSet(true);
return this;
}
public void unsetRecursive() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECURSIVE_ISSET_ID);
}
/** Returns true if field recursive is set (has been assigned a value) and false otherwise */
public boolean isSetRecursive() {
return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID);
}
public void setRecursiveIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECURSIVE_ISSET_ID, value);
}
/**
* the options for deleting the file
*/
public DeleteTOptions getOptions() {
return this.options;
}
/**
* the options for deleting the file
*/
public remove_args setOptions(DeleteTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case RECURSIVE:
if (value == null) {
unsetRecursive();
} else {
setRecursive((Boolean)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((DeleteTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case RECURSIVE:
return isRecursive();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case RECURSIVE:
return isSetRecursive();
case OPTIONS:
return isSetOptions();
}
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_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_recursive = true;
list.add(present_recursive);
if (present_recursive)
list.add(recursive);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(remove_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRecursive()).compareTo(other.isSetRecursive());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRecursive()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.recursive, other.recursive);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("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("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class remove_argsStandardSchemeFactory implements SchemeFactory {
public remove_argsStandardScheme getScheme() {
return new remove_argsStandardScheme();
}
}
private static class remove_argsStandardScheme extends StandardScheme<remove_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, remove_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // RECURSIVE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.recursive = iprot.readBool();
struct.setRecursiveIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new DeleteTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, remove_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(RECURSIVE_FIELD_DESC);
oprot.writeBool(struct.recursive);
oprot.writeFieldEnd();
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class remove_argsTupleSchemeFactory implements SchemeFactory {
public remove_argsTupleScheme getScheme() {
return new remove_argsTupleScheme();
}
}
private static class remove_argsTupleScheme extends TupleScheme<remove_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, remove_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetRecursive()) {
optionals.set(1);
}
if (struct.isSetOptions()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetRecursive()) {
oprot.writeBool(struct.recursive);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, remove_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.recursive = iprot.readBool();
struct.setRecursiveIsSet(true);
}
if (incoming.get(2)) {
struct.options = new DeleteTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class remove_result implements org.apache.thrift.TBase<remove_result, remove_result._Fields>, java.io.Serializable, Cloneable, Comparable<remove_result> {
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.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new remove_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new remove_resultTupleSchemeFactory());
}
private DeleteTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeleteTResponse.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(remove_result.class, metaDataMap);
}
public remove_result() {
}
public remove_result(
DeleteTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public remove_result(remove_result other) {
if (other.isSetSuccess()) {
this.success = new DeleteTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public remove_result deepCopy() {
return new remove_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public DeleteTResponse getSuccess() {
return this.success;
}
public remove_result setSuccess(DeleteTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public remove_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((DeleteTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof 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 && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(remove_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("remove_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class remove_resultStandardSchemeFactory implements SchemeFactory {
public remove_resultStandardScheme getScheme() {
return new remove_resultStandardScheme();
}
}
private static class remove_resultStandardScheme extends StandardScheme<remove_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, remove_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new DeleteTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, remove_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class remove_resultTupleSchemeFactory implements SchemeFactory {
public remove_resultTupleScheme getScheme() {
return new remove_resultTupleScheme();
}
}
private static class remove_resultTupleScheme extends TupleScheme<remove_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, remove_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, remove_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new DeleteTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class rename_args implements org.apache.thrift.TBase<rename_args, rename_args._Fields>, java.io.Serializable, Cloneable, Comparable<rename_args> {
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 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 DST_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("dstPath", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new rename_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new rename_argsTupleSchemeFactory());
}
private String path; // required
private String dstPath; // required
private RenameTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the source path of the file or directory
*/
PATH((short)1, "path"),
/**
* the desination path of the file
*/
DST_PATH((short)2, "dstPath"),
/**
* the method options
*/
OPTIONS((short)3, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // DST_PATH
return DST_PATH;
case 3: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
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.DST_PATH, new org.apache.thrift.meta_data.FieldMetaData("dstPath", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RenameTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(rename_args.class, metaDataMap);
}
public rename_args() {
}
public rename_args(
String path,
String dstPath,
RenameTOptions options)
{
this();
this.path = path;
this.dstPath = dstPath;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public rename_args(rename_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetDstPath()) {
this.dstPath = other.dstPath;
}
if (other.isSetOptions()) {
this.options = new RenameTOptions(other.options);
}
}
public rename_args deepCopy() {
return new rename_args(this);
}
@Override
public void clear() {
this.path = null;
this.dstPath = null;
this.options = null;
}
/**
* the source path of the file or directory
*/
public String getPath() {
return this.path;
}
/**
* the source path of the file or directory
*/
public rename_args setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
/**
* the desination path of the file
*/
public String getDstPath() {
return this.dstPath;
}
/**
* the desination path of the file
*/
public rename_args setDstPath(String dstPath) {
this.dstPath = dstPath;
return this;
}
public void unsetDstPath() {
this.dstPath = null;
}
/** Returns true if field dstPath is set (has been assigned a value) and false otherwise */
public boolean isSetDstPath() {
return this.dstPath != null;
}
public void setDstPathIsSet(boolean value) {
if (!value) {
this.dstPath = null;
}
}
/**
* the method options
*/
public RenameTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public rename_args setOptions(RenameTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case DST_PATH:
if (value == null) {
unsetDstPath();
} else {
setDstPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((RenameTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case DST_PATH:
return getDstPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case DST_PATH:
return isSetDstPath();
case OPTIONS:
return isSetOptions();
}
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_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_dstPath = true && this.isSetDstPath();
boolean that_present_dstPath = true && that.isSetDstPath();
if (this_present_dstPath || that_present_dstPath) {
if (!(this_present_dstPath && that_present_dstPath))
return false;
if (!this.dstPath.equals(that.dstPath))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_dstPath = true && (isSetDstPath());
list.add(present_dstPath);
if (present_dstPath)
list.add(dstPath);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(rename_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDstPath()).compareTo(other.isSetDstPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDstPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dstPath, other.dstPath);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("rename_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("dstPath:");
if (this.dstPath == null) {
sb.append("null");
} else {
sb.append(this.dstPath);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class rename_argsStandardSchemeFactory implements SchemeFactory {
public rename_argsStandardScheme getScheme() {
return new rename_argsStandardScheme();
}
}
private static class rename_argsStandardScheme extends StandardScheme<rename_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, rename_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DST_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.dstPath = iprot.readString();
struct.setDstPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new RenameTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, rename_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.dstPath != null) {
oprot.writeFieldBegin(DST_PATH_FIELD_DESC);
oprot.writeString(struct.dstPath);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class rename_argsTupleSchemeFactory implements SchemeFactory {
public rename_argsTupleScheme getScheme() {
return new rename_argsTupleScheme();
}
}
private static class rename_argsTupleScheme extends TupleScheme<rename_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, rename_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetDstPath()) {
optionals.set(1);
}
if (struct.isSetOptions()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetDstPath()) {
oprot.writeString(struct.dstPath);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, rename_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.dstPath = iprot.readString();
struct.setDstPathIsSet(true);
}
if (incoming.get(2)) {
struct.options = new RenameTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class rename_result implements org.apache.thrift.TBase<rename_result, rename_result._Fields>, java.io.Serializable, Cloneable, Comparable<rename_result> {
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.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new rename_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new rename_resultTupleSchemeFactory());
}
private RenameTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RenameTResponse.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(rename_result.class, metaDataMap);
}
public rename_result() {
}
public rename_result(
RenameTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public rename_result(rename_result other) {
if (other.isSetSuccess()) {
this.success = new RenameTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public rename_result deepCopy() {
return new rename_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public RenameTResponse getSuccess() {
return this.success;
}
public rename_result setSuccess(RenameTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public rename_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((RenameTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof 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 && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(rename_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("rename_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class rename_resultStandardSchemeFactory implements SchemeFactory {
public rename_resultStandardScheme getScheme() {
return new rename_resultStandardScheme();
}
}
private static class rename_resultStandardScheme extends StandardScheme<rename_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, rename_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new RenameTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, rename_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class rename_resultTupleSchemeFactory implements SchemeFactory {
public rename_resultTupleScheme getScheme() {
return new rename_resultTupleScheme();
}
}
private static class rename_resultTupleScheme extends TupleScheme<rename_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, rename_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, rename_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new RenameTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class setAttribute_args implements org.apache.thrift.TBase<setAttribute_args, setAttribute_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAttribute_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setAttribute_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new setAttribute_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new setAttribute_argsTupleSchemeFactory());
}
private String path; // required
private SetAttributeTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the file or directory
*/
PATH((short)1, "path"),
/**
* the method options
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SetAttributeTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setAttribute_args.class, metaDataMap);
}
public setAttribute_args() {
}
public setAttribute_args(
String path,
SetAttributeTOptions options)
{
this();
this.path = path;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public setAttribute_args(setAttribute_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetOptions()) {
this.options = new SetAttributeTOptions(other.options);
}
}
public setAttribute_args deepCopy() {
return new setAttribute_args(this);
}
@Override
public void clear() {
this.path = null;
this.options = null;
}
/**
* the path of the file or directory
*/
public String getPath() {
return this.path;
}
/**
* the path of the file or directory
*/
public setAttribute_args setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
/**
* the method options
*/
public SetAttributeTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public setAttribute_args setOptions(SetAttributeTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((SetAttributeTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof setAttribute_args)
return this.equals((setAttribute_args)that);
return false;
}
public boolean equals(setAttribute_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(setAttribute_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("setAttribute_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class setAttribute_argsStandardSchemeFactory implements SchemeFactory {
public setAttribute_argsStandardScheme getScheme() {
return new setAttribute_argsStandardScheme();
}
}
private static class setAttribute_argsStandardScheme extends StandardScheme<setAttribute_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, setAttribute_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new SetAttributeTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, setAttribute_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class setAttribute_argsTupleSchemeFactory implements SchemeFactory {
public setAttribute_argsTupleScheme getScheme() {
return new setAttribute_argsTupleScheme();
}
}
private static class setAttribute_argsTupleScheme extends TupleScheme<setAttribute_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setAttribute_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setAttribute_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new SetAttributeTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class setAttribute_result implements org.apache.thrift.TBase<setAttribute_result, setAttribute_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAttribute_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setAttribute_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new setAttribute_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new setAttribute_resultTupleSchemeFactory());
}
private SetAttributeTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SetAttributeTResponse.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(setAttribute_result.class, metaDataMap);
}
public setAttribute_result() {
}
public setAttribute_result(
SetAttributeTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public setAttribute_result(setAttribute_result other) {
if (other.isSetSuccess()) {
this.success = new SetAttributeTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public setAttribute_result deepCopy() {
return new setAttribute_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public SetAttributeTResponse getSuccess() {
return this.success;
}
public setAttribute_result setSuccess(SetAttributeTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public setAttribute_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((SetAttributeTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof setAttribute_result)
return this.equals((setAttribute_result)that);
return false;
}
public boolean equals(setAttribute_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(setAttribute_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("setAttribute_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class setAttribute_resultStandardSchemeFactory implements SchemeFactory {
public setAttribute_resultStandardScheme getScheme() {
return new setAttribute_resultStandardScheme();
}
}
private static class setAttribute_resultStandardScheme extends StandardScheme<setAttribute_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, setAttribute_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new SetAttributeTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, setAttribute_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class setAttribute_resultTupleSchemeFactory implements SchemeFactory {
public setAttribute_resultTupleScheme getScheme() {
return new setAttribute_resultTupleScheme();
}
}
private static class setAttribute_resultTupleScheme extends TupleScheme<setAttribute_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setAttribute_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setAttribute_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new SetAttributeTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class scheduleAsyncPersistence_args implements org.apache.thrift.TBase<scheduleAsyncPersistence_args, scheduleAsyncPersistence_args._Fields>, java.io.Serializable, Cloneable, Comparable<scheduleAsyncPersistence_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scheduleAsyncPersistence_args");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new scheduleAsyncPersistence_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scheduleAsyncPersistence_argsTupleSchemeFactory());
}
private String path; // required
private ScheduleAsyncPersistenceTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the file
*/
PATH((short)1, "path"),
/**
* the method options
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PATH
return PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ScheduleAsyncPersistenceTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scheduleAsyncPersistence_args.class, metaDataMap);
}
public scheduleAsyncPersistence_args() {
}
public scheduleAsyncPersistence_args(
String path,
ScheduleAsyncPersistenceTOptions options)
{
this();
this.path = path;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scheduleAsyncPersistence_args(scheduleAsyncPersistence_args other) {
if (other.isSetPath()) {
this.path = other.path;
}
if (other.isSetOptions()) {
this.options = new ScheduleAsyncPersistenceTOptions(other.options);
}
}
public scheduleAsyncPersistence_args deepCopy() {
return new scheduleAsyncPersistence_args(this);
}
@Override
public void clear() {
this.path = null;
this.options = null;
}
/**
* the path of the file
*/
public String getPath() {
return this.path;
}
/**
* the path of the file
*/
public scheduleAsyncPersistence_args setPath(String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
/**
* the method options
*/
public ScheduleAsyncPersistenceTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public scheduleAsyncPersistence_args setOptions(ScheduleAsyncPersistenceTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((ScheduleAsyncPersistenceTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PATH:
return isSetPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scheduleAsyncPersistence_args)
return this.equals((scheduleAsyncPersistence_args)that);
return false;
}
public boolean equals(scheduleAsyncPersistence_args that) {
if (that == null)
return false;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_path = true && (isSetPath());
list.add(present_path);
if (present_path)
list.add(path);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(scheduleAsyncPersistence_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("scheduleAsyncPersistence_args(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class scheduleAsyncPersistence_argsStandardSchemeFactory implements SchemeFactory {
public scheduleAsyncPersistence_argsStandardScheme getScheme() {
return new scheduleAsyncPersistence_argsStandardScheme();
}
}
private static class scheduleAsyncPersistence_argsStandardScheme extends StandardScheme<scheduleAsyncPersistence_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scheduleAsyncPersistence_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new ScheduleAsyncPersistenceTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, scheduleAsyncPersistence_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scheduleAsyncPersistence_argsTupleSchemeFactory implements SchemeFactory {
public scheduleAsyncPersistence_argsTupleScheme getScheme() {
return new scheduleAsyncPersistence_argsTupleScheme();
}
}
private static class scheduleAsyncPersistence_argsTupleScheme extends TupleScheme<scheduleAsyncPersistence_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scheduleAsyncPersistence_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scheduleAsyncPersistence_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new ScheduleAsyncPersistenceTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class scheduleAsyncPersistence_result implements org.apache.thrift.TBase<scheduleAsyncPersistence_result, scheduleAsyncPersistence_result._Fields>, java.io.Serializable, Cloneable, Comparable<scheduleAsyncPersistence_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scheduleAsyncPersistence_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new scheduleAsyncPersistence_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scheduleAsyncPersistence_resultTupleSchemeFactory());
}
private ScheduleAsyncPersistenceTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ScheduleAsyncPersistenceTResponse.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(scheduleAsyncPersistence_result.class, metaDataMap);
}
public scheduleAsyncPersistence_result() {
}
public scheduleAsyncPersistence_result(
ScheduleAsyncPersistenceTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scheduleAsyncPersistence_result(scheduleAsyncPersistence_result other) {
if (other.isSetSuccess()) {
this.success = new ScheduleAsyncPersistenceTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public scheduleAsyncPersistence_result deepCopy() {
return new scheduleAsyncPersistence_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public ScheduleAsyncPersistenceTResponse getSuccess() {
return this.success;
}
public scheduleAsyncPersistence_result setSuccess(ScheduleAsyncPersistenceTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public scheduleAsyncPersistence_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ScheduleAsyncPersistenceTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scheduleAsyncPersistence_result)
return this.equals((scheduleAsyncPersistence_result)that);
return false;
}
public boolean equals(scheduleAsyncPersistence_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(scheduleAsyncPersistence_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("scheduleAsyncPersistence_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class scheduleAsyncPersistence_resultStandardSchemeFactory implements SchemeFactory {
public scheduleAsyncPersistence_resultStandardScheme getScheme() {
return new scheduleAsyncPersistence_resultStandardScheme();
}
}
private static class scheduleAsyncPersistence_resultStandardScheme extends StandardScheme<scheduleAsyncPersistence_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scheduleAsyncPersistence_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new ScheduleAsyncPersistenceTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, scheduleAsyncPersistence_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scheduleAsyncPersistence_resultTupleSchemeFactory implements SchemeFactory {
public scheduleAsyncPersistence_resultTupleScheme getScheme() {
return new scheduleAsyncPersistence_resultTupleScheme();
}
}
private static class scheduleAsyncPersistence_resultTupleScheme extends TupleScheme<scheduleAsyncPersistence_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scheduleAsyncPersistence_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scheduleAsyncPersistence_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new ScheduleAsyncPersistenceTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class unmount_args implements org.apache.thrift.TBase<unmount_args, unmount_args._Fields>, java.io.Serializable, Cloneable, Comparable<unmount_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unmount_args");
private static final org.apache.thrift.protocol.TField ALLUXIO_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("alluxioPath", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new unmount_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new unmount_argsTupleSchemeFactory());
}
private String alluxioPath; // required
private UnmountTOptions options; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the path of the alluxio mount point
*/
ALLUXIO_PATH((short)1, "alluxioPath"),
/**
* the method options
*/
OPTIONS((short)2, "options");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ALLUXIO_PATH
return ALLUXIO_PATH;
case 2: // OPTIONS
return OPTIONS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
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.ALLUXIO_PATH, new org.apache.thrift.meta_data.FieldMetaData("alluxioPath", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UnmountTOptions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unmount_args.class, metaDataMap);
}
public unmount_args() {
}
public unmount_args(
String alluxioPath,
UnmountTOptions options)
{
this();
this.alluxioPath = alluxioPath;
this.options = options;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public unmount_args(unmount_args other) {
if (other.isSetAlluxioPath()) {
this.alluxioPath = other.alluxioPath;
}
if (other.isSetOptions()) {
this.options = new UnmountTOptions(other.options);
}
}
public unmount_args deepCopy() {
return new unmount_args(this);
}
@Override
public void clear() {
this.alluxioPath = null;
this.options = null;
}
/**
* the path of the alluxio mount point
*/
public String getAlluxioPath() {
return this.alluxioPath;
}
/**
* the path of the alluxio mount point
*/
public unmount_args setAlluxioPath(String alluxioPath) {
this.alluxioPath = alluxioPath;
return this;
}
public void unsetAlluxioPath() {
this.alluxioPath = null;
}
/** Returns true if field alluxioPath is set (has been assigned a value) and false otherwise */
public boolean isSetAlluxioPath() {
return this.alluxioPath != null;
}
public void setAlluxioPathIsSet(boolean value) {
if (!value) {
this.alluxioPath = null;
}
}
/**
* the method options
*/
public UnmountTOptions getOptions() {
return this.options;
}
/**
* the method options
*/
public unmount_args setOptions(UnmountTOptions options) {
this.options = options;
return this;
}
public void unsetOptions() {
this.options = null;
}
/** Returns true if field options is set (has been assigned a value) and false otherwise */
public boolean isSetOptions() {
return this.options != null;
}
public void setOptionsIsSet(boolean value) {
if (!value) {
this.options = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ALLUXIO_PATH:
if (value == null) {
unsetAlluxioPath();
} else {
setAlluxioPath((String)value);
}
break;
case OPTIONS:
if (value == null) {
unsetOptions();
} else {
setOptions((UnmountTOptions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ALLUXIO_PATH:
return getAlluxioPath();
case OPTIONS:
return getOptions();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case ALLUXIO_PATH:
return isSetAlluxioPath();
case OPTIONS:
return isSetOptions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof unmount_args)
return this.equals((unmount_args)that);
return false;
}
public boolean equals(unmount_args that) {
if (that == null)
return false;
boolean this_present_alluxioPath = true && this.isSetAlluxioPath();
boolean that_present_alluxioPath = true && that.isSetAlluxioPath();
if (this_present_alluxioPath || that_present_alluxioPath) {
if (!(this_present_alluxioPath && that_present_alluxioPath))
return false;
if (!this.alluxioPath.equals(that.alluxioPath))
return false;
}
boolean this_present_options = true && this.isSetOptions();
boolean that_present_options = true && that.isSetOptions();
if (this_present_options || that_present_options) {
if (!(this_present_options && that_present_options))
return false;
if (!this.options.equals(that.options))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_alluxioPath = true && (isSetAlluxioPath());
list.add(present_alluxioPath);
if (present_alluxioPath)
list.add(alluxioPath);
boolean present_options = true && (isSetOptions());
list.add(present_options);
if (present_options)
list.add(options);
return list.hashCode();
}
@Override
public int compareTo(unmount_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetAlluxioPath()).compareTo(other.isSetAlluxioPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAlluxioPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alluxioPath, other.alluxioPath);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("unmount_args(");
boolean first = true;
sb.append("alluxioPath:");
if (this.alluxioPath == null) {
sb.append("null");
} else {
sb.append(this.alluxioPath);
}
first = false;
if (!first) sb.append(", ");
sb.append("options:");
if (this.options == null) {
sb.append("null");
} else {
sb.append(this.options);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (options != null) {
options.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class unmount_argsStandardSchemeFactory implements SchemeFactory {
public unmount_argsStandardScheme getScheme() {
return new unmount_argsStandardScheme();
}
}
private static class unmount_argsStandardScheme extends StandardScheme<unmount_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // ALLUXIO_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.alluxioPath = iprot.readString();
struct.setAlluxioPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.options = new UnmountTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, unmount_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.alluxioPath != null) {
oprot.writeFieldBegin(ALLUXIO_PATH_FIELD_DESC);
oprot.writeString(struct.alluxioPath);
oprot.writeFieldEnd();
}
if (struct.options != null) {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
struct.options.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class unmount_argsTupleSchemeFactory implements SchemeFactory {
public unmount_argsTupleScheme getScheme() {
return new unmount_argsTupleScheme();
}
}
private static class unmount_argsTupleScheme extends TupleScheme<unmount_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, unmount_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetAlluxioPath()) {
optionals.set(0);
}
if (struct.isSetOptions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetAlluxioPath()) {
oprot.writeString(struct.alluxioPath);
}
if (struct.isSetOptions()) {
struct.options.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, unmount_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.alluxioPath = iprot.readString();
struct.setAlluxioPathIsSet(true);
}
if (incoming.get(1)) {
struct.options = new UnmountTOptions();
struct.options.read(iprot);
struct.setOptionsIsSet(true);
}
}
}
}
public static class unmount_result implements org.apache.thrift.TBase<unmount_result, unmount_result._Fields>, java.io.Serializable, Cloneable, Comparable<unmount_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unmount_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new unmount_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new unmount_resultTupleSchemeFactory());
}
private UnmountTResponse success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UnmountTResponse.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(unmount_result.class, metaDataMap);
}
public unmount_result() {
}
public unmount_result(
UnmountTResponse success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public unmount_result(unmount_result other) {
if (other.isSetSuccess()) {
this.success = new UnmountTResponse(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public unmount_result deepCopy() {
return new unmount_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public UnmountTResponse getSuccess() {
return this.success;
}
public unmount_result setSuccess(UnmountTResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public unmount_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((UnmountTResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof unmount_result)
return this.equals((unmount_result)that);
return false;
}
public boolean equals(unmount_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(unmount_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("unmount_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class unmount_resultStandardSchemeFactory implements SchemeFactory {
public unmount_resultStandardScheme getScheme() {
return new unmount_resultStandardScheme();
}
}
private static class unmount_resultStandardScheme extends StandardScheme<unmount_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, unmount_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new UnmountTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, unmount_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class unmount_resultTupleSchemeFactory implements SchemeFactory {
public unmount_resultTupleScheme getScheme() {
return new unmount_resultTupleScheme();
}
}
private static class unmount_resultTupleScheme extends TupleScheme<unmount_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, unmount_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, unmount_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new UnmountTResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
}