You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2013/12/28 02:03:18 UTC
[5/7] ACCUMULO-1965 Fix exception handling for namespaces
http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
index a43fb03..f6f1e0e 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
@@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
@SuppressWarnings("all") public class MasterClientService {
- public interface Iface {
+ public interface Iface extends FateService.Iface {
public long initiateFlush(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException;
@@ -78,25 +78,9 @@ import org.slf4j.LoggerFactory;
public void reportTabletStatus(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet) throws org.apache.thrift.TException;
- public long beginTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
-
- public void executeTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException;
-
- public String waitForTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException;
-
- public void finishTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
-
- public long beginNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
-
- public void executeNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException;
-
- public String waitForNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException;
-
- public void finishNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
-
}
- public interface AsyncIface {
+ public interface AsyncIface extends FateService .AsyncIface {
public void initiateFlush(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initiateFlush_call> resultHandler) throws org.apache.thrift.TException;
@@ -126,25 +110,9 @@ import org.slf4j.LoggerFactory;
public void reportTabletStatus(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.reportTabletStatus_call> resultHandler) throws org.apache.thrift.TException;
- public void beginTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.beginTableOperation_call> resultHandler) throws org.apache.thrift.TException;
-
- public void executeTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.executeTableOperation_call> resultHandler) throws org.apache.thrift.TException;
-
- public void waitForTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.waitForTableOperation_call> resultHandler) throws org.apache.thrift.TException;
-
- public void finishTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.finishTableOperation_call> resultHandler) throws org.apache.thrift.TException;
-
- public void beginNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.beginNamespaceOperation_call> resultHandler) throws org.apache.thrift.TException;
-
- public void executeNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.executeNamespaceOperation_call> resultHandler) throws org.apache.thrift.TException;
-
- public void waitForNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.waitForNamespaceOperation_call> resultHandler) throws org.apache.thrift.TException;
-
- public void finishNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.finishNamespaceOperation_call> resultHandler) throws org.apache.thrift.TException;
-
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends FateService.Client implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -530,238 +498,8 @@ import org.slf4j.LoggerFactory;
sendBase("reportTabletStatus", args);
}
- public long beginTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
- {
- send_beginTableOperation(tinfo, credentials);
- return recv_beginTableOperation();
- }
-
- public void send_beginTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
- {
- beginTableOperation_args args = new beginTableOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- sendBase("beginTableOperation", args);
- }
-
- public long recv_beginTableOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
- {
- beginTableOperation_result result = new beginTableOperation_result();
- receiveBase(result, "beginTableOperation");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.sec != null) {
- throw result.sec;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginTableOperation failed: unknown result");
- }
-
- public void executeTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException
- {
- send_executeTableOperation(tinfo, credentials, opid, op, arguments, options, autoClean);
- recv_executeTableOperation();
- }
-
- public void send_executeTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean) throws org.apache.thrift.TException
- {
- executeTableOperation_args args = new executeTableOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- args.setOp(op);
- args.setArguments(arguments);
- args.setOptions(options);
- args.setAutoClean(autoClean);
- sendBase("executeTableOperation", args);
- }
-
- public void recv_executeTableOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException
- {
- executeTableOperation_result result = new executeTableOperation_result();
- receiveBase(result, "executeTableOperation");
- if (result.sec != null) {
- throw result.sec;
- }
- if (result.tope != null) {
- throw result.tope;
- }
- return;
- }
-
- public String waitForTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException
- {
- send_waitForTableOperation(tinfo, credentials, opid);
- return recv_waitForTableOperation();
- }
-
- public void send_waitForTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.thrift.TException
- {
- waitForTableOperation_args args = new waitForTableOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- sendBase("waitForTableOperation", args);
- }
-
- public String recv_waitForTableOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException
- {
- waitForTableOperation_result result = new waitForTableOperation_result();
- receiveBase(result, "waitForTableOperation");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.sec != null) {
- throw result.sec;
- }
- if (result.tope != null) {
- throw result.tope;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "waitForTableOperation failed: unknown result");
- }
-
- public void finishTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
- {
- send_finishTableOperation(tinfo, credentials, opid);
- recv_finishTableOperation();
- }
-
- public void send_finishTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.thrift.TException
- {
- finishTableOperation_args args = new finishTableOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- sendBase("finishTableOperation", args);
- }
-
- public void recv_finishTableOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
- {
- finishTableOperation_result result = new finishTableOperation_result();
- receiveBase(result, "finishTableOperation");
- if (result.sec != null) {
- throw result.sec;
- }
- return;
- }
-
- public long beginNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
- {
- send_beginNamespaceOperation(tinfo, credentials);
- return recv_beginNamespaceOperation();
- }
-
- public void send_beginNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
- {
- beginNamespaceOperation_args args = new beginNamespaceOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- sendBase("beginNamespaceOperation", args);
- }
-
- public long recv_beginNamespaceOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
- {
- beginNamespaceOperation_result result = new beginNamespaceOperation_result();
- receiveBase(result, "beginNamespaceOperation");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.sec != null) {
- throw result.sec;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginNamespaceOperation failed: unknown result");
- }
-
- public void executeNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException
- {
- send_executeNamespaceOperation(tinfo, credentials, opid, op, arguments, options, autoClean);
- recv_executeNamespaceOperation();
- }
-
- public void send_executeNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean) throws org.apache.thrift.TException
- {
- executeNamespaceOperation_args args = new executeNamespaceOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- args.setOp(op);
- args.setArguments(arguments);
- args.setOptions(options);
- args.setAutoClean(autoClean);
- sendBase("executeNamespaceOperation", args);
- }
-
- public void recv_executeNamespaceOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException
- {
- executeNamespaceOperation_result result = new executeNamespaceOperation_result();
- receiveBase(result, "executeNamespaceOperation");
- if (result.sec != null) {
- throw result.sec;
- }
- if (result.tope != null) {
- throw result.tope;
- }
- return;
- }
-
- public String waitForNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException
- {
- send_waitForNamespaceOperation(tinfo, credentials, opid);
- return recv_waitForNamespaceOperation();
- }
-
- public void send_waitForNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.thrift.TException
- {
- waitForNamespaceOperation_args args = new waitForNamespaceOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- sendBase("waitForNamespaceOperation", args);
- }
-
- public String recv_waitForNamespaceOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException
- {
- waitForNamespaceOperation_result result = new waitForNamespaceOperation_result();
- receiveBase(result, "waitForNamespaceOperation");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.sec != null) {
- throw result.sec;
- }
- if (result.tope != null) {
- throw result.tope;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "waitForNamespaceOperation failed: unknown result");
- }
-
- public void finishNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
- {
- send_finishNamespaceOperation(tinfo, credentials, opid);
- recv_finishNamespaceOperation();
- }
-
- public void send_finishNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.thrift.TException
- {
- finishNamespaceOperation_args args = new finishNamespaceOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- sendBase("finishNamespaceOperation", args);
- }
-
- public void recv_finishNamespaceOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
- {
- finishNamespaceOperation_result result = new finishNamespaceOperation_result();
- receiveBase(result, "finishNamespaceOperation");
- if (result.sec != null) {
- throw result.sec;
- }
- return;
- }
-
}
- public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+ public static class AsyncClient extends FateService.AsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
@@ -1350,416 +1088,86 @@ import org.slf4j.LoggerFactory;
}
}
- public void beginTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<beginTableOperation_call> resultHandler) throws org.apache.thrift.TException {
- checkReady();
- beginTableOperation_call method_call = new beginTableOperation_call(tinfo, credentials, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
+ }
+
+ public static class Processor<I extends Iface> extends FateService.Processor<I> implements org.apache.thrift.TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
- public static class beginTableOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.accumulo.trace.thrift.TInfo tinfo;
- private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public beginTableOperation_call(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<beginTableOperation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tinfo = tinfo;
- this.credentials = credentials;
+ protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("initiateFlush", new initiateFlush());
+ processMap.put("waitForFlush", new waitForFlush());
+ processMap.put("setTableProperty", new setTableProperty());
+ processMap.put("removeTableProperty", new removeTableProperty());
+ processMap.put("setNamespaceProperty", new setNamespaceProperty());
+ processMap.put("removeNamespaceProperty", new removeNamespaceProperty());
+ processMap.put("setMasterGoalState", new setMasterGoalState());
+ processMap.put("shutdown", new shutdown());
+ processMap.put("shutdownTabletServer", new shutdownTabletServer());
+ processMap.put("setSystemProperty", new setSystemProperty());
+ processMap.put("removeSystemProperty", new removeSystemProperty());
+ processMap.put("getMasterStats", new getMasterStats());
+ processMap.put("reportSplitExtent", new reportSplitExtent());
+ processMap.put("reportTabletStatus", new reportTabletStatus());
+ return processMap;
+ }
+
+ public static class initiateFlush<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initiateFlush_args> {
+ public initiateFlush() {
+ super("initiateFlush");
}
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("beginTableOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- beginTableOperation_args args = new beginTableOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.write(prot);
- prot.writeMessageEnd();
+ public initiateFlush_args getEmptyArgsInstance() {
+ return new initiateFlush_args();
}
- public long getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public initiateFlush_result getResult(I iface, initiateFlush_args args) throws org.apache.thrift.TException {
+ initiateFlush_result result = new initiateFlush_result();
+ try {
+ result.success = iface.initiateFlush(args.tinfo, args.credentials, args.tableName);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
+ result.sec = sec;
+ } catch (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException tope) {
+ result.tope = tope;
}
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_beginTableOperation();
+ return result;
}
}
- public void executeTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback<executeTableOperation_call> resultHandler) throws org.apache.thrift.TException {
- checkReady();
- executeTableOperation_call method_call = new executeTableOperation_call(tinfo, credentials, opid, op, arguments, options, autoClean, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
+ public static class waitForFlush<I extends Iface> extends org.apache.thrift.ProcessFunction<I, waitForFlush_args> {
+ public waitForFlush() {
+ super("waitForFlush");
+ }
- public static class executeTableOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.accumulo.trace.thrift.TInfo tinfo;
- private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private long opid;
- private TableOperation op;
- private List<ByteBuffer> arguments;
- private Map<String,String> options;
- private boolean autoClean;
- public executeTableOperation_call(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback<executeTableOperation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tinfo = tinfo;
- this.credentials = credentials;
- this.opid = opid;
- this.op = op;
- this.arguments = arguments;
- this.options = options;
- this.autoClean = autoClean;
+ public waitForFlush_args getEmptyArgsInstance() {
+ return new waitForFlush_args();
}
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeTableOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- executeTableOperation_args args = new executeTableOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- args.setOp(op);
- args.setArguments(arguments);
- args.setOptions(options);
- args.setAutoClean(autoClean);
- args.write(prot);
- prot.writeMessageEnd();
+ protected boolean isOneway() {
+ return false;
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ public waitForFlush_result getResult(I iface, waitForFlush_args args) throws org.apache.thrift.TException {
+ waitForFlush_result result = new waitForFlush_result();
+ try {
+ iface.waitForFlush(args.tinfo, args.credentials, args.tableName, args.startRow, args.endRow, args.flushID, args.maxLoops);
+ } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
+ result.sec = sec;
+ } catch (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException tope) {
+ result.tope = tope;
}
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_executeTableOperation();
- }
- }
-
- public void waitForTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<waitForTableOperation_call> resultHandler) throws org.apache.thrift.TException {
- checkReady();
- waitForTableOperation_call method_call = new waitForTableOperation_call(tinfo, credentials, opid, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class waitForTableOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.accumulo.trace.thrift.TInfo tinfo;
- private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private long opid;
- public waitForTableOperation_call(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<waitForTableOperation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tinfo = tinfo;
- this.credentials = credentials;
- this.opid = opid;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("waitForTableOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- waitForTableOperation_args args = new waitForTableOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_waitForTableOperation();
- }
- }
-
- public void finishTableOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<finishTableOperation_call> resultHandler) throws org.apache.thrift.TException {
- checkReady();
- finishTableOperation_call method_call = new finishTableOperation_call(tinfo, credentials, opid, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class finishTableOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.accumulo.trace.thrift.TInfo tinfo;
- private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private long opid;
- public finishTableOperation_call(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<finishTableOperation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tinfo = tinfo;
- this.credentials = credentials;
- this.opid = opid;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("finishTableOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- finishTableOperation_args args = new finishTableOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_finishTableOperation();
- }
- }
-
- public void beginNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<beginNamespaceOperation_call> resultHandler) throws org.apache.thrift.TException {
- checkReady();
- beginNamespaceOperation_call method_call = new beginNamespaceOperation_call(tinfo, credentials, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class beginNamespaceOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.accumulo.trace.thrift.TInfo tinfo;
- private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public beginNamespaceOperation_call(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<beginNamespaceOperation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tinfo = tinfo;
- this.credentials = credentials;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("beginNamespaceOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- beginNamespaceOperation_args args = new beginNamespaceOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public long getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_beginNamespaceOperation();
- }
- }
-
- public void executeNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback<executeNamespaceOperation_call> resultHandler) throws org.apache.thrift.TException {
- checkReady();
- executeNamespaceOperation_call method_call = new executeNamespaceOperation_call(tinfo, credentials, opid, op, arguments, options, autoClean, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class executeNamespaceOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.accumulo.trace.thrift.TInfo tinfo;
- private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private long opid;
- private TableOperation op;
- private List<ByteBuffer> arguments;
- private Map<String,String> options;
- private boolean autoClean;
- public executeNamespaceOperation_call(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, TableOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback<executeNamespaceOperation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tinfo = tinfo;
- this.credentials = credentials;
- this.opid = opid;
- this.op = op;
- this.arguments = arguments;
- this.options = options;
- this.autoClean = autoClean;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeNamespaceOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- executeNamespaceOperation_args args = new executeNamespaceOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- args.setOp(op);
- args.setArguments(arguments);
- args.setOptions(options);
- args.setAutoClean(autoClean);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_executeNamespaceOperation();
- }
- }
-
- public void waitForNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<waitForNamespaceOperation_call> resultHandler) throws org.apache.thrift.TException {
- checkReady();
- waitForNamespaceOperation_call method_call = new waitForNamespaceOperation_call(tinfo, credentials, opid, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class waitForNamespaceOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.accumulo.trace.thrift.TInfo tinfo;
- private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private long opid;
- public waitForNamespaceOperation_call(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<waitForNamespaceOperation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tinfo = tinfo;
- this.credentials = credentials;
- this.opid = opid;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("waitForNamespaceOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- waitForNamespaceOperation_args args = new waitForNamespaceOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_waitForNamespaceOperation();
- }
- }
-
- public void finishNamespaceOperation(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<finishNamespaceOperation_call> resultHandler) throws org.apache.thrift.TException {
- checkReady();
- finishNamespaceOperation_call method_call = new finishNamespaceOperation_call(tinfo, credentials, opid, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class finishNamespaceOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.accumulo.trace.thrift.TInfo tinfo;
- private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private long opid;
- public finishNamespaceOperation_call(org.apache.accumulo.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<finishNamespaceOperation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tinfo = tinfo;
- this.credentials = credentials;
- this.opid = opid;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("finishNamespaceOperation", org.apache.thrift.protocol.TMessageType.CALL, 0));
- finishNamespaceOperation_args args = new finishNamespaceOperation_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.setOpid(opid);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_finishNamespaceOperation();
- }
- }
-
- }
-
- public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
- public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
- }
-
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- processMap.put("initiateFlush", new initiateFlush());
- processMap.put("waitForFlush", new waitForFlush());
- processMap.put("setTableProperty", new setTableProperty());
- processMap.put("removeTableProperty", new removeTableProperty());
- processMap.put("setNamespaceProperty", new setNamespaceProperty());
- processMap.put("removeNamespaceProperty", new removeNamespaceProperty());
- processMap.put("setMasterGoalState", new setMasterGoalState());
- processMap.put("shutdown", new shutdown());
- processMap.put("shutdownTabletServer", new shutdownTabletServer());
- processMap.put("setSystemProperty", new setSystemProperty());
- processMap.put("removeSystemProperty", new removeSystemProperty());
- processMap.put("getMasterStats", new getMasterStats());
- processMap.put("reportSplitExtent", new reportSplitExtent());
- processMap.put("reportTabletStatus", new reportTabletStatus());
- processMap.put("beginTableOperation", new beginTableOperation());
- processMap.put("executeTableOperation", new executeTableOperation());
- processMap.put("waitForTableOperation", new waitForTableOperation());
- processMap.put("finishTableOperation", new finishTableOperation());
- processMap.put("beginNamespaceOperation", new beginNamespaceOperation());
- processMap.put("executeNamespaceOperation", new executeNamespaceOperation());
- processMap.put("waitForNamespaceOperation", new waitForNamespaceOperation());
- processMap.put("finishNamespaceOperation", new finishNamespaceOperation());
- return processMap;
- }
-
- public static class initiateFlush<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initiateFlush_args> {
- public initiateFlush() {
- super("initiateFlush");
- }
-
- public initiateFlush_args getEmptyArgsInstance() {
- return new initiateFlush_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public initiateFlush_result getResult(I iface, initiateFlush_args args) throws org.apache.thrift.TException {
- initiateFlush_result result = new initiateFlush_result();
- try {
- result.success = iface.initiateFlush(args.tinfo, args.credentials, args.tableName);
- result.setSuccessIsSet(true);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException tope) {
- result.tope = tope;
- }
- return result;
- }
- }
-
- public static class waitForFlush<I extends Iface> extends org.apache.thrift.ProcessFunction<I, waitForFlush_args> {
- public waitForFlush() {
- super("waitForFlush");
- }
-
- public waitForFlush_args getEmptyArgsInstance() {
- return new waitForFlush_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public waitForFlush_result getResult(I iface, waitForFlush_args args) throws org.apache.thrift.TException {
- waitForFlush_result result = new waitForFlush_result();
- try {
- iface.waitForFlush(args.tinfo, args.credentials, args.tableName, args.startRow, args.endRow, args.flushID, args.maxLoops);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException tope) {
- result.tope = tope;
- }
- return result;
+ return result;
}
}
@@ -2049,212 +1457,10 @@ import org.slf4j.LoggerFactory;
}
}
- public static class beginTableOperation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, beginTableOperation_args> {
- public beginTableOperation() {
- super("beginTableOperation");
- }
-
- public beginTableOperation_args getEmptyArgsInstance() {
- return new beginTableOperation_args();
- }
+ }
- protected boolean isOneway() {
- return false;
- }
-
- public beginTableOperation_result getResult(I iface, beginTableOperation_args args) throws org.apache.thrift.TException {
- beginTableOperation_result result = new beginTableOperation_result();
- try {
- result.success = iface.beginTableOperation(args.tinfo, args.credentials);
- result.setSuccessIsSet(true);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- }
- return result;
- }
- }
-
- public static class executeTableOperation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, executeTableOperation_args> {
- public executeTableOperation() {
- super("executeTableOperation");
- }
-
- public executeTableOperation_args getEmptyArgsInstance() {
- return new executeTableOperation_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public executeTableOperation_result getResult(I iface, executeTableOperation_args args) throws org.apache.thrift.TException {
- executeTableOperation_result result = new executeTableOperation_result();
- try {
- iface.executeTableOperation(args.tinfo, args.credentials, args.opid, args.op, args.arguments, args.options, args.autoClean);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException tope) {
- result.tope = tope;
- }
- return result;
- }
- }
-
- public static class waitForTableOperation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, waitForTableOperation_args> {
- public waitForTableOperation() {
- super("waitForTableOperation");
- }
-
- public waitForTableOperation_args getEmptyArgsInstance() {
- return new waitForTableOperation_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public waitForTableOperation_result getResult(I iface, waitForTableOperation_args args) throws org.apache.thrift.TException {
- waitForTableOperation_result result = new waitForTableOperation_result();
- try {
- result.success = iface.waitForTableOperation(args.tinfo, args.credentials, args.opid);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException tope) {
- result.tope = tope;
- }
- return result;
- }
- }
-
- public static class finishTableOperation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, finishTableOperation_args> {
- public finishTableOperation() {
- super("finishTableOperation");
- }
-
- public finishTableOperation_args getEmptyArgsInstance() {
- return new finishTableOperation_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public finishTableOperation_result getResult(I iface, finishTableOperation_args args) throws org.apache.thrift.TException {
- finishTableOperation_result result = new finishTableOperation_result();
- try {
- iface.finishTableOperation(args.tinfo, args.credentials, args.opid);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- }
- return result;
- }
- }
-
- public static class beginNamespaceOperation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, beginNamespaceOperation_args> {
- public beginNamespaceOperation() {
- super("beginNamespaceOperation");
- }
-
- public beginNamespaceOperation_args getEmptyArgsInstance() {
- return new beginNamespaceOperation_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public beginNamespaceOperation_result getResult(I iface, beginNamespaceOperation_args args) throws org.apache.thrift.TException {
- beginNamespaceOperation_result result = new beginNamespaceOperation_result();
- try {
- result.success = iface.beginNamespaceOperation(args.tinfo, args.credentials);
- result.setSuccessIsSet(true);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- }
- return result;
- }
- }
-
- public static class executeNamespaceOperation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, executeNamespaceOperation_args> {
- public executeNamespaceOperation() {
- super("executeNamespaceOperation");
- }
-
- public executeNamespaceOperation_args getEmptyArgsInstance() {
- return new executeNamespaceOperation_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public executeNamespaceOperation_result getResult(I iface, executeNamespaceOperation_args args) throws org.apache.thrift.TException {
- executeNamespaceOperation_result result = new executeNamespaceOperation_result();
- try {
- iface.executeNamespaceOperation(args.tinfo, args.credentials, args.opid, args.op, args.arguments, args.options, args.autoClean);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException tope) {
- result.tope = tope;
- }
- return result;
- }
- }
-
- public static class waitForNamespaceOperation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, waitForNamespaceOperation_args> {
- public waitForNamespaceOperation() {
- super("waitForNamespaceOperation");
- }
-
- public waitForNamespaceOperation_args getEmptyArgsInstance() {
- return new waitForNamespaceOperation_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public waitForNamespaceOperation_result getResult(I iface, waitForNamespaceOperation_args args) throws org.apache.thrift.TException {
- waitForNamespaceOperation_result result = new waitForNamespaceOperation_result();
- try {
- result.success = iface.waitForNamespaceOperation(args.tinfo, args.credentials, args.opid);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException tope) {
- result.tope = tope;
- }
- return result;
- }
- }
-
- public static class finishNamespaceOperation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, finishNamespaceOperation_args> {
- public finishNamespaceOperation() {
- super("finishNamespaceOperation");
- }
-
- public finishNamespaceOperation_args getEmptyArgsInstance() {
- return new finishNamespaceOperation_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public finishNamespaceOperation_result getResult(I iface, finishNamespaceOperation_args args) throws org.apache.thrift.TException {
- finishNamespaceOperation_result result = new finishNamespaceOperation_result();
- try {
- iface.finishNamespaceOperation(args.tinfo, args.credentials, args.opid);
- } catch (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- }
- return result;
- }
- }
-
- }
-
- public static class initiateFlush_args implements org.apache.thrift.TBase<initiateFlush_args, initiateFlush_args._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initiateFlush_args");
+ public static class initiateFlush_args implements org.apache.thrift.TBase<initiateFlush_args, initiateFlush_args._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initiateFlush_args");
private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)1);
@@ -16690,9014 +15896,4 @@ import org.slf4j.LoggerFactory;
}
- public static class beginTableOperation_args implements org.apache.thrift.TBase<beginTableOperation_args, beginTableOperation_args._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginTableOperation_args");
-
- private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new beginTableOperation_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new beginTableOperation_argsTupleSchemeFactory());
- }
-
- public org.apache.accumulo.trace.thrift.TInfo tinfo; // required
- public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TINFO((short)2, "tinfo"),
- CREDENTIALS((short)1, "credentials");
-
- 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 2: // TINFO
- return TINFO;
- case 1: // CREDENTIALS
- return CREDENTIALS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.trace.thrift.TInfo.class)));
- tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.security.thrift.TCredentials.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginTableOperation_args.class, metaDataMap);
- }
-
- public beginTableOperation_args() {
- }
-
- public beginTableOperation_args(
- org.apache.accumulo.trace.thrift.TInfo tinfo,
- org.apache.accumulo.core.security.thrift.TCredentials credentials)
- {
- this();
- this.tinfo = tinfo;
- this.credentials = credentials;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public beginTableOperation_args(beginTableOperation_args other) {
- if (other.isSetTinfo()) {
- this.tinfo = new org.apache.accumulo.trace.thrift.TInfo(other.tinfo);
- }
- if (other.isSetCredentials()) {
- this.credentials = new org.apache.accumulo.core.security.thrift.TCredentials(other.credentials);
- }
- }
-
- public beginTableOperation_args deepCopy() {
- return new beginTableOperation_args(this);
- }
-
- @Override
- public void clear() {
- this.tinfo = null;
- this.credentials = null;
- }
-
- public org.apache.accumulo.trace.thrift.TInfo getTinfo() {
- return this.tinfo;
- }
-
- public beginTableOperation_args setTinfo(org.apache.accumulo.trace.thrift.TInfo tinfo) {
- this.tinfo = tinfo;
- return this;
- }
-
- public void unsetTinfo() {
- this.tinfo = null;
- }
-
- /** Returns true if field tinfo is set (has been assigned a value) and false otherwise */
- public boolean isSetTinfo() {
- return this.tinfo != null;
- }
-
- public void setTinfoIsSet(boolean value) {
- if (!value) {
- this.tinfo = null;
- }
- }
-
- public org.apache.accumulo.core.security.thrift.TCredentials getCredentials() {
- return this.credentials;
- }
-
- public beginTableOperation_args setCredentials(org.apache.accumulo.core.security.thrift.TCredentials credentials) {
- this.credentials = credentials;
- return this;
- }
-
- public void unsetCredentials() {
- this.credentials = null;
- }
-
- /** Returns true if field credentials is set (has been assigned a value) and false otherwise */
- public boolean isSetCredentials() {
- return this.credentials != null;
- }
-
- public void setCredentialsIsSet(boolean value) {
- if (!value) {
- this.credentials = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TINFO:
- if (value == null) {
- unsetTinfo();
- } else {
- setTinfo((org.apache.accumulo.trace.thrift.TInfo)value);
- }
- break;
-
- case CREDENTIALS:
- if (value == null) {
- unsetCredentials();
- } else {
- setCredentials((org.apache.accumulo.core.security.thrift.TCredentials)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TINFO:
- return getTinfo();
-
- case CREDENTIALS:
- return getCredentials();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TINFO:
- return isSetTinfo();
- case CREDENTIALS:
- return isSetCredentials();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof beginTableOperation_args)
- return this.equals((beginTableOperation_args)that);
- return false;
- }
-
- public boolean equals(beginTableOperation_args that) {
- if (that == null)
- return false;
-
- boolean this_present_tinfo = true && this.isSetTinfo();
- boolean that_present_tinfo = true && that.isSetTinfo();
- if (this_present_tinfo || that_present_tinfo) {
- if (!(this_present_tinfo && that_present_tinfo))
- return false;
- if (!this.tinfo.equals(that.tinfo))
- return false;
- }
-
- boolean this_present_credentials = true && this.isSetCredentials();
- boolean that_present_credentials = true && that.isSetCredentials();
- if (this_present_credentials || that_present_credentials) {
- if (!(this_present_credentials && that_present_credentials))
- return false;
- if (!this.credentials.equals(that.credentials))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- public int compareTo(beginTableOperation_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- beginTableOperation_args typedOther = (beginTableOperation_args)other;
-
- lastComparison = Boolean.valueOf(isSetTinfo()).compareTo(typedOther.isSetTinfo());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTinfo()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, typedOther.tinfo);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCredentials()).compareTo(typedOther.isSetCredentials());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCredentials()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, typedOther.credentials);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("beginTableOperation_args(");
- boolean first = true;
-
- sb.append("tinfo:");
- if (this.tinfo == null) {
- sb.append("null");
- } else {
- sb.append(this.tinfo);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("credentials:");
- if (this.credentials == null) {
- sb.append("null");
- } else {
- sb.append(this.credentials);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (tinfo != null) {
- tinfo.validate();
- }
- if (credentials != null) {
- credentials.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class beginTableOperation_argsStandardSchemeFactory implements SchemeFactory {
- public beginTableOperation_argsStandardScheme getScheme() {
- return new beginTableOperation_argsStandardScheme();
- }
- }
-
- private static class beginTableOperation_argsStandardScheme extends StandardScheme<beginTableOperation_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, beginTableOperation_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 2: // TINFO
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.tinfo = new org.apache.accumulo.trace.thrift.TInfo();
- struct.tinfo.read(iprot);
- struct.setTinfoIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // CREDENTIALS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.credentials = new org.apache.accumulo.core.security.thrift.TCredentials();
- struct.credentials.read(iprot);
- struct.setCredentialsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, beginTableOperation_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.credentials != null) {
- oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
- struct.credentials.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.tinfo != null) {
- oprot.writeFieldBegin(TINFO_FIELD_DESC);
- struct.tinfo.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class beginTableOperation_argsTupleSchemeFactory implements SchemeFactory {
- public beginTableOperation_argsTupleScheme getScheme() {
- return new beginTableOperation_argsTupleScheme();
- }
- }
-
- private static class beginTableOperation_argsTupleScheme extends TupleScheme<beginTableOperation_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, beginTableOperation_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetTinfo()) {
- optionals.set(0);
- }
- if (struct.isSetCredentials()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetTinfo()) {
- struct.tinfo.write(oprot);
- }
- if (struct.isSetCredentials()) {
- struct.credentials.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, beginTableOperation_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.tinfo = new org.apache.accumulo.trace.thrift.TInfo();
- struct.tinfo.read(iprot);
- struct.setTinfoIsSet(true);
- }
- if (incoming.get(1)) {
- struct.credentials = new org.apache.accumulo.core.security.thrift.TCredentials();
- struct.credentials.read(iprot);
- struct.setCredentialsIsSet(true);
- }
- }
- }
-
- }
-
- public static class beginTableOperation_result implements org.apache.thrift.TBase<beginTableOperation_result, beginTableOperation_result._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginTableOperation_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
- private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new beginTableOperation_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new beginTableOperation_resultTupleSchemeFactory());
- }
-
- public long success; // required
- public org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
- SEC((short)1, "sec");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // SEC
- return SEC;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginTableOperation_result.class, metaDataMap);
- }
-
- public beginTableOperation_result() {
- }
-
- public beginTableOperation_result(
- long success,
- org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- this.sec = sec;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public beginTableOperation_result(beginTableOperation_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- if (other.isSetSec()) {
- this.sec = new org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException(other.sec);
- }
- }
-
- public beginTableOperation_result deepCopy() {
- return new beginTableOperation_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = 0;
- this.sec = null;
- }
-
- public long getSuccess() {
- return this.success;
- }
-
- public beginTableOperation_result setSuccess(long success) {
- this.success = success;
- setSuccessIsSet(true);
- return this;
- }
-
- public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
- }
-
- public org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException getSec() {
- return this.sec;
- }
-
- public beginTableOperation_result setSec(org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec) {
- this.sec = sec;
- return this;
- }
-
- public void unsetSec() {
- this.sec = null;
- }
-
- /** Returns true if field sec is set (has been assigned a value) and false otherwise */
- public boolean isSetSec() {
- return this.sec != null;
- }
-
- public void setSecIsSet(boolean value) {
- if (!value) {
- this.sec = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Long)value);
- }
- break;
-
- case SEC:
- if (value == null) {
- unsetSec();
- } else {
- setSec((org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return Long.valueOf(getSuccess());
-
- case SEC:
- return getSec();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case SEC:
- return isSetSec();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof beginTableOperation_result)
- return this.equals((beginTableOperation_result)that);
- return false;
- }
-
- public boolean equals(beginTableOperation_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true;
- boolean that_present_success = true;
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (this.success != that.success)
- return false;
- }
-
- boolean this_present_sec = true && this.isSetSec();
- boolean that_present_sec = true && that.isSetSec();
- if (this_present_sec || that_present_sec) {
- if (!(this_present_sec && that_present_sec))
- return false;
- if (!this.sec.equals(that.sec))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- public int compareTo(beginTableOperation_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- beginTableOperation_result typedOther = (beginTableOperation_result)other;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSec()).compareTo(typedOther.isSetSec());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSec()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, typedOther.sec);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("beginTableOperation_result(");
- boolean first = true;
-
- sb.append("success:");
- sb.append(this.success);
- first = false;
- if (!first) sb.append(", ");
- sb.append("sec:");
- if (this.sec == null) {
- sb.append("null");
- } else {
- sb.append(this.sec);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class beginTableOperation_resultStandardSchemeFactory implements SchemeFactory {
- public beginTableOperation_resultStandardScheme getScheme() {
- return new beginTableOperation_resultStandardScheme();
- }
- }
-
- private static class beginTableOperation_resultStandardScheme extends StandardScheme<beginTableOperation_result> {
-
- public v
<TRUNCATED>