You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/10/27 21:32:33 UTC
[40/53] airavata git commit: Adding aurora-client project
http://git-wip-us.apache.org/repos/asf/airavata/blob/0f781b2e/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/AuroraAdmin.java
----------------------------------------------------------------------
diff --git a/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/AuroraAdmin.java b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/AuroraAdmin.java
new file mode 100644
index 0000000..0aa65f8
--- /dev/null
+++ b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/AuroraAdmin.java
@@ -0,0 +1,14381 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.cloud.aurora.client.sdk;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-21")
+public class AuroraAdmin {
+
+ public interface Iface extends AuroraSchedulerManager.Iface {
+
+ /**
+ * Assign quota to a user. This will overwrite any pre-existing quota for the user.
+ *
+ * @param ownerRole
+ * @param quota
+ */
+ public Response setQuota(String ownerRole, ResourceAggregate quota) throws org.apache.thrift.TException;
+
+ /**
+ * Forces a task into a specific state. This does not guarantee the task will enter the given
+ * state, as the task must still transition within the bounds of the state machine. However,
+ * it attempts to enter that state via the state machine.
+ *
+ * @param taskId
+ * @param status
+ */
+ public Response forceTaskState(String taskId, ScheduleStatus status) throws org.apache.thrift.TException;
+
+ /**
+ * Immediately writes a storage snapshot to disk.
+ */
+ public Response performBackup() throws org.apache.thrift.TException;
+
+ /**
+ * Lists backups that are available for recovery.
+ */
+ public Response listBackups() throws org.apache.thrift.TException;
+
+ /**
+ * Loads a backup to an in-memory storage. This must precede all other recovery operations.
+ *
+ * @param backupId
+ */
+ public Response stageRecovery(String backupId) throws org.apache.thrift.TException;
+
+ /**
+ * Queries for tasks in a staged recovery.
+ *
+ * @param query
+ */
+ public Response queryRecovery(TaskQuery query) throws org.apache.thrift.TException;
+
+ /**
+ * Deletes tasks from a staged recovery.
+ *
+ * @param query
+ */
+ public Response deleteRecoveryTasks(TaskQuery query) throws org.apache.thrift.TException;
+
+ /**
+ * Commits a staged recovery, completely replacing the previous storage state.
+ */
+ public Response commitRecovery() throws org.apache.thrift.TException;
+
+ /**
+ * Unloads (aborts) a staged recovery.
+ */
+ public Response unloadRecovery() throws org.apache.thrift.TException;
+
+ /**
+ * Put the given hosts into maintenance mode.
+ *
+ * @param hosts
+ */
+ public Response startMaintenance(Hosts hosts) throws org.apache.thrift.TException;
+
+ /**
+ * Ask scheduler to begin moving tasks scheduled on given hosts.
+ *
+ * @param hosts
+ */
+ public Response drainHosts(Hosts hosts) throws org.apache.thrift.TException;
+
+ /**
+ * Retrieve the current maintenance states for a group of hosts.
+ *
+ * @param hosts
+ */
+ public Response maintenanceStatus(Hosts hosts) throws org.apache.thrift.TException;
+
+ /**
+ * Set the given hosts back into serving mode.
+ *
+ * @param hosts
+ */
+ public Response endMaintenance(Hosts hosts) throws org.apache.thrift.TException;
+
+ /**
+ * Start a storage snapshot and block until it completes.
+ */
+ public Response snapshot() throws org.apache.thrift.TException;
+
+ /**
+ * Forcibly rewrites the stored definition of user configurations. This is intended to be used
+ * in a controlled setting, primarily to migrate pieces of configurations that are opaque to the
+ * scheduler (e.g. executorConfig).
+ * The scheduler may do some validation of the rewritten configurations, but it is important
+ * that the caller take care to provide valid input and alter only necessary fields.
+ *
+ * @param request
+ */
+ public Response rewriteConfigs(RewriteConfigsRequest request) throws org.apache.thrift.TException;
+
+ /**
+ * Tell scheduler to trigger an explicit task reconciliation with the given settings.
+ *
+ * @param settings
+ */
+ public Response triggerExplicitTaskReconciliation(ExplicitReconciliationSettings settings) throws org.apache.thrift.TException;
+
+ /**
+ * Tell scheduler to trigger an implicit task reconciliation.
+ */
+ public Response triggerImplicitTaskReconciliation() throws org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface extends AuroraSchedulerManager .AsyncIface {
+
+ public void setQuota(String ownerRole, ResourceAggregate quota, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void forceTaskState(String taskId, ScheduleStatus status, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void performBackup(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void listBackups(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void stageRecovery(String backupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void queryRecovery(TaskQuery query, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteRecoveryTasks(TaskQuery query, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void commitRecovery(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void unloadRecovery(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void startMaintenance(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void drainHosts(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void maintenanceStatus(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void endMaintenance(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void snapshot(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void rewriteConfigs(RewriteConfigsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void triggerExplicitTaskReconciliation(ExplicitReconciliationSettings settings, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void triggerImplicitTaskReconciliation(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends AuroraSchedulerManager.Client implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public Response setQuota(String ownerRole, ResourceAggregate quota) throws org.apache.thrift.TException
+ {
+ send_setQuota(ownerRole, quota);
+ return recv_setQuota();
+ }
+
+ public void send_setQuota(String ownerRole, ResourceAggregate quota) throws org.apache.thrift.TException
+ {
+ setQuota_args args = new setQuota_args();
+ args.setOwnerRole(ownerRole);
+ args.setQuota(quota);
+ sendBase("setQuota", args);
+ }
+
+ public Response recv_setQuota() throws org.apache.thrift.TException
+ {
+ setQuota_result result = new setQuota_result();
+ receiveBase(result, "setQuota");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setQuota failed: unknown result");
+ }
+
+ public Response forceTaskState(String taskId, ScheduleStatus status) throws org.apache.thrift.TException
+ {
+ send_forceTaskState(taskId, status);
+ return recv_forceTaskState();
+ }
+
+ public void send_forceTaskState(String taskId, ScheduleStatus status) throws org.apache.thrift.TException
+ {
+ forceTaskState_args args = new forceTaskState_args();
+ args.setTaskId(taskId);
+ args.setStatus(status);
+ sendBase("forceTaskState", args);
+ }
+
+ public Response recv_forceTaskState() throws org.apache.thrift.TException
+ {
+ forceTaskState_result result = new forceTaskState_result();
+ receiveBase(result, "forceTaskState");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "forceTaskState failed: unknown result");
+ }
+
+ public Response performBackup() throws org.apache.thrift.TException
+ {
+ send_performBackup();
+ return recv_performBackup();
+ }
+
+ public void send_performBackup() throws org.apache.thrift.TException
+ {
+ performBackup_args args = new performBackup_args();
+ sendBase("performBackup", args);
+ }
+
+ public Response recv_performBackup() throws org.apache.thrift.TException
+ {
+ performBackup_result result = new performBackup_result();
+ receiveBase(result, "performBackup");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "performBackup failed: unknown result");
+ }
+
+ public Response listBackups() throws org.apache.thrift.TException
+ {
+ send_listBackups();
+ return recv_listBackups();
+ }
+
+ public void send_listBackups() throws org.apache.thrift.TException
+ {
+ listBackups_args args = new listBackups_args();
+ sendBase("listBackups", args);
+ }
+
+ public Response recv_listBackups() throws org.apache.thrift.TException
+ {
+ listBackups_result result = new listBackups_result();
+ receiveBase(result, "listBackups");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listBackups failed: unknown result");
+ }
+
+ public Response stageRecovery(String backupId) throws org.apache.thrift.TException
+ {
+ send_stageRecovery(backupId);
+ return recv_stageRecovery();
+ }
+
+ public void send_stageRecovery(String backupId) throws org.apache.thrift.TException
+ {
+ stageRecovery_args args = new stageRecovery_args();
+ args.setBackupId(backupId);
+ sendBase("stageRecovery", args);
+ }
+
+ public Response recv_stageRecovery() throws org.apache.thrift.TException
+ {
+ stageRecovery_result result = new stageRecovery_result();
+ receiveBase(result, "stageRecovery");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "stageRecovery failed: unknown result");
+ }
+
+ public Response queryRecovery(TaskQuery query) throws org.apache.thrift.TException
+ {
+ send_queryRecovery(query);
+ return recv_queryRecovery();
+ }
+
+ public void send_queryRecovery(TaskQuery query) throws org.apache.thrift.TException
+ {
+ queryRecovery_args args = new queryRecovery_args();
+ args.setQuery(query);
+ sendBase("queryRecovery", args);
+ }
+
+ public Response recv_queryRecovery() throws org.apache.thrift.TException
+ {
+ queryRecovery_result result = new queryRecovery_result();
+ receiveBase(result, "queryRecovery");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryRecovery failed: unknown result");
+ }
+
+ public Response deleteRecoveryTasks(TaskQuery query) throws org.apache.thrift.TException
+ {
+ send_deleteRecoveryTasks(query);
+ return recv_deleteRecoveryTasks();
+ }
+
+ public void send_deleteRecoveryTasks(TaskQuery query) throws org.apache.thrift.TException
+ {
+ deleteRecoveryTasks_args args = new deleteRecoveryTasks_args();
+ args.setQuery(query);
+ sendBase("deleteRecoveryTasks", args);
+ }
+
+ public Response recv_deleteRecoveryTasks() throws org.apache.thrift.TException
+ {
+ deleteRecoveryTasks_result result = new deleteRecoveryTasks_result();
+ receiveBase(result, "deleteRecoveryTasks");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteRecoveryTasks failed: unknown result");
+ }
+
+ public Response commitRecovery() throws org.apache.thrift.TException
+ {
+ send_commitRecovery();
+ return recv_commitRecovery();
+ }
+
+ public void send_commitRecovery() throws org.apache.thrift.TException
+ {
+ commitRecovery_args args = new commitRecovery_args();
+ sendBase("commitRecovery", args);
+ }
+
+ public Response recv_commitRecovery() throws org.apache.thrift.TException
+ {
+ commitRecovery_result result = new commitRecovery_result();
+ receiveBase(result, "commitRecovery");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "commitRecovery failed: unknown result");
+ }
+
+ public Response unloadRecovery() throws org.apache.thrift.TException
+ {
+ send_unloadRecovery();
+ return recv_unloadRecovery();
+ }
+
+ public void send_unloadRecovery() throws org.apache.thrift.TException
+ {
+ unloadRecovery_args args = new unloadRecovery_args();
+ sendBase("unloadRecovery", args);
+ }
+
+ public Response recv_unloadRecovery() throws org.apache.thrift.TException
+ {
+ unloadRecovery_result result = new unloadRecovery_result();
+ receiveBase(result, "unloadRecovery");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unloadRecovery failed: unknown result");
+ }
+
+ public Response startMaintenance(Hosts hosts) throws org.apache.thrift.TException
+ {
+ send_startMaintenance(hosts);
+ return recv_startMaintenance();
+ }
+
+ public void send_startMaintenance(Hosts hosts) throws org.apache.thrift.TException
+ {
+ startMaintenance_args args = new startMaintenance_args();
+ args.setHosts(hosts);
+ sendBase("startMaintenance", args);
+ }
+
+ public Response recv_startMaintenance() throws org.apache.thrift.TException
+ {
+ startMaintenance_result result = new startMaintenance_result();
+ receiveBase(result, "startMaintenance");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startMaintenance failed: unknown result");
+ }
+
+ public Response drainHosts(Hosts hosts) throws org.apache.thrift.TException
+ {
+ send_drainHosts(hosts);
+ return recv_drainHosts();
+ }
+
+ public void send_drainHosts(Hosts hosts) throws org.apache.thrift.TException
+ {
+ drainHosts_args args = new drainHosts_args();
+ args.setHosts(hosts);
+ sendBase("drainHosts", args);
+ }
+
+ public Response recv_drainHosts() throws org.apache.thrift.TException
+ {
+ drainHosts_result result = new drainHosts_result();
+ receiveBase(result, "drainHosts");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "drainHosts failed: unknown result");
+ }
+
+ public Response maintenanceStatus(Hosts hosts) throws org.apache.thrift.TException
+ {
+ send_maintenanceStatus(hosts);
+ return recv_maintenanceStatus();
+ }
+
+ public void send_maintenanceStatus(Hosts hosts) throws org.apache.thrift.TException
+ {
+ maintenanceStatus_args args = new maintenanceStatus_args();
+ args.setHosts(hosts);
+ sendBase("maintenanceStatus", args);
+ }
+
+ public Response recv_maintenanceStatus() throws org.apache.thrift.TException
+ {
+ maintenanceStatus_result result = new maintenanceStatus_result();
+ receiveBase(result, "maintenanceStatus");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "maintenanceStatus failed: unknown result");
+ }
+
+ public Response endMaintenance(Hosts hosts) throws org.apache.thrift.TException
+ {
+ send_endMaintenance(hosts);
+ return recv_endMaintenance();
+ }
+
+ public void send_endMaintenance(Hosts hosts) throws org.apache.thrift.TException
+ {
+ endMaintenance_args args = new endMaintenance_args();
+ args.setHosts(hosts);
+ sendBase("endMaintenance", args);
+ }
+
+ public Response recv_endMaintenance() throws org.apache.thrift.TException
+ {
+ endMaintenance_result result = new endMaintenance_result();
+ receiveBase(result, "endMaintenance");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "endMaintenance failed: unknown result");
+ }
+
+ public Response snapshot() throws org.apache.thrift.TException
+ {
+ send_snapshot();
+ return recv_snapshot();
+ }
+
+ public void send_snapshot() throws org.apache.thrift.TException
+ {
+ snapshot_args args = new snapshot_args();
+ sendBase("snapshot", args);
+ }
+
+ public Response recv_snapshot() throws org.apache.thrift.TException
+ {
+ snapshot_result result = new snapshot_result();
+ receiveBase(result, "snapshot");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "snapshot failed: unknown result");
+ }
+
+ public Response rewriteConfigs(RewriteConfigsRequest request) throws org.apache.thrift.TException
+ {
+ send_rewriteConfigs(request);
+ return recv_rewriteConfigs();
+ }
+
+ public void send_rewriteConfigs(RewriteConfigsRequest request) throws org.apache.thrift.TException
+ {
+ rewriteConfigs_args args = new rewriteConfigs_args();
+ args.setRequest(request);
+ sendBase("rewriteConfigs", args);
+ }
+
+ public Response recv_rewriteConfigs() throws org.apache.thrift.TException
+ {
+ rewriteConfigs_result result = new rewriteConfigs_result();
+ receiveBase(result, "rewriteConfigs");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "rewriteConfigs failed: unknown result");
+ }
+
+ public Response triggerExplicitTaskReconciliation(ExplicitReconciliationSettings settings) throws org.apache.thrift.TException
+ {
+ send_triggerExplicitTaskReconciliation(settings);
+ return recv_triggerExplicitTaskReconciliation();
+ }
+
+ public void send_triggerExplicitTaskReconciliation(ExplicitReconciliationSettings settings) throws org.apache.thrift.TException
+ {
+ triggerExplicitTaskReconciliation_args args = new triggerExplicitTaskReconciliation_args();
+ args.setSettings(settings);
+ sendBase("triggerExplicitTaskReconciliation", args);
+ }
+
+ public Response recv_triggerExplicitTaskReconciliation() throws org.apache.thrift.TException
+ {
+ triggerExplicitTaskReconciliation_result result = new triggerExplicitTaskReconciliation_result();
+ receiveBase(result, "triggerExplicitTaskReconciliation");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "triggerExplicitTaskReconciliation failed: unknown result");
+ }
+
+ public Response triggerImplicitTaskReconciliation() throws org.apache.thrift.TException
+ {
+ send_triggerImplicitTaskReconciliation();
+ return recv_triggerImplicitTaskReconciliation();
+ }
+
+ public void send_triggerImplicitTaskReconciliation() throws org.apache.thrift.TException
+ {
+ triggerImplicitTaskReconciliation_args args = new triggerImplicitTaskReconciliation_args();
+ sendBase("triggerImplicitTaskReconciliation", args);
+ }
+
+ public Response recv_triggerImplicitTaskReconciliation() throws org.apache.thrift.TException
+ {
+ triggerImplicitTaskReconciliation_result result = new triggerImplicitTaskReconciliation_result();
+ receiveBase(result, "triggerImplicitTaskReconciliation");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "triggerImplicitTaskReconciliation failed: unknown result");
+ }
+
+ }
+ public static class AsyncClient extends AuroraSchedulerManager.AsyncClient implements AsyncIface {
+ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void setQuota(String ownerRole, ResourceAggregate quota, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ setQuota_call method_call = new setQuota_call(ownerRole, quota, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class setQuota_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String ownerRole;
+ private ResourceAggregate quota;
+ public setQuota_call(String ownerRole, ResourceAggregate quota, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.ownerRole = ownerRole;
+ this.quota = quota;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setQuota", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ setQuota_args args = new setQuota_args();
+ args.setOwnerRole(ownerRole);
+ args.setQuota(quota);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_setQuota();
+ }
+ }
+
+ public void forceTaskState(String taskId, ScheduleStatus status, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ forceTaskState_call method_call = new forceTaskState_call(taskId, status, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class forceTaskState_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String taskId;
+ private ScheduleStatus status;
+ public forceTaskState_call(String taskId, ScheduleStatus status, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.taskId = taskId;
+ this.status = status;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("forceTaskState", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ forceTaskState_args args = new forceTaskState_args();
+ args.setTaskId(taskId);
+ args.setStatus(status);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_forceTaskState();
+ }
+ }
+
+ public void performBackup(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ performBackup_call method_call = new performBackup_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class performBackup_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public performBackup_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("performBackup", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ performBackup_args args = new performBackup_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_performBackup();
+ }
+ }
+
+ public void listBackups(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ listBackups_call method_call = new listBackups_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class listBackups_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public listBackups_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listBackups", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ listBackups_args args = new listBackups_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_listBackups();
+ }
+ }
+
+ public void stageRecovery(String backupId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ stageRecovery_call method_call = new stageRecovery_call(backupId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class stageRecovery_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String backupId;
+ public stageRecovery_call(String backupId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.backupId = backupId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stageRecovery", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ stageRecovery_args args = new stageRecovery_args();
+ args.setBackupId(backupId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_stageRecovery();
+ }
+ }
+
+ public void queryRecovery(TaskQuery query, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ queryRecovery_call method_call = new queryRecovery_call(query, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class queryRecovery_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private TaskQuery query;
+ public queryRecovery_call(TaskQuery query, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.query = query;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryRecovery", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ queryRecovery_args args = new queryRecovery_args();
+ args.setQuery(query);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_queryRecovery();
+ }
+ }
+
+ public void deleteRecoveryTasks(TaskQuery query, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteRecoveryTasks_call method_call = new deleteRecoveryTasks_call(query, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteRecoveryTasks_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private TaskQuery query;
+ public deleteRecoveryTasks_call(TaskQuery query, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.query = query;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteRecoveryTasks", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteRecoveryTasks_args args = new deleteRecoveryTasks_args();
+ args.setQuery(query);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_deleteRecoveryTasks();
+ }
+ }
+
+ public void commitRecovery(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ commitRecovery_call method_call = new commitRecovery_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class commitRecovery_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public commitRecovery_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("commitRecovery", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ commitRecovery_args args = new commitRecovery_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_commitRecovery();
+ }
+ }
+
+ public void unloadRecovery(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ unloadRecovery_call method_call = new unloadRecovery_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class unloadRecovery_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public unloadRecovery_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unloadRecovery", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ unloadRecovery_args args = new unloadRecovery_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_unloadRecovery();
+ }
+ }
+
+ public void startMaintenance(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ startMaintenance_call method_call = new startMaintenance_call(hosts, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class startMaintenance_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private Hosts hosts;
+ public startMaintenance_call(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.hosts = hosts;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startMaintenance", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ startMaintenance_args args = new startMaintenance_args();
+ args.setHosts(hosts);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_startMaintenance();
+ }
+ }
+
+ public void drainHosts(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ drainHosts_call method_call = new drainHosts_call(hosts, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class drainHosts_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private Hosts hosts;
+ public drainHosts_call(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.hosts = hosts;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("drainHosts", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ drainHosts_args args = new drainHosts_args();
+ args.setHosts(hosts);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_drainHosts();
+ }
+ }
+
+ public void maintenanceStatus(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ maintenanceStatus_call method_call = new maintenanceStatus_call(hosts, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class maintenanceStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private Hosts hosts;
+ public maintenanceStatus_call(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.hosts = hosts;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("maintenanceStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ maintenanceStatus_args args = new maintenanceStatus_args();
+ args.setHosts(hosts);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_maintenanceStatus();
+ }
+ }
+
+ public void endMaintenance(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ endMaintenance_call method_call = new endMaintenance_call(hosts, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class endMaintenance_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private Hosts hosts;
+ public endMaintenance_call(Hosts hosts, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.hosts = hosts;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("endMaintenance", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ endMaintenance_args args = new endMaintenance_args();
+ args.setHosts(hosts);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_endMaintenance();
+ }
+ }
+
+ public void snapshot(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ snapshot_call method_call = new snapshot_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class snapshot_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public snapshot_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("snapshot", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ snapshot_args args = new snapshot_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_snapshot();
+ }
+ }
+
+ public void rewriteConfigs(RewriteConfigsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ rewriteConfigs_call method_call = new rewriteConfigs_call(request, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class rewriteConfigs_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private RewriteConfigsRequest request;
+ public rewriteConfigs_call(RewriteConfigsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.request = request;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("rewriteConfigs", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ rewriteConfigs_args args = new rewriteConfigs_args();
+ args.setRequest(request);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_rewriteConfigs();
+ }
+ }
+
+ public void triggerExplicitTaskReconciliation(ExplicitReconciliationSettings settings, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ triggerExplicitTaskReconciliation_call method_call = new triggerExplicitTaskReconciliation_call(settings, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class triggerExplicitTaskReconciliation_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private ExplicitReconciliationSettings settings;
+ public triggerExplicitTaskReconciliation_call(ExplicitReconciliationSettings settings, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.settings = settings;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("triggerExplicitTaskReconciliation", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ triggerExplicitTaskReconciliation_args args = new triggerExplicitTaskReconciliation_args();
+ args.setSettings(settings);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_triggerExplicitTaskReconciliation();
+ }
+ }
+
+ public void triggerImplicitTaskReconciliation(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ triggerImplicitTaskReconciliation_call method_call = new triggerImplicitTaskReconciliation_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class triggerImplicitTaskReconciliation_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public triggerImplicitTaskReconciliation_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("triggerImplicitTaskReconciliation", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ triggerImplicitTaskReconciliation_args args = new triggerImplicitTaskReconciliation_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Response getResult() throws 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_triggerImplicitTaskReconciliation();
+ }
+ }
+
+ }
+
+ public static class Processor<I extends Iface> extends AuroraSchedulerManager.Processor<I> implements org.apache.thrift.TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ }
+
+ protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("setQuota", new setQuota());
+ processMap.put("forceTaskState", new forceTaskState());
+ processMap.put("performBackup", new performBackup());
+ processMap.put("listBackups", new listBackups());
+ processMap.put("stageRecovery", new stageRecovery());
+ processMap.put("queryRecovery", new queryRecovery());
+ processMap.put("deleteRecoveryTasks", new deleteRecoveryTasks());
+ processMap.put("commitRecovery", new commitRecovery());
+ processMap.put("unloadRecovery", new unloadRecovery());
+ processMap.put("startMaintenance", new startMaintenance());
+ processMap.put("drainHosts", new drainHosts());
+ processMap.put("maintenanceStatus", new maintenanceStatus());
+ processMap.put("endMaintenance", new endMaintenance());
+ processMap.put("snapshot", new snapshot());
+ processMap.put("rewriteConfigs", new rewriteConfigs());
+ processMap.put("triggerExplicitTaskReconciliation", new triggerExplicitTaskReconciliation());
+ processMap.put("triggerImplicitTaskReconciliation", new triggerImplicitTaskReconciliation());
+ return processMap;
+ }
+
+ public static class setQuota<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setQuota_args> {
+ public setQuota() {
+ super("setQuota");
+ }
+
+ public setQuota_args getEmptyArgsInstance() {
+ return new setQuota_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public setQuota_result getResult(I iface, setQuota_args args) throws org.apache.thrift.TException {
+ setQuota_result result = new setQuota_result();
+ result.success = iface.setQuota(args.ownerRole, args.quota);
+ return result;
+ }
+ }
+
+ public static class forceTaskState<I extends Iface> extends org.apache.thrift.ProcessFunction<I, forceTaskState_args> {
+ public forceTaskState() {
+ super("forceTaskState");
+ }
+
+ public forceTaskState_args getEmptyArgsInstance() {
+ return new forceTaskState_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public forceTaskState_result getResult(I iface, forceTaskState_args args) throws org.apache.thrift.TException {
+ forceTaskState_result result = new forceTaskState_result();
+ result.success = iface.forceTaskState(args.taskId, args.status);
+ return result;
+ }
+ }
+
+ public static class performBackup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, performBackup_args> {
+ public performBackup() {
+ super("performBackup");
+ }
+
+ public performBackup_args getEmptyArgsInstance() {
+ return new performBackup_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public performBackup_result getResult(I iface, performBackup_args args) throws org.apache.thrift.TException {
+ performBackup_result result = new performBackup_result();
+ result.success = iface.performBackup();
+ return result;
+ }
+ }
+
+ public static class listBackups<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listBackups_args> {
+ public listBackups() {
+ super("listBackups");
+ }
+
+ public listBackups_args getEmptyArgsInstance() {
+ return new listBackups_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public listBackups_result getResult(I iface, listBackups_args args) throws org.apache.thrift.TException {
+ listBackups_result result = new listBackups_result();
+ result.success = iface.listBackups();
+ return result;
+ }
+ }
+
+ public static class stageRecovery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stageRecovery_args> {
+ public stageRecovery() {
+ super("stageRecovery");
+ }
+
+ public stageRecovery_args getEmptyArgsInstance() {
+ return new stageRecovery_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public stageRecovery_result getResult(I iface, stageRecovery_args args) throws org.apache.thrift.TException {
+ stageRecovery_result result = new stageRecovery_result();
+ result.success = iface.stageRecovery(args.backupId);
+ return result;
+ }
+ }
+
+ public static class queryRecovery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, queryRecovery_args> {
+ public queryRecovery() {
+ super("queryRecovery");
+ }
+
+ public queryRecovery_args getEmptyArgsInstance() {
+ return new queryRecovery_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public queryRecovery_result getResult(I iface, queryRecovery_args args) throws org.apache.thrift.TException {
+ queryRecovery_result result = new queryRecovery_result();
+ result.success = iface.queryRecovery(args.query);
+ return result;
+ }
+ }
+
+ public static class deleteRecoveryTasks<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteRecoveryTasks_args> {
+ public deleteRecoveryTasks() {
+ super("deleteRecoveryTasks");
+ }
+
+ public deleteRecoveryTasks_args getEmptyArgsInstance() {
+ return new deleteRecoveryTasks_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public deleteRecoveryTasks_result getResult(I iface, deleteRecoveryTasks_args args) throws org.apache.thrift.TException {
+ deleteRecoveryTasks_result result = new deleteRecoveryTasks_result();
+ result.success = iface.deleteRecoveryTasks(args.query);
+ return result;
+ }
+ }
+
+ public static class commitRecovery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, commitRecovery_args> {
+ public commitRecovery() {
+ super("commitRecovery");
+ }
+
+ public commitRecovery_args getEmptyArgsInstance() {
+ return new commitRecovery_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public commitRecovery_result getResult(I iface, commitRecovery_args args) throws org.apache.thrift.TException {
+ commitRecovery_result result = new commitRecovery_result();
+ result.success = iface.commitRecovery();
+ return result;
+ }
+ }
+
+ public static class unloadRecovery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unloadRecovery_args> {
+ public unloadRecovery() {
+ super("unloadRecovery");
+ }
+
+ public unloadRecovery_args getEmptyArgsInstance() {
+ return new unloadRecovery_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public unloadRecovery_result getResult(I iface, unloadRecovery_args args) throws org.apache.thrift.TException {
+ unloadRecovery_result result = new unloadRecovery_result();
+ result.success = iface.unloadRecovery();
+ return result;
+ }
+ }
+
+ public static class startMaintenance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startMaintenance_args> {
+ public startMaintenance() {
+ super("startMaintenance");
+ }
+
+ public startMaintenance_args getEmptyArgsInstance() {
+ return new startMaintenance_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public startMaintenance_result getResult(I iface, startMaintenance_args args) throws org.apache.thrift.TException {
+ startMaintenance_result result = new startMaintenance_result();
+ result.success = iface.startMaintenance(args.hosts);
+ return result;
+ }
+ }
+
+ public static class drainHosts<I extends Iface> extends org.apache.thrift.ProcessFunction<I, drainHosts_args> {
+ public drainHosts() {
+ super("drainHosts");
+ }
+
+ public drainHosts_args getEmptyArgsInstance() {
+ return new drainHosts_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public drainHosts_result getResult(I iface, drainHosts_args args) throws org.apache.thrift.TException {
+ drainHosts_result result = new drainHosts_result();
+ result.success = iface.drainHosts(args.hosts);
+ return result;
+ }
+ }
+
+ public static class maintenanceStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, maintenanceStatus_args> {
+ public maintenanceStatus() {
+ super("maintenanceStatus");
+ }
+
+ public maintenanceStatus_args getEmptyArgsInstance() {
+ return new maintenanceStatus_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public maintenanceStatus_result getResult(I iface, maintenanceStatus_args args) throws org.apache.thrift.TException {
+ maintenanceStatus_result result = new maintenanceStatus_result();
+ result.success = iface.maintenanceStatus(args.hosts);
+ return result;
+ }
+ }
+
+ public static class endMaintenance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, endMaintenance_args> {
+ public endMaintenance() {
+ super("endMaintenance");
+ }
+
+ public endMaintenance_args getEmptyArgsInstance() {
+ return new endMaintenance_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public endMaintenance_result getResult(I iface, endMaintenance_args args) throws org.apache.thrift.TException {
+ endMaintenance_result result = new endMaintenance_result();
+ result.success = iface.endMaintenance(args.hosts);
+ return result;
+ }
+ }
+
+ public static class snapshot<I extends Iface> extends org.apache.thrift.ProcessFunction<I, snapshot_args> {
+ public snapshot() {
+ super("snapshot");
+ }
+
+ public snapshot_args getEmptyArgsInstance() {
+ return new snapshot_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public snapshot_result getResult(I iface, snapshot_args args) throws org.apache.thrift.TException {
+ snapshot_result result = new snapshot_result();
+ result.success = iface.snapshot();
+ return result;
+ }
+ }
+
+ public static class rewriteConfigs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, rewriteConfigs_args> {
+ public rewriteConfigs() {
+ super("rewriteConfigs");
+ }
+
+ public rewriteConfigs_args getEmptyArgsInstance() {
+ return new rewriteConfigs_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public rewriteConfigs_result getResult(I iface, rewriteConfigs_args args) throws org.apache.thrift.TException {
+ rewriteConfigs_result result = new rewriteConfigs_result();
+ result.success = iface.rewriteConfigs(args.request);
+ return result;
+ }
+ }
+
+ public static class triggerExplicitTaskReconciliation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, triggerExplicitTaskReconciliation_args> {
+ public triggerExplicitTaskReconciliation() {
+ super("triggerExplicitTaskReconciliation");
+ }
+
+ public triggerExplicitTaskReconciliation_args getEmptyArgsInstance() {
+ return new triggerExplicitTaskReconciliation_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public triggerExplicitTaskReconciliation_result getResult(I iface, triggerExplicitTaskReconciliation_args args) throws org.apache.thrift.TException {
+ triggerExplicitTaskReconciliation_result result = new triggerExplicitTaskReconciliation_result();
+ result.success = iface.triggerExplicitTaskReconciliation(args.settings);
+ return result;
+ }
+ }
+
+ public static class triggerImplicitTaskReconciliation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, triggerImplicitTaskReconciliation_args> {
+ public triggerImplicitTaskReconciliation() {
+ super("triggerImplicitTaskReconciliation");
+ }
+
+ public triggerImplicitTaskReconciliation_args getEmptyArgsInstance() {
+ return new triggerImplicitTaskReconciliation_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public triggerImplicitTaskReconciliation_result getResult(I iface, triggerImplicitTaskReconciliation_args args) throws org.apache.thrift.TException {
+ triggerImplicitTaskReconciliation_result result = new triggerImplicitTaskReconciliation_result();
+ result.success = iface.triggerImplicitTaskReconciliation();
+ return result;
+ }
+ }
+
+ }
+
+ public static class AsyncProcessor<I extends AsyncIface> extends AuroraSchedulerManager.AsyncProcessor<I> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ public AsyncProcessor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ }
+
+ protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ processMap.put("setQuota", new setQuota());
+ processMap.put("forceTaskState", new forceTaskState());
+ processMap.put("performBackup", new performBackup());
+ processMap.put("listBackups", new listBackups());
+ processMap.put("stageRecovery", new stageRecovery());
+ processMap.put("queryRecovery", new queryRecovery());
+ processMap.put("deleteRecoveryTasks", new deleteRecoveryTasks());
+ processMap.put("commitRecovery", new commitRecovery());
+ processMap.put("unloadRecovery", new unloadRecovery());
+ processMap.put("startMaintenance", new startMaintenance());
+ processMap.put("drainHosts", new drainHosts());
+ processMap.put("maintenanceStatus", new maintenanceStatus());
+ processMap.put("endMaintenance", new endMaintenance());
+ processMap.put("snapshot", new snapshot());
+ processMap.put("rewriteConfigs", new rewriteConfigs());
+ processMap.put("triggerExplicitTaskReconciliation", new triggerExplicitTaskReconciliation());
+ processMap.put("triggerImplicitTaskReconciliation", new triggerImplicitTaskReconciliation());
+ return processMap;
+ }
+
+ public static class setQuota<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setQuota_args, Response> {
+ public setQuota() {
+ super("setQuota");
+ }
+
+ public setQuota_args getEmptyArgsInstance() {
+ return new setQuota_args();
+ }
+
+ public AsyncMethodCallback<Response> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Response>() {
+ public void onComplete(Response o) {
+ setQuota_result result = new setQuota_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ setQuota_result result = new setQuota_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, setQuota_args args, org.apache.thrift.async.AsyncMethodCallback<Response> resultHandler) throws TException {
+ iface.setQuota(args.ownerRole, args.quota,resultHandler);
+ }
+ }
+
+ public static class forceTaskState<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, forceTaskState_args, Response> {
+ public forceTaskState() {
+ super("forceTaskState");
+ }
+
+ public forceTaskState_args getEmptyArgsInstance() {
+ return new forceTaskState_args();
+ }
+
+ public AsyncMethodCallback<Response> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Response>() {
+ public void onComplete(Response o) {
+ forceTaskState_result result = new forceTaskState_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ forceTaskState_result result = new forceTaskState_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, forceTaskState_args args, org.apache.thrift.async.AsyncMethodCallback<Response> resultHandler) throws TException {
+ iface.forceTaskState(args.taskId, args.status,resultHandler);
+ }
+ }
+
+ public static class performBackup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, performBackup_args, Response> {
+ public performBackup() {
+ super("performBackup");
+ }
+
+ public performBackup_args getEmptyArgsInstance() {
+ return new performBackup_args();
+ }
+
+ public AsyncMethodCallback<Response> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Response>() {
+ public void onComplete(Response o) {
+ performBackup_result result = new performBackup_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ performBackup_result result = new performBackup_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, performBackup_args args, org.apache.thrift.async.AsyncMethodCallback<Response> resultHandler) throws TException {
+ iface.performBackup(resultHandler);
+ }
+ }
+
+ public static class listBackups<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listBackups_args, Response> {
+ public listBackups() {
+ super("listBackups");
+ }
+
+ public listBackups_args getEmptyArgsInstance() {
+ return new listBackups_args();
+ }
+
+ public AsyncMethodCallback<Response> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Response>() {
+ public void onComplete(Response o) {
+ listBackups_result result = new listBackups_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ listBackups_result result = new listBackups_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, listBackups_args args, org.apache.thrift.async.AsyncMethodCallback<Response> resultHandler) throws TException {
+ iface.listBackups(resultHandler);
+ }
+ }
+
+ public static class stageRecovery<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, stageRecovery_args, Response> {
+ public stageRecovery() {
+ super("stageRecovery");
+ }
+
+ public stageRecovery_args getEmptyArgsInstance() {
+ return new stageRecovery_args();
+ }
+
+ public AsyncMethodCallback<Response> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Response>() {
+ public void onComplete(Response o) {
+ stageRecovery_result result = new stageRecovery_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ stageRecovery_result result = new stageRecovery_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, stageRecovery_args args, org.apache.thrift.async.AsyncMethodCallback<Response> resultHandler) throws TException {
+ iface.stageRecovery(args.backupId,resultHandler);
+ }
+ }
+
+ public static class queryRecovery<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, queryRecovery_args, Response> {
+ public queryRecovery() {
+ super("queryRecovery");
+ }
+
+ public queryRecovery_args getEmptyArgsInstance() {
+ return new queryRecovery_args();
+ }
+
+ public AsyncMethodCallback<Response> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Response>() {
+ public void onComplete(Response o) {
+ queryRecovery_result result = new queryRecovery_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ queryRecovery_result result = new queryRecovery_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, queryRecovery_args args, org.apache.thrift.async.AsyncMethodCallback<Response> resultHandler) throws TException {
+ iface.queryRecovery(args.query,resultHandler);
+ }
+ }
+
+ public static class deleteRecoveryTasks<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteRecoveryTasks_args, Response> {
+ public deleteRecoveryTasks() {
+ super("deleteRecoveryTasks");
+ }
+
+ public deleteRecoveryTasks_args getEmptyArgsInstance() {
+ return new deleteRecoveryTasks_args();
+ }
+
+ public AsyncMethodCallback<Response> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Response>() {
+ public void onComplete(Response o) {
+ deleteRecoveryTasks_result result = new deleteRecoveryTasks_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ deleteRecoveryTasks_result result = new deleteRecoveryTasks_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, deleteRecoveryTasks_args args, org.apache.thrift.async.AsyncMethodCallback<Response> resultHandler) throws TException {
+ iface.deleteRecoveryTasks(args.query,resultHandler);
+ }
+ }
+
+ public static class commitRecovery<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, commitRecovery_args, Response> {
+ public commitRecovery() {
+ super("commitRecovery");
+ }
+
+ public commitRecovery_args getEmptyArgsInstance() {
+ return new commitRecovery_args();
+ }
+
+ public AsyncMethodCallback<Response> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Response>() {
+ public void onComplete(Response o) {
+ commitRecovery_result result = new commitRecovery_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,re
<TRUNCATED>