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