/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package alluxio.thrift;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class FileSystemMasterWorkerService {
/**
* This interface contains file system master service endpoints for Alluxio workers.
*/
public interface Iface extends alluxio.thrift.AlluxioService.Iface {
public FileInfo getFileInfo(long fileId) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Returns the set of pinned files.
*/
public Set<Long> getPinIdList() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Periodic file system worker heartbeat. Returns the command for persisting
* the blocks of a file.
*
* @param workerId the id of the worker
*
* @param persistedFiles the list of persisted files
*/
public FileSystemCommand heartbeat(long workerId, List<Long> persistedFiles) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
/**
* Returns the UFS information for the given mount point identified by its id.
*
*
* @param mountId the id of the ufs
*/
public UfsInfo getUfsInfo(long mountId) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;
}
public interface AsyncIface extends alluxio.thrift.AlluxioService .AsyncIface {
public void getFileInfo(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getPinIdList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void heartbeat(long workerId, List<Long> persistedFiles, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getUfsInfo(long mountId, 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 FileInfo getFileInfo(long fileId) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_getFileInfo(fileId);
return recv_getFileInfo();
}
public void send_getFileInfo(long fileId) throws org.apache.thrift.TException
{
getFileInfo_args args = new getFileInfo_args();
args.setFileId(fileId);
sendBase("getFileInfo", args);
}
public FileInfo recv_getFileInfo() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
getFileInfo_result result = new getFileInfo_result();
receiveBase(result, "getFileInfo");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFileInfo failed: unknown result");
}
public Set<Long> getPinIdList() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_getPinIdList();
return recv_getPinIdList();
}
public void send_getPinIdList() throws org.apache.thrift.TException
{
getPinIdList_args args = new getPinIdList_args();
sendBase("getPinIdList", args);
}
public Set<Long> recv_getPinIdList() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
getPinIdList_result result = new getPinIdList_result();
receiveBase(result, "getPinIdList");
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, "getPinIdList failed: unknown result");
}
public FileSystemCommand heartbeat(long workerId, List<Long> persistedFiles) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_heartbeat(workerId, persistedFiles);
return recv_heartbeat();
}
public void send_heartbeat(long workerId, List<Long> persistedFiles) throws org.apache.thrift.TException
{
heartbeat_args args = new heartbeat_args();
args.setWorkerId(workerId);
args.setPersistedFiles(persistedFiles);
sendBase("heartbeat", args);
}
public FileSystemCommand recv_heartbeat() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
heartbeat_result result = new heartbeat_result();
receiveBase(result, "heartbeat");
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, "heartbeat failed: unknown result");
}
public UfsInfo getUfsInfo(long mountId) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
send_getUfsInfo(mountId);
return recv_getUfsInfo();
}
public void send_getUfsInfo(long mountId) throws org.apache.thrift.TException
{
getUfsInfo_args args = new getUfsInfo_args();
args.setMountId(mountId);
sendBase("getUfsInfo", args);
}
public UfsInfo recv_getUfsInfo() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException
{
getUfsInfo_result result = new getUfsInfo_result();
receiveBase(result, "getUfsInfo");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUfsInfo failed: unknown result");
}
}
public static class AsyncClient extends alluxio.thrift.AlluxioService.AsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void getFileInfo(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getFileInfo_call method_call = new getFileInfo_call(fileId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getFileInfo_call extends org.apache.thrift.async.TAsyncMethodCall {
private long fileId;
public getFileInfo_call(long fileId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.fileId = fileId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFileInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
getFileInfo_args args = new getFileInfo_args();
args.setFileId(fileId);
args.write(prot);
prot.writeMessageEnd();
}
public FileInfo getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getFileInfo();
}
}
public void getPinIdList(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getPinIdList_call method_call = new getPinIdList_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getPinIdList_call extends org.apache.thrift.async.TAsyncMethodCall {
public getPinIdList_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("getPinIdList", org.apache.thrift.protocol.TMessageType.CALL, 0));
getPinIdList_args args = new getPinIdList_args();
args.write(prot);
prot.writeMessageEnd();
}
public Set<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_getPinIdList();
}
}
public void heartbeat(long workerId, List<Long> persistedFiles, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
heartbeat_call method_call = new heartbeat_call(workerId, persistedFiles, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class heartbeat_call extends org.apache.thrift.async.TAsyncMethodCall {
private long workerId;
private List<Long> persistedFiles;
public heartbeat_call(long workerId, List<Long> persistedFiles, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.workerId = workerId;
this.persistedFiles = persistedFiles;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("heartbeat", org.apache.thrift.protocol.TMessageType.CALL, 0));
heartbeat_args args = new heartbeat_args();
args.setWorkerId(workerId);
args.setPersistedFiles(persistedFiles);
args.write(prot);
prot.writeMessageEnd();
}
public FileSystemCommand 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_heartbeat();
}
}
public void getUfsInfo(long mountId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getUfsInfo_call method_call = new getUfsInfo_call(mountId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getUfsInfo_call extends org.apache.thrift.async.TAsyncMethodCall {
private long mountId;
public getUfsInfo_call(long mountId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.mountId = mountId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUfsInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUfsInfo_args args = new getUfsInfo_args();
args.setMountId(mountId);
args.write(prot);
prot.writeMessageEnd();
}
public UfsInfo getResult() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getUfsInfo();
}
}
}
public static class Processor<I extends Iface> extends alluxio.thrift.AlluxioService.Processor<I> implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("getFileInfo", new getFileInfo());
processMap.put("getPinIdList", new getPinIdList());
processMap.put("heartbeat", new heartbeat());
processMap.put("getUfsInfo", new getUfsInfo());
return processMap;
}
public static class getFileInfo<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFileInfo_args> {
public getFileInfo() {
super("getFileInfo");
}
public getFileInfo_args getEmptyArgsInstance() {
return new getFileInfo_args();
}
protected boolean isOneway() {
return false;
}
public getFileInfo_result getResult(I iface, getFileInfo_args args) throws org.apache.thrift.TException {
getFileInfo_result result = new getFileInfo_result();
try {
result.success = iface.getFileInfo(args.fileId);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class getPinIdList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPinIdList_args> {
public getPinIdList() {
super("getPinIdList");
}
public getPinIdList_args getEmptyArgsInstance() {
return new getPinIdList_args();
}
protected boolean isOneway() {
return false;
}
public getPinIdList_result getResult(I iface, getPinIdList_args args) throws org.apache.thrift.TException {
getPinIdList_result result = new getPinIdList_result();
try {
result.success = iface.getPinIdList();
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class heartbeat<I extends Iface> extends org.apache.thrift.ProcessFunction<I, heartbeat_args> {
public heartbeat() {
super("heartbeat");
}
public heartbeat_args getEmptyArgsInstance() {
return new heartbeat_args();
}
protected boolean isOneway() {
return false;
}
public heartbeat_result getResult(I iface, heartbeat_args args) throws org.apache.thrift.TException {
heartbeat_result result = new heartbeat_result();
try {
result.success = iface.heartbeat(args.workerId, args.persistedFiles);
} catch (alluxio.thrift.AlluxioTException e) {
result.e = e;
}
return result;
}
}
public static class getUfsInfo<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUfsInfo_args> {
public getUfsInfo() {
super("getUfsInfo");
}
public getUfsInfo_args getEmptyArgsInstance() {
return new getUfsInfo_args();
}
protected boolean isOneway() {
return false;
}
public getUfsInfo_result getResult(I iface, getUfsInfo_args args) throws org.apache.thrift.TException {
getUfsInfo_result result = new getUfsInfo_result();
try {
result.success = iface.getUfsInfo(args.mountId);
} 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("getFileInfo", new getFileInfo());
processMap.put("getPinIdList", new getPinIdList());
processMap.put("heartbeat", new heartbeat());
processMap.put("getUfsInfo", new getUfsInfo());
return processMap;
}
public static class getFileInfo<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getFileInfo_args, FileInfo> {
public getFileInfo() {
super("getFileInfo");
}
public getFileInfo_args getEmptyArgsInstance() {
return new getFileInfo_args();
}
public AsyncMethodCallback<FileInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<FileInfo>() {
public void onComplete(FileInfo o) {
getFileInfo_result result = new getFileInfo_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
getFileInfo_result result = new getFileInfo_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getFileInfo_args args, org.apache.thrift.async.AsyncMethodCallback<FileInfo> resultHandler) throws TException {
iface.getFileInfo(args.fileId,resultHandler);
}
}
public static class getPinIdList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPinIdList_args, Set<Long>> {
public getPinIdList() {
super("getPinIdList");
}
public getPinIdList_args getEmptyArgsInstance() {
return new getPinIdList_args();
}
public AsyncMethodCallback<Set<Long>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Set<Long>>() {
public void onComplete(Set<Long> o) {
getPinIdList_result result = new getPinIdList_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;
getPinIdList_result result = new getPinIdList_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, getPinIdList_args args, org.apache.thrift.async.AsyncMethodCallback<Set<Long>> resultHandler) throws TException {
iface.getPinIdList(resultHandler);
}
}
public static class heartbeat<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, heartbeat_args, FileSystemCommand> {
public heartbeat() {
super("heartbeat");
}
public heartbeat_args getEmptyArgsInstance() {
return new heartbeat_args();
}
public AsyncMethodCallback<FileSystemCommand> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<FileSystemCommand>() {
public void onComplete(FileSystemCommand o) {
heartbeat_result result = new heartbeat_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;
heartbeat_result result = new heartbeat_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, heartbeat_args args, org.apache.thrift.async.AsyncMethodCallback<FileSystemCommand> resultHandler) throws TException {
iface.heartbeat(args.workerId, args.persistedFiles,resultHandler);
}
}
public static class getUfsInfo<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUfsInfo_args, UfsInfo> {
public getUfsInfo() {
super("getUfsInfo");
}
public getUfsInfo_args getEmptyArgsInstance() {
return new getUfsInfo_args();
}
public AsyncMethodCallback<UfsInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<UfsInfo>() {
public void onComplete(UfsInfo o) {
getUfsInfo_result result = new getUfsInfo_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
getUfsInfo_result result = new getUfsInfo_result();
if (e instanceof alluxio.thrift.AlluxioTException) {
result.e = (alluxio.thrift.AlluxioTException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getUfsInfo_args args, org.apache.thrift.async.AsyncMethodCallback<UfsInfo> resultHandler) throws TException {
iface.getUfsInfo(args.mountId,resultHandler);
}
}
}
public static class getFileInfo_args implements org.apache.thrift.TBase<getFileInfo_args, getFileInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFileInfo_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileInfo_args");
private static final org.apache.thrift.protocol.TField FILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fileId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getFileInfo_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getFileInfo_argsTupleSchemeFactory());
}
private long fileId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the id of the file
*/
FILE_ID((short)1, "fileId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FILE_ID
return FILE_ID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __FILEID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.FILE_ID, new org.apache.thrift.meta_data.FieldMetaData("fileId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileInfo_args.class, metaDataMap);
}
public getFileInfo_args() {
}
public getFileInfo_args(
long fileId)
{
this();
this.fileId = fileId;
setFileIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getFileInfo_args(getFileInfo_args other) {
__isset_bitfield = other.__isset_bitfield;
this.fileId = other.fileId;
}
public getFileInfo_args deepCopy() {
return new getFileInfo_args(this);
}
@Override
public void clear() {
setFileIdIsSet(false);
this.fileId = 0;
}
/**
* the id of the file
*/
public long getFileId() {
return this.fileId;
}
/**
* the id of the file
*/
public getFileInfo_args setFileId(long fileId) {
this.fileId = fileId;
setFileIdIsSet(true);
return this;
}
public void unsetFileId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILEID_ISSET_ID);
}
/** Returns true if field fileId is set (has been assigned a value) and false otherwise */
public boolean isSetFileId() {
return EncodingUtils.testBit(__isset_bitfield, __FILEID_ISSET_ID);
}
public void setFileIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILEID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FILE_ID:
if (value == null) {
unsetFileId();
} else {
setFileId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FILE_ID:
return getFileId();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case FILE_ID:
return isSetFileId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getFileInfo_args)
return this.equals((getFileInfo_args)that);
return false;
}
public boolean equals(getFileInfo_args that) {
if (that == null)
return false;
boolean this_present_fileId = true;
boolean that_present_fileId = true;
if (this_present_fileId || that_present_fileId) {
if (!(this_present_fileId && that_present_fileId))
return false;
if (this.fileId != that.fileId)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_fileId = true;
list.add(present_fileId);
if (present_fileId)
list.add(fileId);
return list.hashCode();
}
@Override
public int compareTo(getFileInfo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetFileId()).compareTo(other.isSetFileId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileId, other.fileId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getFileInfo_args(");
boolean first = true;
sb.append("fileId:");
sb.append(this.fileId);
first = false;
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 getFileInfo_argsStandardSchemeFactory implements SchemeFactory {
public getFileInfo_argsStandardScheme getScheme() {
return new getFileInfo_argsStandardScheme();
}
}
private static class getFileInfo_argsStandardScheme extends StandardScheme<getFileInfo_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // FILE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.fileId = iprot.readI64();
struct.setFileIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfo_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(FILE_ID_FIELD_DESC);
oprot.writeI64(struct.fileId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getFileInfo_argsTupleSchemeFactory implements SchemeFactory {
public getFileInfo_argsTupleScheme getScheme() {
return new getFileInfo_argsTupleScheme();
}
}
private static class getFileInfo_argsTupleScheme extends TupleScheme<getFileInfo_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfo_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetFileId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetFileId()) {
oprot.writeI64(struct.fileId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfo_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.fileId = iprot.readI64();
struct.setFileIdIsSet(true);
}
}
}
}
public static class getFileInfo_result implements org.apache.thrift.TBase<getFileInfo_result, getFileInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getFileInfo_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFileInfo_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getFileInfo_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getFileInfo_resultTupleSchemeFactory());
}
private FileInfo success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileInfo.class)));
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFileInfo_result.class, metaDataMap);
}
public getFileInfo_result() {
}
public getFileInfo_result(
FileInfo success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getFileInfo_result(getFileInfo_result other) {
if (other.isSetSuccess()) {
this.success = new FileInfo(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public getFileInfo_result deepCopy() {
return new getFileInfo_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public FileInfo getSuccess() {
return this.success;
}
public getFileInfo_result setSuccess(FileInfo success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public getFileInfo_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((FileInfo)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getFileInfo_result)
return this.equals((getFileInfo_result)that);
return false;
}
public boolean equals(getFileInfo_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(getFileInfo_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getFileInfo_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getFileInfo_resultStandardSchemeFactory implements SchemeFactory {
public getFileInfo_resultStandardScheme getScheme() {
return new getFileInfo_resultStandardScheme();
}
}
private static class getFileInfo_resultStandardScheme extends StandardScheme<getFileInfo_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getFileInfo_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new FileInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getFileInfo_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getFileInfo_resultTupleSchemeFactory implements SchemeFactory {
public getFileInfo_resultTupleScheme getScheme() {
return new getFileInfo_resultTupleScheme();
}
}
private static class getFileInfo_resultTupleScheme extends TupleScheme<getFileInfo_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getFileInfo_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getFileInfo_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new FileInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class getPinIdList_args implements org.apache.thrift.TBase<getPinIdList_args, getPinIdList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPinIdList_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPinIdList_args");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getPinIdList_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getPinIdList_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(getPinIdList_args.class, metaDataMap);
}
public getPinIdList_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getPinIdList_args(getPinIdList_args other) {
}
public getPinIdList_args deepCopy() {
return new getPinIdList_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 getPinIdList_args)
return this.equals((getPinIdList_args)that);
return false;
}
public boolean equals(getPinIdList_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(getPinIdList_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("getPinIdList_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 getPinIdList_argsStandardSchemeFactory implements SchemeFactory {
public getPinIdList_argsStandardScheme getScheme() {
return new getPinIdList_argsStandardScheme();
}
}
private static class getPinIdList_argsStandardScheme extends StandardScheme<getPinIdList_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getPinIdList_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, getPinIdList_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getPinIdList_argsTupleSchemeFactory implements SchemeFactory {
public getPinIdList_argsTupleScheme getScheme() {
return new getPinIdList_argsTupleScheme();
}
}
private static class getPinIdList_argsTupleScheme extends TupleScheme<getPinIdList_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPinIdList_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getPinIdList_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class getPinIdList_result implements org.apache.thrift.TBase<getPinIdList_result, getPinIdList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPinIdList_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPinIdList_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.SET, (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 getPinIdList_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getPinIdList_resultTupleSchemeFactory());
}
private Set<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
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.SetMetaData(org.apache.thrift.protocol.TType.SET,
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(getPinIdList_result.class, metaDataMap);
}
public getPinIdList_result() {
}
public getPinIdList_result(
Set<Long> success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getPinIdList_result(getPinIdList_result other) {
if (other.isSetSuccess()) {
Set<Long> __this__success = new HashSet<Long>(other.success);
this.success = __this__success;
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public getPinIdList_result deepCopy() {
return new getPinIdList_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<Long> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(long elem) {
if (this.success == null) {
this.success = new HashSet<Long>();
}
this.success.add(elem);
}
public Set<Long> getSuccess() {
return this.success;
}
public getPinIdList_result setSuccess(Set<Long> 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 getPinIdList_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((Set<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 getPinIdList_result)
return this.equals((getPinIdList_result)that);
return false;
}
public boolean equals(getPinIdList_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(getPinIdList_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("getPinIdList_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 getPinIdList_resultStandardSchemeFactory implements SchemeFactory {
public getPinIdList_resultStandardScheme getScheme() {
return new getPinIdList_resultStandardScheme();
}
}
private static class getPinIdList_resultStandardScheme extends StandardScheme<getPinIdList_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getPinIdList_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.SET) {
{
org.apache.thrift.protocol.TSet _set92 = iprot.readSetBegin();
struct.success = new HashSet<Long>(2*_set92.size);
long _elem93;
for (int _i94 = 0; _i94 < _set92.size; ++_i94)
{
_elem93 = iprot.readI64();
struct.success.add(_elem93);
}
iprot.readSetEnd();
}
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, getPinIdList_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.success.size()));
for (long _iter95 : struct.success)
{
oprot.writeI64(_iter95);
}
oprot.writeSetEnd();
}
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getPinIdList_resultTupleSchemeFactory implements SchemeFactory {
public getPinIdList_resultTupleScheme getScheme() {
return new getPinIdList_resultTupleScheme();
}
}
private static class getPinIdList_resultTupleScheme extends TupleScheme<getPinIdList_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPinIdList_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 (long _iter96 : struct.success)
{
oprot.writeI64(_iter96);
}
}
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getPinIdList_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TSet _set97 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
struct.success = new HashSet<Long>(2*_set97.size);
long _elem98;
for (int _i99 = 0; _i99 < _set97.size; ++_i99)
{
_elem98 = iprot.readI64();
struct.success.add(_elem98);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class heartbeat_args implements org.apache.thrift.TBase<heartbeat_args, heartbeat_args._Fields>, java.io.Serializable, Cloneable, Comparable<heartbeat_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_args");
private static final org.apache.thrift.protocol.TField WORKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField PERSISTED_FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedFiles", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new heartbeat_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new heartbeat_argsTupleSchemeFactory());
}
private long workerId; // required
private List<Long> persistedFiles; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the id of the worker
*/
WORKER_ID((short)1, "workerId"),
/**
* the list of persisted files
*/
PERSISTED_FILES((short)2, "persistedFiles");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // WORKER_ID
return WORKER_ID;
case 2: // PERSISTED_FILES
return PERSISTED_FILES;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __WORKERID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.WORKER_ID, new org.apache.thrift.meta_data.FieldMetaData("workerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PERSISTED_FILES, new org.apache.thrift.meta_data.FieldMetaData("persistedFiles", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_args.class, metaDataMap);
}
public heartbeat_args() {
}
public heartbeat_args(
long workerId,
List<Long> persistedFiles)
{
this();
this.workerId = workerId;
setWorkerIdIsSet(true);
this.persistedFiles = persistedFiles;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public heartbeat_args(heartbeat_args other) {
__isset_bitfield = other.__isset_bitfield;
this.workerId = other.workerId;
if (other.isSetPersistedFiles()) {
List<Long> __this__persistedFiles = new ArrayList<Long>(other.persistedFiles);
this.persistedFiles = __this__persistedFiles;
}
}
public heartbeat_args deepCopy() {
return new heartbeat_args(this);
}
@Override
public void clear() {
setWorkerIdIsSet(false);
this.workerId = 0;
this.persistedFiles = null;
}
/**
* the id of the worker
*/
public long getWorkerId() {
return this.workerId;
}
/**
* the id of the worker
*/
public heartbeat_args setWorkerId(long workerId) {
this.workerId = workerId;
setWorkerIdIsSet(true);
return this;
}
public void unsetWorkerId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WORKERID_ISSET_ID);
}
/** Returns true if field workerId is set (has been assigned a value) and false otherwise */
public boolean isSetWorkerId() {
return EncodingUtils.testBit(__isset_bitfield, __WORKERID_ISSET_ID);
}
public void setWorkerIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WORKERID_ISSET_ID, value);
}
public int getPersistedFilesSize() {
return (this.persistedFiles == null) ? 0 : this.persistedFiles.size();
}
public java.util.Iterator<Long> getPersistedFilesIterator() {
return (this.persistedFiles == null) ? null : this.persistedFiles.iterator();
}
public void addToPersistedFiles(long elem) {
if (this.persistedFiles == null) {
this.persistedFiles = new ArrayList<Long>();
}
this.persistedFiles.add(elem);
}
/**
* the list of persisted files
*/
public List<Long> getPersistedFiles() {
return this.persistedFiles;
}
/**
* the list of persisted files
*/
public heartbeat_args setPersistedFiles(List<Long> persistedFiles) {
this.persistedFiles = persistedFiles;
return this;
}
public void unsetPersistedFiles() {
this.persistedFiles = null;
}
/** Returns true if field persistedFiles is set (has been assigned a value) and false otherwise */
public boolean isSetPersistedFiles() {
return this.persistedFiles != null;
}
public void setPersistedFilesIsSet(boolean value) {
if (!value) {
this.persistedFiles = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case WORKER_ID:
if (value == null) {
unsetWorkerId();
} else {
setWorkerId((Long)value);
}
break;
case PERSISTED_FILES:
if (value == null) {
unsetPersistedFiles();
} else {
setPersistedFiles((List<Long>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case WORKER_ID:
return getWorkerId();
case PERSISTED_FILES:
return getPersistedFiles();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case WORKER_ID:
return isSetWorkerId();
case PERSISTED_FILES:
return isSetPersistedFiles();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof heartbeat_args)
return this.equals((heartbeat_args)that);
return false;
}
public boolean equals(heartbeat_args that) {
if (that == null)
return false;
boolean this_present_workerId = true;
boolean that_present_workerId = true;
if (this_present_workerId || that_present_workerId) {
if (!(this_present_workerId && that_present_workerId))
return false;
if (this.workerId != that.workerId)
return false;
}
boolean this_present_persistedFiles = true && this.isSetPersistedFiles();
boolean that_present_persistedFiles = true && that.isSetPersistedFiles();
if (this_present_persistedFiles || that_present_persistedFiles) {
if (!(this_present_persistedFiles && that_present_persistedFiles))
return false;
if (!this.persistedFiles.equals(that.persistedFiles))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_workerId = true;
list.add(present_workerId);
if (present_workerId)
list.add(workerId);
boolean present_persistedFiles = true && (isSetPersistedFiles());
list.add(present_persistedFiles);
if (present_persistedFiles)
list.add(persistedFiles);
return list.hashCode();
}
@Override
public int compareTo(heartbeat_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetWorkerId()).compareTo(other.isSetWorkerId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWorkerId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workerId, other.workerId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPersistedFiles()).compareTo(other.isSetPersistedFiles());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPersistedFiles()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistedFiles, other.persistedFiles);
if (lastComparison != 0) {
return lastComparison;
}
}
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("heartbeat_args(");
boolean first = true;
sb.append("workerId:");
sb.append(this.workerId);
first = false;
if (!first) sb.append(", ");
sb.append("persistedFiles:");
if (this.persistedFiles == null) {
sb.append("null");
} else {
sb.append(this.persistedFiles);
}
first = false;
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 heartbeat_argsStandardSchemeFactory implements SchemeFactory {
public heartbeat_argsStandardScheme getScheme() {
return new heartbeat_argsStandardScheme();
}
}
private static class heartbeat_argsStandardScheme extends StandardScheme<heartbeat_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // WORKER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.workerId = iprot.readI64();
struct.setWorkerIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PERSISTED_FILES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list100 = iprot.readListBegin();
struct.persistedFiles = new ArrayList<Long>(_list100.size);
long _elem101;
for (int _i102 = 0; _i102 < _list100.size; ++_i102)
{
_elem101 = iprot.readI64();
struct.persistedFiles.add(_elem101);
}
iprot.readListEnd();
}
struct.setPersistedFilesIsSet(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, heartbeat_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(WORKER_ID_FIELD_DESC);
oprot.writeI64(struct.workerId);
oprot.writeFieldEnd();
if (struct.persistedFiles != null) {
oprot.writeFieldBegin(PERSISTED_FILES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.persistedFiles.size()));
for (long _iter103 : struct.persistedFiles)
{
oprot.writeI64(_iter103);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class heartbeat_argsTupleSchemeFactory implements SchemeFactory {
public heartbeat_argsTupleScheme getScheme() {
return new heartbeat_argsTupleScheme();
}
}
private static class heartbeat_argsTupleScheme extends TupleScheme<heartbeat_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetWorkerId()) {
optionals.set(0);
}
if (struct.isSetPersistedFiles()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetWorkerId()) {
oprot.writeI64(struct.workerId);
}
if (struct.isSetPersistedFiles()) {
{
oprot.writeI32(struct.persistedFiles.size());
for (long _iter104 : struct.persistedFiles)
{
oprot.writeI64(_iter104);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.workerId = iprot.readI64();
struct.setWorkerIdIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list105 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
struct.persistedFiles = new ArrayList<Long>(_list105.size);
long _elem106;
for (int _i107 = 0; _i107 < _list105.size; ++_i107)
{
_elem106 = iprot.readI64();
struct.persistedFiles.add(_elem106);
}
}
struct.setPersistedFilesIsSet(true);
}
}
}
}
public static class heartbeat_result implements org.apache.thrift.TBase<heartbeat_result, heartbeat_result._Fields>, java.io.Serializable, Cloneable, Comparable<heartbeat_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("heartbeat_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new heartbeat_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new heartbeat_resultTupleSchemeFactory());
}
private FileSystemCommand success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FileSystemCommand.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(heartbeat_result.class, metaDataMap);
}
public heartbeat_result() {
}
public heartbeat_result(
FileSystemCommand success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public heartbeat_result(heartbeat_result other) {
if (other.isSetSuccess()) {
this.success = new FileSystemCommand(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public heartbeat_result deepCopy() {
return new heartbeat_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public FileSystemCommand getSuccess() {
return this.success;
}
public heartbeat_result setSuccess(FileSystemCommand 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 heartbeat_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((FileSystemCommand)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 heartbeat_result)
return this.equals((heartbeat_result)that);
return false;
}
public boolean equals(heartbeat_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(heartbeat_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("heartbeat_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class heartbeat_resultStandardSchemeFactory implements SchemeFactory {
public heartbeat_resultStandardScheme getScheme() {
return new heartbeat_resultStandardScheme();
}
}
private static class heartbeat_resultStandardScheme extends StandardScheme<heartbeat_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new FileSystemCommand();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class heartbeat_resultTupleSchemeFactory implements SchemeFactory {
public heartbeat_resultTupleScheme getScheme() {
return new heartbeat_resultTupleScheme();
}
}
private static class heartbeat_resultTupleScheme extends TupleScheme<heartbeat_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new FileSystemCommand();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class getUfsInfo_args implements org.apache.thrift.TBase<getUfsInfo_args, getUfsInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUfsInfo_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUfsInfo_args");
private static final org.apache.thrift.protocol.TField MOUNT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("mountId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getUfsInfo_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getUfsInfo_argsTupleSchemeFactory());
}
private long mountId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* the id of the ufs
*/
MOUNT_ID((short)1, "mountId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // MOUNT_ID
return MOUNT_ID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __MOUNTID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MOUNT_ID, new org.apache.thrift.meta_data.FieldMetaData("mountId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUfsInfo_args.class, metaDataMap);
}
public getUfsInfo_args() {
}
public getUfsInfo_args(
long mountId)
{
this();
this.mountId = mountId;
setMountIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUfsInfo_args(getUfsInfo_args other) {
__isset_bitfield = other.__isset_bitfield;
this.mountId = other.mountId;
}
public getUfsInfo_args deepCopy() {
return new getUfsInfo_args(this);
}
@Override
public void clear() {
setMountIdIsSet(false);
this.mountId = 0;
}
/**
* the id of the ufs
*/
public long getMountId() {
return this.mountId;
}
/**
* the id of the ufs
*/
public getUfsInfo_args setMountId(long mountId) {
this.mountId = mountId;
setMountIdIsSet(true);
return this;
}
public void unsetMountId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MOUNTID_ISSET_ID);
}
/** Returns true if field mountId is set (has been assigned a value) and false otherwise */
public boolean isSetMountId() {
return EncodingUtils.testBit(__isset_bitfield, __MOUNTID_ISSET_ID);
}
public void setMountIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MOUNTID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MOUNT_ID:
if (value == null) {
unsetMountId();
} else {
setMountId((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MOUNT_ID:
return getMountId();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case MOUNT_ID:
return isSetMountId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getUfsInfo_args)
return this.equals((getUfsInfo_args)that);
return false;
}
public boolean equals(getUfsInfo_args that) {
if (that == null)
return false;
boolean this_present_mountId = true;
boolean that_present_mountId = true;
if (this_present_mountId || that_present_mountId) {
if (!(this_present_mountId && that_present_mountId))
return false;
if (this.mountId != that.mountId)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_mountId = true;
list.add(present_mountId);
if (present_mountId)
list.add(mountId);
return list.hashCode();
}
@Override
public int compareTo(getUfsInfo_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetMountId()).compareTo(other.isSetMountId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMountId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mountId, other.mountId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getUfsInfo_args(");
boolean first = true;
sb.append("mountId:");
sb.append(this.mountId);
first = false;
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 getUfsInfo_argsStandardSchemeFactory implements SchemeFactory {
public getUfsInfo_argsStandardScheme getScheme() {
return new getUfsInfo_argsStandardScheme();
}
}
private static class getUfsInfo_argsStandardScheme extends StandardScheme<getUfsInfo_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsInfo_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // MOUNT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.mountId = iprot.readI64();
struct.setMountIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getUfsInfo_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(MOUNT_ID_FIELD_DESC);
oprot.writeI64(struct.mountId);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUfsInfo_argsTupleSchemeFactory implements SchemeFactory {
public getUfsInfo_argsTupleScheme getScheme() {
return new getUfsInfo_argsTupleScheme();
}
}
private static class getUfsInfo_argsTupleScheme extends TupleScheme<getUfsInfo_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUfsInfo_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetMountId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetMountId()) {
oprot.writeI64(struct.mountId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUfsInfo_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.mountId = iprot.readI64();
struct.setMountIdIsSet(true);
}
}
}
}
public static class getUfsInfo_result implements org.apache.thrift.TBase<getUfsInfo_result, getUfsInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUfsInfo_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUfsInfo_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new getUfsInfo_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getUfsInfo_resultTupleSchemeFactory());
}
private UfsInfo success; // required
private alluxio.thrift.AlluxioTException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UfsInfo.class)));
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUfsInfo_result.class, metaDataMap);
}
public getUfsInfo_result() {
}
public getUfsInfo_result(
UfsInfo success,
alluxio.thrift.AlluxioTException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getUfsInfo_result(getUfsInfo_result other) {
if (other.isSetSuccess()) {
this.success = new UfsInfo(other.success);
}
if (other.isSetE()) {
this.e = new alluxio.thrift.AlluxioTException(other.e);
}
}
public getUfsInfo_result deepCopy() {
return new getUfsInfo_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public UfsInfo getSuccess() {
return this.success;
}
public getUfsInfo_result setSuccess(UfsInfo success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public alluxio.thrift.AlluxioTException getE() {
return this.e;
}
public getUfsInfo_result setE(alluxio.thrift.AlluxioTException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((UfsInfo)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((alluxio.thrift.AlluxioTException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getUfsInfo_result)
return this.equals((getUfsInfo_result)that);
return false;
}
public boolean equals(getUfsInfo_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(getUfsInfo_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getUfsInfo_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class getUfsInfo_resultStandardSchemeFactory implements SchemeFactory {
public getUfsInfo_resultStandardScheme getScheme() {
return new getUfsInfo_resultStandardScheme();
}
}
private static class getUfsInfo_resultStandardScheme extends StandardScheme<getUfsInfo_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getUfsInfo_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new UfsInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getUfsInfo_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getUfsInfo_resultTupleSchemeFactory implements SchemeFactory {
public getUfsInfo_resultTupleScheme getScheme() {
return new getUfsInfo_resultTupleScheme();
}
}
private static class getUfsInfo_resultTupleScheme extends TupleScheme<getUfsInfo_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUfsInfo_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUfsInfo_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new UfsInfo();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new alluxio.thrift.AlluxioTException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
}