/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package com.cloudera.flume.conf.thrift;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
public class FlumeMasterAdminServer {
public interface Iface {
public long submit(FlumeMasterCommandThrift command) throws TException;
public boolean isSuccess(long cmdid) throws TException;
public boolean isFailure(long cmdid) throws TException;
public Map<String,FlumeNodeStatusThrift> getNodeStatuses() throws TException;
public Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> getConfigs() throws TException;
public boolean hasCmdId(long cmdid) throws TException;
public Map<String,List<String>> getMappings(String physicalNode) throws TException;
}
public interface AsyncIface {
public void submit(FlumeMasterCommandThrift command, AsyncMethodCallback<AsyncClient.submit_call> resultHandler) throws TException;
public void isSuccess(long cmdid, AsyncMethodCallback<AsyncClient.isSuccess_call> resultHandler) throws TException;
public void isFailure(long cmdid, AsyncMethodCallback<AsyncClient.isFailure_call> resultHandler) throws TException;
public void getNodeStatuses(AsyncMethodCallback<AsyncClient.getNodeStatuses_call> resultHandler) throws TException;
public void getConfigs(AsyncMethodCallback<AsyncClient.getConfigs_call> resultHandler) throws TException;
public void hasCmdId(long cmdid, AsyncMethodCallback<AsyncClient.hasCmdId_call> resultHandler) throws TException;
public void getMappings(String physicalNode, AsyncMethodCallback<AsyncClient.getMappings_call> resultHandler) throws TException;
}
public static class Client implements TServiceClient, Iface {
public static class Factory implements TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(TProtocol prot) {
return new Client(prot);
}
public Client getClient(TProtocol iprot, TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(TProtocol prot)
{
this(prot, prot);
}
public Client(TProtocol iprot, TProtocol oprot)
{
iprot_ = iprot;
oprot_ = oprot;
}
protected TProtocol iprot_;
protected TProtocol oprot_;
protected int seqid_;
public TProtocol getInputProtocol()
{
return this.iprot_;
}
public TProtocol getOutputProtocol()
{
return this.oprot_;
}
public long submit(FlumeMasterCommandThrift command) throws TException
{
send_submit(command);
return recv_submit();
}
public void send_submit(FlumeMasterCommandThrift command) throws TException
{
oprot_.writeMessageBegin(new TMessage("submit", TMessageType.CALL, ++seqid_));
submit_args args = new submit_args();
args.setCommand(command);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public long recv_submit() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "submit failed: out of sequence response");
}
submit_result result = new submit_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.isSetSuccess()) {
return result.success;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "submit failed: unknown result");
}
public boolean isSuccess(long cmdid) throws TException
{
send_isSuccess(cmdid);
return recv_isSuccess();
}
public void send_isSuccess(long cmdid) throws TException
{
oprot_.writeMessageBegin(new TMessage("isSuccess", TMessageType.CALL, ++seqid_));
isSuccess_args args = new isSuccess_args();
args.setCmdid(cmdid);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public boolean recv_isSuccess() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "isSuccess failed: out of sequence response");
}
isSuccess_result result = new isSuccess_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.isSetSuccess()) {
return result.success;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "isSuccess failed: unknown result");
}
public boolean isFailure(long cmdid) throws TException
{
send_isFailure(cmdid);
return recv_isFailure();
}
public void send_isFailure(long cmdid) throws TException
{
oprot_.writeMessageBegin(new TMessage("isFailure", TMessageType.CALL, ++seqid_));
isFailure_args args = new isFailure_args();
args.setCmdid(cmdid);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public boolean recv_isFailure() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "isFailure failed: out of sequence response");
}
isFailure_result result = new isFailure_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.isSetSuccess()) {
return result.success;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "isFailure failed: unknown result");
}
public Map<String,FlumeNodeStatusThrift> getNodeStatuses() throws TException
{
send_getNodeStatuses();
return recv_getNodeStatuses();
}
public void send_getNodeStatuses() throws TException
{
oprot_.writeMessageBegin(new TMessage("getNodeStatuses", TMessageType.CALL, ++seqid_));
getNodeStatuses_args args = new getNodeStatuses_args();
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public Map<String,FlumeNodeStatusThrift> recv_getNodeStatuses() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNodeStatuses failed: out of sequence response");
}
getNodeStatuses_result result = new getNodeStatuses_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.isSetSuccess()) {
return result.success;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNodeStatuses failed: unknown result");
}
public Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> getConfigs() throws TException
{
send_getConfigs();
return recv_getConfigs();
}
public void send_getConfigs() throws TException
{
oprot_.writeMessageBegin(new TMessage("getConfigs", TMessageType.CALL, ++seqid_));
getConfigs_args args = new getConfigs_args();
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> recv_getConfigs() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getConfigs failed: out of sequence response");
}
getConfigs_result result = new getConfigs_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.isSetSuccess()) {
return result.success;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "getConfigs failed: unknown result");
}
public boolean hasCmdId(long cmdid) throws TException
{
send_hasCmdId(cmdid);
return recv_hasCmdId();
}
public void send_hasCmdId(long cmdid) throws TException
{
oprot_.writeMessageBegin(new TMessage("hasCmdId", TMessageType.CALL, ++seqid_));
hasCmdId_args args = new hasCmdId_args();
args.setCmdid(cmdid);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public boolean recv_hasCmdId() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "hasCmdId failed: out of sequence response");
}
hasCmdId_result result = new hasCmdId_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.isSetSuccess()) {
return result.success;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "hasCmdId failed: unknown result");
}
public Map<String,List<String>> getMappings(String physicalNode) throws TException
{
send_getMappings(physicalNode);
return recv_getMappings();
}
public void send_getMappings(String physicalNode) throws TException
{
oprot_.writeMessageBegin(new TMessage("getMappings", TMessageType.CALL, ++seqid_));
getMappings_args args = new getMappings_args();
args.setPhysicalNode(physicalNode);
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
public Map<String,List<String>> recv_getMappings() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
TApplicationException x = TApplicationException.read(iprot_);
iprot_.readMessageEnd();
throw x;
}
if (msg.seqid != seqid_) {
throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getMappings failed: out of sequence response");
}
getMappings_result result = new getMappings_result();
result.read(iprot_);
iprot_.readMessageEnd();
if (result.isSetSuccess()) {
return result.success;
}
throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMappings failed: unknown result");
}
}
public static class AsyncClient extends TAsyncClient implements AsyncIface {
public static class Factory implements TAsyncClientFactory<AsyncClient> {
private TAsyncClientManager clientManager;
private TProtocolFactory protocolFactory;
public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void submit(FlumeMasterCommandThrift command, AsyncMethodCallback<submit_call> resultHandler) throws TException {
checkReady();
submit_call method_call = new submit_call(command, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class submit_call extends TAsyncMethodCall {
private FlumeMasterCommandThrift command;
public submit_call(FlumeMasterCommandThrift command, AsyncMethodCallback<submit_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.command = command;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("submit", TMessageType.CALL, 0));
submit_args args = new submit_args();
args.setCommand(command);
args.write(prot);
prot.writeMessageEnd();
}
public long getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_submit();
}
}
public void isSuccess(long cmdid, AsyncMethodCallback<isSuccess_call> resultHandler) throws TException {
checkReady();
isSuccess_call method_call = new isSuccess_call(cmdid, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class isSuccess_call extends TAsyncMethodCall {
private long cmdid;
public isSuccess_call(long cmdid, AsyncMethodCallback<isSuccess_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.cmdid = cmdid;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("isSuccess", TMessageType.CALL, 0));
isSuccess_args args = new isSuccess_args();
args.setCmdid(cmdid);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_isSuccess();
}
}
public void isFailure(long cmdid, AsyncMethodCallback<isFailure_call> resultHandler) throws TException {
checkReady();
isFailure_call method_call = new isFailure_call(cmdid, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class isFailure_call extends TAsyncMethodCall {
private long cmdid;
public isFailure_call(long cmdid, AsyncMethodCallback<isFailure_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.cmdid = cmdid;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("isFailure", TMessageType.CALL, 0));
isFailure_args args = new isFailure_args();
args.setCmdid(cmdid);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_isFailure();
}
}
public void getNodeStatuses(AsyncMethodCallback<getNodeStatuses_call> resultHandler) throws TException {
checkReady();
getNodeStatuses_call method_call = new getNodeStatuses_call(resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class getNodeStatuses_call extends TAsyncMethodCall {
public getNodeStatuses_call(AsyncMethodCallback<getNodeStatuses_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("getNodeStatuses", TMessageType.CALL, 0));
getNodeStatuses_args args = new getNodeStatuses_args();
args.write(prot);
prot.writeMessageEnd();
}
public Map<String,FlumeNodeStatusThrift> getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getNodeStatuses();
}
}
public void getConfigs(AsyncMethodCallback<getConfigs_call> resultHandler) throws TException {
checkReady();
getConfigs_call method_call = new getConfigs_call(resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class getConfigs_call extends TAsyncMethodCall {
public getConfigs_call(AsyncMethodCallback<getConfigs_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("getConfigs", TMessageType.CALL, 0));
getConfigs_args args = new getConfigs_args();
args.write(prot);
prot.writeMessageEnd();
}
public Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getConfigs();
}
}
public void hasCmdId(long cmdid, AsyncMethodCallback<hasCmdId_call> resultHandler) throws TException {
checkReady();
hasCmdId_call method_call = new hasCmdId_call(cmdid, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class hasCmdId_call extends TAsyncMethodCall {
private long cmdid;
public hasCmdId_call(long cmdid, AsyncMethodCallback<hasCmdId_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.cmdid = cmdid;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("hasCmdId", TMessageType.CALL, 0));
hasCmdId_args args = new hasCmdId_args();
args.setCmdid(cmdid);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_hasCmdId();
}
}
public void getMappings(String physicalNode, AsyncMethodCallback<getMappings_call> resultHandler) throws TException {
checkReady();
getMappings_call method_call = new getMappings_call(physicalNode, resultHandler, this, protocolFactory, transport);
manager.call(method_call);
}
public static class getMappings_call extends TAsyncMethodCall {
private String physicalNode;
public getMappings_call(String physicalNode, AsyncMethodCallback<getMappings_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.physicalNode = physicalNode;
}
public void write_args(TProtocol prot) throws TException {
prot.writeMessageBegin(new TMessage("getMappings", TMessageType.CALL, 0));
getMappings_args args = new getMappings_args();
args.setPhysicalNode(physicalNode);
args.write(prot);
prot.writeMessageEnd();
}
public Map<String,List<String>> getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_getMappings();
}
}
}
public static class Processor implements TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(Iface iface)
{
iface_ = iface;
processMap_.put("submit", new submit());
processMap_.put("isSuccess", new isSuccess());
processMap_.put("isFailure", new isFailure());
processMap_.put("getNodeStatuses", new getNodeStatuses());
processMap_.put("getConfigs", new getConfigs());
processMap_.put("hasCmdId", new hasCmdId());
processMap_.put("getMappings", new getMappings());
}
protected static interface ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
}
private Iface iface_;
protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
public boolean process(TProtocol iprot, TProtocol oprot) throws TException
{
TMessage msg = iprot.readMessageBegin();
ProcessFunction fn = processMap_.get(msg.name);
if (fn == null) {
TProtocolUtil.skip(iprot, TType.STRUCT);
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return true;
}
fn.process(msg.seqid, iprot, oprot);
return true;
}
private class submit implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
submit_args args = new submit_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("submit", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
submit_result result = new submit_result();
result.success = iface_.submit(args.command);
result.setSuccessIsSet(true);
oprot.writeMessageBegin(new TMessage("submit", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class isSuccess implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
isSuccess_args args = new isSuccess_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("isSuccess", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
isSuccess_result result = new isSuccess_result();
result.success = iface_.isSuccess(args.cmdid);
result.setSuccessIsSet(true);
oprot.writeMessageBegin(new TMessage("isSuccess", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class isFailure implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
isFailure_args args = new isFailure_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("isFailure", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
isFailure_result result = new isFailure_result();
result.success = iface_.isFailure(args.cmdid);
result.setSuccessIsSet(true);
oprot.writeMessageBegin(new TMessage("isFailure", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class getNodeStatuses implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
getNodeStatuses_args args = new getNodeStatuses_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("getNodeStatuses", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
getNodeStatuses_result result = new getNodeStatuses_result();
result.success = iface_.getNodeStatuses();
oprot.writeMessageBegin(new TMessage("getNodeStatuses", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class getConfigs implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
getConfigs_args args = new getConfigs_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("getConfigs", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
getConfigs_result result = new getConfigs_result();
result.success = iface_.getConfigs();
oprot.writeMessageBegin(new TMessage("getConfigs", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class hasCmdId implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
hasCmdId_args args = new hasCmdId_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("hasCmdId", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
hasCmdId_result result = new hasCmdId_result();
result.success = iface_.hasCmdId(args.cmdid);
result.setSuccessIsSet(true);
oprot.writeMessageBegin(new TMessage("hasCmdId", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
private class getMappings implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
getMappings_args args = new getMappings_args();
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
oprot.writeMessageBegin(new TMessage("getMappings", TMessageType.EXCEPTION, seqid));
x.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
return;
}
iprot.readMessageEnd();
getMappings_result result = new getMappings_result();
result.success = iface_.getMappings(args.physicalNode);
oprot.writeMessageBegin(new TMessage("getMappings", TMessageType.REPLY, seqid));
result.write(oprot);
oprot.writeMessageEnd();
oprot.getTransport().flush();
}
}
}
public static class submit_args implements TBase<submit_args, submit_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("submit_args");
private static final TField COMMAND_FIELD_DESC = new TField("command", TType.STRUCT, (short)1);
public FlumeMasterCommandThrift command;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
COMMAND((short)1, "command");
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: // COMMAND
return COMMAND;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COMMAND, new FieldMetaData("command", TFieldRequirementType.DEFAULT,
new StructMetaData(TType.STRUCT, FlumeMasterCommandThrift.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(submit_args.class, metaDataMap);
}
public submit_args() {
}
public submit_args(
FlumeMasterCommandThrift command)
{
this();
this.command = command;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public submit_args(submit_args other) {
if (other.isSetCommand()) {
this.command = new FlumeMasterCommandThrift(other.command);
}
}
public submit_args deepCopy() {
return new submit_args(this);
}
@Override
public void clear() {
this.command = null;
}
public FlumeMasterCommandThrift getCommand() {
return this.command;
}
public submit_args setCommand(FlumeMasterCommandThrift command) {
this.command = command;
return this;
}
public void unsetCommand() {
this.command = null;
}
/** Returns true if field command is set (has been asigned a value) and false otherwise */
public boolean isSetCommand() {
return this.command != null;
}
public void setCommandIsSet(boolean value) {
if (!value) {
this.command = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case COMMAND:
if (value == null) {
unsetCommand();
} else {
setCommand((FlumeMasterCommandThrift)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case COMMAND:
return getCommand();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case COMMAND:
return isSetCommand();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof submit_args)
return this.equals((submit_args)that);
return false;
}
public boolean equals(submit_args that) {
if (that == null)
return false;
boolean this_present_command = true && this.isSetCommand();
boolean that_present_command = true && that.isSetCommand();
if (this_present_command || that_present_command) {
if (!(this_present_command && that_present_command))
return false;
if (!this.command.equals(that.command))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(submit_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
submit_args typedOther = (submit_args)other;
lastComparison = Boolean.valueOf(isSetCommand()).compareTo(typedOther.isSetCommand());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCommand()) {
lastComparison = TBaseHelper.compareTo(this.command, typedOther.command);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // COMMAND
if (field.type == TType.STRUCT) {
this.command = new FlumeMasterCommandThrift();
this.command.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.command != null) {
oprot.writeFieldBegin(COMMAND_FIELD_DESC);
this.command.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("submit_args(");
boolean first = true;
sb.append("command:");
if (this.command == null) {
sb.append("null");
} else {
sb.append(this.command);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class submit_result implements TBase<submit_result, submit_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("submit_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
public long success;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success");
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;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(submit_result.class, metaDataMap);
}
public submit_result() {
}
public submit_result(
long success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public submit_result(submit_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
}
public submit_result deepCopy() {
return new submit_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
}
public long getSuccess() {
return this.success;
}
public submit_result setSuccess(long success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been asigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return new Long(getSuccess());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof submit_result)
return this.equals((submit_result)that);
return false;
}
public boolean equals(submit_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(submit_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
submit_result typedOther = (submit_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.I64) {
this.success = iprot.readI64();
setSuccessIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI64(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("submit_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class isSuccess_args implements TBase<isSuccess_args, isSuccess_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("isSuccess_args");
private static final TField CMDID_FIELD_DESC = new TField("cmdid", TType.I64, (short)1);
public long cmdid;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
CMDID((short)1, "cmdid");
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: // CMDID
return CMDID;
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 __CMDID_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CMDID, new FieldMetaData("cmdid", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(isSuccess_args.class, metaDataMap);
}
public isSuccess_args() {
}
public isSuccess_args(
long cmdid)
{
this();
this.cmdid = cmdid;
setCmdidIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isSuccess_args(isSuccess_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.cmdid = other.cmdid;
}
public isSuccess_args deepCopy() {
return new isSuccess_args(this);
}
@Override
public void clear() {
setCmdidIsSet(false);
this.cmdid = 0;
}
public long getCmdid() {
return this.cmdid;
}
public isSuccess_args setCmdid(long cmdid) {
this.cmdid = cmdid;
setCmdidIsSet(true);
return this;
}
public void unsetCmdid() {
__isset_bit_vector.clear(__CMDID_ISSET_ID);
}
/** Returns true if field cmdid is set (has been asigned a value) and false otherwise */
public boolean isSetCmdid() {
return __isset_bit_vector.get(__CMDID_ISSET_ID);
}
public void setCmdidIsSet(boolean value) {
__isset_bit_vector.set(__CMDID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CMDID:
if (value == null) {
unsetCmdid();
} else {
setCmdid((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CMDID:
return new Long(getCmdid());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case CMDID:
return isSetCmdid();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof isSuccess_args)
return this.equals((isSuccess_args)that);
return false;
}
public boolean equals(isSuccess_args that) {
if (that == null)
return false;
boolean this_present_cmdid = true;
boolean that_present_cmdid = true;
if (this_present_cmdid || that_present_cmdid) {
if (!(this_present_cmdid && that_present_cmdid))
return false;
if (this.cmdid != that.cmdid)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(isSuccess_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
isSuccess_args typedOther = (isSuccess_args)other;
lastComparison = Boolean.valueOf(isSetCmdid()).compareTo(typedOther.isSetCmdid());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCmdid()) {
lastComparison = TBaseHelper.compareTo(this.cmdid, typedOther.cmdid);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // CMDID
if (field.type == TType.I64) {
this.cmdid = iprot.readI64();
setCmdidIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(CMDID_FIELD_DESC);
oprot.writeI64(this.cmdid);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("isSuccess_args(");
boolean first = true;
sb.append("cmdid:");
sb.append(this.cmdid);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class isSuccess_result implements TBase<isSuccess_result, isSuccess_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("isSuccess_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
public boolean success;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success");
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;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(isSuccess_result.class, metaDataMap);
}
public isSuccess_result() {
}
public isSuccess_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isSuccess_result(isSuccess_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
}
public isSuccess_result deepCopy() {
return new isSuccess_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public isSuccess_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been asigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return new Boolean(isSuccess());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof isSuccess_result)
return this.equals((isSuccess_result)that);
return false;
}
public boolean equals(isSuccess_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(isSuccess_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
isSuccess_result typedOther = (isSuccess_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("isSuccess_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class isFailure_args implements TBase<isFailure_args, isFailure_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("isFailure_args");
private static final TField CMDID_FIELD_DESC = new TField("cmdid", TType.I64, (short)1);
public long cmdid;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
CMDID((short)1, "cmdid");
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: // CMDID
return CMDID;
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 __CMDID_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CMDID, new FieldMetaData("cmdid", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(isFailure_args.class, metaDataMap);
}
public isFailure_args() {
}
public isFailure_args(
long cmdid)
{
this();
this.cmdid = cmdid;
setCmdidIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isFailure_args(isFailure_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.cmdid = other.cmdid;
}
public isFailure_args deepCopy() {
return new isFailure_args(this);
}
@Override
public void clear() {
setCmdidIsSet(false);
this.cmdid = 0;
}
public long getCmdid() {
return this.cmdid;
}
public isFailure_args setCmdid(long cmdid) {
this.cmdid = cmdid;
setCmdidIsSet(true);
return this;
}
public void unsetCmdid() {
__isset_bit_vector.clear(__CMDID_ISSET_ID);
}
/** Returns true if field cmdid is set (has been asigned a value) and false otherwise */
public boolean isSetCmdid() {
return __isset_bit_vector.get(__CMDID_ISSET_ID);
}
public void setCmdidIsSet(boolean value) {
__isset_bit_vector.set(__CMDID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CMDID:
if (value == null) {
unsetCmdid();
} else {
setCmdid((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CMDID:
return new Long(getCmdid());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case CMDID:
return isSetCmdid();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof isFailure_args)
return this.equals((isFailure_args)that);
return false;
}
public boolean equals(isFailure_args that) {
if (that == null)
return false;
boolean this_present_cmdid = true;
boolean that_present_cmdid = true;
if (this_present_cmdid || that_present_cmdid) {
if (!(this_present_cmdid && that_present_cmdid))
return false;
if (this.cmdid != that.cmdid)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(isFailure_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
isFailure_args typedOther = (isFailure_args)other;
lastComparison = Boolean.valueOf(isSetCmdid()).compareTo(typedOther.isSetCmdid());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCmdid()) {
lastComparison = TBaseHelper.compareTo(this.cmdid, typedOther.cmdid);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // CMDID
if (field.type == TType.I64) {
this.cmdid = iprot.readI64();
setCmdidIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(CMDID_FIELD_DESC);
oprot.writeI64(this.cmdid);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("isFailure_args(");
boolean first = true;
sb.append("cmdid:");
sb.append(this.cmdid);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class isFailure_result implements TBase<isFailure_result, isFailure_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("isFailure_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
public boolean success;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success");
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;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(isFailure_result.class, metaDataMap);
}
public isFailure_result() {
}
public isFailure_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public isFailure_result(isFailure_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
}
public isFailure_result deepCopy() {
return new isFailure_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public isFailure_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been asigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return new Boolean(isSuccess());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof isFailure_result)
return this.equals((isFailure_result)that);
return false;
}
public boolean equals(isFailure_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(isFailure_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
isFailure_result typedOther = (isFailure_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("isFailure_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class getNodeStatuses_args implements TBase<getNodeStatuses_args, getNodeStatuses_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("getNodeStatuses_args");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements 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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(getNodeStatuses_args.class, metaDataMap);
}
public getNodeStatuses_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getNodeStatuses_args(getNodeStatuses_args other) {
}
public getNodeStatuses_args deepCopy() {
return new getNodeStatuses_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 asigned 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 getNodeStatuses_args)
return this.equals((getNodeStatuses_args)that);
return false;
}
public boolean equals(getNodeStatuses_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getNodeStatuses_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getNodeStatuses_args typedOther = (getNodeStatuses_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getNodeStatuses_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class getNodeStatuses_result implements TBase<getNodeStatuses_result, getNodeStatuses_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("getNodeStatuses_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
public Map<String,FlumeNodeStatusThrift> success;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success");
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;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new MapMetaData(TType.MAP,
new FieldValueMetaData(TType.STRING),
new StructMetaData(TType.STRUCT, FlumeNodeStatusThrift.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(getNodeStatuses_result.class, metaDataMap);
}
public getNodeStatuses_result() {
}
public getNodeStatuses_result(
Map<String,FlumeNodeStatusThrift> success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getNodeStatuses_result(getNodeStatuses_result other) {
if (other.isSetSuccess()) {
Map<String,FlumeNodeStatusThrift> __this__success = new HashMap<String,FlumeNodeStatusThrift>();
for (Map.Entry<String, FlumeNodeStatusThrift> other_element : other.success.entrySet()) {
String other_element_key = other_element.getKey();
FlumeNodeStatusThrift other_element_value = other_element.getValue();
String __this__success_copy_key = other_element_key;
FlumeNodeStatusThrift __this__success_copy_value = new FlumeNodeStatusThrift(other_element_value);
__this__success.put(__this__success_copy_key, __this__success_copy_value);
}
this.success = __this__success;
}
}
public getNodeStatuses_result deepCopy() {
return new getNodeStatuses_result(this);
}
@Override
public void clear() {
this.success = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public void putToSuccess(String key, FlumeNodeStatusThrift val) {
if (this.success == null) {
this.success = new HashMap<String,FlumeNodeStatusThrift>();
}
this.success.put(key, val);
}
public Map<String,FlumeNodeStatusThrift> getSuccess() {
return this.success;
}
public getNodeStatuses_result setSuccess(Map<String,FlumeNodeStatusThrift> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been asigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Map<String,FlumeNodeStatusThrift>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getNodeStatuses_result)
return this.equals((getNodeStatuses_result)that);
return false;
}
public boolean equals(getNodeStatuses_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;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getNodeStatuses_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getNodeStatuses_result typedOther = (getNodeStatuses_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.MAP) {
{
TMap _map4 = iprot.readMapBegin();
this.success = new HashMap<String,FlumeNodeStatusThrift>(2*_map4.size);
for (int _i5 = 0; _i5 < _map4.size; ++_i5)
{
String _key6;
FlumeNodeStatusThrift _val7;
_key6 = iprot.readString();
_val7 = new FlumeNodeStatusThrift();
_val7.read(iprot);
this.success.put(_key6, _val7);
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size()));
for (Map.Entry<String, FlumeNodeStatusThrift> _iter8 : this.success.entrySet())
{
oprot.writeString(_iter8.getKey());
_iter8.getValue().write(oprot);
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getNodeStatuses_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class getConfigs_args implements TBase<getConfigs_args, getConfigs_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("getConfigs_args");
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements 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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(getConfigs_args.class, metaDataMap);
}
public getConfigs_args() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getConfigs_args(getConfigs_args other) {
}
public getConfigs_args deepCopy() {
return new getConfigs_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 asigned 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 getConfigs_args)
return this.equals((getConfigs_args)that);
return false;
}
public boolean equals(getConfigs_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getConfigs_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getConfigs_args typedOther = (getConfigs_args)other;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getConfigs_args(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class getConfigs_result implements TBase<getConfigs_result, getConfigs_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("getConfigs_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
public Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> success;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success");
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;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new MapMetaData(TType.MAP,
new FieldValueMetaData(TType.STRING),
new StructMetaData(TType.STRUCT, com.cloudera.flume.conf.thrift.ThriftFlumeConfigData.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(getConfigs_result.class, metaDataMap);
}
public getConfigs_result() {
}
public getConfigs_result(
Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getConfigs_result(getConfigs_result other) {
if (other.isSetSuccess()) {
Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> __this__success = new HashMap<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData>();
for (Map.Entry<String, com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> other_element : other.success.entrySet()) {
String other_element_key = other_element.getKey();
com.cloudera.flume.conf.thrift.ThriftFlumeConfigData other_element_value = other_element.getValue();
String __this__success_copy_key = other_element_key;
com.cloudera.flume.conf.thrift.ThriftFlumeConfigData __this__success_copy_value = new com.cloudera.flume.conf.thrift.ThriftFlumeConfigData(other_element_value);
__this__success.put(__this__success_copy_key, __this__success_copy_value);
}
this.success = __this__success;
}
}
public getConfigs_result deepCopy() {
return new getConfigs_result(this);
}
@Override
public void clear() {
this.success = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public void putToSuccess(String key, com.cloudera.flume.conf.thrift.ThriftFlumeConfigData val) {
if (this.success == null) {
this.success = new HashMap<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData>();
}
this.success.put(key, val);
}
public Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> getSuccess() {
return this.success;
}
public getConfigs_result setSuccess(Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been asigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Map<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getConfigs_result)
return this.equals((getConfigs_result)that);
return false;
}
public boolean equals(getConfigs_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;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getConfigs_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getConfigs_result typedOther = (getConfigs_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.MAP) {
{
TMap _map9 = iprot.readMapBegin();
this.success = new HashMap<String,com.cloudera.flume.conf.thrift.ThriftFlumeConfigData>(2*_map9.size);
for (int _i10 = 0; _i10 < _map9.size; ++_i10)
{
String _key11;
com.cloudera.flume.conf.thrift.ThriftFlumeConfigData _val12;
_key11 = iprot.readString();
_val12 = new com.cloudera.flume.conf.thrift.ThriftFlumeConfigData();
_val12.read(iprot);
this.success.put(_key11, _val12);
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size()));
for (Map.Entry<String, com.cloudera.flume.conf.thrift.ThriftFlumeConfigData> _iter13 : this.success.entrySet())
{
oprot.writeString(_iter13.getKey());
_iter13.getValue().write(oprot);
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getConfigs_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class hasCmdId_args implements TBase<hasCmdId_args, hasCmdId_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("hasCmdId_args");
private static final TField CMDID_FIELD_DESC = new TField("cmdid", TType.I64, (short)1);
public long cmdid;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
CMDID((short)1, "cmdid");
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: // CMDID
return CMDID;
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 __CMDID_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CMDID, new FieldMetaData("cmdid", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(hasCmdId_args.class, metaDataMap);
}
public hasCmdId_args() {
}
public hasCmdId_args(
long cmdid)
{
this();
this.cmdid = cmdid;
setCmdidIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public hasCmdId_args(hasCmdId_args other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.cmdid = other.cmdid;
}
public hasCmdId_args deepCopy() {
return new hasCmdId_args(this);
}
@Override
public void clear() {
setCmdidIsSet(false);
this.cmdid = 0;
}
public long getCmdid() {
return this.cmdid;
}
public hasCmdId_args setCmdid(long cmdid) {
this.cmdid = cmdid;
setCmdidIsSet(true);
return this;
}
public void unsetCmdid() {
__isset_bit_vector.clear(__CMDID_ISSET_ID);
}
/** Returns true if field cmdid is set (has been asigned a value) and false otherwise */
public boolean isSetCmdid() {
return __isset_bit_vector.get(__CMDID_ISSET_ID);
}
public void setCmdidIsSet(boolean value) {
__isset_bit_vector.set(__CMDID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CMDID:
if (value == null) {
unsetCmdid();
} else {
setCmdid((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CMDID:
return new Long(getCmdid());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case CMDID:
return isSetCmdid();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof hasCmdId_args)
return this.equals((hasCmdId_args)that);
return false;
}
public boolean equals(hasCmdId_args that) {
if (that == null)
return false;
boolean this_present_cmdid = true;
boolean that_present_cmdid = true;
if (this_present_cmdid || that_present_cmdid) {
if (!(this_present_cmdid && that_present_cmdid))
return false;
if (this.cmdid != that.cmdid)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(hasCmdId_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
hasCmdId_args typedOther = (hasCmdId_args)other;
lastComparison = Boolean.valueOf(isSetCmdid()).compareTo(typedOther.isSetCmdid());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCmdid()) {
lastComparison = TBaseHelper.compareTo(this.cmdid, typedOther.cmdid);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // CMDID
if (field.type == TType.I64) {
this.cmdid = iprot.readI64();
setCmdidIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(CMDID_FIELD_DESC);
oprot.writeI64(this.cmdid);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("hasCmdId_args(");
boolean first = true;
sb.append("cmdid:");
sb.append(this.cmdid);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class hasCmdId_result implements TBase<hasCmdId_result, hasCmdId_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("hasCmdId_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
public boolean success;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success");
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;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(hasCmdId_result.class, metaDataMap);
}
public hasCmdId_result() {
}
public hasCmdId_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public hasCmdId_result(hasCmdId_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
}
public hasCmdId_result deepCopy() {
return new hasCmdId_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public hasCmdId_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been asigned a value) and false otherwise */
public boolean isSetSuccess() {
return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return new Boolean(isSuccess());
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof hasCmdId_result)
return this.equals((hasCmdId_result)that);
return false;
}
public boolean equals(hasCmdId_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(hasCmdId_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
hasCmdId_result typedOther = (hasCmdId_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.BOOL) {
this.success = iprot.readBool();
setSuccessIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("hasCmdId_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class getMappings_args implements TBase<getMappings_args, getMappings_args._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("getMappings_args");
private static final TField PHYSICAL_NODE_FIELD_DESC = new TField("physicalNode", TType.STRING, (short)1);
public String physicalNode;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
PHYSICAL_NODE((short)1, "physicalNode");
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: // PHYSICAL_NODE
return PHYSICAL_NODE;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PHYSICAL_NODE, new FieldMetaData("physicalNode", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(getMappings_args.class, metaDataMap);
}
public getMappings_args() {
}
public getMappings_args(
String physicalNode)
{
this();
this.physicalNode = physicalNode;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getMappings_args(getMappings_args other) {
if (other.isSetPhysicalNode()) {
this.physicalNode = other.physicalNode;
}
}
public getMappings_args deepCopy() {
return new getMappings_args(this);
}
@Override
public void clear() {
this.physicalNode = null;
}
public String getPhysicalNode() {
return this.physicalNode;
}
public getMappings_args setPhysicalNode(String physicalNode) {
this.physicalNode = physicalNode;
return this;
}
public void unsetPhysicalNode() {
this.physicalNode = null;
}
/** Returns true if field physicalNode is set (has been asigned a value) and false otherwise */
public boolean isSetPhysicalNode() {
return this.physicalNode != null;
}
public void setPhysicalNodeIsSet(boolean value) {
if (!value) {
this.physicalNode = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PHYSICAL_NODE:
if (value == null) {
unsetPhysicalNode();
} else {
setPhysicalNode((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PHYSICAL_NODE:
return getPhysicalNode();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PHYSICAL_NODE:
return isSetPhysicalNode();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getMappings_args)
return this.equals((getMappings_args)that);
return false;
}
public boolean equals(getMappings_args that) {
if (that == null)
return false;
boolean this_present_physicalNode = true && this.isSetPhysicalNode();
boolean that_present_physicalNode = true && that.isSetPhysicalNode();
if (this_present_physicalNode || that_present_physicalNode) {
if (!(this_present_physicalNode && that_present_physicalNode))
return false;
if (!this.physicalNode.equals(that.physicalNode))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getMappings_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getMappings_args typedOther = (getMappings_args)other;
lastComparison = Boolean.valueOf(isSetPhysicalNode()).compareTo(typedOther.isSetPhysicalNode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPhysicalNode()) {
lastComparison = TBaseHelper.compareTo(this.physicalNode, typedOther.physicalNode);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // PHYSICAL_NODE
if (field.type == TType.STRING) {
this.physicalNode = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
if (this.physicalNode != null) {
oprot.writeFieldBegin(PHYSICAL_NODE_FIELD_DESC);
oprot.writeString(this.physicalNode);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getMappings_args(");
boolean first = true;
sb.append("physicalNode:");
if (this.physicalNode == null) {
sb.append("null");
} else {
sb.append(this.physicalNode);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
public static class getMappings_result implements TBase<getMappings_result, getMappings_result._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("getMappings_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
public Map<String,List<String>> success;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
SUCCESS((short)0, "success");
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;
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, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new MapMetaData(TType.MAP,
new FieldValueMetaData(TType.STRING),
new ListMetaData(TType.LIST,
new FieldValueMetaData(TType.STRING)))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(getMappings_result.class, metaDataMap);
}
public getMappings_result() {
}
public getMappings_result(
Map<String,List<String>> success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getMappings_result(getMappings_result other) {
if (other.isSetSuccess()) {
Map<String,List<String>> __this__success = new HashMap<String,List<String>>();
for (Map.Entry<String, List<String>> other_element : other.success.entrySet()) {
String other_element_key = other_element.getKey();
List<String> other_element_value = other_element.getValue();
String __this__success_copy_key = other_element_key;
List<String> __this__success_copy_value = new ArrayList<String>();
for (String other_element_value_element : other_element_value) {
__this__success_copy_value.add(other_element_value_element);
}
__this__success.put(__this__success_copy_key, __this__success_copy_value);
}
this.success = __this__success;
}
}
public getMappings_result deepCopy() {
return new getMappings_result(this);
}
@Override
public void clear() {
this.success = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public void putToSuccess(String key, List<String> val) {
if (this.success == null) {
this.success = new HashMap<String,List<String>>();
}
this.success.put(key, val);
}
public Map<String,List<String>> getSuccess() {
return this.success;
}
public getMappings_result setSuccess(Map<String,List<String>> success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been asigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Map<String,List<String>>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getMappings_result)
return this.equals((getMappings_result)that);
return false;
}
public boolean equals(getMappings_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;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(getMappings_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
getMappings_result typedOther = (getMappings_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 0: // SUCCESS
if (field.type == TType.MAP) {
{
TMap _map14 = iprot.readMapBegin();
this.success = new HashMap<String,List<String>>(2*_map14.size);
for (int _i15 = 0; _i15 < _map14.size; ++_i15)
{
String _key16;
List<String> _val17;
_key16 = iprot.readString();
{
TList _list18 = iprot.readListBegin();
_val17 = new ArrayList<String>(_list18.size);
for (int _i19 = 0; _i19 < _list18.size; ++_i19)
{
String _elem20;
_elem20 = iprot.readString();
_val17.add(_elem20);
}
iprot.readListEnd();
}
this.success.put(_key16, _val17);
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.STRING, TType.LIST, this.success.size()));
for (Map.Entry<String, List<String>> _iter21 : this.success.entrySet())
{
oprot.writeString(_iter21.getKey());
{
oprot.writeListBegin(new TList(TType.STRING, _iter21.getValue().size()));
for (String _iter22 : _iter21.getValue())
{
oprot.writeString(_iter22);
}
oprot.writeListEnd();
}
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("getMappings_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}
}