You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2026/03/10 22:25:02 UTC
(accumulo) branch main updated: Adds support for multiple managers running distributed fate (#6168)
This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new e65f1b2a94 Adds support for multiple managers running distributed fate (#6168)
e65f1b2a94 is described below
commit e65f1b2a94ec25f763f5cbee99f441f99d4ea11b
Author: Keith Turner <kt...@apache.org>
AuthorDate: Tue Mar 10 15:24:56 2026 -0700
Adds support for multiple managers running distributed fate (#6168)
Lays the foundation for multiple manager with the following changes.
The best place to start looking at these changes is in the Manager.run()
method which sets everything and ties it all together.
* Each manager process acquires two zookeeper locks now, a primary lock
and an assistant lock. Only one manager process can obtain the
primary lock and when it does it assumes the role of primary manager.
All manager processes acquire an assistant lock, which is similar to a
tserver or compactor lock. The assistant lock advertises the manager
process as being available to other Accumulo processes to handle
assistant manager operations.
* Manager processes have a single thrift server and thrift services
hosted on that thrift server are categorized into primary manager and
assistant manager services. When an assistant manager receives an RPC
for a primary manager thrift service it will not execute the request and
will throw an error or ignore the request.
* The primary manager process delegates manager responsibility via RPCs
to assistant managers.
* Any management responsibility not delegated runs on the primary manager.
Using the changes above fate is now distributed across all manager
processes. In the future the changes above should make it easy to
delegate other responsibilities to assistant managers. The following
is an outline of the fate changes.
* New FateWorker class. This runs in every manager and handles
request from the primary manager to adjust what range of the fate
table its currently responsible for. FateWorker implements a new
thrift service used to assign it ranges.
* New FateManager class that is run by the primary manager and is
responsible for partitioning fate processing across all assistant
managers. As manager processes come and go this will repartition the
fate table evenly across all available managers. The FateManager
communicates with FateWorkers via thrift.
* Some new RPCs for best effort notifications. Before these changes
there were in memory notification systems that made the manager more
responsive. These would allow a fate operation to signal the Tablet
Group Watcher to take action sooner. FateWorkerEnv sends these
notifications to the primary manger over a new RPC. Does not matter if
they are lost, things will still eventually happen.
Other than fate, the primary manager process does everything the
current manager does. This change pulls from #3262 and #6139.
Co-authored-by: Dave Marion <dl...@apache.org>
---
.../java/org/apache/accumulo/core/Constants.java | 1 +
.../accumulo/core/clientImpl/ClientContext.java | 2 +-
.../accumulo/core/fate/AbstractFateStore.java | 27 +-
.../java/org/apache/accumulo/core/fate/Fate.java | 48 +-
.../org/apache/accumulo/core/fate/FateClient.java | 34 +-
.../apache/accumulo/core/fate/FateExecutor.java | 18 +-
.../accumulo/core/fate/FateExecutorMetrics.java | 4 +-
.../apache/accumulo/core/fate/FatePartition.java | 63 +
.../org/apache/accumulo/core/fate/FateStore.java | 12 +-
.../accumulo/core/fate/ReadOnlyFateStore.java | 6 +-
.../accumulo/core/fate/user/UserFateStore.java | 24 +-
.../core/fate/zookeeper/MetaFateStore.java | 18 +-
.../apache/accumulo/core/lock/ServiceLockData.java | 3 +-
.../accumulo/core/lock/ServiceLockPaths.java | 23 +-
.../apache/accumulo/core/logging/FateLogger.java | 30 +-
.../core/rpc/clients/FateWorkerThriftClient.java | 31 +
.../core/rpc/clients/ThriftClientTypes.java | 4 +
core/src/main/spotbugs/exclude-filter.xml | 1 +
.../thrift/CompactionCoordinatorService.java | 728 ++++
.../accumulo/core/manager/thrift/FateService.java | 76 +-
.../core/manager/thrift/FateWorkerService.java | 3778 ++++++++++++++++++++
.../core/manager/thrift/ManagerClientService.java | 1946 ++++++++--
.../accumulo/core/manager/thrift/TEvent.java | 516 +++
.../core/manager/thrift/TFatePartition.java | 511 +++
.../core/manager/thrift/TFatePartitions.java | 561 +++
core/src/main/thrift/compaction-coordinator.thrift | 6 +
core/src/main/thrift/manager.thrift | 50 +
.../org/apache/accumulo/core/fate/TestStore.java | 10 +-
...rvice.java => PrimaryManagerThriftService.java} | 8 +-
.../accumulo/server/init/ZooKeeperInitializer.java | 2 +
... => PrimaryManagerThriftInvocationHandler.java} | 18 +-
...ava => PrimaryManagerThriftServiceWrapper.java} | 14 +-
.../accumulo/server/rpc/ThriftProcessorTypes.java | 10 +-
.../apache/accumulo/manager/EventCoordinator.java | 50 +-
.../java/org/apache/accumulo/manager/Manager.java | 240 +-
.../manager/ManagerClientServiceHandler.java | 20 +-
.../accumulo/manager/TabletGroupWatcher.java | 4 +-
.../coordinator/CompactionCoordinator.java | 8 +
.../apache/accumulo/manager/fate/FateManager.java | 451 +++
.../apache/accumulo/manager/fate/FateWorker.java | 188 +
.../accumulo/manager/fate/FateWorkerEnv.java | 242 ++
.../metrics/fate/FateExecutorMetricsProducer.java | 74 +
.../accumulo/manager/metrics/fate/FateMetrics.java | 30 +-
.../manager/metrics/fate/meta/MetaFateMetrics.java | 8 +-
.../manager/metrics/fate/user/UserFateMetrics.java | 9 +-
.../accumulo/manager/tableOps/split/PreSplit.java | 2 +-
.../accumulo/manager/upgrade/Upgrader11to12.java | 11 +
.../accumulo/test/ComprehensiveMultiManagerIT.java | 84 +
.../apache/accumulo/test/MultipleManagerIT.java | 300 ++
.../test/fate/FateExecutionOrderITBase.java | 5 +-
.../org/apache/accumulo/test/fate/FateITBase.java | 133 +-
.../accumulo/test/fate/FateOpsCommandsITBase.java | 6 +-
.../accumulo/test/fate/FatePoolsWatcherITBase.java | 7 +
.../apache/accumulo/test/fate/FateStoreITBase.java | 10 +-
.../accumulo/test/fate/FlakyFateManager.java | 5 +-
.../accumulo/test/fate/MultipleStoresITBase.java | 22 +-
.../accumulo/test/fate/SlowFateSplitManager.java | 5 +-
57 files changed, 9932 insertions(+), 565 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/Constants.java b/core/src/main/java/org/apache/accumulo/core/Constants.java
index ea06bc4ad7..eb8ba1059e 100644
--- a/core/src/main/java/org/apache/accumulo/core/Constants.java
+++ b/core/src/main/java/org/apache/accumulo/core/Constants.java
@@ -49,6 +49,7 @@ public class Constants {
public static final String ZMANAGERS = "/managers";
public static final String ZMANAGER_LOCK = ZMANAGERS + "/lock";
+ public static final String ZMANAGER_ASSISTANT_LOCK = ZMANAGERS + "/assistants";
public static final String ZMANAGER_GOAL_STATE = ZMANAGERS + "/goal_state";
public static final String ZMANAGER_TICK = ZMANAGERS + "/tick";
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
index 085777e54d..8b65091c49 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
@@ -1333,7 +1333,7 @@ public class ClientContext implements AccumuloClient {
Constants.ZMANAGER_LOCK, Constants.ZMINI_LOCK, Constants.ZMONITOR_LOCK,
Constants.ZNAMESPACES, Constants.ZRECOVERY, Constants.ZSSERVERS, Constants.ZTABLES,
Constants.ZTSERVERS, Constants.ZUSERS, RootTable.ZROOT_TABLET, Constants.ZTEST_LOCK,
- Constants.ZRESOURCEGROUPS)) {
+ Constants.ZMANAGER_ASSISTANT_LOCK, Constants.ZRESOURCEGROUPS)) {
pathsToWatch.add(path);
}
return pathsToWatch;
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/AbstractFateStore.java b/core/src/main/java/org/apache/accumulo/core/fate/AbstractFateStore.java
index 14755be12b..f8acdd8306 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/AbstractFateStore.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/AbstractFateStore.java
@@ -162,7 +162,12 @@ public abstract class AbstractFateStore<T> implements FateStore<T> {
EnumSet.of(TStatus.SUBMITTED, TStatus.FAILED_IN_PROGRESS);
@Override
- public void runnable(BooleanSupplier keepWaiting, Consumer<FateIdStatus> idConsumer) {
+ public void runnable(Set<FatePartition> partitions, BooleanSupplier keepWaiting,
+ Consumer<FateIdStatus> idConsumer) {
+
+ if (partitions.isEmpty()) {
+ return;
+ }
AtomicLong seen = new AtomicLong(0);
@@ -170,8 +175,8 @@ public abstract class AbstractFateStore<T> implements FateStore<T> {
final long beforeCount = unreservedRunnableCount.getCount();
final boolean beforeDeferredOverflow = deferredOverflow.get();
- try (Stream<FateIdStatus> inProgress = getTransactions(IN_PROGRESS_SET);
- Stream<FateIdStatus> other = getTransactions(OTHER_RUNNABLE_SET)) {
+ try (Stream<FateIdStatus> inProgress = getTransactions(partitions, IN_PROGRESS_SET);
+ Stream<FateIdStatus> other = getTransactions(partitions, OTHER_RUNNABLE_SET)) {
// read the in progress transaction first and then everything else in order to process those
// first
var transactions = Stream.concat(inProgress, other);
@@ -200,6 +205,8 @@ public abstract class AbstractFateStore<T> implements FateStore<T> {
if (beforeCount == unreservedRunnableCount.getCount()) {
long waitTime = 5000;
synchronized (deferred) {
+ deferred.keySet().removeIf(
+ fateId -> partitions.stream().noneMatch(partition -> partition.contains(fateId)));
if (!deferred.isEmpty()) {
waitTime = deferred.values().stream()
.mapToLong(countDownTimer -> countDownTimer.timeLeft(TimeUnit.MILLISECONDS)).min()
@@ -240,9 +247,11 @@ public abstract class AbstractFateStore<T> implements FateStore<T> {
}
@Override
- public Map<FateId,FateReservation> getActiveReservations() {
- return list().filter(entry -> entry.getFateReservation().isPresent()).collect(Collectors
- .toMap(FateIdStatus::getFateId, entry -> entry.getFateReservation().orElseThrow()));
+ public Map<FateId,FateReservation> getActiveReservations(Set<FatePartition> partitions) {
+ try (var stream = getTransactions(partitions, EnumSet.allOf(TStatus.class))) {
+ return stream.filter(entry -> entry.getFateReservation().isPresent()).collect(Collectors
+ .toMap(FateIdStatus::getFateId, entry -> entry.getFateReservation().orElseThrow()));
+ }
}
protected boolean isRunnable(TStatus status) {
@@ -289,6 +298,9 @@ public abstract class AbstractFateStore<T> implements FateStore<T> {
protected abstract Stream<FateIdStatus> getTransactions(EnumSet<TStatus> statuses);
+ protected abstract Stream<FateIdStatus> getTransactions(Set<FatePartition> partitions,
+ EnumSet<TStatus> statuses);
+
protected abstract TStatus _getStatus(FateId fateId);
protected abstract Optional<FateKey> getKey(FateId fateId);
@@ -418,7 +430,8 @@ public abstract class AbstractFateStore<T> implements FateStore<T> {
FateId newRandomId(FateInstanceType instanceType);
}
- protected void seededTx() {
+ @Override
+ public void seeded() {
unreservedRunnableCount.increment();
}
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/Fate.java b/core/src/main/java/org/apache/accumulo/core/fate/Fate.java
index 58bdc5cef6..8f016db640 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/Fate.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/Fate.java
@@ -30,6 +30,7 @@ import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.ExecutorService;
@@ -51,6 +52,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
import com.google.gson.JsonParser;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -76,6 +79,7 @@ public class Fate<T> extends FateClient<T> {
private final AtomicBoolean keepRunning = new AtomicBoolean(true);
// Visible for FlakyFate test object
protected final Set<FateExecutor<T>> fateExecutors = new HashSet<>();
+ private Set<FatePartition> currentPartitions = Set.of();
public enum TxInfo {
FATE_OP, AUTO_CLEAN, EXCEPTION, TX_AGEOFF, RETURN_VALUE
@@ -208,8 +212,10 @@ public class Fate<T> extends FateClient<T> {
fe -> fe.getFateOps().equals(fateOps) && fe.getName().equals(fateExecutorName))) {
log.debug("[{}] Adding FateExecutor for {} with {} threads", store.type(), fateOps,
poolSize);
- fateExecutors.add(
- new FateExecutor<>(Fate.this, environment, fateOps, poolSize, fateExecutorName));
+ var fateExecutor =
+ new FateExecutor<>(Fate.this, environment, fateOps, poolSize, fateExecutorName);
+ fateExecutors.add(fateExecutor);
+ fateExecutor.setPartitions(currentPartitions);
}
}
}
@@ -233,7 +239,11 @@ public class Fate<T> extends FateClient<T> {
@Override
public void run() {
if (keepRunning.get()) {
- store.deleteDeadReservations();
+ Set<FatePartition> partitions;
+ synchronized (fateExecutors) {
+ partitions = currentPartitions;
+ }
+ store.deleteDeadReservations(partitions);
}
}
}
@@ -369,6 +379,17 @@ public class Fate<T> extends FateClient<T> {
return needMoreThreadsWarnCount;
}
+ public void seeded(Set<FatePartition> partitions) {
+ synchronized (fateExecutors) {
+ if (Sets.intersection(currentPartitions, partitions).isEmpty()) {
+ return;
+ }
+ }
+
+ log.trace("Notified of seeding for {}", partitions);
+ store.seeded();
+ }
+
/**
* Initiates shutdown of background threads that run fate operations and cleanup fate data and
* optionally waits on them. Leaves the fate object in a state where it can still update and read
@@ -432,6 +453,27 @@ public class Fate<T> extends FateClient<T> {
store.close();
}
+ public Set<FatePartition> getPartitions() {
+ synchronized (fateExecutors) {
+ return currentPartitions;
+ }
+ }
+
+ public Set<FatePartition> setPartitions(Set<FatePartition> partitions) {
+ Objects.requireNonNull(partitions);
+ Preconditions.checkArgument(
+ partitions.stream().allMatch(
+ fp -> fp.start().getType() == store.type() && fp.end().getType() == store.type()),
+ "type mismatch type:%s partitions:%s", store.type(), partitions);
+
+ synchronized (fateExecutors) {
+ var old = currentPartitions;
+ currentPartitions = Set.copyOf(partitions);
+ fateExecutors.forEach(fe -> fe.setPartitions(currentPartitions));
+ return old;
+ }
+ }
+
private boolean anyFateExecutorIsAlive() {
synchronized (fateExecutors) {
return fateExecutors.stream().anyMatch(FateExecutor::isAlive);
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/FateClient.java b/core/src/main/java/org/apache/accumulo/core/fate/FateClient.java
index 2dc472e4bd..1bc4263986 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/FateClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/FateClient.java
@@ -28,6 +28,9 @@ import static org.apache.accumulo.core.fate.ReadOnlyFateStore.TStatus.UNKNOWN;
import java.time.Duration;
import java.util.EnumSet;
import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Stream;
@@ -46,6 +49,8 @@ public class FateClient<T> {
private static final EnumSet<ReadOnlyFateStore.TStatus> FINISHED_STATES =
EnumSet.of(FAILED, SUCCESSFUL, UNKNOWN);
+ private AtomicReference<Consumer<FateId>> seedingConsumer = new AtomicReference<>(fid -> {});
+
public FateClient(FateStore<T> store, Function<Repo<T>,String> toLogStrFunc) {
this.store = FateLogger.wrap(store, toLogStrFunc, false);
}
@@ -56,15 +61,33 @@ public class FateClient<T> {
}
public FateStore.Seeder<T> beginSeeding() {
- return store.beginSeeding();
+ var seeder = store.beginSeeding();
+ return new FateStore.Seeder<T>() {
+ @Override
+ public CompletableFuture<Optional<FateId>> attemptToSeedTransaction(Fate.FateOperation fateOp,
+ FateKey fateKey, Repo<T> repo, boolean autoCleanUp) {
+ var cfuture = seeder.attemptToSeedTransaction(fateOp, fateKey, repo, autoCleanUp);
+ return cfuture.thenApply(optional -> {
+ optional.ifPresent(seedingConsumer.get());
+ return optional;
+ });
+ }
+
+ @Override
+ public void close() {
+ seeder.close();
+ }
+ };
}
public void seedTransaction(Fate.FateOperation fateOp, FateKey fateKey, Repo<T> repo,
boolean autoCleanUp) {
+ CompletableFuture<Optional<FateId>> cfuture;
try (var seeder = store.beginSeeding()) {
- @SuppressWarnings("unused")
- var unused = seeder.attemptToSeedTransaction(fateOp, fateKey, repo, autoCleanUp);
+ cfuture = seeder.attemptToSeedTransaction(fateOp, fateKey, repo, autoCleanUp);
}
+ var optional = cfuture.join();
+ optional.ifPresent(seedingConsumer.get());
}
// start work in the transaction.. it is safe to call this
@@ -73,6 +96,7 @@ public class FateClient<T> {
boolean autoCleanUp, String goalMessage) {
Fate.log.info("[{}] Seeding {} {} {}", store.type(), fateOp, fateId, goalMessage);
store.seedTransaction(fateOp, fateId, repo, autoCleanUp);
+ seedingConsumer.get().accept(fateId);
}
// check on the transaction
@@ -176,4 +200,8 @@ public class FateClient<T> {
public Stream<FateKey> list(FateKey.FateKeyType type) {
return store.list(type);
}
+
+ public void setSeedingConsumer(Consumer<FateId> seedingConsumer) {
+ this.seedingConsumer.set(seedingConsumer);
+ }
}
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/FateExecutor.java b/core/src/main/java/org/apache/accumulo/core/fate/FateExecutor.java
index 883146eb4e..2457095209 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/FateExecutor.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/FateExecutor.java
@@ -33,6 +33,7 @@ import java.time.Duration;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
+import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentLinkedQueue;
@@ -43,6 +44,8 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.TransferQueue;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.BooleanSupplier;
import org.apache.accumulo.core.clientImpl.AcceptableThriftTableOperationException;
import org.apache.accumulo.core.conf.Property;
@@ -81,6 +84,7 @@ public class FateExecutor<T> {
private final Set<Fate.FateOperation> fateOps;
private final ConcurrentLinkedQueue<Integer> idleCountHistory = new ConcurrentLinkedQueue<>();
private final FateExecutorMetrics<T> fateExecutorMetrics;
+ private final AtomicReference<Set<FatePartition>> partitions = new AtomicReference<>(Set.of());
public FateExecutor(Fate<T> fate, T environment, Set<Fate.FateOperation> fateOps, int poolSize,
String name) {
@@ -298,6 +302,11 @@ public class FateExecutor<T> {
return idleCountHistory;
}
+ public void setPartitions(Set<FatePartition> partitions) {
+ Objects.requireNonNull(partitions);
+ this.partitions.set(Set.copyOf(partitions));
+ }
+
/**
* A single thread that finds transactions to work on and queues them up. Do not want each worker
* thread going to the store and looking for work as it would place more load on the store.
@@ -308,7 +317,12 @@ public class FateExecutor<T> {
public void run() {
while (fate.getKeepRunning().get() && !isShutdown()) {
try {
- fate.getStore().runnable(() -> fate.getKeepRunning().get(), fateIdStatus -> {
+ var localPartitions = partitions.get();
+ // if the set of partitions changes, we should stop looking for work w/ the old set of
+ // partitions
+ BooleanSupplier keepRunning =
+ () -> fate.getKeepRunning().get() && localPartitions == partitions.get();
+ fate.getStore().runnable(localPartitions, keepRunning, fateIdStatus -> {
// The FateId with the fate operation 'fateOp' is workable by this FateExecutor if
// 1) This FateExecutor is assigned to work on 'fateOp' ('fateOp' is in 'fateOps')
// 2) The transaction was cancelled while NEW. This is an edge case that needs to be
@@ -319,7 +333,7 @@ public class FateExecutor<T> {
var fateOp = fateIdStatus.getFateOperation().orElse(null);
if ((fateOp != null && fateOps.contains(fateOp))
|| txCancelledWhileNew(status, fateOp)) {
- while (fate.getKeepRunning().get() && !isShutdown()) {
+ while (keepRunning.getAsBoolean() && !isShutdown()) {
try {
// The reason for calling transfer instead of queueing is avoid rescanning the
// storage layer and adding the same thing over and over. For example if all
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/FateExecutorMetrics.java b/core/src/main/java/org/apache/accumulo/core/fate/FateExecutorMetrics.java
index 4edc70fe7a..f9753a4ab6 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/FateExecutorMetrics.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/FateExecutorMetrics.java
@@ -22,14 +22,13 @@ import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.accumulo.core.metrics.Metric;
-import org.apache.accumulo.core.metrics.MetricsProducer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.micrometer.core.instrument.Gauge;
import io.micrometer.core.instrument.MeterRegistry;
-public class FateExecutorMetrics<T> implements MetricsProducer {
+public class FateExecutorMetrics<T> {
private static final Logger log = LoggerFactory.getLogger(FateExecutorMetrics.class);
private final FateInstanceType type;
private final String poolName;
@@ -49,7 +48,6 @@ public class FateExecutorMetrics<T> implements MetricsProducer {
this.idleWorkerCount = idleWorkerCount;
}
- @Override
public void registerMetrics(MeterRegistry registry) {
// noop if already registered or cleared
if (state == State.UNREGISTERED) {
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/FatePartition.java b/core/src/main/java/org/apache/accumulo/core/fate/FatePartition.java
new file mode 100644
index 0000000000..33cbbc9724
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/fate/FatePartition.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.core.fate;
+
+import java.util.UUID;
+
+import org.apache.accumulo.core.manager.thrift.TFatePartition;
+
+public record FatePartition(FateId start, FateId end) {
+
+ public TFatePartition toThrift() {
+ return new TFatePartition(start.canonical(), end.canonical());
+ }
+
+ public static FatePartition from(TFatePartition tfp) {
+ return new FatePartition(FateId.from(tfp.start), FateId.from(tfp.stop));
+ }
+
+ private static final FatePartition ALL_USER =
+ new FatePartition(FateId.from(FateInstanceType.USER, new UUID(0, 0)),
+ FateId.from(FateInstanceType.USER, new UUID(-1, -1)));
+ private static final FatePartition ALL_META =
+ new FatePartition(FateId.from(FateInstanceType.META, new UUID(0, 0)),
+ FateId.from(FateInstanceType.META, new UUID(-1, -1)));
+
+ public static FatePartition all(FateInstanceType type) {
+ return switch (type) {
+ case META -> ALL_META;
+ case USER -> ALL_USER;
+ };
+ }
+
+ private static final UUID LAST_UUID = new UUID(-1, -1);
+
+ public boolean isEndInclusive() {
+ return end.getTxUUID().equals(LAST_UUID);
+ }
+
+ public boolean contains(FateId fateId) {
+ if (isEndInclusive()) {
+ return fateId.compareTo(start) >= 0 && fateId.compareTo(end) <= 0;
+ } else {
+ return fateId.compareTo(start) >= 0 && fateId.compareTo(end) < 0;
+ }
+
+ }
+}
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/FateStore.java b/core/src/main/java/org/apache/accumulo/core/fate/FateStore.java
index 6756f84f5a..9436cce05b 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/FateStore.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/FateStore.java
@@ -27,10 +27,10 @@ import java.time.Duration;
import java.util.Arrays;
import java.util.Objects;
import java.util.Optional;
+import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.function.BooleanSupplier;
-import java.util.function.Consumer;
import org.apache.accumulo.core.fate.zookeeper.ZooUtil;
import org.apache.hadoop.io.DataInputBuffer;
@@ -153,7 +153,8 @@ public interface FateStore<T> extends ReadOnlyFateStore<T>, AutoCloseable {
* longer interact with it.
*
* @param deferTime time to keep this transaction from being returned by
- * {@link #runnable(BooleanSupplier, Consumer)}. Must be non-negative.
+ * {@link #runnable(Set, BooleanSupplier, java.util.function.Consumer)}. Must be
+ * non-negative.
*/
void unreserve(Duration deferTime);
}
@@ -249,7 +250,7 @@ public interface FateStore<T> extends ReadOnlyFateStore<T>, AutoCloseable {
* can no longer be worked on so their reservation should be deleted, so they can be picked up and
* worked on again.
*/
- void deleteDeadReservations();
+ void deleteDeadReservations(Set<FatePartition> partitions);
/**
* Attempt to reserve the fate transaction.
@@ -269,6 +270,11 @@ public interface FateStore<T> extends ReadOnlyFateStore<T>, AutoCloseable {
*/
FateTxStore<T> reserve(FateId fateId);
+ /**
+ * Notification that something in this store was seeded by another process.
+ */
+ void seeded();
+
@Override
void close();
}
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/ReadOnlyFateStore.java b/core/src/main/java/org/apache/accumulo/core/fate/ReadOnlyFateStore.java
index 451823ac70..ad7baae9bc 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/ReadOnlyFateStore.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/ReadOnlyFateStore.java
@@ -23,6 +23,7 @@ import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
+import java.util.Set;
import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
import java.util.stream.Stream;
@@ -155,7 +156,7 @@ public interface ReadOnlyFateStore<T> {
* @return a map of the current active reservations with the keys being the transaction that is
* reserved and the value being the value stored to indicate the transaction is reserved.
*/
- Map<FateId,FateStore.FateReservation> getActiveReservations();
+ Map<FateId,FateStore.FateReservation> getActiveReservations(Set<FatePartition> partitions);
/**
* Finds all fate ops that are (IN_PROGRESS, SUBMITTED, or FAILED_IN_PROGRESS) and unreserved. Ids
@@ -163,7 +164,8 @@ public interface ReadOnlyFateStore<T> {
* is found or until the keepWaiting parameter is false. It will return once all runnable ids
* found were passed to the consumer.
*/
- void runnable(BooleanSupplier keepWaiting, Consumer<FateIdStatus> idConsumer);
+ void runnable(Set<FatePartition> partitions, BooleanSupplier keepWaiting,
+ Consumer<FateIdStatus> idConsumer);
/**
* Returns true if the deferred map was cleared and if deferred executions are currently disabled
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/user/UserFateStore.java b/core/src/main/java/org/apache/accumulo/core/fate/user/UserFateStore.java
index 55300470d7..158c2ce1aa 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/user/UserFateStore.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/user/UserFateStore.java
@@ -28,6 +28,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Optional;
+import java.util.Set;
import java.util.SortedMap;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@@ -56,6 +57,7 @@ import org.apache.accumulo.core.fate.Fate.TxInfo;
import org.apache.accumulo.core.fate.FateId;
import org.apache.accumulo.core.fate.FateInstanceType;
import org.apache.accumulo.core.fate.FateKey;
+import org.apache.accumulo.core.fate.FatePartition;
import org.apache.accumulo.core.fate.ReadOnlyRepo;
import org.apache.accumulo.core.fate.Repo;
import org.apache.accumulo.core.fate.StackOverflowException;
@@ -196,7 +198,7 @@ public class UserFateStore<T> extends AbstractFateStore<T> {
var status = mutator.tryMutate();
if (status == FateMutator.Status.ACCEPTED) {
// signal to the super class that a new fate transaction was seeded and is ready to run
- seededTx();
+ seeded();
log.trace("Attempt to seed {} returned {}", logId, status);
return true;
} else if (status == FateMutator.Status.REJECTED) {
@@ -255,8 +257,8 @@ public class UserFateStore<T> extends AbstractFateStore<T> {
}
@Override
- public void deleteDeadReservations() {
- for (Entry<FateId,FateReservation> activeRes : getActiveReservations().entrySet()) {
+ public void deleteDeadReservations(Set<FatePartition> partitions) {
+ for (Entry<FateId,FateReservation> activeRes : getActiveReservations(partitions).entrySet()) {
FateId fateId = activeRes.getKey();
FateReservation reservation = activeRes.getValue();
if (!isLockHeld.test(reservation.getLockID())) {
@@ -281,9 +283,21 @@ public class UserFateStore<T> extends AbstractFateStore<T> {
@Override
protected Stream<FateIdStatus> getTransactions(EnumSet<TStatus> statuses) {
+ return getTransactions(FatePartition.all(FateInstanceType.USER), statuses);
+ }
+
+ @Override
+ protected Stream<FateIdStatus> getTransactions(Set<FatePartition> partitions,
+ EnumSet<TStatus> statuses) {
+ return partitions.stream().flatMap(p -> getTransactions(p, statuses));
+ }
+
+ private Stream<FateIdStatus> getTransactions(FatePartition partition, EnumSet<TStatus> statuses) {
try {
Scanner scanner = context.createScanner(tableName, Authorizations.EMPTY);
- scanner.setRange(new Range());
+ var range = new Range(getRowId(partition.start()), true, getRowId(partition.end()),
+ partition.isEndInclusive());
+ scanner.setRange(range);
RowFateStatusFilter.configureScanner(scanner, statuses);
// columns fetched here must be in/added to TxAdminColumnFamily for locality group benefits
TxAdminColumnFamily.STATUS_COLUMN.fetch(scanner);
@@ -453,7 +467,7 @@ public class UserFateStore<T> extends AbstractFateStore<T> {
var future = pending.get(fateId).getSecond();
switch (result.getValue()) {
case ACCEPTED:
- seededTx();
+ seeded();
log.trace("Attempt to seed {} returned {}", fateId.canonical(), status);
// Complete the future with the fatId and remove from pending
future.complete(Optional.of(fateId));
diff --git a/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java b/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
index f6f67dfef2..a7cf3236af 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
@@ -55,6 +55,7 @@ import org.apache.accumulo.core.fate.Fate.TxInfo;
import org.apache.accumulo.core.fate.FateId;
import org.apache.accumulo.core.fate.FateInstanceType;
import org.apache.accumulo.core.fate.FateKey;
+import org.apache.accumulo.core.fate.FatePartition;
import org.apache.accumulo.core.fate.ReadOnlyRepo;
import org.apache.accumulo.core.fate.Repo;
import org.apache.accumulo.core.fate.StackOverflowException;
@@ -71,6 +72,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.base.Suppliers;
+import com.google.common.collect.Range;
+import com.google.common.collect.RangeSet;
+import com.google.common.collect.TreeRangeSet;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -279,8 +283,8 @@ public class MetaFateStore<T> extends AbstractFateStore<T> {
}
@Override
- public void deleteDeadReservations() {
- for (Map.Entry<FateId,FateReservation> entry : getActiveReservations().entrySet()) {
+ public void deleteDeadReservations(Set<FatePartition> partitions) {
+ for (Map.Entry<FateId,FateReservation> entry : getActiveReservations(partitions).entrySet()) {
FateId fateId = entry.getKey();
FateReservation reservation = entry.getValue();
if (isLockHeld.test(reservation.getLockID())) {
@@ -616,6 +620,16 @@ public class MetaFateStore<T> extends AbstractFateStore<T> {
}
}
+ @Override
+ protected Stream<FateIdStatus> getTransactions(Set<FatePartition> partitions,
+ EnumSet<TStatus> statuses) {
+
+ RangeSet<FateId> rangeSet = TreeRangeSet.create();
+ partitions.forEach(partition -> rangeSet.add(Range.closed(partition.start(), partition.end())));
+
+ return getTransactions(statuses).filter(fis -> rangeSet.contains(fis.getFateId()));
+ }
+
@Override
public Stream<FateKey> list(FateKey.FateKeyType type) {
return getTransactions(EnumSet.allOf(TStatus.class))
diff --git a/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockData.java b/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockData.java
index c29879f05c..3e48b20243 100644
--- a/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockData.java
+++ b/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockData.java
@@ -45,7 +45,8 @@ public class ServiceLockData implements Comparable<ServiceLockData> {
CLIENT,
COORDINATOR,
COMPACTOR,
- FATE,
+ FATE_CLIENT,
+ FATE_WORKER,
GC,
MANAGER,
NONE,
diff --git a/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockPaths.java b/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockPaths.java
index 68c29c485f..363f3cc402 100644
--- a/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockPaths.java
+++ b/core/src/main/java/org/apache/accumulo/core/lock/ServiceLockPaths.java
@@ -77,7 +77,8 @@ public class ServiceLockPaths {
Preconditions.checkArgument(this.type.equals(Constants.ZGC_LOCK)
|| this.type.equals(Constants.ZMANAGER_LOCK) || this.type.equals(Constants.ZMONITOR_LOCK)
|| this.type.equals(Constants.ZTABLE_LOCKS) || this.type.equals(Constants.ZADMIN_LOCK)
- || this.type.equals(Constants.ZTEST_LOCK), "Unsupported type: " + type);
+ || this.type.equals(Constants.ZTEST_LOCK)
+ || this.type.equals(Constants.ZMANAGER_ASSISTANT_LOCK), "Unsupported type: " + type);
// These server types support only one active instance, so they use a lock at
// a known path, not the server's address.
this.resourceGroup = null;
@@ -105,7 +106,8 @@ public class ServiceLockPaths {
this.type = requireNonNull(type);
Preconditions.checkArgument(
this.type.equals(Constants.ZCOMPACTORS) || this.type.equals(Constants.ZSSERVERS)
- || this.type.equals(Constants.ZTSERVERS) || this.type.equals(Constants.ZDEADTSERVERS),
+ || this.type.equals(Constants.ZTSERVERS) || this.type.equals(Constants.ZDEADTSERVERS)
+ || this.type.equals(Constants.ZMANAGER_ASSISTANT_LOCK),
"Unsupported type: " + type);
this.resourceGroup = requireNonNull(resourceGroup);
this.server = requireNonNull(server).toString();
@@ -170,6 +172,8 @@ public class ServiceLockPaths {
return Constants.ZGC_LOCK;
} else if (pathStartsWith(path, Constants.ZMANAGER_LOCK)) {
return Constants.ZMANAGER_LOCK;
+ } else if (pathStartsWith(path, Constants.ZMANAGER_ASSISTANT_LOCK)) {
+ return Constants.ZMANAGER_ASSISTANT_LOCK;
} else if (pathStartsWith(path, Constants.ZMONITOR_LOCK)) {
return Constants.ZMONITOR_LOCK;
} else if (pathStartsWith(path, Constants.ZMINI_LOCK)) {
@@ -219,7 +223,7 @@ public class ServiceLockPaths {
return switch (type) {
case Constants.ZMINI_LOCK -> new ServiceLockPath(type, server);
case Constants.ZCOMPACTORS, Constants.ZSSERVERS, Constants.ZTSERVERS,
- Constants.ZDEADTSERVERS ->
+ Constants.ZDEADTSERVERS, Constants.ZMANAGER_ASSISTANT_LOCK ->
new ServiceLockPath(type, ResourceGroupId.of(resourceGroup),
HostAndPort.fromString(server));
default ->
@@ -238,6 +242,11 @@ public class ServiceLockPaths {
return new ServiceLockPath(Constants.ZMANAGER_LOCK);
}
+ public ServiceLockPath createAssistantManagerPath(HostAndPort advertiseAddress) {
+ return new ServiceLockPath(Constants.ZMANAGER_ASSISTANT_LOCK, ResourceGroupId.DEFAULT,
+ advertiseAddress);
+ }
+
public ServiceLockPath createMiniPath(String miniUUID) {
return new ServiceLockPath(Constants.ZMINI_LOCK, miniUUID);
}
@@ -317,6 +326,11 @@ public class ServiceLockPaths {
}
}
+ public Set<ServiceLockPath> getAssistantManagers(AddressSelector address, boolean withLock) {
+ return get(Constants.ZMANAGER_ASSISTANT_LOCK, ResourceGroupPredicate.DEFAULT_RG_ONLY, address,
+ withLock);
+ }
+
/**
* Note that the ServiceLockPath object returned by this method does not populate the server
* attribute. To get the location of the Monitor you will need to parse the lock data at the
@@ -431,7 +445,8 @@ public class ServiceLockPaths {
}
}
} else if (serverType.equals(Constants.ZCOMPACTORS) || serverType.equals(Constants.ZSSERVERS)
- || serverType.equals(Constants.ZTSERVERS) || serverType.equals(Constants.ZDEADTSERVERS)) {
+ || serverType.equals(Constants.ZTSERVERS) || serverType.equals(Constants.ZDEADTSERVERS)
+ || serverType.equals(Constants.ZMANAGER_ASSISTANT_LOCK)) {
final List<String> resourceGroups = zooCache.getChildren(typePath);
for (final String group : resourceGroups) {
if (resourceGroupPredicate.test(ResourceGroupId.of(group))) {
diff --git a/core/src/main/java/org/apache/accumulo/core/logging/FateLogger.java b/core/src/main/java/org/apache/accumulo/core/logging/FateLogger.java
index 8c7a956c05..0fa5fec296 100644
--- a/core/src/main/java/org/apache/accumulo/core/logging/FateLogger.java
+++ b/core/src/main/java/org/apache/accumulo/core/logging/FateLogger.java
@@ -23,6 +23,7 @@ import java.util.EnumSet;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
@@ -34,6 +35,7 @@ import org.apache.accumulo.core.fate.Fate.FateOperation;
import org.apache.accumulo.core.fate.FateId;
import org.apache.accumulo.core.fate.FateInstanceType;
import org.apache.accumulo.core.fate.FateKey;
+import org.apache.accumulo.core.fate.FatePartition;
import org.apache.accumulo.core.fate.FateStore;
import org.apache.accumulo.core.fate.FateStore.FateTxStore;
import org.apache.accumulo.core.fate.FateStore.Seeder;
@@ -113,6 +115,11 @@ public class FateLogger {
return new LoggingFateTxStore<>(store.reserve(fateId), toLogString, allowForceDel);
}
+ @Override
+ public void seeded() {
+ store.seeded();
+ }
+
@Override
public Optional<FateTxStore<T>> tryReserve(FateId fateId) {
return store.tryReserve(fateId)
@@ -140,8 +147,9 @@ public class FateLogger {
}
@Override
- public void runnable(BooleanSupplier keepWaiting, Consumer<FateIdStatus> idConsumer) {
- store.runnable(keepWaiting, idConsumer);
+ public void runnable(Set<FatePartition> partitions, BooleanSupplier keepWaiting,
+ Consumer<FateIdStatus> idConsumer) {
+ store.runnable(partitions, keepWaiting, idConsumer);
}
@Override
@@ -162,8 +170,8 @@ public class FateLogger {
public boolean seedTransaction(Fate.FateOperation fateOp, FateId fateId, Repo<T> repo,
boolean autoCleanUp) {
boolean seeded = store.seedTransaction(fateOp, fateId, repo, autoCleanUp);
- if (storeLog.isTraceEnabled()) {
- storeLog.trace("{} {} {} {}", fateId, seeded ? "seeded" : "unable to seed",
+ if (storeLog.isDebugEnabled()) {
+ storeLog.debug("{} {} {} {}", fateId, seeded ? "seeded" : "unable to seed",
toLogString.apply(repo), autoCleanUp);
}
return seeded;
@@ -185,13 +193,13 @@ public class FateLogger {
}
@Override
- public Map<FateId,FateReservation> getActiveReservations() {
- return store.getActiveReservations();
+ public Map<FateId,FateReservation> getActiveReservations(Set<FatePartition> partitions) {
+ return store.getActiveReservations(partitions);
}
@Override
- public void deleteDeadReservations() {
- store.deleteDeadReservations();
+ public void deleteDeadReservations(Set<FatePartition> partitions) {
+ store.deleteDeadReservations(partitions);
}
@Override
@@ -217,12 +225,12 @@ public class FateLogger {
FateKey fateKey, Repo<T> repo, boolean autoCleanUp) {
var future = this.seeder.attemptToSeedTransaction(fateOp, fateKey, repo, autoCleanUp);
return future.whenComplete((optional, throwable) -> {
- if (storeLog.isTraceEnabled()) {
+ if (storeLog.isDebugEnabled()) {
optional.ifPresentOrElse(fateId -> {
- storeLog.trace("{} seeded {} {} {}", fateId, fateKey, toLogString.apply(repo),
+ storeLog.debug("{} seeded {} {} {}", fateId, fateKey, toLogString.apply(repo),
autoCleanUp);
}, () -> {
- storeLog.trace("Possibly unable to seed {} {} {}", fateKey, toLogString.apply(repo),
+ storeLog.debug("Possibly unable to seed {} {} {}", fateKey, toLogString.apply(repo),
autoCleanUp);
});
}
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/clients/FateWorkerThriftClient.java b/core/src/main/java/org/apache/accumulo/core/rpc/clients/FateWorkerThriftClient.java
new file mode 100644
index 0000000000..abd9748def
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/clients/FateWorkerThriftClient.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.core.rpc.clients;
+
+import org.apache.accumulo.core.manager.thrift.FateWorkerService;
+
+/**
+ * Client side object that can be used to interact with fate operations, which are supported by any
+ * manager process.
+ */
+public class FateWorkerThriftClient extends ThriftClientTypes<FateWorkerService.Client> {
+ FateWorkerThriftClient(String serviceName) {
+ super(serviceName, new FateWorkerService.Client.Factory());
+ }
+}
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/clients/ThriftClientTypes.java b/core/src/main/java/org/apache/accumulo/core/rpc/clients/ThriftClientTypes.java
index 5b9a5c203d..1ba5a5c138 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/clients/ThriftClientTypes.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/clients/ThriftClientTypes.java
@@ -24,6 +24,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.clientImpl.ClientContext;
+import org.apache.accumulo.core.manager.thrift.FateWorkerService;
import org.apache.thrift.TException;
import org.apache.thrift.TServiceClient;
import org.apache.thrift.TServiceClientFactory;
@@ -61,6 +62,9 @@ public abstract class ThriftClientTypes<C extends TServiceClient> {
public static final ServerProcessServiceThriftClient SERVER_PROCESS =
new ServerProcessServiceThriftClient("process");
+ public static final ThriftClientTypes<FateWorkerService.Client> FATE_WORKER =
+ new FateWorkerThriftClient("fate_worker");
+
/**
* execute method with supplied client returning object of type R
*
diff --git a/core/src/main/spotbugs/exclude-filter.xml b/core/src/main/spotbugs/exclude-filter.xml
index cfaac3ea6f..b8e0876216 100644
--- a/core/src/main/spotbugs/exclude-filter.xml
+++ b/core/src/main/spotbugs/exclude-filter.xml
@@ -30,6 +30,7 @@
<Package name="org.apache.accumulo.core.compaction.thrift" />
<Package name="org.apache.accumulo.core.clientImpl.thrift" />
<Package name="org.apache.accumulo.core.dataImpl.thrift" />
+ <Package name="org.apache.accumulo.core.fate.thrift" />
<Package name="org.apache.accumulo.core.gc.thrift" />
<Package name="org.apache.accumulo.core.manager.thrift" />
<Package name="org.apache.accumulo.core.process.thrift" />
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinatorService.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinatorService.java
index 3b12a9ccc3..c9d2708c86 100644
--- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinatorService.java
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinatorService.java
@@ -45,6 +45,8 @@ public class CompactionCoordinatorService {
public void cancel(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void recordCompletion(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId) throws org.apache.thrift.TException;
+
}
public interface AsyncIface {
@@ -65,6 +67,8 @@ public class CompactionCoordinatorService {
public void cancel(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void recordCompletion(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -339,6 +343,21 @@ public class CompactionCoordinatorService {
return;
}
+ @Override
+ public void recordCompletion(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId) throws org.apache.thrift.TException
+ {
+ send_recordCompletion(tinfo, credentials, externalCompactionId);
+ }
+
+ public void send_recordCompletion(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId) throws org.apache.thrift.TException
+ {
+ recordCompletion_args args = new recordCompletion_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setExternalCompactionId(externalCompactionId);
+ sendBaseOneway("recordCompletion", args);
+ }
+
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
@@ -708,6 +727,47 @@ public class CompactionCoordinatorService {
}
}
+ @Override
+ public void recordCompletion(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ recordCompletion_call method_call = new recordCompletion_call(tinfo, credentials, externalCompactionId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class recordCompletion_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
+ private java.lang.String externalCompactionId;
+ public recordCompletion_call(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, org.apache.thrift.async.AsyncMethodCallback<Void> 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, true);
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ this.externalCompactionId = externalCompactionId;
+ }
+
+ @Override
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("recordCompletion", org.apache.thrift.protocol.TMessageType.ONEWAY, 0));
+ recordCompletion_args args = new recordCompletion_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setExternalCompactionId(externalCompactionId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ @Override
+ public Void getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.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 null;
+ }
+ }
+
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -729,6 +789,7 @@ public class CompactionCoordinatorService {
processMap.put("getLongRunningCompactions", new getLongRunningCompactions());
processMap.put("getCompletedCompactions", new getCompletedCompactions());
processMap.put("cancel", new cancel());
+ processMap.put("recordCompletion", new recordCompletion());
return processMap;
}
@@ -1004,6 +1065,33 @@ public class CompactionCoordinatorService {
}
}
+ public static class recordCompletion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, recordCompletion_args> {
+ public recordCompletion() {
+ super("recordCompletion");
+ }
+
+ @Override
+ public recordCompletion_args getEmptyArgsInstance() {
+ return new recordCompletion_args();
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return true;
+ }
+
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
+ public org.apache.thrift.TBase getResult(I iface, recordCompletion_args args) throws org.apache.thrift.TException {
+ iface.recordCompletion(args.tinfo, args.credentials, args.externalCompactionId);
+ return null;
+ }
+ }
+
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -1025,6 +1113,7 @@ public class CompactionCoordinatorService {
processMap.put("getLongRunningCompactions", new getLongRunningCompactions());
processMap.put("getCompletedCompactions", new getCompletedCompactions());
processMap.put("cancel", new cancel());
+ processMap.put("recordCompletion", new recordCompletion());
return processMap;
}
@@ -1624,6 +1713,46 @@ public class CompactionCoordinatorService {
}
}
+ public static class recordCompletion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, recordCompletion_args, Void> {
+ public recordCompletion() {
+ super("recordCompletion");
+ }
+
+ @Override
+ public recordCompletion_args getEmptyArgsInstance() {
+ return new recordCompletion_args();
+ }
+
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
+ public void onComplete(Void o) {
+ }
+ @Override
+ public void onError(java.lang.Exception e) {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ } else {
+ _LOGGER.error("Exception inside oneway handler", e);
+ }
+ }
+ };
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return true;
+ }
+
+ @Override
+ public void start(I iface, recordCompletion_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ iface.recordCompletion(args.tinfo, args.credentials, args.externalCompactionId,resultHandler);
+ }
+ }
+
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@@ -11475,5 +11604,604 @@ public class CompactionCoordinatorService {
}
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class recordCompletion_args implements org.apache.thrift.TBase<recordCompletion_args, recordCompletion_args._Fields>, java.io.Serializable, Cloneable, Comparable<recordCompletion_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("recordCompletion_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)1);
+ 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)2);
+ private static final org.apache.thrift.protocol.TField EXTERNAL_COMPACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("externalCompactionId", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new recordCompletion_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new recordCompletion_argsTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TINFO((short)1, "tinfo"),
+ CREDENTIALS((short)2, "credentials"),
+ EXTERNAL_COMPACTION_ID((short)3, "externalCompactionId");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TINFO
+ return TINFO;
+ case 2: // CREDENTIALS
+ return CREDENTIALS;
+ case 3: // EXTERNAL_COMPACTION_ID
+ return EXTERNAL_COMPACTION_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.core.clientImpl.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.securityImpl.thrift.TCredentials.class)));
+ tmpMap.put(_Fields.EXTERNAL_COMPACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("externalCompactionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(recordCompletion_args.class, metaDataMap);
+ }
+
+ public recordCompletion_args() {
+ }
+
+ public recordCompletion_args(
+ org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
+ java.lang.String externalCompactionId)
+ {
+ this();
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ this.externalCompactionId = externalCompactionId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public recordCompletion_args(recordCompletion_args other) {
+ if (other.isSetTinfo()) {
+ this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
+ }
+ if (other.isSetCredentials()) {
+ this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ }
+ if (other.isSetExternalCompactionId()) {
+ this.externalCompactionId = other.externalCompactionId;
+ }
+ }
+
+ @Override
+ public recordCompletion_args deepCopy() {
+ return new recordCompletion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tinfo = null;
+ this.credentials = null;
+ this.externalCompactionId = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
+ public recordCompletion_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.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;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
+ return this.credentials;
+ }
+
+ public recordCompletion_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.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;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getExternalCompactionId() {
+ return this.externalCompactionId;
+ }
+
+ public recordCompletion_args setExternalCompactionId(@org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId) {
+ this.externalCompactionId = externalCompactionId;
+ return this;
+ }
+
+ public void unsetExternalCompactionId() {
+ this.externalCompactionId = null;
+ }
+
+ /** Returns true if field externalCompactionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetExternalCompactionId() {
+ return this.externalCompactionId != null;
+ }
+
+ public void setExternalCompactionIdIsSet(boolean value) {
+ if (!value) {
+ this.externalCompactionId = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case TINFO:
+ if (value == null) {
+ unsetTinfo();
+ } else {
+ setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value);
+ }
+ break;
+
+ case CREDENTIALS:
+ if (value == null) {
+ unsetCredentials();
+ } else {
+ setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
+ }
+ break;
+
+ case EXTERNAL_COMPACTION_ID:
+ if (value == null) {
+ unsetExternalCompactionId();
+ } else {
+ setExternalCompactionId((java.lang.String)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
+ case EXTERNAL_COMPACTION_ID:
+ return getExternalCompactionId();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
+ case EXTERNAL_COMPACTION_ID:
+ return isSetExternalCompactionId();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof recordCompletion_args)
+ return this.equals((recordCompletion_args)that);
+ return false;
+ }
+
+ public boolean equals(recordCompletion_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ 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;
+ }
+
+ boolean this_present_externalCompactionId = true && this.isSetExternalCompactionId();
+ boolean that_present_externalCompactionId = true && that.isSetExternalCompactionId();
+ if (this_present_externalCompactionId || that_present_externalCompactionId) {
+ if (!(this_present_externalCompactionId && that_present_externalCompactionId))
+ return false;
+ if (!this.externalCompactionId.equals(that.externalCompactionId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetExternalCompactionId()) ? 131071 : 524287);
+ if (isSetExternalCompactionId())
+ hashCode = hashCode * 8191 + externalCompactionId.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(recordCompletion_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTinfo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCredentials()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetExternalCompactionId(), other.isSetExternalCompactionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExternalCompactionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalCompactionId, other.externalCompactionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("recordCompletion_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;
+ if (!first) sb.append(", ");
+ sb.append("externalCompactionId:");
+ if (this.externalCompactionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.externalCompactionId);
+ }
+ 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, java.lang.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 recordCompletion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public recordCompletion_argsStandardScheme getScheme() {
+ return new recordCompletion_argsStandardScheme();
+ }
+ }
+
+ private static class recordCompletion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<recordCompletion_args> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, recordCompletion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TINFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREDENTIALS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // EXTERNAL_COMPACTION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.externalCompactionId = iprot.readString();
+ struct.setExternalCompactionIdIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, recordCompletion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.tinfo != null) {
+ oprot.writeFieldBegin(TINFO_FIELD_DESC);
+ struct.tinfo.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.credentials != null) {
+ oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+ struct.credentials.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.externalCompactionId != null) {
+ oprot.writeFieldBegin(EXTERNAL_COMPACTION_ID_FIELD_DESC);
+ oprot.writeString(struct.externalCompactionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class recordCompletion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public recordCompletion_argsTupleScheme getScheme() {
+ return new recordCompletion_argsTupleScheme();
+ }
+ }
+
+ private static class recordCompletion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<recordCompletion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, recordCompletion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetTinfo()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCredentials()) {
+ optionals.set(1);
+ }
+ if (struct.isSetExternalCompactionId()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetTinfo()) {
+ struct.tinfo.write(oprot);
+ }
+ if (struct.isSetCredentials()) {
+ struct.credentials.write(oprot);
+ }
+ if (struct.isSetExternalCompactionId()) {
+ oprot.writeString(struct.externalCompactionId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, recordCompletion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.externalCompactionId = iprot.readString();
+ struct.setExternalCompactionIdIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
private static void unusedMethod() {}
}
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateService.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateService.java
index 1670ca4c2d..5fbeeb4276 100644
--- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateService.java
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateService.java
@@ -3182,13 +3182,13 @@ public class FateService {
case 5: // ARGUMENTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
- struct.arguments = new java.util.ArrayList<java.nio.ByteBuffer>(_list70.size);
- @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem71;
- for (int _i72 = 0; _i72 < _list70.size; ++_i72)
+ org.apache.thrift.protocol.TList _list78 = iprot.readListBegin();
+ struct.arguments = new java.util.ArrayList<java.nio.ByteBuffer>(_list78.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem79;
+ for (int _i80 = 0; _i80 < _list78.size; ++_i80)
{
- _elem71 = iprot.readBinary();
- struct.arguments.add(_elem71);
+ _elem79 = iprot.readBinary();
+ struct.arguments.add(_elem79);
}
iprot.readListEnd();
}
@@ -3200,15 +3200,15 @@ public class FateService {
case 6: // OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map73 = iprot.readMapBegin();
- struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map73.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _key74;
- @org.apache.thrift.annotation.Nullable java.lang.String _val75;
- for (int _i76 = 0; _i76 < _map73.size; ++_i76)
+ org.apache.thrift.protocol.TMap _map81 = iprot.readMapBegin();
+ struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map81.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key82;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val83;
+ for (int _i84 = 0; _i84 < _map81.size; ++_i84)
{
- _key74 = iprot.readString();
- _val75 = iprot.readString();
- struct.options.put(_key74, _val75);
+ _key82 = iprot.readString();
+ _val83 = iprot.readString();
+ struct.options.put(_key82, _val83);
}
iprot.readMapEnd();
}
@@ -3265,9 +3265,9 @@ public class FateService {
oprot.writeFieldBegin(ARGUMENTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.arguments.size()));
- for (java.nio.ByteBuffer _iter77 : struct.arguments)
+ for (java.nio.ByteBuffer _iter85 : struct.arguments)
{
- oprot.writeBinary(_iter77);
+ oprot.writeBinary(_iter85);
}
oprot.writeListEnd();
}
@@ -3277,10 +3277,10 @@ public class FateService {
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.options.size()));
- for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter78 : struct.options.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter86 : struct.options.entrySet())
{
- oprot.writeString(_iter78.getKey());
- oprot.writeString(_iter78.getValue());
+ oprot.writeString(_iter86.getKey());
+ oprot.writeString(_iter86.getValue());
}
oprot.writeMapEnd();
}
@@ -3345,19 +3345,19 @@ public class FateService {
if (struct.isSetArguments()) {
{
oprot.writeI32(struct.arguments.size());
- for (java.nio.ByteBuffer _iter79 : struct.arguments)
+ for (java.nio.ByteBuffer _iter87 : struct.arguments)
{
- oprot.writeBinary(_iter79);
+ oprot.writeBinary(_iter87);
}
}
}
if (struct.isSetOptions()) {
{
oprot.writeI32(struct.options.size());
- for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter80 : struct.options.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter88 : struct.options.entrySet())
{
- oprot.writeString(_iter80.getKey());
- oprot.writeString(_iter80.getValue());
+ oprot.writeString(_iter88.getKey());
+ oprot.writeString(_iter88.getValue());
}
}
}
@@ -3391,28 +3391,28 @@ public class FateService {
}
if (incoming.get(4)) {
{
- org.apache.thrift.protocol.TList _list81 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
- struct.arguments = new java.util.ArrayList<java.nio.ByteBuffer>(_list81.size);
- @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem82;
- for (int _i83 = 0; _i83 < _list81.size; ++_i83)
+ org.apache.thrift.protocol.TList _list89 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.arguments = new java.util.ArrayList<java.nio.ByteBuffer>(_list89.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem90;
+ for (int _i91 = 0; _i91 < _list89.size; ++_i91)
{
- _elem82 = iprot.readBinary();
- struct.arguments.add(_elem82);
+ _elem90 = iprot.readBinary();
+ struct.arguments.add(_elem90);
}
}
struct.setArgumentsIsSet(true);
}
if (incoming.get(5)) {
{
- org.apache.thrift.protocol.TMap _map84 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
- struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map84.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _key85;
- @org.apache.thrift.annotation.Nullable java.lang.String _val86;
- for (int _i87 = 0; _i87 < _map84.size; ++_i87)
+ org.apache.thrift.protocol.TMap _map92 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
+ struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map92.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key93;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val94;
+ for (int _i95 = 0; _i95 < _map92.size; ++_i95)
{
- _key85 = iprot.readString();
- _val86 = iprot.readString();
- struct.options.put(_key85, _val86);
+ _key93 = iprot.readString();
+ _val94 = iprot.readString();
+ struct.options.put(_key93, _val94);
}
}
struct.setOptionsIsSet(true);
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateWorkerService.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateWorkerService.java
new file mode 100644
index 0000000000..7cfbb74d30
--- /dev/null
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/FateWorkerService.java
@@ -0,0 +1,3778 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Autogenerated by Thrift Compiler (0.17.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.accumulo.core.manager.thrift;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+public class FateWorkerService {
+
+ public interface Iface {
+
+ public TFatePartitions getPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException;
+
+ public boolean setPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, long updateId, java.util.List<TFatePartition> desired) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException;
+
+ public void seeded(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TFatePartition> tpartitions) throws org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void getPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<TFatePartitions> resultHandler) throws org.apache.thrift.TException;
+
+ public void setPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, long updateId, java.util.List<TFatePartition> desired, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+
+ public void seeded(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TFatePartition> tpartitions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ @Override
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ @Override
+ 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);
+ }
+
+ @Override
+ public TFatePartitions getPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ {
+ send_getPartitions(tinfo, credentials);
+ return recv_getPartitions();
+ }
+
+ public void send_getPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.thrift.TException
+ {
+ getPartitions_args args = new getPartitions_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ sendBase("getPartitions", args);
+ }
+
+ public TFatePartitions recv_getPartitions() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ {
+ getPartitions_result result = new getPartitions_result();
+ receiveBase(result, "getPartitions");
+ 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, "getPartitions failed: unknown result");
+ }
+
+ @Override
+ public boolean setPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, long updateId, java.util.List<TFatePartition> desired) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ {
+ send_setPartitions(tinfo, credentials, updateId, desired);
+ return recv_setPartitions();
+ }
+
+ public void send_setPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, long updateId, java.util.List<TFatePartition> desired) throws org.apache.thrift.TException
+ {
+ setPartitions_args args = new setPartitions_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setUpdateId(updateId);
+ args.setDesired(desired);
+ sendBase("setPartitions", args);
+ }
+
+ public boolean recv_setPartitions() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ {
+ setPartitions_result result = new setPartitions_result();
+ receiveBase(result, "setPartitions");
+ 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, "setPartitions failed: unknown result");
+ }
+
+ @Override
+ public void seeded(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TFatePartition> tpartitions) throws org.apache.thrift.TException
+ {
+ send_seeded(tinfo, credentials, tpartitions);
+ recv_seeded();
+ }
+
+ public void send_seeded(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TFatePartition> tpartitions) throws org.apache.thrift.TException
+ {
+ seeded_args args = new seeded_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setTpartitions(tpartitions);
+ sendBase("seeded", args);
+ }
+
+ public void recv_seeded() throws org.apache.thrift.TException
+ {
+ seeded_result result = new seeded_result();
+ receiveBase(result, "seeded");
+ return;
+ }
+
+ }
+ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient 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;
+ }
+ @Override
+ 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);
+ }
+
+ @Override
+ public void getPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<TFatePartitions> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getPartitions_call method_call = new getPartitions_call(tinfo, credentials, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getPartitions_call extends org.apache.thrift.async.TAsyncMethodCall<TFatePartitions> {
+ private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
+ public getPartitions_call(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<TFatePartitions> 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;
+ }
+
+ @Override
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPartitions", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getPartitions_args args = new getPartitions_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ @Override
+ public TFatePartitions getResult() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.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_getPartitions();
+ }
+ }
+
+ @Override
+ public void setPartitions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, long updateId, java.util.List<TFatePartition> desired, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ setPartitions_call method_call = new setPartitions_call(tinfo, credentials, updateId, desired, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class setPartitions_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
+ private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
+ private long updateId;
+ private java.util.List<TFatePartition> desired;
+ public setPartitions_call(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, long updateId, java.util.List<TFatePartition> desired, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.updateId = updateId;
+ this.desired = desired;
+ }
+
+ @Override
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setPartitions", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ setPartitions_args args = new setPartitions_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setUpdateId(updateId);
+ args.setDesired(desired);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ @Override
+ public java.lang.Boolean getResult() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.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_setPartitions();
+ }
+ }
+
+ @Override
+ public void seeded(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TFatePartition> tpartitions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ seeded_call method_call = new seeded_call(tinfo, credentials, tpartitions, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class seeded_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
+ private java.util.List<TFatePartition> tpartitions;
+ public seeded_call(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TFatePartition> tpartitions, org.apache.thrift.async.AsyncMethodCallback<Void> 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.tpartitions = tpartitions;
+ }
+
+ @Override
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("seeded", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ seeded_args args = new seeded_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setTpartitions(tpartitions);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ @Override
+ public Void getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.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_seeded();
+ return null;
+ }
+ }
+
+ }
+
+ public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ }
+
+ protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("getPartitions", new getPartitions());
+ processMap.put("setPartitions", new setPartitions());
+ processMap.put("seeded", new seeded());
+ return processMap;
+ }
+
+ public static class getPartitions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPartitions_args> {
+ public getPartitions() {
+ super("getPartitions");
+ }
+
+ @Override
+ public getPartitions_args getEmptyArgsInstance() {
+ return new getPartitions_args();
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
+ public getPartitions_result getResult(I iface, getPartitions_args args) throws org.apache.thrift.TException {
+ getPartitions_result result = new getPartitions_result();
+ try {
+ result.success = iface.getPartitions(args.tinfo, args.credentials);
+ } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ result.sec = sec;
+ }
+ return result;
+ }
+ }
+
+ public static class setPartitions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setPartitions_args> {
+ public setPartitions() {
+ super("setPartitions");
+ }
+
+ @Override
+ public setPartitions_args getEmptyArgsInstance() {
+ return new setPartitions_args();
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
+ public setPartitions_result getResult(I iface, setPartitions_args args) throws org.apache.thrift.TException {
+ setPartitions_result result = new setPartitions_result();
+ try {
+ result.success = iface.setPartitions(args.tinfo, args.credentials, args.updateId, args.desired);
+ result.setSuccessIsSet(true);
+ } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ result.sec = sec;
+ }
+ return result;
+ }
+ }
+
+ public static class seeded<I extends Iface> extends org.apache.thrift.ProcessFunction<I, seeded_args> {
+ public seeded() {
+ super("seeded");
+ }
+
+ @Override
+ public seeded_args getEmptyArgsInstance() {
+ return new seeded_args();
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
+ public seeded_result getResult(I iface, seeded_args args) throws org.apache.thrift.TException {
+ seeded_result result = new seeded_result();
+ iface.seeded(args.tinfo, args.credentials, args.tpartitions);
+ return result;
+ }
+ }
+
+ }
+
+ public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ public AsyncProcessor(I iface) {
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ }
+
+ protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ processMap.put("getPartitions", new getPartitions());
+ processMap.put("setPartitions", new setPartitions());
+ processMap.put("seeded", new seeded());
+ return processMap;
+ }
+
+ public static class getPartitions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPartitions_args, TFatePartitions> {
+ public getPartitions() {
+ super("getPartitions");
+ }
+
+ @Override
+ public getPartitions_args getEmptyArgsInstance() {
+ return new getPartitions_args();
+ }
+
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<TFatePartitions> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.thrift.async.AsyncMethodCallback<TFatePartitions>() {
+ @Override
+ public void onComplete(TFatePartitions o) {
+ getPartitions_result result = new getPartitions_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ @Override
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TSerializable msg;
+ getPartitions_result result = new getPartitions_result();
+ if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) {
+ result.sec = (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) e;
+ result.setSecIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ public void start(I iface, getPartitions_args args, org.apache.thrift.async.AsyncMethodCallback<TFatePartitions> resultHandler) throws org.apache.thrift.TException {
+ iface.getPartitions(args.tinfo, args.credentials,resultHandler);
+ }
+ }
+
+ public static class setPartitions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setPartitions_args, java.lang.Boolean> {
+ public setPartitions() {
+ super("setPartitions");
+ }
+
+ @Override
+ public setPartitions_args getEmptyArgsInstance() {
+ return new setPartitions_args();
+ }
+
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
+ @Override
+ public void onComplete(java.lang.Boolean o) {
+ setPartitions_result result = new setPartitions_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ @Override
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TSerializable msg;
+ setPartitions_result result = new setPartitions_result();
+ if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) {
+ result.sec = (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) e;
+ result.setSecIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ public void start(I iface, setPartitions_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+ iface.setPartitions(args.tinfo, args.credentials, args.updateId, args.desired,resultHandler);
+ }
+ }
+
+ public static class seeded<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, seeded_args, Void> {
+ public seeded() {
+ super("seeded");
+ }
+
+ @Override
+ public seeded_args getEmptyArgsInstance() {
+ return new seeded_args();
+ }
+
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
+ public void onComplete(Void o) {
+ seeded_result result = new seeded_result();
+ try {
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ @Override
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TSerializable msg;
+ seeded_result result = new seeded_result();
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ public void start(I iface, seeded_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ iface.seeded(args.tinfo, args.credentials, args.tpartitions,resultHandler);
+ }
+ }
+
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class getPartitions_args implements org.apache.thrift.TBase<getPartitions_args, getPartitions_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPartitions_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPartitions_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)1);
+ 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)2);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPartitions_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPartitions_argsTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TINFO((short)1, "tinfo"),
+ CREDENTIALS((short)2, "credentials");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TINFO
+ return TINFO;
+ case 2: // 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.core.clientImpl.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.securityImpl.thrift.TCredentials.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPartitions_args.class, metaDataMap);
+ }
+
+ public getPartitions_args() {
+ }
+
+ public getPartitions_args(
+ org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials)
+ {
+ this();
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getPartitions_args(getPartitions_args other) {
+ if (other.isSetTinfo()) {
+ this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
+ }
+ if (other.isSetCredentials()) {
+ this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ }
+ }
+
+ @Override
+ public getPartitions_args deepCopy() {
+ return new getPartitions_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tinfo = null;
+ this.credentials = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
+ public getPartitions_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.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;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
+ return this.credentials;
+ }
+
+ public getPartitions_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.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;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case TINFO:
+ if (value == null) {
+ unsetTinfo();
+ } else {
+ setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value);
+ }
+ break;
+
+ case CREDENTIALS:
+ if (value == null) {
+ unsetCredentials();
+ } else {
+ setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof getPartitions_args)
+ return this.equals((getPartitions_args)that);
+ return false;
+ }
+
+ public boolean equals(getPartitions_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ 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() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getPartitions_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTinfo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCredentials()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getPartitions_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, java.lang.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 getPartitions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getPartitions_argsStandardScheme getScheme() {
+ return new getPartitions_argsStandardScheme();
+ }
+ }
+
+ private static class getPartitions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getPartitions_args> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getPartitions_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TINFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREDENTIALS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getPartitions_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.tinfo != null) {
+ oprot.writeFieldBegin(TINFO_FIELD_DESC);
+ struct.tinfo.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.credentials != null) {
+ oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+ struct.credentials.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getPartitions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getPartitions_argsTupleScheme getScheme() {
+ return new getPartitions_argsTupleScheme();
+ }
+ }
+
+ private static class getPartitions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getPartitions_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getPartitions_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.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, getPartitions_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class getPartitions_result implements org.apache.thrift.TBase<getPartitions_result, getPartitions_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPartitions_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPartitions_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+ private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPartitions_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPartitions_resultTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable TFatePartitions success; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ SEC((short)1, "sec");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFatePartitions.class)));
+ tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPartitions_result.class, metaDataMap);
+ }
+
+ public getPartitions_result() {
+ }
+
+ public getPartitions_result(
+ TFatePartitions success,
+ org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec)
+ {
+ this();
+ this.success = success;
+ this.sec = sec;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getPartitions_result(getPartitions_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new TFatePartitions(other.success);
+ }
+ if (other.isSetSec()) {
+ this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
+ }
+ }
+
+ @Override
+ public getPartitions_result deepCopy() {
+ return new getPartitions_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.sec = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public TFatePartitions getSuccess() {
+ return this.success;
+ }
+
+ public getPartitions_result setSuccess(@org.apache.thrift.annotation.Nullable TFatePartitions success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() {
+ return this.sec;
+ }
+
+ public getPartitions_result setSec(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.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;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((TFatePartitions)value);
+ }
+ break;
+
+ case SEC:
+ if (value == null) {
+ unsetSec();
+ } else {
+ setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case SEC:
+ return getSec();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case SEC:
+ return isSetSec();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof getPartitions_result)
+ return this.equals((getPartitions_result)that);
+ return false;
+ }
+
+ public boolean equals(getPartitions_result that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_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() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getPartitions_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSec()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, other.sec);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getPartitions_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("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
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 getPartitions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getPartitions_resultStandardScheme getScheme() {
+ return new getPartitions_resultStandardScheme();
+ }
+ }
+
+ private static class getPartitions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getPartitions_result> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getPartitions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new TFatePartitions();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // SEC
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getPartitions_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ struct.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.sec != null) {
+ oprot.writeFieldBegin(SEC_FIELD_DESC);
+ struct.sec.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getPartitions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getPartitions_resultTupleScheme getScheme() {
+ return new getPartitions_resultTupleScheme();
+ }
+ }
+
+ private static class getPartitions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getPartitions_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getPartitions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetSec()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetSec()) {
+ struct.sec.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getPartitions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = new TFatePartitions();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class setPartitions_args implements org.apache.thrift.TBase<setPartitions_args, setPartitions_args._Fields>, java.io.Serializable, Cloneable, Comparable<setPartitions_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setPartitions_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)1);
+ 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)2);
+ private static final org.apache.thrift.protocol.TField UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updateId", org.apache.thrift.protocol.TType.I64, (short)3);
+ private static final org.apache.thrift.protocol.TField DESIRED_FIELD_DESC = new org.apache.thrift.protocol.TField("desired", org.apache.thrift.protocol.TType.LIST, (short)4);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setPartitions_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setPartitions_argsTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
+ public long updateId; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<TFatePartition> desired; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TINFO((short)1, "tinfo"),
+ CREDENTIALS((short)2, "credentials"),
+ UPDATE_ID((short)3, "updateId"),
+ DESIRED((short)4, "desired");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TINFO
+ return TINFO;
+ case 2: // CREDENTIALS
+ return CREDENTIALS;
+ case 3: // UPDATE_ID
+ return UPDATE_ID;
+ case 4: // DESIRED
+ return DESIRED;
+ 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __UPDATEID_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.core.clientImpl.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.securityImpl.thrift.TCredentials.class)));
+ tmpMap.put(_Fields.UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("updateId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.DESIRED, new org.apache.thrift.meta_data.FieldMetaData("desired", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFatePartition.class))));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setPartitions_args.class, metaDataMap);
+ }
+
+ public setPartitions_args() {
+ }
+
+ public setPartitions_args(
+ org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
+ long updateId,
+ java.util.List<TFatePartition> desired)
+ {
+ this();
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ this.updateId = updateId;
+ setUpdateIdIsSet(true);
+ this.desired = desired;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public setPartitions_args(setPartitions_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetTinfo()) {
+ this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
+ }
+ if (other.isSetCredentials()) {
+ this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ }
+ this.updateId = other.updateId;
+ if (other.isSetDesired()) {
+ java.util.List<TFatePartition> __this__desired = new java.util.ArrayList<TFatePartition>(other.desired.size());
+ for (TFatePartition other_element : other.desired) {
+ __this__desired.add(new TFatePartition(other_element));
+ }
+ this.desired = __this__desired;
+ }
+ }
+
+ @Override
+ public setPartitions_args deepCopy() {
+ return new setPartitions_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tinfo = null;
+ this.credentials = null;
+ setUpdateIdIsSet(false);
+ this.updateId = 0;
+ this.desired = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
+ public setPartitions_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.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;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
+ return this.credentials;
+ }
+
+ public setPartitions_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.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 long getUpdateId() {
+ return this.updateId;
+ }
+
+ public setPartitions_args setUpdateId(long updateId) {
+ this.updateId = updateId;
+ setUpdateIdIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdateId() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPDATEID_ISSET_ID);
+ }
+
+ /** Returns true if field updateId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdateId() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATEID_ISSET_ID);
+ }
+
+ public void setUpdateIdIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATEID_ISSET_ID, value);
+ }
+
+ public int getDesiredSize() {
+ return (this.desired == null) ? 0 : this.desired.size();
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<TFatePartition> getDesiredIterator() {
+ return (this.desired == null) ? null : this.desired.iterator();
+ }
+
+ public void addToDesired(TFatePartition elem) {
+ if (this.desired == null) {
+ this.desired = new java.util.ArrayList<TFatePartition>();
+ }
+ this.desired.add(elem);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<TFatePartition> getDesired() {
+ return this.desired;
+ }
+
+ public setPartitions_args setDesired(@org.apache.thrift.annotation.Nullable java.util.List<TFatePartition> desired) {
+ this.desired = desired;
+ return this;
+ }
+
+ public void unsetDesired() {
+ this.desired = null;
+ }
+
+ /** Returns true if field desired is set (has been assigned a value) and false otherwise */
+ public boolean isSetDesired() {
+ return this.desired != null;
+ }
+
+ public void setDesiredIsSet(boolean value) {
+ if (!value) {
+ this.desired = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case TINFO:
+ if (value == null) {
+ unsetTinfo();
+ } else {
+ setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value);
+ }
+ break;
+
+ case CREDENTIALS:
+ if (value == null) {
+ unsetCredentials();
+ } else {
+ setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
+ }
+ break;
+
+ case UPDATE_ID:
+ if (value == null) {
+ unsetUpdateId();
+ } else {
+ setUpdateId((java.lang.Long)value);
+ }
+ break;
+
+ case DESIRED:
+ if (value == null) {
+ unsetDesired();
+ } else {
+ setDesired((java.util.List<TFatePartition>)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
+ case UPDATE_ID:
+ return getUpdateId();
+
+ case DESIRED:
+ return getDesired();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
+ case UPDATE_ID:
+ return isSetUpdateId();
+ case DESIRED:
+ return isSetDesired();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof setPartitions_args)
+ return this.equals((setPartitions_args)that);
+ return false;
+ }
+
+ public boolean equals(setPartitions_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ 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;
+ }
+
+ boolean this_present_updateId = true;
+ boolean that_present_updateId = true;
+ if (this_present_updateId || that_present_updateId) {
+ if (!(this_present_updateId && that_present_updateId))
+ return false;
+ if (this.updateId != that.updateId)
+ return false;
+ }
+
+ boolean this_present_desired = true && this.isSetDesired();
+ boolean that_present_desired = true && that.isSetDesired();
+ if (this_present_desired || that_present_desired) {
+ if (!(this_present_desired && that_present_desired))
+ return false;
+ if (!this.desired.equals(that.desired))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updateId);
+
+ hashCode = hashCode * 8191 + ((isSetDesired()) ? 131071 : 524287);
+ if (isSetDesired())
+ hashCode = hashCode * 8191 + desired.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(setPartitions_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTinfo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCredentials()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetUpdateId(), other.isSetUpdateId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdateId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateId, other.updateId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetDesired(), other.isSetDesired());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDesired()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desired, other.desired);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setPartitions_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;
+ if (!first) sb.append(", ");
+ sb.append("updateId:");
+ sb.append(this.updateId);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("desired:");
+ if (this.desired == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.desired);
+ }
+ 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, java.lang.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 setPartitions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public setPartitions_argsStandardScheme getScheme() {
+ return new setPartitions_argsStandardScheme();
+ }
+ }
+
+ private static class setPartitions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setPartitions_args> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, setPartitions_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TINFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREDENTIALS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // UPDATE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updateId = iprot.readI64();
+ struct.setUpdateIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // DESIRED
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list138 = iprot.readListBegin();
+ struct.desired = new java.util.ArrayList<TFatePartition>(_list138.size);
+ @org.apache.thrift.annotation.Nullable TFatePartition _elem139;
+ for (int _i140 = 0; _i140 < _list138.size; ++_i140)
+ {
+ _elem139 = new TFatePartition();
+ _elem139.read(iprot);
+ struct.desired.add(_elem139);
+ }
+ iprot.readListEnd();
+ }
+ struct.setDesiredIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, setPartitions_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.tinfo != null) {
+ oprot.writeFieldBegin(TINFO_FIELD_DESC);
+ struct.tinfo.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.credentials != null) {
+ oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+ struct.credentials.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(UPDATE_ID_FIELD_DESC);
+ oprot.writeI64(struct.updateId);
+ oprot.writeFieldEnd();
+ if (struct.desired != null) {
+ oprot.writeFieldBegin(DESIRED_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.desired.size()));
+ for (TFatePartition _iter141 : struct.desired)
+ {
+ _iter141.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class setPartitions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public setPartitions_argsTupleScheme getScheme() {
+ return new setPartitions_argsTupleScheme();
+ }
+ }
+
+ private static class setPartitions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setPartitions_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, setPartitions_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetTinfo()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCredentials()) {
+ optionals.set(1);
+ }
+ if (struct.isSetUpdateId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetDesired()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetTinfo()) {
+ struct.tinfo.write(oprot);
+ }
+ if (struct.isSetCredentials()) {
+ struct.credentials.write(oprot);
+ }
+ if (struct.isSetUpdateId()) {
+ oprot.writeI64(struct.updateId);
+ }
+ if (struct.isSetDesired()) {
+ {
+ oprot.writeI32(struct.desired.size());
+ for (TFatePartition _iter142 : struct.desired)
+ {
+ _iter142.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, setPartitions_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.updateId = iprot.readI64();
+ struct.setUpdateIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ {
+ org.apache.thrift.protocol.TList _list143 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.desired = new java.util.ArrayList<TFatePartition>(_list143.size);
+ @org.apache.thrift.annotation.Nullable TFatePartition _elem144;
+ for (int _i145 = 0; _i145 < _list143.size; ++_i145)
+ {
+ _elem144 = new TFatePartition();
+ _elem144.read(iprot);
+ struct.desired.add(_elem144);
+ }
+ }
+ struct.setDesiredIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class setPartitions_result implements org.apache.thrift.TBase<setPartitions_result, setPartitions_result._Fields>, java.io.Serializable, Cloneable, Comparable<setPartitions_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setPartitions_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setPartitions_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setPartitions_resultTupleSchemeFactory();
+
+ public boolean success; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ SEC((short)1, "sec");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setPartitions_result.class, metaDataMap);
+ }
+
+ public setPartitions_result() {
+ }
+
+ public setPartitions_result(
+ boolean success,
+ org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.sec = sec;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public setPartitions_result(setPartitions_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetSec()) {
+ this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
+ }
+ }
+
+ @Override
+ public setPartitions_result deepCopy() {
+ return new setPartitions_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.sec = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public setPartitions_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() {
+ return this.sec;
+ }
+
+ public setPartitions_result setSec(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.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;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((java.lang.Boolean)value);
+ }
+ break;
+
+ case SEC:
+ if (value == null) {
+ unsetSec();
+ } else {
+ setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return isSuccess();
+
+ case SEC:
+ return getSec();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case SEC:
+ return isSetSec();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof setPartitions_result)
+ return this.equals((setPartitions_result)that);
+ return false;
+ }
+
+ public boolean equals(setPartitions_result that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ 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() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(setPartitions_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSec()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, other.sec);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setPartitions_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, java.lang.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 setPartitions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public setPartitions_resultStandardScheme getScheme() {
+ return new setPartitions_resultStandardScheme();
+ }
+ }
+
+ private static class setPartitions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setPartitions_result> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, setPartitions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // SEC
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, setPartitions_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.sec != null) {
+ oprot.writeFieldBegin(SEC_FIELD_DESC);
+ struct.sec.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class setPartitions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public setPartitions_resultTupleScheme getScheme() {
+ return new setPartitions_resultTupleScheme();
+ }
+ }
+
+ private static class setPartitions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setPartitions_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, setPartitions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetSec()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetSec()) {
+ struct.sec.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, setPartitions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class seeded_args implements org.apache.thrift.TBase<seeded_args, seeded_args._Fields>, java.io.Serializable, Cloneable, Comparable<seeded_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("seeded_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)1);
+ 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)2);
+ private static final org.apache.thrift.protocol.TField TPARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("tpartitions", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new seeded_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new seeded_argsTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<TFatePartition> tpartitions; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TINFO((short)1, "tinfo"),
+ CREDENTIALS((short)2, "credentials"),
+ TPARTITIONS((short)3, "tpartitions");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TINFO
+ return TINFO;
+ case 2: // CREDENTIALS
+ return CREDENTIALS;
+ case 3: // TPARTITIONS
+ return TPARTITIONS;
+ 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.core.clientImpl.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.securityImpl.thrift.TCredentials.class)));
+ tmpMap.put(_Fields.TPARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("tpartitions", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFatePartition.class))));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(seeded_args.class, metaDataMap);
+ }
+
+ public seeded_args() {
+ }
+
+ public seeded_args(
+ org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
+ java.util.List<TFatePartition> tpartitions)
+ {
+ this();
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ this.tpartitions = tpartitions;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public seeded_args(seeded_args other) {
+ if (other.isSetTinfo()) {
+ this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
+ }
+ if (other.isSetCredentials()) {
+ this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ }
+ if (other.isSetTpartitions()) {
+ java.util.List<TFatePartition> __this__tpartitions = new java.util.ArrayList<TFatePartition>(other.tpartitions.size());
+ for (TFatePartition other_element : other.tpartitions) {
+ __this__tpartitions.add(new TFatePartition(other_element));
+ }
+ this.tpartitions = __this__tpartitions;
+ }
+ }
+
+ @Override
+ public seeded_args deepCopy() {
+ return new seeded_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tinfo = null;
+ this.credentials = null;
+ this.tpartitions = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
+ public seeded_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.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;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
+ return this.credentials;
+ }
+
+ public seeded_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.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 int getTpartitionsSize() {
+ return (this.tpartitions == null) ? 0 : this.tpartitions.size();
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<TFatePartition> getTpartitionsIterator() {
+ return (this.tpartitions == null) ? null : this.tpartitions.iterator();
+ }
+
+ public void addToTpartitions(TFatePartition elem) {
+ if (this.tpartitions == null) {
+ this.tpartitions = new java.util.ArrayList<TFatePartition>();
+ }
+ this.tpartitions.add(elem);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<TFatePartition> getTpartitions() {
+ return this.tpartitions;
+ }
+
+ public seeded_args setTpartitions(@org.apache.thrift.annotation.Nullable java.util.List<TFatePartition> tpartitions) {
+ this.tpartitions = tpartitions;
+ return this;
+ }
+
+ public void unsetTpartitions() {
+ this.tpartitions = null;
+ }
+
+ /** Returns true if field tpartitions is set (has been assigned a value) and false otherwise */
+ public boolean isSetTpartitions() {
+ return this.tpartitions != null;
+ }
+
+ public void setTpartitionsIsSet(boolean value) {
+ if (!value) {
+ this.tpartitions = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case TINFO:
+ if (value == null) {
+ unsetTinfo();
+ } else {
+ setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value);
+ }
+ break;
+
+ case CREDENTIALS:
+ if (value == null) {
+ unsetCredentials();
+ } else {
+ setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
+ }
+ break;
+
+ case TPARTITIONS:
+ if (value == null) {
+ unsetTpartitions();
+ } else {
+ setTpartitions((java.util.List<TFatePartition>)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
+ case TPARTITIONS:
+ return getTpartitions();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
+ case TPARTITIONS:
+ return isSetTpartitions();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof seeded_args)
+ return this.equals((seeded_args)that);
+ return false;
+ }
+
+ public boolean equals(seeded_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ 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;
+ }
+
+ boolean this_present_tpartitions = true && this.isSetTpartitions();
+ boolean that_present_tpartitions = true && that.isSetTpartitions();
+ if (this_present_tpartitions || that_present_tpartitions) {
+ if (!(this_present_tpartitions && that_present_tpartitions))
+ return false;
+ if (!this.tpartitions.equals(that.tpartitions))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetTpartitions()) ? 131071 : 524287);
+ if (isSetTpartitions())
+ hashCode = hashCode * 8191 + tpartitions.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(seeded_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTinfo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCredentials()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetTpartitions(), other.isSetTpartitions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTpartitions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tpartitions, other.tpartitions);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("seeded_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;
+ if (!first) sb.append(", ");
+ sb.append("tpartitions:");
+ if (this.tpartitions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tpartitions);
+ }
+ 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, java.lang.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 seeded_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public seeded_argsStandardScheme getScheme() {
+ return new seeded_argsStandardScheme();
+ }
+ }
+
+ private static class seeded_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<seeded_args> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, seeded_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TINFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREDENTIALS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TPARTITIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list146 = iprot.readListBegin();
+ struct.tpartitions = new java.util.ArrayList<TFatePartition>(_list146.size);
+ @org.apache.thrift.annotation.Nullable TFatePartition _elem147;
+ for (int _i148 = 0; _i148 < _list146.size; ++_i148)
+ {
+ _elem147 = new TFatePartition();
+ _elem147.read(iprot);
+ struct.tpartitions.add(_elem147);
+ }
+ iprot.readListEnd();
+ }
+ struct.setTpartitionsIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, seeded_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.tinfo != null) {
+ oprot.writeFieldBegin(TINFO_FIELD_DESC);
+ struct.tinfo.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.credentials != null) {
+ oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+ struct.credentials.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tpartitions != null) {
+ oprot.writeFieldBegin(TPARTITIONS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tpartitions.size()));
+ for (TFatePartition _iter149 : struct.tpartitions)
+ {
+ _iter149.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class seeded_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public seeded_argsTupleScheme getScheme() {
+ return new seeded_argsTupleScheme();
+ }
+ }
+
+ private static class seeded_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<seeded_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, seeded_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetTinfo()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCredentials()) {
+ optionals.set(1);
+ }
+ if (struct.isSetTpartitions()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetTinfo()) {
+ struct.tinfo.write(oprot);
+ }
+ if (struct.isSetCredentials()) {
+ struct.credentials.write(oprot);
+ }
+ if (struct.isSetTpartitions()) {
+ {
+ oprot.writeI32(struct.tpartitions.size());
+ for (TFatePartition _iter150 : struct.tpartitions)
+ {
+ _iter150.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, seeded_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list151 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.tpartitions = new java.util.ArrayList<TFatePartition>(_list151.size);
+ @org.apache.thrift.annotation.Nullable TFatePartition _elem152;
+ for (int _i153 = 0; _i153 < _list151.size; ++_i153)
+ {
+ _elem152 = new TFatePartition();
+ _elem152.read(iprot);
+ struct.tpartitions.add(_elem152);
+ }
+ }
+ struct.setTpartitionsIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class seeded_result implements org.apache.thrift.TBase<seeded_result, seeded_result._Fields>, java.io.Serializable, Cloneable, Comparable<seeded_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("seeded_result");
+
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new seeded_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new seeded_resultTupleSchemeFactory();
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(seeded_result.class, metaDataMap);
+ }
+
+ public seeded_result() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public seeded_result(seeded_result other) {
+ }
+
+ @Override
+ public seeded_result deepCopy() {
+ return new seeded_result(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof seeded_result)
+ return this.equals((seeded_result)that);
+ return false;
+ }
+
+ public boolean equals(seeded_result that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(seeded_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("seeded_result(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 seeded_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public seeded_resultStandardScheme getScheme() {
+ return new seeded_resultStandardScheme();
+ }
+ }
+
+ private static class seeded_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<seeded_result> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, seeded_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ 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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, seeded_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class seeded_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public seeded_resultTupleScheme getScheme() {
+ return new seeded_resultTupleScheme();
+ }
+ }
+
+ private static class seeded_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<seeded_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, seeded_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, seeded_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ private static void unusedMethod() {}
+}
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/ManagerClientService.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/ManagerClientService.java
index d34eef78b0..0455f9be21 100644
--- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/ManagerClientService.java
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/ManagerClientService.java
@@ -85,6 +85,8 @@ public class ManagerClientService {
public long getManagerTimeNanos(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void processEvents(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TEvent> events) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+
}
public interface AsyncIface {
@@ -145,6 +147,8 @@ public class ManagerClientService {
public void getManagerTimeNanos(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
+ public void processEvents(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TEvent> events, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
@@ -1078,6 +1082,35 @@ public class ManagerClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getManagerTimeNanos failed: unknown result");
}
+ @Override
+ public void processEvents(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TEvent> events) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ {
+ send_processEvents(tinfo, credentials, events);
+ recv_processEvents();
+ }
+
+ public void send_processEvents(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TEvent> events) throws org.apache.thrift.TException
+ {
+ processEvents_args args = new processEvents_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setEvents(events);
+ sendBase("processEvents", args);
+ }
+
+ public void recv_processEvents() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ {
+ processEvents_result result = new processEvents_result();
+ receiveBase(result, "processEvents");
+ if (result.sec != null) {
+ throw result.sec;
+ }
+ if (result.tnase != null) {
+ throw result.tnase;
+ }
+ return;
+ }
+
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
@@ -2320,6 +2353,48 @@ public class ManagerClientService {
}
}
+ @Override
+ public void processEvents(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TEvent> events, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ processEvents_call method_call = new processEvents_call(tinfo, credentials, events, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class processEvents_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
+ private java.util.List<TEvent> events;
+ public processEvents_call(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<TEvent> events, org.apache.thrift.async.AsyncMethodCallback<Void> 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.events = events;
+ }
+
+ @Override
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("processEvents", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ processEvents_args args = new processEvents_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setEvents(events);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ @Override
+ public Void getResult() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.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_processEvents();
+ return null;
+ }
+ }
+
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
@@ -2361,6 +2436,7 @@ public class ManagerClientService {
processMap.put("requestTabletHosting", new requestTabletHosting());
processMap.put("updateTabletMergeability", new updateTabletMergeability());
processMap.put("getManagerTimeNanos", new getManagerTimeNanos());
+ processMap.put("processEvents", new processEvents());
return processMap;
}
@@ -3361,6 +3437,40 @@ public class ManagerClientService {
}
}
+ public static class processEvents<I extends Iface> extends org.apache.thrift.ProcessFunction<I, processEvents_args> {
+ public processEvents() {
+ super("processEvents");
+ }
+
+ @Override
+ public processEvents_args getEmptyArgsInstance() {
+ return new processEvents_args();
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
+ public processEvents_result getResult(I iface, processEvents_args args) throws org.apache.thrift.TException {
+ processEvents_result result = new processEvents_result();
+ try {
+ iface.processEvents(args.tinfo, args.credentials, args.events);
+ } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ result.sec = sec;
+ } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase) {
+ result.tnase = tnase;
+ }
+ return result;
+ }
+ }
+
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
@@ -3402,6 +3512,7 @@ public class ManagerClientService {
processMap.put("requestTabletHosting", new requestTabletHosting());
processMap.put("updateTabletMergeability", new updateTabletMergeability());
processMap.put("getManagerTimeNanos", new getManagerTimeNanos());
+ processMap.put("processEvents", new processEvents());
return processMap;
}
@@ -5551,6 +5662,80 @@ public class ManagerClientService {
}
}
+ public static class processEvents<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, processEvents_args, Void> {
+ public processEvents() {
+ super("processEvents");
+ }
+
+ @Override
+ public processEvents_args getEmptyArgsInstance() {
+ return new processEvents_args();
+ }
+
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
+ public void onComplete(Void o) {
+ processEvents_result result = new processEvents_result();
+ try {
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ @Override
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TSerializable msg;
+ processEvents_result result = new processEvents_result();
+ if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) {
+ result.sec = (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) e;
+ result.setSecIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException) {
+ result.tnase = (org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException) e;
+ result.setTnaseIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ public void start(I iface, processEvents_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ iface.processEvents(args.tinfo, args.credentials, args.events,resultHandler);
+ }
+ }
+
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@@ -35645,13 +35830,13 @@ public class ManagerClientService {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
- struct.success = new java.util.ArrayList<java.lang.String>(_list88.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _elem89;
- for (int _i90 = 0; _i90 < _list88.size; ++_i90)
+ org.apache.thrift.protocol.TList _list96 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<java.lang.String>(_list96.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem97;
+ for (int _i98 = 0; _i98 < _list96.size; ++_i98)
{
- _elem89 = iprot.readString();
- struct.success.add(_elem89);
+ _elem97 = iprot.readString();
+ struct.success.add(_elem97);
}
iprot.readListEnd();
}
@@ -35698,9 +35883,9 @@ public class ManagerClientService {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (java.lang.String _iter91 : struct.success)
+ for (java.lang.String _iter99 : struct.success)
{
- oprot.writeString(_iter91);
+ oprot.writeString(_iter99);
}
oprot.writeListEnd();
}
@@ -35748,9 +35933,9 @@ public class ManagerClientService {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (java.lang.String _iter92 : struct.success)
+ for (java.lang.String _iter100 : struct.success)
{
- oprot.writeString(_iter92);
+ oprot.writeString(_iter100);
}
}
}
@@ -35768,13 +35953,13 @@ public class ManagerClientService {
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list93 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
- struct.success = new java.util.ArrayList<java.lang.String>(_list93.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _elem94;
- for (int _i95 = 0; _i95 < _list93.size; ++_i95)
+ org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.success = new java.util.ArrayList<java.lang.String>(_list101.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem102;
+ for (int _i103 = 0; _i103 < _list101.size; ++_i103)
{
- _elem94 = iprot.readString();
- struct.success.add(_elem94);
+ _elem102 = iprot.readString();
+ struct.success.add(_elem102);
}
}
struct.setSuccessIsSet(true);
@@ -37606,14 +37791,14 @@ public class ManagerClientService {
case 4: // EXTENTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list96 = iprot.readListBegin();
- struct.extents = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list96.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem97;
- for (int _i98 = 0; _i98 < _list96.size; ++_i98)
+ org.apache.thrift.protocol.TList _list104 = iprot.readListBegin();
+ struct.extents = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list104.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem105;
+ for (int _i106 = 0; _i106 < _list104.size; ++_i106)
{
- _elem97 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _elem97.read(iprot);
- struct.extents.add(_elem97);
+ _elem105 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _elem105.read(iprot);
+ struct.extents.add(_elem105);
}
iprot.readListEnd();
}
@@ -37657,9 +37842,9 @@ public class ManagerClientService {
oprot.writeFieldBegin(EXTENTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.extents.size()));
- for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter99 : struct.extents)
+ for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter107 : struct.extents)
{
- _iter99.write(oprot);
+ _iter107.write(oprot);
}
oprot.writeListEnd();
}
@@ -37709,9 +37894,9 @@ public class ManagerClientService {
if (struct.isSetExtents()) {
{
oprot.writeI32(struct.extents.size());
- for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter100 : struct.extents)
+ for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter108 : struct.extents)
{
- _iter100.write(oprot);
+ _iter108.write(oprot);
}
}
}
@@ -37737,14 +37922,14 @@ public class ManagerClientService {
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
- struct.extents = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list101.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem102;
- for (int _i103 = 0; _i103 < _list101.size; ++_i103)
+ org.apache.thrift.protocol.TList _list109 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.extents = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list109.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem110;
+ for (int _i111 = 0; _i111 < _list109.size; ++_i111)
{
- _elem102 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _elem102.read(iprot);
- struct.extents.add(_elem102);
+ _elem110 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _elem110.read(iprot);
+ struct.extents.add(_elem110);
}
}
struct.setExtentsIsSet(true);
@@ -38963,17 +39148,17 @@ public class ManagerClientService {
case 4: // SPLITS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map104 = iprot.readMapBegin();
- struct.splits = new java.util.HashMap<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent,TTabletMergeability>(2*_map104.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _key105;
- @org.apache.thrift.annotation.Nullable TTabletMergeability _val106;
- for (int _i107 = 0; _i107 < _map104.size; ++_i107)
+ org.apache.thrift.protocol.TMap _map112 = iprot.readMapBegin();
+ struct.splits = new java.util.HashMap<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent,TTabletMergeability>(2*_map112.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _key113;
+ @org.apache.thrift.annotation.Nullable TTabletMergeability _val114;
+ for (int _i115 = 0; _i115 < _map112.size; ++_i115)
{
- _key105 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _key105.read(iprot);
- _val106 = new TTabletMergeability();
- _val106.read(iprot);
- struct.splits.put(_key105, _val106);
+ _key113 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _key113.read(iprot);
+ _val114 = new TTabletMergeability();
+ _val114.read(iprot);
+ struct.splits.put(_key113, _val114);
}
iprot.readMapEnd();
}
@@ -39017,10 +39202,10 @@ public class ManagerClientService {
oprot.writeFieldBegin(SPLITS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, struct.splits.size()));
- for (java.util.Map.Entry<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent, TTabletMergeability> _iter108 : struct.splits.entrySet())
+ for (java.util.Map.Entry<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent, TTabletMergeability> _iter116 : struct.splits.entrySet())
{
- _iter108.getKey().write(oprot);
- _iter108.getValue().write(oprot);
+ _iter116.getKey().write(oprot);
+ _iter116.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -39070,10 +39255,10 @@ public class ManagerClientService {
if (struct.isSetSplits()) {
{
oprot.writeI32(struct.splits.size());
- for (java.util.Map.Entry<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent, TTabletMergeability> _iter109 : struct.splits.entrySet())
+ for (java.util.Map.Entry<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent, TTabletMergeability> _iter117 : struct.splits.entrySet())
{
- _iter109.getKey().write(oprot);
- _iter109.getValue().write(oprot);
+ _iter117.getKey().write(oprot);
+ _iter117.getValue().write(oprot);
}
}
}
@@ -39099,17 +39284,17 @@ public class ManagerClientService {
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TMap _map110 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT);
- struct.splits = new java.util.HashMap<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent,TTabletMergeability>(2*_map110.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _key111;
- @org.apache.thrift.annotation.Nullable TTabletMergeability _val112;
- for (int _i113 = 0; _i113 < _map110.size; ++_i113)
+ org.apache.thrift.protocol.TMap _map118 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT);
+ struct.splits = new java.util.HashMap<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent,TTabletMergeability>(2*_map118.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _key119;
+ @org.apache.thrift.annotation.Nullable TTabletMergeability _val120;
+ for (int _i121 = 0; _i121 < _map118.size; ++_i121)
{
- _key111 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _key111.read(iprot);
- _val112 = new TTabletMergeability();
- _val112.read(iprot);
- struct.splits.put(_key111, _val112);
+ _key119 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _key119.read(iprot);
+ _val120 = new TTabletMergeability();
+ _val120.read(iprot);
+ struct.splits.put(_key119, _val120);
}
}
struct.setSplitsIsSet(true);
@@ -39674,17 +39859,1159 @@ public class ManagerClientService {
}
}
- private static class updateTabletMergeability_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ private static class updateTabletMergeability_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public updateTabletMergeability_resultStandardScheme getScheme() {
+ return new updateTabletMergeability_resultStandardScheme();
+ }
+ }
+
+ private static class updateTabletMergeability_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateTabletMergeability_result> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateTabletMergeability_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list122 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list122.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem123;
+ for (int _i124 = 0; _i124 < _list122.size; ++_i124)
+ {
+ _elem123 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _elem123.read(iprot);
+ struct.success.add(_elem123);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // SEC
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TOE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.toe = new org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException();
+ struct.toe.read(iprot);
+ struct.setToeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TNASE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tnase = new org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException();
+ struct.tnase.read(iprot);
+ struct.setTnaseIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, updateTabletMergeability_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+ for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter125 : struct.success)
+ {
+ _iter125.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.sec != null) {
+ oprot.writeFieldBegin(SEC_FIELD_DESC);
+ struct.sec.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.toe != null) {
+ oprot.writeFieldBegin(TOE_FIELD_DESC);
+ struct.toe.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tnase != null) {
+ oprot.writeFieldBegin(TNASE_FIELD_DESC);
+ struct.tnase.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateTabletMergeability_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public updateTabletMergeability_resultTupleScheme getScheme() {
+ return new updateTabletMergeability_resultTupleScheme();
+ }
+ }
+
+ private static class updateTabletMergeability_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateTabletMergeability_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateTabletMergeability_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetSec()) {
+ optionals.set(1);
+ }
+ if (struct.isSetToe()) {
+ optionals.set(2);
+ }
+ if (struct.isSetTnase()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter126 : struct.success)
+ {
+ _iter126.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetSec()) {
+ struct.sec.write(oprot);
+ }
+ if (struct.isSetToe()) {
+ struct.toe.write(oprot);
+ }
+ if (struct.isSetTnase()) {
+ struct.tnase.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateTabletMergeability_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list127 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list127.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem128;
+ for (int _i129 = 0; _i129 < _list127.size; ++_i129)
+ {
+ _elem128 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _elem128.read(iprot);
+ struct.success.add(_elem128);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.toe = new org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException();
+ struct.toe.read(iprot);
+ struct.setToeIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.tnase = new org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException();
+ struct.tnase.read(iprot);
+ struct.setTnaseIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class getManagerTimeNanos_args implements org.apache.thrift.TBase<getManagerTimeNanos_args, getManagerTimeNanos_args._Fields>, java.io.Serializable, Cloneable, Comparable<getManagerTimeNanos_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getManagerTimeNanos_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)1);
+ 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)2);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getManagerTimeNanos_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getManagerTimeNanos_argsTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TINFO((short)1, "tinfo"),
+ CREDENTIALS((short)2, "credentials");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TINFO
+ return TINFO;
+ case 2: // 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.core.clientImpl.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.securityImpl.thrift.TCredentials.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getManagerTimeNanos_args.class, metaDataMap);
+ }
+
+ public getManagerTimeNanos_args() {
+ }
+
+ public getManagerTimeNanos_args(
+ org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials)
+ {
+ this();
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getManagerTimeNanos_args(getManagerTimeNanos_args other) {
+ if (other.isSetTinfo()) {
+ this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
+ }
+ if (other.isSetCredentials()) {
+ this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ }
+ }
+
+ @Override
+ public getManagerTimeNanos_args deepCopy() {
+ return new getManagerTimeNanos_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tinfo = null;
+ this.credentials = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
+ public getManagerTimeNanos_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.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;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
+ return this.credentials;
+ }
+
+ public getManagerTimeNanos_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.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;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case TINFO:
+ if (value == null) {
+ unsetTinfo();
+ } else {
+ setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value);
+ }
+ break;
+
+ case CREDENTIALS:
+ if (value == null) {
+ unsetCredentials();
+ } else {
+ setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof getManagerTimeNanos_args)
+ return this.equals((getManagerTimeNanos_args)that);
+ return false;
+ }
+
+ public boolean equals(getManagerTimeNanos_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ 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() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getManagerTimeNanos_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTinfo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCredentials()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getManagerTimeNanos_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, java.lang.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 getManagerTimeNanos_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getManagerTimeNanos_argsStandardScheme getScheme() {
+ return new getManagerTimeNanos_argsStandardScheme();
+ }
+ }
+
+ private static class getManagerTimeNanos_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getManagerTimeNanos_args> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getManagerTimeNanos_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TINFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREDENTIALS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getManagerTimeNanos_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.tinfo != null) {
+ oprot.writeFieldBegin(TINFO_FIELD_DESC);
+ struct.tinfo.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.credentials != null) {
+ oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+ struct.credentials.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getManagerTimeNanos_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getManagerTimeNanos_argsTupleScheme getScheme() {
+ return new getManagerTimeNanos_argsTupleScheme();
+ }
+ }
+
+ private static class getManagerTimeNanos_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getManagerTimeNanos_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getManagerTimeNanos_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.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, getManagerTimeNanos_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();
+ struct.credentials.read(iprot);
+ struct.setCredentialsIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class getManagerTimeNanos_result implements org.apache.thrift.TBase<getManagerTimeNanos_result, getManagerTimeNanos_result._Fields>, java.io.Serializable, Cloneable, Comparable<getManagerTimeNanos_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getManagerTimeNanos_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 org.apache.thrift.protocol.TField TNASE_FIELD_DESC = new org.apache.thrift.protocol.TField("tnase", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getManagerTimeNanos_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getManagerTimeNanos_resultTupleSchemeFactory();
+
+ public long success; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ SEC((short)1, "sec"),
+ TNASE((short)2, "tnase");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // SEC
+ return SEC;
+ case 2: // TNASE
+ return TNASE;
+ 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException.class)));
+ tmpMap.put(_Fields.TNASE, new org.apache.thrift.meta_data.FieldMetaData("tnase", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getManagerTimeNanos_result.class, metaDataMap);
+ }
+
+ public getManagerTimeNanos_result() {
+ }
+
+ public getManagerTimeNanos_result(
+ long success,
+ org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec,
+ org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.sec = sec;
+ this.tnase = tnase;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getManagerTimeNanos_result(getManagerTimeNanos_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetSec()) {
+ this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
+ }
+ if (other.isSetTnase()) {
+ this.tnase = new org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException(other.tnase);
+ }
+ }
+
+ @Override
+ public getManagerTimeNanos_result deepCopy() {
+ return new getManagerTimeNanos_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ this.sec = null;
+ this.tnase = null;
+ }
+
+ public long getSuccess() {
+ return this.success;
+ }
+
+ public getManagerTimeNanos_result setSuccess(long success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() {
+ return this.sec;
+ }
+
+ public getManagerTimeNanos_result setSec(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.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;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException getTnase() {
+ return this.tnase;
+ }
+
+ public getManagerTimeNanos_result setTnase(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase) {
+ this.tnase = tnase;
+ return this;
+ }
+
+ public void unsetTnase() {
+ this.tnase = null;
+ }
+
+ /** Returns true if field tnase is set (has been assigned a value) and false otherwise */
+ public boolean isSetTnase() {
+ return this.tnase != null;
+ }
+
+ public void setTnaseIsSet(boolean value) {
+ if (!value) {
+ this.tnase = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((java.lang.Long)value);
+ }
+ break;
+
+ case SEC:
+ if (value == null) {
+ unsetSec();
+ } else {
+ setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
+ }
+ break;
+
+ case TNASE:
+ if (value == null) {
+ unsetTnase();
+ } else {
+ setTnase((org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case SEC:
+ return getSec();
+
+ case TNASE:
+ return getTnase();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case SEC:
+ return isSetSec();
+ case TNASE:
+ return isSetTnase();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof getManagerTimeNanos_result)
+ return this.equals((getManagerTimeNanos_result)that);
+ return false;
+ }
+
+ public boolean equals(getManagerTimeNanos_result that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ 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;
+ }
+
+ boolean this_present_tnase = true && this.isSetTnase();
+ boolean that_present_tnase = true && that.isSetTnase();
+ if (this_present_tnase || that_present_tnase) {
+ if (!(this_present_tnase && that_present_tnase))
+ return false;
+ if (!this.tnase.equals(that.tnase))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
+
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetTnase()) ? 131071 : 524287);
+ if (isSetTnase())
+ hashCode = hashCode * 8191 + tnase.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getManagerTimeNanos_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSec()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, other.sec);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetTnase(), other.isSetTnase());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTnase()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tnase, other.tnase);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getManagerTimeNanos_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;
+ if (!first) sb.append(", ");
+ sb.append("tnase:");
+ if (this.tnase == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tnase);
+ }
+ 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, java.lang.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 getManagerTimeNanos_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
- public updateTabletMergeability_resultStandardScheme getScheme() {
- return new updateTabletMergeability_resultStandardScheme();
+ public getManagerTimeNanos_resultStandardScheme getScheme() {
+ return new getManagerTimeNanos_resultStandardScheme();
}
}
- private static class updateTabletMergeability_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateTabletMergeability_result> {
+ private static class getManagerTimeNanos_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getManagerTimeNanos_result> {
@Override
- public void read(org.apache.thrift.protocol.TProtocol iprot, updateTabletMergeability_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getManagerTimeNanos_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -39695,19 +41022,8 @@ public class ManagerClientService {
}
switch (schemeField.id) {
case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list114 = iprot.readListBegin();
- struct.success = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list114.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem115;
- for (int _i116 = 0; _i116 < _list114.size; ++_i116)
- {
- _elem115 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _elem115.read(iprot);
- struct.success.add(_elem115);
- }
- iprot.readListEnd();
- }
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -39722,16 +41038,7 @@ public class ManagerClientService {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // TOE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.toe = new org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException();
- struct.toe.read(iprot);
- struct.setToeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TNASE
+ case 2: // TNASE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tnase = new org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException();
struct.tnase.read(iprot);
@@ -39752,20 +41059,13 @@ public class ManagerClientService {
}
@Override
- public void write(org.apache.thrift.protocol.TProtocol oprot, updateTabletMergeability_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getManagerTimeNanos_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
+ if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter117 : struct.success)
- {
- _iter117.write(oprot);
- }
- oprot.writeListEnd();
- }
+ oprot.writeI64(struct.success);
oprot.writeFieldEnd();
}
if (struct.sec != null) {
@@ -39773,11 +41073,6 @@ public class ManagerClientService {
struct.sec.write(oprot);
oprot.writeFieldEnd();
}
- if (struct.toe != null) {
- oprot.writeFieldBegin(TOE_FIELD_DESC);
- struct.toe.write(oprot);
- oprot.writeFieldEnd();
- }
if (struct.tnase != null) {
oprot.writeFieldBegin(TNASE_FIELD_DESC);
struct.tnase.write(oprot);
@@ -39789,17 +41084,17 @@ public class ManagerClientService {
}
- private static class updateTabletMergeability_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ private static class getManagerTimeNanos_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
- public updateTabletMergeability_resultTupleScheme getScheme() {
- return new updateTabletMergeability_resultTupleScheme();
+ public getManagerTimeNanos_resultTupleScheme getScheme() {
+ return new getManagerTimeNanos_resultTupleScheme();
}
}
- private static class updateTabletMergeability_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateTabletMergeability_result> {
+ private static class getManagerTimeNanos_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getManagerTimeNanos_result> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, updateTabletMergeability_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, getManagerTimeNanos_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
@@ -39808,49 +41103,27 @@ public class ManagerClientService {
if (struct.isSetSec()) {
optionals.set(1);
}
- if (struct.isSetToe()) {
- optionals.set(2);
- }
if (struct.isSetTnase()) {
- optionals.set(3);
+ optionals.set(2);
}
- oprot.writeBitSet(optionals, 4);
+ oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter118 : struct.success)
- {
- _iter118.write(oprot);
- }
- }
+ oprot.writeI64(struct.success);
}
if (struct.isSetSec()) {
struct.sec.write(oprot);
}
- if (struct.isSetToe()) {
- struct.toe.write(oprot);
- }
if (struct.isSetTnase()) {
struct.tnase.write(oprot);
}
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, updateTabletMergeability_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, getManagerTimeNanos_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(4);
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list119 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
- struct.success = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list119.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem120;
- for (int _i121 = 0; _i121 < _list119.size; ++_i121)
- {
- _elem120 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _elem120.read(iprot);
- struct.success.add(_elem120);
- }
- }
+ struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
@@ -39859,11 +41132,6 @@ public class ManagerClientService {
struct.setSecIsSet(true);
}
if (incoming.get(2)) {
- struct.toe = new org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException();
- struct.toe.read(iprot);
- struct.setToeIsSet(true);
- }
- if (incoming.get(3)) {
struct.tnase = new org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException();
struct.tnase.read(iprot);
struct.setTnaseIsSet(true);
@@ -39877,22 +41145,25 @@ public class ManagerClientService {
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
- public static class getManagerTimeNanos_args implements org.apache.thrift.TBase<getManagerTimeNanos_args, getManagerTimeNanos_args._Fields>, java.io.Serializable, Cloneable, Comparable<getManagerTimeNanos_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getManagerTimeNanos_args");
+ public static class processEvents_args implements org.apache.thrift.TBase<processEvents_args, processEvents_args._Fields>, java.io.Serializable, Cloneable, Comparable<processEvents_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("processEvents_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)1);
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)2);
+ private static final org.apache.thrift.protocol.TField EVENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("events", org.apache.thrift.protocol.TType.LIST, (short)3);
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getManagerTimeNanos_argsStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getManagerTimeNanos_argsTupleSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new processEvents_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new processEvents_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<TEvent> events; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TINFO((short)1, "tinfo"),
- CREDENTIALS((short)2, "credentials");
+ CREDENTIALS((short)2, "credentials"),
+ EVENTS((short)3, "events");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -39912,6 +41183,8 @@ public class ManagerClientService {
return TINFO;
case 2: // CREDENTIALS
return CREDENTIALS;
+ case 3: // EVENTS
+ return EVENTS;
default:
return null;
}
@@ -39962,43 +41235,56 @@ public class ManagerClientService {
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.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.securityImpl.thrift.TCredentials.class)));
+ tmpMap.put(_Fields.EVENTS, new org.apache.thrift.meta_data.FieldMetaData("events", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TEvent.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getManagerTimeNanos_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(processEvents_args.class, metaDataMap);
}
- public getManagerTimeNanos_args() {
+ public processEvents_args() {
}
- public getManagerTimeNanos_args(
+ public processEvents_args(
org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
- org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials)
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
+ java.util.List<TEvent> events)
{
this();
this.tinfo = tinfo;
this.credentials = credentials;
+ this.events = events;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public getManagerTimeNanos_args(getManagerTimeNanos_args other) {
+ public processEvents_args(processEvents_args other) {
if (other.isSetTinfo()) {
this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
}
if (other.isSetCredentials()) {
this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
}
+ if (other.isSetEvents()) {
+ java.util.List<TEvent> __this__events = new java.util.ArrayList<TEvent>(other.events.size());
+ for (TEvent other_element : other.events) {
+ __this__events.add(new TEvent(other_element));
+ }
+ this.events = __this__events;
+ }
}
@Override
- public getManagerTimeNanos_args deepCopy() {
- return new getManagerTimeNanos_args(this);
+ public processEvents_args deepCopy() {
+ return new processEvents_args(this);
}
@Override
public void clear() {
this.tinfo = null;
this.credentials = null;
+ this.events = null;
}
@org.apache.thrift.annotation.Nullable
@@ -40006,7 +41292,7 @@ public class ManagerClientService {
return this.tinfo;
}
- public getManagerTimeNanos_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) {
+ public processEvents_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) {
this.tinfo = tinfo;
return this;
}
@@ -40031,7 +41317,7 @@ public class ManagerClientService {
return this.credentials;
}
- public getManagerTimeNanos_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
+ public processEvents_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
this.credentials = credentials;
return this;
}
@@ -40051,6 +41337,47 @@ public class ManagerClientService {
}
}
+ public int getEventsSize() {
+ return (this.events == null) ? 0 : this.events.size();
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<TEvent> getEventsIterator() {
+ return (this.events == null) ? null : this.events.iterator();
+ }
+
+ public void addToEvents(TEvent elem) {
+ if (this.events == null) {
+ this.events = new java.util.ArrayList<TEvent>();
+ }
+ this.events.add(elem);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<TEvent> getEvents() {
+ return this.events;
+ }
+
+ public processEvents_args setEvents(@org.apache.thrift.annotation.Nullable java.util.List<TEvent> events) {
+ this.events = events;
+ return this;
+ }
+
+ public void unsetEvents() {
+ this.events = null;
+ }
+
+ /** Returns true if field events is set (has been assigned a value) and false otherwise */
+ public boolean isSetEvents() {
+ return this.events != null;
+ }
+
+ public void setEventsIsSet(boolean value) {
+ if (!value) {
+ this.events = null;
+ }
+ }
+
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
@@ -40070,6 +41397,14 @@ public class ManagerClientService {
}
break;
+ case EVENTS:
+ if (value == null) {
+ unsetEvents();
+ } else {
+ setEvents((java.util.List<TEvent>)value);
+ }
+ break;
+
}
}
@@ -40083,6 +41418,9 @@ public class ManagerClientService {
case CREDENTIALS:
return getCredentials();
+ case EVENTS:
+ return getEvents();
+
}
throw new java.lang.IllegalStateException();
}
@@ -40099,18 +41437,20 @@ public class ManagerClientService {
return isSetTinfo();
case CREDENTIALS:
return isSetCredentials();
+ case EVENTS:
+ return isSetEvents();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
- if (that instanceof getManagerTimeNanos_args)
- return this.equals((getManagerTimeNanos_args)that);
+ if (that instanceof processEvents_args)
+ return this.equals((processEvents_args)that);
return false;
}
- public boolean equals(getManagerTimeNanos_args that) {
+ public boolean equals(processEvents_args that) {
if (that == null)
return false;
if (this == that)
@@ -40134,6 +41474,15 @@ public class ManagerClientService {
return false;
}
+ boolean this_present_events = true && this.isSetEvents();
+ boolean that_present_events = true && that.isSetEvents();
+ if (this_present_events || that_present_events) {
+ if (!(this_present_events && that_present_events))
+ return false;
+ if (!this.events.equals(that.events))
+ return false;
+ }
+
return true;
}
@@ -40149,11 +41498,15 @@ public class ManagerClientService {
if (isSetCredentials())
hashCode = hashCode * 8191 + credentials.hashCode();
+ hashCode = hashCode * 8191 + ((isSetEvents()) ? 131071 : 524287);
+ if (isSetEvents())
+ hashCode = hashCode * 8191 + events.hashCode();
+
return hashCode;
}
@Override
- public int compareTo(getManagerTimeNanos_args other) {
+ public int compareTo(processEvents_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -40180,6 +41533,16 @@ public class ManagerClientService {
return lastComparison;
}
}
+ lastComparison = java.lang.Boolean.compare(isSetEvents(), other.isSetEvents());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEvents()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.events, other.events);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -40201,7 +41564,7 @@ public class ManagerClientService {
@Override
public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("getManagerTimeNanos_args(");
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("processEvents_args(");
boolean first = true;
sb.append("tinfo:");
@@ -40219,6 +41582,14 @@ public class ManagerClientService {
sb.append(this.credentials);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("events:");
+ if (this.events == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.events);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -40250,17 +41621,17 @@ public class ManagerClientService {
}
}
- private static class getManagerTimeNanos_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ private static class processEvents_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
- public getManagerTimeNanos_argsStandardScheme getScheme() {
- return new getManagerTimeNanos_argsStandardScheme();
+ public processEvents_argsStandardScheme getScheme() {
+ return new processEvents_argsStandardScheme();
}
}
- private static class getManagerTimeNanos_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getManagerTimeNanos_args> {
+ private static class processEvents_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<processEvents_args> {
@Override
- public void read(org.apache.thrift.protocol.TProtocol iprot, getManagerTimeNanos_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, processEvents_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -40288,6 +41659,25 @@ public class ManagerClientService {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 3: // EVENTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list130 = iprot.readListBegin();
+ struct.events = new java.util.ArrayList<TEvent>(_list130.size);
+ @org.apache.thrift.annotation.Nullable TEvent _elem131;
+ for (int _i132 = 0; _i132 < _list130.size; ++_i132)
+ {
+ _elem131 = new TEvent();
+ _elem131.read(iprot);
+ struct.events.add(_elem131);
+ }
+ iprot.readListEnd();
+ }
+ struct.setEventsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -40300,7 +41690,7 @@ public class ManagerClientService {
}
@Override
- public void write(org.apache.thrift.protocol.TProtocol oprot, getManagerTimeNanos_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, processEvents_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -40314,23 +41704,35 @@ public class ManagerClientService {
struct.credentials.write(oprot);
oprot.writeFieldEnd();
}
+ if (struct.events != null) {
+ oprot.writeFieldBegin(EVENTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.events.size()));
+ for (TEvent _iter133 : struct.events)
+ {
+ _iter133.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class getManagerTimeNanos_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ private static class processEvents_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
- public getManagerTimeNanos_argsTupleScheme getScheme() {
- return new getManagerTimeNanos_argsTupleScheme();
+ public processEvents_argsTupleScheme getScheme() {
+ return new processEvents_argsTupleScheme();
}
}
- private static class getManagerTimeNanos_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getManagerTimeNanos_args> {
+ private static class processEvents_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<processEvents_args> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getManagerTimeNanos_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, processEvents_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTinfo()) {
@@ -40339,19 +41741,31 @@ public class ManagerClientService {
if (struct.isSetCredentials()) {
optionals.set(1);
}
- oprot.writeBitSet(optionals, 2);
+ if (struct.isSetEvents()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
if (struct.isSetTinfo()) {
struct.tinfo.write(oprot);
}
if (struct.isSetCredentials()) {
struct.credentials.write(oprot);
}
+ if (struct.isSetEvents()) {
+ {
+ oprot.writeI32(struct.events.size());
+ for (TEvent _iter134 : struct.events)
+ {
+ _iter134.write(oprot);
+ }
+ }
+ }
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getManagerTimeNanos_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, processEvents_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(2);
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
struct.tinfo.read(iprot);
@@ -40362,6 +41776,20 @@ public class ManagerClientService {
struct.credentials.read(iprot);
struct.setCredentialsIsSet(true);
}
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list135 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.events = new java.util.ArrayList<TEvent>(_list135.size);
+ @org.apache.thrift.annotation.Nullable TEvent _elem136;
+ for (int _i137 = 0; _i137 < _list135.size; ++_i137)
+ {
+ _elem136 = new TEvent();
+ _elem136.read(iprot);
+ struct.events.add(_elem136);
+ }
+ }
+ struct.setEventsIsSet(true);
+ }
}
}
@@ -40371,23 +41799,20 @@ public class ManagerClientService {
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
- public static class getManagerTimeNanos_result implements org.apache.thrift.TBase<getManagerTimeNanos_result, getManagerTimeNanos_result._Fields>, java.io.Serializable, Cloneable, Comparable<getManagerTimeNanos_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getManagerTimeNanos_result");
+ public static class processEvents_result implements org.apache.thrift.TBase<processEvents_result, processEvents_result._Fields>, java.io.Serializable, Cloneable, Comparable<processEvents_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("processEvents_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 org.apache.thrift.protocol.TField TNASE_FIELD_DESC = new org.apache.thrift.protocol.TField("tnase", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getManagerTimeNanos_resultStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getManagerTimeNanos_resultTupleSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new processEvents_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new processEvents_resultTupleSchemeFactory();
- public long success; // required
public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec; // required
public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
SEC((short)1, "sec"),
TNASE((short)2, "tnase");
@@ -40405,8 +41830,6 @@ public class ManagerClientService {
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
case 1: // SEC
return SEC;
case 2: // TNASE
@@ -40454,32 +41877,25 @@ public class ManagerClientService {
}
// isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException.class)));
tmpMap.put(_Fields.TNASE, new org.apache.thrift.meta_data.FieldMetaData("tnase", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getManagerTimeNanos_result.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(processEvents_result.class, metaDataMap);
}
- public getManagerTimeNanos_result() {
+ public processEvents_result() {
}
- public getManagerTimeNanos_result(
- long success,
+ public processEvents_result(
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec,
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase)
{
this();
- this.success = success;
- setSuccessIsSet(true);
this.sec = sec;
this.tnase = tnase;
}
@@ -40487,9 +41903,7 @@ public class ManagerClientService {
/**
* Performs a deep copy on <i>other</i>.
*/
- public getManagerTimeNanos_result(getManagerTimeNanos_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
+ public processEvents_result(processEvents_result other) {
if (other.isSetSec()) {
this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
}
@@ -40499,47 +41913,22 @@ public class ManagerClientService {
}
@Override
- public getManagerTimeNanos_result deepCopy() {
- return new getManagerTimeNanos_result(this);
+ public processEvents_result deepCopy() {
+ return new processEvents_result(this);
}
@Override
public void clear() {
- setSuccessIsSet(false);
- this.success = 0;
this.sec = null;
this.tnase = null;
}
- public long getSuccess() {
- return this.success;
- }
-
- public getManagerTimeNanos_result setSuccess(long success) {
- this.success = success;
- setSuccessIsSet(true);
- return this;
- }
-
- public void unsetSuccess() {
- __isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- public void setSuccessIsSet(boolean value) {
- __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
- }
-
@org.apache.thrift.annotation.Nullable
public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() {
return this.sec;
}
- public getManagerTimeNanos_result setSec(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ public processEvents_result setSec(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
this.sec = sec;
return this;
}
@@ -40564,7 +41953,7 @@ public class ManagerClientService {
return this.tnase;
}
- public getManagerTimeNanos_result setTnase(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase) {
+ public processEvents_result setTnase(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException tnase) {
this.tnase = tnase;
return this;
}
@@ -40587,14 +41976,6 @@ public class ManagerClientService {
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((java.lang.Long)value);
- }
- break;
-
case SEC:
if (value == null) {
unsetSec();
@@ -40618,9 +41999,6 @@ public class ManagerClientService {
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case SUCCESS:
- return getSuccess();
-
case SEC:
return getSec();
@@ -40639,8 +42017,6 @@ public class ManagerClientService {
}
switch (field) {
- case SUCCESS:
- return isSetSuccess();
case SEC:
return isSetSec();
case TNASE:
@@ -40651,26 +42027,17 @@ public class ManagerClientService {
@Override
public boolean equals(java.lang.Object that) {
- if (that instanceof getManagerTimeNanos_result)
- return this.equals((getManagerTimeNanos_result)that);
+ if (that instanceof processEvents_result)
+ return this.equals((processEvents_result)that);
return false;
}
- public boolean equals(getManagerTimeNanos_result that) {
+ public boolean equals(processEvents_result that) {
if (that == null)
return false;
if (this == that)
return true;
- 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) {
@@ -40696,8 +42063,6 @@ public class ManagerClientService {
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
-
hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
if (isSetSec())
hashCode = hashCode * 8191 + sec.hashCode();
@@ -40710,23 +42075,13 @@ public class ManagerClientService {
}
@Override
- public int compareTo(getManagerTimeNanos_result other) {
+ public int compareTo(processEvents_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());
if (lastComparison != 0) {
return lastComparison;
@@ -40767,13 +42122,9 @@ public class ManagerClientService {
@Override
public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("getManagerTimeNanos_result(");
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("processEvents_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");
@@ -40808,25 +42159,23 @@ public class ManagerClientService {
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 getManagerTimeNanos_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ private static class processEvents_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
- public getManagerTimeNanos_resultStandardScheme getScheme() {
- return new getManagerTimeNanos_resultStandardScheme();
+ public processEvents_resultStandardScheme getScheme() {
+ return new processEvents_resultStandardScheme();
}
}
- private static class getManagerTimeNanos_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getManagerTimeNanos_result> {
+ private static class processEvents_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<processEvents_result> {
@Override
- public void read(org.apache.thrift.protocol.TProtocol iprot, getManagerTimeNanos_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, processEvents_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -40836,14 +42185,6 @@ public class ManagerClientService {
break;
}
switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.success = iprot.readI64();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
case 1: // SEC
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
@@ -40874,15 +42215,10 @@ public class ManagerClientService {
}
@Override
- public void write(org.apache.thrift.protocol.TProtocol oprot, getManagerTimeNanos_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, processEvents_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeI64(struct.success);
- oprot.writeFieldEnd();
- }
if (struct.sec != null) {
oprot.writeFieldBegin(SEC_FIELD_DESC);
struct.sec.write(oprot);
@@ -40899,32 +42235,26 @@ public class ManagerClientService {
}
- private static class getManagerTimeNanos_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ private static class processEvents_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
- public getManagerTimeNanos_resultTupleScheme getScheme() {
- return new getManagerTimeNanos_resultTupleScheme();
+ public processEvents_resultTupleScheme getScheme() {
+ return new processEvents_resultTupleScheme();
}
}
- private static class getManagerTimeNanos_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getManagerTimeNanos_result> {
+ private static class processEvents_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<processEvents_result> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getManagerTimeNanos_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, processEvents_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
if (struct.isSetSec()) {
- optionals.set(1);
+ optionals.set(0);
}
if (struct.isSetTnase()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetSuccess()) {
- oprot.writeI64(struct.success);
+ optionals.set(1);
}
+ oprot.writeBitSet(optionals, 2);
if (struct.isSetSec()) {
struct.sec.write(oprot);
}
@@ -40934,19 +42264,15 @@ public class ManagerClientService {
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getManagerTimeNanos_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, processEvents_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(3);
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
- struct.success = iprot.readI64();
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
struct.sec.read(iprot);
struct.setSecIsSet(true);
}
- if (incoming.get(2)) {
+ if (incoming.get(1)) {
struct.tnase = new org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException();
struct.tnase.read(iprot);
struct.setTnaseIsSet(true);
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/TEvent.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/TEvent.java
new file mode 100644
index 0000000000..a4ff9d6281
--- /dev/null
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/TEvent.java
@@ -0,0 +1,516 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Autogenerated by Thrift Compiler (0.17.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.accumulo.core.manager.thrift;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+public class TEvent implements org.apache.thrift.TBase<TEvent, TEvent._Fields>, java.io.Serializable, Cloneable, Comparable<TEvent> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TEvent");
+
+ private static final org.apache.thrift.protocol.TField LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("level", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TEventStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TEventTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable java.lang.String level; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ LEVEL((short)1, "level"),
+ EXTENT((short)2, "extent");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // LEVEL
+ return LEVEL;
+ case 2: // EXTENT
+ return EXTENT;
+ 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.LEVEL, new org.apache.thrift.meta_data.FieldMetaData("level", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.dataImpl.thrift.TKeyExtent.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TEvent.class, metaDataMap);
+ }
+
+ public TEvent() {
+ }
+
+ public TEvent(
+ java.lang.String level,
+ org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent)
+ {
+ this();
+ this.level = level;
+ this.extent = extent;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TEvent(TEvent other) {
+ if (other.isSetLevel()) {
+ this.level = other.level;
+ }
+ if (other.isSetExtent()) {
+ this.extent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent(other.extent);
+ }
+ }
+
+ @Override
+ public TEvent deepCopy() {
+ return new TEvent(this);
+ }
+
+ @Override
+ public void clear() {
+ this.level = null;
+ this.extent = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLevel() {
+ return this.level;
+ }
+
+ public TEvent setLevel(@org.apache.thrift.annotation.Nullable java.lang.String level) {
+ this.level = level;
+ return this;
+ }
+
+ public void unsetLevel() {
+ this.level = null;
+ }
+
+ /** Returns true if field level is set (has been assigned a value) and false otherwise */
+ public boolean isSetLevel() {
+ return this.level != null;
+ }
+
+ public void setLevelIsSet(boolean value) {
+ if (!value) {
+ this.level = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.dataImpl.thrift.TKeyExtent getExtent() {
+ return this.extent;
+ }
+
+ public TEvent setExtent(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent) {
+ this.extent = extent;
+ return this;
+ }
+
+ public void unsetExtent() {
+ this.extent = null;
+ }
+
+ /** Returns true if field extent is set (has been assigned a value) and false otherwise */
+ public boolean isSetExtent() {
+ return this.extent != null;
+ }
+
+ public void setExtentIsSet(boolean value) {
+ if (!value) {
+ this.extent = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case LEVEL:
+ if (value == null) {
+ unsetLevel();
+ } else {
+ setLevel((java.lang.String)value);
+ }
+ break;
+
+ case EXTENT:
+ if (value == null) {
+ unsetExtent();
+ } else {
+ setExtent((org.apache.accumulo.core.dataImpl.thrift.TKeyExtent)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LEVEL:
+ return getLevel();
+
+ case EXTENT:
+ return getExtent();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case LEVEL:
+ return isSetLevel();
+ case EXTENT:
+ return isSetExtent();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof TEvent)
+ return this.equals((TEvent)that);
+ return false;
+ }
+
+ public boolean equals(TEvent that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_level = true && this.isSetLevel();
+ boolean that_present_level = true && that.isSetLevel();
+ if (this_present_level || that_present_level) {
+ if (!(this_present_level && that_present_level))
+ return false;
+ if (!this.level.equals(that.level))
+ return false;
+ }
+
+ boolean this_present_extent = true && this.isSetExtent();
+ boolean that_present_extent = true && that.isSetExtent();
+ if (this_present_extent || that_present_extent) {
+ if (!(this_present_extent && that_present_extent))
+ return false;
+ if (!this.extent.equals(that.extent))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetLevel()) ? 131071 : 524287);
+ if (isSetLevel())
+ hashCode = hashCode * 8191 + level.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(TEvent other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetLevel(), other.isSetLevel());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLevel()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.level, other.level);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetExtent(), other.isSetExtent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExtent()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extent, other.extent);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TEvent(");
+ boolean first = true;
+
+ sb.append("level:");
+ if (this.level == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.level);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("extent:");
+ if (this.extent == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.extent);
+ }
+ 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 (extent != null) {
+ extent.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, java.lang.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 TEventStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public TEventStandardScheme getScheme() {
+ return new TEventStandardScheme();
+ }
+ }
+
+ private static class TEventStandardScheme extends org.apache.thrift.scheme.StandardScheme<TEvent> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TEvent struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // LEVEL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.level = iprot.readString();
+ struct.setLevelIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // EXTENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.extent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ struct.extent.read(iprot);
+ struct.setExtentIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TEvent struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.level != null) {
+ oprot.writeFieldBegin(LEVEL_FIELD_DESC);
+ oprot.writeString(struct.level);
+ oprot.writeFieldEnd();
+ }
+ if (struct.extent != null) {
+ oprot.writeFieldBegin(EXTENT_FIELD_DESC);
+ struct.extent.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TEventTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public TEventTupleScheme getScheme() {
+ return new TEventTupleScheme();
+ }
+ }
+
+ private static class TEventTupleScheme extends org.apache.thrift.scheme.TupleScheme<TEvent> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TEvent struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetLevel()) {
+ optionals.set(0);
+ }
+ if (struct.isSetExtent()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetLevel()) {
+ oprot.writeString(struct.level);
+ }
+ if (struct.isSetExtent()) {
+ struct.extent.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TEvent struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.level = iprot.readString();
+ struct.setLevelIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.extent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ struct.extent.read(iprot);
+ struct.setExtentIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
+}
+
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/TFatePartition.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/TFatePartition.java
new file mode 100644
index 0000000000..349d67a198
--- /dev/null
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/TFatePartition.java
@@ -0,0 +1,511 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Autogenerated by Thrift Compiler (0.17.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.accumulo.core.manager.thrift;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+public class TFatePartition implements org.apache.thrift.TBase<TFatePartition, TFatePartition._Fields>, java.io.Serializable, Cloneable, Comparable<TFatePartition> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFatePartition");
+
+ private static final org.apache.thrift.protocol.TField START_FIELD_DESC = new org.apache.thrift.protocol.TField("start", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField STOP_FIELD_DESC = new org.apache.thrift.protocol.TField("stop", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TFatePartitionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TFatePartitionTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable java.lang.String start; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String stop; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ START((short)1, "start"),
+ STOP((short)2, "stop");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // START
+ return START;
+ case 2: // STOP
+ return STOP;
+ 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.STOP, new org.apache.thrift.meta_data.FieldMetaData("stop", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFatePartition.class, metaDataMap);
+ }
+
+ public TFatePartition() {
+ }
+
+ public TFatePartition(
+ java.lang.String start,
+ java.lang.String stop)
+ {
+ this();
+ this.start = start;
+ this.stop = stop;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TFatePartition(TFatePartition other) {
+ if (other.isSetStart()) {
+ this.start = other.start;
+ }
+ if (other.isSetStop()) {
+ this.stop = other.stop;
+ }
+ }
+
+ @Override
+ public TFatePartition deepCopy() {
+ return new TFatePartition(this);
+ }
+
+ @Override
+ public void clear() {
+ this.start = null;
+ this.stop = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getStart() {
+ return this.start;
+ }
+
+ public TFatePartition setStart(@org.apache.thrift.annotation.Nullable java.lang.String start) {
+ this.start = start;
+ return this;
+ }
+
+ public void unsetStart() {
+ this.start = null;
+ }
+
+ /** Returns true if field start is set (has been assigned a value) and false otherwise */
+ public boolean isSetStart() {
+ return this.start != null;
+ }
+
+ public void setStartIsSet(boolean value) {
+ if (!value) {
+ this.start = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getStop() {
+ return this.stop;
+ }
+
+ public TFatePartition setStop(@org.apache.thrift.annotation.Nullable java.lang.String stop) {
+ this.stop = stop;
+ return this;
+ }
+
+ public void unsetStop() {
+ this.stop = null;
+ }
+
+ /** Returns true if field stop is set (has been assigned a value) and false otherwise */
+ public boolean isSetStop() {
+ return this.stop != null;
+ }
+
+ public void setStopIsSet(boolean value) {
+ if (!value) {
+ this.stop = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case START:
+ if (value == null) {
+ unsetStart();
+ } else {
+ setStart((java.lang.String)value);
+ }
+ break;
+
+ case STOP:
+ if (value == null) {
+ unsetStop();
+ } else {
+ setStop((java.lang.String)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case START:
+ return getStart();
+
+ case STOP:
+ return getStop();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case START:
+ return isSetStart();
+ case STOP:
+ return isSetStop();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof TFatePartition)
+ return this.equals((TFatePartition)that);
+ return false;
+ }
+
+ public boolean equals(TFatePartition that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_start = true && this.isSetStart();
+ boolean that_present_start = true && that.isSetStart();
+ if (this_present_start || that_present_start) {
+ if (!(this_present_start && that_present_start))
+ return false;
+ if (!this.start.equals(that.start))
+ return false;
+ }
+
+ boolean this_present_stop = true && this.isSetStop();
+ boolean that_present_stop = true && that.isSetStop();
+ if (this_present_stop || that_present_stop) {
+ if (!(this_present_stop && that_present_stop))
+ return false;
+ if (!this.stop.equals(that.stop))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetStart()) ? 131071 : 524287);
+ if (isSetStart())
+ hashCode = hashCode * 8191 + start.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetStop()) ? 131071 : 524287);
+ if (isSetStop())
+ hashCode = hashCode * 8191 + stop.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(TFatePartition other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetStart(), other.isSetStart());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStart()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.start, other.start);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetStop(), other.isSetStop());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStop()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stop, other.stop);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TFatePartition(");
+ boolean first = true;
+
+ sb.append("start:");
+ if (this.start == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.start);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("stop:");
+ if (this.stop == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.stop);
+ }
+ 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, java.lang.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 TFatePartitionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public TFatePartitionStandardScheme getScheme() {
+ return new TFatePartitionStandardScheme();
+ }
+ }
+
+ private static class TFatePartitionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TFatePartition> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TFatePartition struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // START
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.start = iprot.readString();
+ struct.setStartIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // STOP
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.stop = iprot.readString();
+ struct.setStopIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TFatePartition struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.start != null) {
+ oprot.writeFieldBegin(START_FIELD_DESC);
+ oprot.writeString(struct.start);
+ oprot.writeFieldEnd();
+ }
+ if (struct.stop != null) {
+ oprot.writeFieldBegin(STOP_FIELD_DESC);
+ oprot.writeString(struct.stop);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TFatePartitionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public TFatePartitionTupleScheme getScheme() {
+ return new TFatePartitionTupleScheme();
+ }
+ }
+
+ private static class TFatePartitionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TFatePartition> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TFatePartition struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetStart()) {
+ optionals.set(0);
+ }
+ if (struct.isSetStop()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetStart()) {
+ oprot.writeString(struct.start);
+ }
+ if (struct.isSetStop()) {
+ oprot.writeString(struct.stop);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TFatePartition struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.start = iprot.readString();
+ struct.setStartIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.stop = iprot.readString();
+ struct.setStopIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
+}
+
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/TFatePartitions.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/TFatePartitions.java
new file mode 100644
index 0000000000..477b52ad85
--- /dev/null
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/manager/thrift/TFatePartitions.java
@@ -0,0 +1,561 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Autogenerated by Thrift Compiler (0.17.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.accumulo.core.manager.thrift;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+public class TFatePartitions implements org.apache.thrift.TBase<TFatePartitions, TFatePartitions._Fields>, java.io.Serializable, Cloneable, Comparable<TFatePartitions> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFatePartitions");
+
+ private static final org.apache.thrift.protocol.TField UPDATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updateId", org.apache.thrift.protocol.TType.I64, (short)1);
+ private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)2);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TFatePartitionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TFatePartitionsTupleSchemeFactory();
+
+ public long updateId; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<TFatePartition> partitions; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ UPDATE_ID((short)1, "updateId"),
+ PARTITIONS((short)2, "partitions");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // UPDATE_ID
+ return UPDATE_ID;
+ case 2: // PARTITIONS
+ return PARTITIONS;
+ 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __UPDATEID_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.UPDATE_ID, new org.apache.thrift.meta_data.FieldMetaData("updateId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFatePartition.class))));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFatePartitions.class, metaDataMap);
+ }
+
+ public TFatePartitions() {
+ }
+
+ public TFatePartitions(
+ long updateId,
+ java.util.List<TFatePartition> partitions)
+ {
+ this();
+ this.updateId = updateId;
+ setUpdateIdIsSet(true);
+ this.partitions = partitions;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TFatePartitions(TFatePartitions other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.updateId = other.updateId;
+ if (other.isSetPartitions()) {
+ java.util.List<TFatePartition> __this__partitions = new java.util.ArrayList<TFatePartition>(other.partitions.size());
+ for (TFatePartition other_element : other.partitions) {
+ __this__partitions.add(new TFatePartition(other_element));
+ }
+ this.partitions = __this__partitions;
+ }
+ }
+
+ @Override
+ public TFatePartitions deepCopy() {
+ return new TFatePartitions(this);
+ }
+
+ @Override
+ public void clear() {
+ setUpdateIdIsSet(false);
+ this.updateId = 0;
+ this.partitions = null;
+ }
+
+ public long getUpdateId() {
+ return this.updateId;
+ }
+
+ public TFatePartitions setUpdateId(long updateId) {
+ this.updateId = updateId;
+ setUpdateIdIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdateId() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPDATEID_ISSET_ID);
+ }
+
+ /** Returns true if field updateId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdateId() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATEID_ISSET_ID);
+ }
+
+ public void setUpdateIdIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATEID_ISSET_ID, value);
+ }
+
+ public int getPartitionsSize() {
+ return (this.partitions == null) ? 0 : this.partitions.size();
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<TFatePartition> getPartitionsIterator() {
+ return (this.partitions == null) ? null : this.partitions.iterator();
+ }
+
+ public void addToPartitions(TFatePartition elem) {
+ if (this.partitions == null) {
+ this.partitions = new java.util.ArrayList<TFatePartition>();
+ }
+ this.partitions.add(elem);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<TFatePartition> getPartitions() {
+ return this.partitions;
+ }
+
+ public TFatePartitions setPartitions(@org.apache.thrift.annotation.Nullable java.util.List<TFatePartition> partitions) {
+ this.partitions = partitions;
+ return this;
+ }
+
+ public void unsetPartitions() {
+ this.partitions = null;
+ }
+
+ /** Returns true if field partitions is set (has been assigned a value) and false otherwise */
+ public boolean isSetPartitions() {
+ return this.partitions != null;
+ }
+
+ public void setPartitionsIsSet(boolean value) {
+ if (!value) {
+ this.partitions = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case UPDATE_ID:
+ if (value == null) {
+ unsetUpdateId();
+ } else {
+ setUpdateId((java.lang.Long)value);
+ }
+ break;
+
+ case PARTITIONS:
+ if (value == null) {
+ unsetPartitions();
+ } else {
+ setPartitions((java.util.List<TFatePartition>)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case UPDATE_ID:
+ return getUpdateId();
+
+ case PARTITIONS:
+ return getPartitions();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case UPDATE_ID:
+ return isSetUpdateId();
+ case PARTITIONS:
+ return isSetPartitions();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof TFatePartitions)
+ return this.equals((TFatePartitions)that);
+ return false;
+ }
+
+ public boolean equals(TFatePartitions that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_updateId = true;
+ boolean that_present_updateId = true;
+ if (this_present_updateId || that_present_updateId) {
+ if (!(this_present_updateId && that_present_updateId))
+ return false;
+ if (this.updateId != that.updateId)
+ return false;
+ }
+
+ boolean this_present_partitions = true && this.isSetPartitions();
+ boolean that_present_partitions = true && that.isSetPartitions();
+ if (this_present_partitions || that_present_partitions) {
+ if (!(this_present_partitions && that_present_partitions))
+ return false;
+ if (!this.partitions.equals(that.partitions))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updateId);
+
+ hashCode = hashCode * 8191 + ((isSetPartitions()) ? 131071 : 524287);
+ if (isSetPartitions())
+ hashCode = hashCode * 8191 + partitions.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(TFatePartitions other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetUpdateId(), other.isSetUpdateId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdateId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateId, other.updateId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetPartitions(), other.isSetPartitions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPartitions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TFatePartitions(");
+ boolean first = true;
+
+ sb.append("updateId:");
+ sb.append(this.updateId);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("partitions:");
+ if (this.partitions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.partitions);
+ }
+ 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, java.lang.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 TFatePartitionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public TFatePartitionsStandardScheme getScheme() {
+ return new TFatePartitionsStandardScheme();
+ }
+ }
+
+ private static class TFatePartitionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TFatePartitions> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TFatePartitions struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // UPDATE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updateId = iprot.readI64();
+ struct.setUpdateIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PARTITIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
+ struct.partitions = new java.util.ArrayList<TFatePartition>(_list70.size);
+ @org.apache.thrift.annotation.Nullable TFatePartition _elem71;
+ for (int _i72 = 0; _i72 < _list70.size; ++_i72)
+ {
+ _elem71 = new TFatePartition();
+ _elem71.read(iprot);
+ struct.partitions.add(_elem71);
+ }
+ iprot.readListEnd();
+ }
+ struct.setPartitionsIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TFatePartitions struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(UPDATE_ID_FIELD_DESC);
+ oprot.writeI64(struct.updateId);
+ oprot.writeFieldEnd();
+ if (struct.partitions != null) {
+ oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
+ for (TFatePartition _iter73 : struct.partitions)
+ {
+ _iter73.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TFatePartitionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public TFatePartitionsTupleScheme getScheme() {
+ return new TFatePartitionsTupleScheme();
+ }
+ }
+
+ private static class TFatePartitionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TFatePartitions> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TFatePartitions struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetUpdateId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPartitions()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUpdateId()) {
+ oprot.writeI64(struct.updateId);
+ }
+ if (struct.isSetPartitions()) {
+ {
+ oprot.writeI32(struct.partitions.size());
+ for (TFatePartition _iter74 : struct.partitions)
+ {
+ _iter74.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TFatePartitions struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.updateId = iprot.readI64();
+ struct.setUpdateIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TList _list75 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.partitions = new java.util.ArrayList<TFatePartition>(_list75.size);
+ @org.apache.thrift.annotation.Nullable TFatePartition _elem76;
+ for (int _i77 = 0; _i77 < _list75.size; ++_i77)
+ {
+ _elem76 = new TFatePartition();
+ _elem76.read(iprot);
+ struct.partitions.add(_elem76);
+ }
+ }
+ struct.setPartitionsIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
+}
+
diff --git a/core/src/main/thrift/compaction-coordinator.thrift b/core/src/main/thrift/compaction-coordinator.thrift
index d5b0d3c4ac..99d5df10ee 100644
--- a/core/src/main/thrift/compaction-coordinator.thrift
+++ b/core/src/main/thrift/compaction-coordinator.thrift
@@ -173,6 +173,12 @@ service CompactionCoordinatorService {
1:client.ThriftSecurityException sec
2:client.ThriftNotActiveServiceException tnase
)
+
+ oneway void recordCompletion(
+ 1:client.TInfo tinfo
+ 2:security.TCredentials credentials
+ 3:string externalCompactionId
+ )
}
service CompactorService {
diff --git a/core/src/main/thrift/manager.thrift b/core/src/main/thrift/manager.thrift
index b20b7debf3..7b9cbfd87a 100644
--- a/core/src/main/thrift/manager.thrift
+++ b/core/src/main/thrift/manager.thrift
@@ -159,6 +159,11 @@ struct TTabletMergeability {
2:i64 delay
}
+struct TEvent {
+ 1:string level
+ 2:data.TKeyExtent extent
+}
+
service FateService {
// register a fate operation by reserving an opid
@@ -517,4 +522,49 @@ service ManagerClientService {
1:client.ThriftSecurityException sec
2:client.ThriftNotActiveServiceException tnase
)
+
+ void processEvents(
+ 1:client.TInfo tinfo
+ 2:security.TCredentials credentials
+ 3:list<TEvent> events
+ ) throws (
+ 1:client.ThriftSecurityException sec
+ 2:client.ThriftNotActiveServiceException tnase
+ )
... 3005 lines suppressed ...