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 2021/03/05 02:15:28 UTC
[accumulo] branch 1451-external-compactions-feature updated: WIP
changes in tserver to support external compactions
This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch 1451-external-compactions-feature
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/1451-external-compactions-feature by this push:
new e177502 WIP changes in tserver to support external compactions
e177502 is described below
commit e177502d8cc2408f38cefe34c17538d0f031128e
Author: Keith Turner <kt...@apache.org>
AuthorDate: Thu Mar 4 21:13:39 2021 -0500
WIP changes in tserver to support external compactions
---
.../compaction/thrift/CompactionCoordinator.java | 334 ++--
.../core/compaction/thrift/CompactionJob.java | 1842 --------------------
.../accumulo/core/compaction/thrift/Compactor.java | 145 +-
.../accumulo/core/compaction/thrift/Status.java | 121 +-
.../spi/compaction/DefaultCompactionPlanner.java | 19 +-
.../core/spi/compaction/ExecutorManager.java | 5 +
...ueSummary.java => TCompactionQueueSummary.java} | 60 +-
...pactionJob.java => TExternalCompactionJob.java} | 547 ++----
.../tabletserver/thrift/TabletClientService.java | 1597 +++++++++++++++--
core/src/main/thrift/compaction-coordinator.thrift | 14 +-
core/src/main/thrift/tabletserver.thrift | 58 +-
.../compaction/DefaultCompactionPlannerTest.java | 5 +
.../coordinator/CompactionCoordinator.java | 231 ++-
.../org/apache/accumulo/compactor/Compactor.java | 114 +-
.../accumulo/tserver/ThriftClientHandler.java | 49 +
.../accumulo/tserver/compactions/Compactable.java | 6 +
.../tserver/compactions/CompactionExecutor.java | 209 +--
.../tserver/compactions/CompactionManager.java | 59 +-
.../tserver/compactions/CompactionService.java | 40 +-
.../compactions/ExternalCompactionExecutor.java | 132 ++
.../tserver/compactions/ExternalCompactionJob.java | 87 +
...ecutor.java => InternalCompactionExecutor.java} | 16 +-
.../accumulo/tserver/tablet/CompactableImpl.java | 170 +-
.../accumulo/test/performance/NullTserver.java | 27 +
24 files changed, 2727 insertions(+), 3160 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinator.java b/core/src/main/java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinator.java
index 9397c22..1dd04d2 100644
--- a/core/src/main/java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinator.java
+++ b/core/src/main/java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinator.java
@@ -33,11 +33,11 @@ public class CompactionCoordinator {
public java.util.List<Status> getCompactionStatus(org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent, java.lang.String queueName, long priority) throws org.apache.thrift.TException;
- public org.apache.accumulo.core.tabletserver.thrift.CompactionJob getCompactionJob(java.lang.String queueName, java.lang.String compactor) throws org.apache.thrift.TException;
+ public org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob getCompactionJob(java.lang.String queueName, java.lang.String compactor) throws org.apache.thrift.TException;
- public void compactionCompleted(org.apache.accumulo.core.tabletserver.thrift.CompactionJob job, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats) throws org.apache.thrift.TException;
+ public void compactionCompleted(java.lang.String externalCompactionId, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats) throws org.apache.thrift.TException;
- public void updateCompactionStatus(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction, CompactionState state, java.lang.String message, long timestamp) throws org.apache.thrift.TException;
+ public void updateCompactionStatus(java.lang.String externalCompactionId, CompactionState state, java.lang.String message, long timestamp) throws org.apache.thrift.TException;
}
@@ -47,11 +47,11 @@ public class CompactionCoordinator {
public void getCompactionStatus(org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent, java.lang.String queueName, long priority, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Status>> resultHandler) throws org.apache.thrift.TException;
- public void getCompactionJob(java.lang.String queueName, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.CompactionJob> resultHandler) throws org.apache.thrift.TException;
+ public void getCompactionJob(java.lang.String queueName, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob> resultHandler) throws org.apache.thrift.TException;
- public void compactionCompleted(org.apache.accumulo.core.tabletserver.thrift.CompactionJob job, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void compactionCompleted(java.lang.String externalCompactionId, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void updateCompactionStatus(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction, CompactionState state, java.lang.String message, long timestamp, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void updateCompactionStatus(java.lang.String externalCompactionId, CompactionState state, java.lang.String message, long timestamp, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
}
@@ -122,7 +122,7 @@ public class CompactionCoordinator {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCompactionStatus failed: unknown result");
}
- public org.apache.accumulo.core.tabletserver.thrift.CompactionJob getCompactionJob(java.lang.String queueName, java.lang.String compactor) throws org.apache.thrift.TException
+ public org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob getCompactionJob(java.lang.String queueName, java.lang.String compactor) throws org.apache.thrift.TException
{
send_getCompactionJob(queueName, compactor);
return recv_getCompactionJob();
@@ -136,7 +136,7 @@ public class CompactionCoordinator {
sendBase("getCompactionJob", args);
}
- public org.apache.accumulo.core.tabletserver.thrift.CompactionJob recv_getCompactionJob() throws org.apache.thrift.TException
+ public org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob recv_getCompactionJob() throws org.apache.thrift.TException
{
getCompactionJob_result result = new getCompactionJob_result();
receiveBase(result, "getCompactionJob");
@@ -146,16 +146,16 @@ public class CompactionCoordinator {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCompactionJob failed: unknown result");
}
- public void compactionCompleted(org.apache.accumulo.core.tabletserver.thrift.CompactionJob job, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats) throws org.apache.thrift.TException
+ public void compactionCompleted(java.lang.String externalCompactionId, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats) throws org.apache.thrift.TException
{
- send_compactionCompleted(job, stats);
+ send_compactionCompleted(externalCompactionId, stats);
recv_compactionCompleted();
}
- public void send_compactionCompleted(org.apache.accumulo.core.tabletserver.thrift.CompactionJob job, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats) throws org.apache.thrift.TException
+ public void send_compactionCompleted(java.lang.String externalCompactionId, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats) throws org.apache.thrift.TException
{
compactionCompleted_args args = new compactionCompleted_args();
- args.setJob(job);
+ args.setExternalCompactionId(externalCompactionId);
args.setStats(stats);
sendBase("compactionCompleted", args);
}
@@ -167,16 +167,16 @@ public class CompactionCoordinator {
return;
}
- public void updateCompactionStatus(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction, CompactionState state, java.lang.String message, long timestamp) throws org.apache.thrift.TException
+ public void updateCompactionStatus(java.lang.String externalCompactionId, CompactionState state, java.lang.String message, long timestamp) throws org.apache.thrift.TException
{
- send_updateCompactionStatus(compaction, state, message, timestamp);
+ send_updateCompactionStatus(externalCompactionId, state, message, timestamp);
recv_updateCompactionStatus();
}
- public void send_updateCompactionStatus(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction, CompactionState state, java.lang.String message, long timestamp) throws org.apache.thrift.TException
+ public void send_updateCompactionStatus(java.lang.String externalCompactionId, CompactionState state, java.lang.String message, long timestamp) throws org.apache.thrift.TException
{
updateCompactionStatus_args args = new updateCompactionStatus_args();
- args.setCompaction(compaction);
+ args.setExternalCompactionId(externalCompactionId);
args.setState(state);
args.setMessage(message);
args.setTimestamp(timestamp);
@@ -284,17 +284,17 @@ public class CompactionCoordinator {
}
}
- public void getCompactionJob(java.lang.String queueName, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.CompactionJob> resultHandler) throws org.apache.thrift.TException {
+ public void getCompactionJob(java.lang.String queueName, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob> resultHandler) throws org.apache.thrift.TException {
checkReady();
getCompactionJob_call method_call = new getCompactionJob_call(queueName, compactor, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getCompactionJob_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.accumulo.core.tabletserver.thrift.CompactionJob> {
+ public static class getCompactionJob_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob> {
private java.lang.String queueName;
private java.lang.String compactor;
- public getCompactionJob_call(java.lang.String queueName, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.CompactionJob> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getCompactionJob_call(java.lang.String queueName, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob> 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.queueName = queueName;
this.compactor = compactor;
@@ -309,7 +309,7 @@ public class CompactionCoordinator {
prot.writeMessageEnd();
}
- public org.apache.accumulo.core.tabletserver.thrift.CompactionJob getResult() throws org.apache.thrift.TException {
+ public org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob 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!");
}
@@ -319,26 +319,26 @@ public class CompactionCoordinator {
}
}
- public void compactionCompleted(org.apache.accumulo.core.tabletserver.thrift.CompactionJob job, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ public void compactionCompleted(java.lang.String externalCompactionId, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
- compactionCompleted_call method_call = new compactionCompleted_call(job, stats, resultHandler, this, ___protocolFactory, ___transport);
+ compactionCompleted_call method_call = new compactionCompleted_call(externalCompactionId, stats, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class compactionCompleted_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
- private org.apache.accumulo.core.tabletserver.thrift.CompactionJob job;
+ private java.lang.String externalCompactionId;
private org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats;
- public compactionCompleted_call(org.apache.accumulo.core.tabletserver.thrift.CompactionJob job, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats, 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 {
+ public compactionCompleted_call(java.lang.String externalCompactionId, org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats, 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.job = job;
+ this.externalCompactionId = externalCompactionId;
this.stats = stats;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compactionCompleted", org.apache.thrift.protocol.TMessageType.CALL, 0));
compactionCompleted_args args = new compactionCompleted_args();
- args.setJob(job);
+ args.setExternalCompactionId(externalCompactionId);
args.setStats(stats);
args.write(prot);
prot.writeMessageEnd();
@@ -354,21 +354,21 @@ public class CompactionCoordinator {
}
}
- public void updateCompactionStatus(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction, CompactionState state, java.lang.String message, long timestamp, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ public void updateCompactionStatus(java.lang.String externalCompactionId, CompactionState state, java.lang.String message, long timestamp, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
- updateCompactionStatus_call method_call = new updateCompactionStatus_call(compaction, state, message, timestamp, resultHandler, this, ___protocolFactory, ___transport);
+ updateCompactionStatus_call method_call = new updateCompactionStatus_call(externalCompactionId, state, message, timestamp, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class updateCompactionStatus_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
- private org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction;
+ private java.lang.String externalCompactionId;
private CompactionState state;
private java.lang.String message;
private long timestamp;
- public updateCompactionStatus_call(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction, CompactionState state, java.lang.String message, long timestamp, 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 {
+ public updateCompactionStatus_call(java.lang.String externalCompactionId, CompactionState state, java.lang.String message, long timestamp, 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.compaction = compaction;
+ this.externalCompactionId = externalCompactionId;
this.state = state;
this.message = message;
this.timestamp = timestamp;
@@ -377,7 +377,7 @@ public class CompactionCoordinator {
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateCompactionStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
updateCompactionStatus_args args = new updateCompactionStatus_args();
- args.setCompaction(compaction);
+ args.setExternalCompactionId(externalCompactionId);
args.setState(state);
args.setMessage(message);
args.setTimestamp(timestamp);
@@ -511,7 +511,7 @@ public class CompactionCoordinator {
public compactionCompleted_result getResult(I iface, compactionCompleted_args args) throws org.apache.thrift.TException {
compactionCompleted_result result = new compactionCompleted_result();
- iface.compactionCompleted(args.job, args.stats);
+ iface.compactionCompleted(args.externalCompactionId, args.stats);
return result;
}
}
@@ -536,7 +536,7 @@ public class CompactionCoordinator {
public updateCompactionStatus_result getResult(I iface, updateCompactionStatus_args args) throws org.apache.thrift.TException {
updateCompactionStatus_result result = new updateCompactionStatus_result();
- iface.updateCompactionStatus(args.compaction, args.state, args.message, args.timestamp);
+ iface.updateCompactionStatus(args.externalCompactionId, args.state, args.message, args.timestamp);
return result;
}
}
@@ -683,7 +683,7 @@ public class CompactionCoordinator {
}
}
- public static class getCompactionJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCompactionJob_args, org.apache.accumulo.core.tabletserver.thrift.CompactionJob> {
+ public static class getCompactionJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCompactionJob_args, org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob> {
public getCompactionJob() {
super("getCompactionJob");
}
@@ -692,10 +692,10 @@ public class CompactionCoordinator {
return new getCompactionJob_args();
}
- public org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.CompactionJob> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob> 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<org.apache.accumulo.core.tabletserver.thrift.CompactionJob>() {
- public void onComplete(org.apache.accumulo.core.tabletserver.thrift.CompactionJob o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob>() {
+ public void onComplete(org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob o) {
getCompactionJob_result result = new getCompactionJob_result();
result.success = o;
try {
@@ -739,7 +739,7 @@ public class CompactionCoordinator {
return false;
}
- public void start(I iface, getCompactionJob_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.CompactionJob> resultHandler) throws org.apache.thrift.TException {
+ public void start(I iface, getCompactionJob_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob> resultHandler) throws org.apache.thrift.TException {
iface.getCompactionJob(args.queueName, args.compactor,resultHandler);
}
}
@@ -800,7 +800,7 @@ public class CompactionCoordinator {
}
public void start(I iface, compactionCompleted_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
- iface.compactionCompleted(args.job, args.stats,resultHandler);
+ iface.compactionCompleted(args.externalCompactionId, args.stats,resultHandler);
}
}
@@ -860,7 +860,7 @@ public class CompactionCoordinator {
}
public void start(I iface, updateCompactionStatus_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
- iface.updateCompactionStatus(args.compaction, args.state, args.message, args.timestamp,resultHandler);
+ iface.updateCompactionStatus(args.externalCompactionId, args.state, args.message, args.timestamp,resultHandler);
}
}
@@ -3176,7 +3176,7 @@ public class CompactionCoordinator {
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getCompactionJob_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getCompactionJob_resultTupleSchemeFactory();
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionJob success; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob success; // 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 {
@@ -3243,7 +3243,7 @@ public class CompactionCoordinator {
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, org.apache.accumulo.core.tabletserver.thrift.CompactionJob.class)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCompactionJob_result.class, metaDataMap);
}
@@ -3252,7 +3252,7 @@ public class CompactionCoordinator {
}
public getCompactionJob_result(
- org.apache.accumulo.core.tabletserver.thrift.CompactionJob success)
+ org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob success)
{
this();
this.success = success;
@@ -3263,7 +3263,7 @@ public class CompactionCoordinator {
*/
public getCompactionJob_result(getCompactionJob_result other) {
if (other.isSetSuccess()) {
- this.success = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob(other.success);
+ this.success = new org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob(other.success);
}
}
@@ -3277,11 +3277,11 @@ public class CompactionCoordinator {
}
@org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.tabletserver.thrift.CompactionJob getSuccess() {
+ public org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob getSuccess() {
return this.success;
}
- public getCompactionJob_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionJob success) {
+ public getCompactionJob_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob success) {
this.success = success;
return this;
}
@@ -3307,7 +3307,7 @@ public class CompactionCoordinator {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((org.apache.accumulo.core.tabletserver.thrift.CompactionJob)value);
+ setSuccess((org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob)value);
}
break;
@@ -3469,7 +3469,7 @@ public class CompactionCoordinator {
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob();
+ struct.success = new org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
@@ -3528,7 +3528,7 @@ public class CompactionCoordinator {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
- struct.success = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob();
+ struct.success = new org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
@@ -3543,18 +3543,18 @@ public class CompactionCoordinator {
public static class compactionCompleted_args implements org.apache.thrift.TBase<compactionCompleted_args, compactionCompleted_args._Fields>, java.io.Serializable, Cloneable, Comparable<compactionCompleted_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compactionCompleted_args");
- private static final org.apache.thrift.protocol.TField JOB_FIELD_DESC = new org.apache.thrift.protocol.TField("job", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ 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)1);
private static final org.apache.thrift.protocol.TField STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stats", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new compactionCompleted_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new compactionCompleted_argsTupleSchemeFactory();
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionJob job; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId; // required
public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats; // 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 {
- JOB((short)1, "job"),
+ EXTERNAL_COMPACTION_ID((short)1, "externalCompactionId"),
STATS((short)2, "stats");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -3571,8 +3571,8 @@ public class CompactionCoordinator {
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // JOB
- return JOB;
+ case 1: // EXTERNAL_COMPACTION_ID
+ return EXTERNAL_COMPACTION_ID;
case 2: // STATS
return STATS;
default:
@@ -3619,8 +3619,8 @@ public class CompactionCoordinator {
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.JOB, new org.apache.thrift.meta_data.FieldMetaData("job", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.tabletserver.thrift.CompactionJob.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)));
tmpMap.put(_Fields.STATS, new org.apache.thrift.meta_data.FieldMetaData("stats", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.tabletserver.thrift.CompactionStats.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
@@ -3631,11 +3631,11 @@ public class CompactionCoordinator {
}
public compactionCompleted_args(
- org.apache.accumulo.core.tabletserver.thrift.CompactionJob job,
+ java.lang.String externalCompactionId,
org.apache.accumulo.core.tabletserver.thrift.CompactionStats stats)
{
this();
- this.job = job;
+ this.externalCompactionId = externalCompactionId;
this.stats = stats;
}
@@ -3643,8 +3643,8 @@ public class CompactionCoordinator {
* Performs a deep copy on <i>other</i>.
*/
public compactionCompleted_args(compactionCompleted_args other) {
- if (other.isSetJob()) {
- this.job = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob(other.job);
+ if (other.isSetExternalCompactionId()) {
+ this.externalCompactionId = other.externalCompactionId;
}
if (other.isSetStats()) {
this.stats = new org.apache.accumulo.core.tabletserver.thrift.CompactionStats(other.stats);
@@ -3657,32 +3657,32 @@ public class CompactionCoordinator {
@Override
public void clear() {
- this.job = null;
+ this.externalCompactionId = null;
this.stats = null;
}
@org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.tabletserver.thrift.CompactionJob getJob() {
- return this.job;
+ public java.lang.String getExternalCompactionId() {
+ return this.externalCompactionId;
}
- public compactionCompleted_args setJob(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionJob job) {
- this.job = job;
+ public compactionCompleted_args setExternalCompactionId(@org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId) {
+ this.externalCompactionId = externalCompactionId;
return this;
}
- public void unsetJob() {
- this.job = null;
+ public void unsetExternalCompactionId() {
+ this.externalCompactionId = null;
}
- /** Returns true if field job is set (has been assigned a value) and false otherwise */
- public boolean isSetJob() {
- return this.job != 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 setJobIsSet(boolean value) {
+ public void setExternalCompactionIdIsSet(boolean value) {
if (!value) {
- this.job = null;
+ this.externalCompactionId = null;
}
}
@@ -3713,11 +3713,11 @@ public class CompactionCoordinator {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case JOB:
+ case EXTERNAL_COMPACTION_ID:
if (value == null) {
- unsetJob();
+ unsetExternalCompactionId();
} else {
- setJob((org.apache.accumulo.core.tabletserver.thrift.CompactionJob)value);
+ setExternalCompactionId((java.lang.String)value);
}
break;
@@ -3735,8 +3735,8 @@ public class CompactionCoordinator {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case JOB:
- return getJob();
+ case EXTERNAL_COMPACTION_ID:
+ return getExternalCompactionId();
case STATS:
return getStats();
@@ -3752,8 +3752,8 @@ public class CompactionCoordinator {
}
switch (field) {
- case JOB:
- return isSetJob();
+ case EXTERNAL_COMPACTION_ID:
+ return isSetExternalCompactionId();
case STATS:
return isSetStats();
}
@@ -3775,12 +3775,12 @@ public class CompactionCoordinator {
if (this == that)
return true;
- boolean this_present_job = true && this.isSetJob();
- boolean that_present_job = true && that.isSetJob();
- if (this_present_job || that_present_job) {
- if (!(this_present_job && that_present_job))
+ 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.job.equals(that.job))
+ if (!this.externalCompactionId.equals(that.externalCompactionId))
return false;
}
@@ -3800,9 +3800,9 @@ public class CompactionCoordinator {
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + ((isSetJob()) ? 131071 : 524287);
- if (isSetJob())
- hashCode = hashCode * 8191 + job.hashCode();
+ hashCode = hashCode * 8191 + ((isSetExternalCompactionId()) ? 131071 : 524287);
+ if (isSetExternalCompactionId())
+ hashCode = hashCode * 8191 + externalCompactionId.hashCode();
hashCode = hashCode * 8191 + ((isSetStats()) ? 131071 : 524287);
if (isSetStats())
@@ -3819,12 +3819,12 @@ public class CompactionCoordinator {
int lastComparison = 0;
- lastComparison = java.lang.Boolean.valueOf(isSetJob()).compareTo(other.isSetJob());
+ lastComparison = java.lang.Boolean.valueOf(isSetExternalCompactionId()).compareTo(other.isSetExternalCompactionId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetJob()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job, other.job);
+ if (isSetExternalCompactionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalCompactionId, other.externalCompactionId);
if (lastComparison != 0) {
return lastComparison;
}
@@ -3860,11 +3860,11 @@ public class CompactionCoordinator {
java.lang.StringBuilder sb = new java.lang.StringBuilder("compactionCompleted_args(");
boolean first = true;
- sb.append("job:");
- if (this.job == null) {
+ sb.append("externalCompactionId:");
+ if (this.externalCompactionId == null) {
sb.append("null");
} else {
- sb.append(this.job);
+ sb.append(this.externalCompactionId);
}
first = false;
if (!first) sb.append(", ");
@@ -3882,9 +3882,6 @@ public class CompactionCoordinator {
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
- if (job != null) {
- job.validate();
- }
if (stats != null) {
stats.validate();
}
@@ -3924,11 +3921,10 @@ public class CompactionCoordinator {
break;
}
switch (schemeField.id) {
- case 1: // JOB
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.job = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob();
- struct.job.read(iprot);
- struct.setJobIsSet(true);
+ case 1: // 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);
}
@@ -3957,9 +3953,9 @@ public class CompactionCoordinator {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.job != null) {
- oprot.writeFieldBegin(JOB_FIELD_DESC);
- struct.job.write(oprot);
+ if (struct.externalCompactionId != null) {
+ oprot.writeFieldBegin(EXTERNAL_COMPACTION_ID_FIELD_DESC);
+ oprot.writeString(struct.externalCompactionId);
oprot.writeFieldEnd();
}
if (struct.stats != null) {
@@ -3985,15 +3981,15 @@ public class CompactionCoordinator {
public void write(org.apache.thrift.protocol.TProtocol prot, compactionCompleted_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.isSetJob()) {
+ if (struct.isSetExternalCompactionId()) {
optionals.set(0);
}
if (struct.isSetStats()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
- if (struct.isSetJob()) {
- struct.job.write(oprot);
+ if (struct.isSetExternalCompactionId()) {
+ oprot.writeString(struct.externalCompactionId);
}
if (struct.isSetStats()) {
struct.stats.write(oprot);
@@ -4005,9 +4001,8 @@ public class CompactionCoordinator {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
- struct.job = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob();
- struct.job.read(iprot);
- struct.setJobIsSet(true);
+ struct.externalCompactionId = iprot.readString();
+ struct.setExternalCompactionIdIsSet(true);
}
if (incoming.get(1)) {
struct.stats = new org.apache.accumulo.core.tabletserver.thrift.CompactionStats();
@@ -4279,7 +4274,7 @@ public class CompactionCoordinator {
public static class updateCompactionStatus_args implements org.apache.thrift.TBase<updateCompactionStatus_args, updateCompactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateCompactionStatus_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateCompactionStatus_args");
- private static final org.apache.thrift.protocol.TField COMPACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("compaction", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ 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)1);
private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4);
@@ -4287,7 +4282,7 @@ public class CompactionCoordinator {
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateCompactionStatus_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateCompactionStatus_argsTupleSchemeFactory();
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId; // required
/**
*
* @see CompactionState
@@ -4298,7 +4293,7 @@ public class CompactionCoordinator {
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- COMPACTION((short)1, "compaction"),
+ EXTERNAL_COMPACTION_ID((short)1, "externalCompactionId"),
/**
*
* @see CompactionState
@@ -4321,8 +4316,8 @@ public class CompactionCoordinator {
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // COMPACTION
- return COMPACTION;
+ case 1: // EXTERNAL_COMPACTION_ID
+ return EXTERNAL_COMPACTION_ID;
case 2: // STATE
return STATE;
case 3: // MESSAGE
@@ -4375,8 +4370,8 @@ public class CompactionCoordinator {
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.COMPACTION, new org.apache.thrift.meta_data.FieldMetaData("compaction", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.tabletserver.thrift.CompactionJob.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)));
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompactionState.class)));
tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -4391,13 +4386,13 @@ public class CompactionCoordinator {
}
public updateCompactionStatus_args(
- org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction,
+ java.lang.String externalCompactionId,
CompactionState state,
java.lang.String message,
long timestamp)
{
this();
- this.compaction = compaction;
+ this.externalCompactionId = externalCompactionId;
this.state = state;
this.message = message;
this.timestamp = timestamp;
@@ -4409,8 +4404,8 @@ public class CompactionCoordinator {
*/
public updateCompactionStatus_args(updateCompactionStatus_args other) {
__isset_bitfield = other.__isset_bitfield;
- if (other.isSetCompaction()) {
- this.compaction = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob(other.compaction);
+ if (other.isSetExternalCompactionId()) {
+ this.externalCompactionId = other.externalCompactionId;
}
if (other.isSetState()) {
this.state = other.state;
@@ -4427,7 +4422,7 @@ public class CompactionCoordinator {
@Override
public void clear() {
- this.compaction = null;
+ this.externalCompactionId = null;
this.state = null;
this.message = null;
setTimestampIsSet(false);
@@ -4435,27 +4430,27 @@ public class CompactionCoordinator {
}
@org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.tabletserver.thrift.CompactionJob getCompaction() {
- return this.compaction;
+ public java.lang.String getExternalCompactionId() {
+ return this.externalCompactionId;
}
- public updateCompactionStatus_args setCompaction(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction) {
- this.compaction = compaction;
+ public updateCompactionStatus_args setExternalCompactionId(@org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId) {
+ this.externalCompactionId = externalCompactionId;
return this;
}
- public void unsetCompaction() {
- this.compaction = null;
+ public void unsetExternalCompactionId() {
+ this.externalCompactionId = null;
}
- /** Returns true if field compaction is set (has been assigned a value) and false otherwise */
- public boolean isSetCompaction() {
- return this.compaction != 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 setCompactionIsSet(boolean value) {
+ public void setExternalCompactionIdIsSet(boolean value) {
if (!value) {
- this.compaction = null;
+ this.externalCompactionId = null;
}
}
@@ -4542,11 +4537,11 @@ public class CompactionCoordinator {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case COMPACTION:
+ case EXTERNAL_COMPACTION_ID:
if (value == null) {
- unsetCompaction();
+ unsetExternalCompactionId();
} else {
- setCompaction((org.apache.accumulo.core.tabletserver.thrift.CompactionJob)value);
+ setExternalCompactionId((java.lang.String)value);
}
break;
@@ -4580,8 +4575,8 @@ public class CompactionCoordinator {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case COMPACTION:
- return getCompaction();
+ case EXTERNAL_COMPACTION_ID:
+ return getExternalCompactionId();
case STATE:
return getState();
@@ -4603,8 +4598,8 @@ public class CompactionCoordinator {
}
switch (field) {
- case COMPACTION:
- return isSetCompaction();
+ case EXTERNAL_COMPACTION_ID:
+ return isSetExternalCompactionId();
case STATE:
return isSetState();
case MESSAGE:
@@ -4630,12 +4625,12 @@ public class CompactionCoordinator {
if (this == that)
return true;
- boolean this_present_compaction = true && this.isSetCompaction();
- boolean that_present_compaction = true && that.isSetCompaction();
- if (this_present_compaction || that_present_compaction) {
- if (!(this_present_compaction && that_present_compaction))
+ 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.compaction.equals(that.compaction))
+ if (!this.externalCompactionId.equals(that.externalCompactionId))
return false;
}
@@ -4673,9 +4668,9 @@ public class CompactionCoordinator {
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + ((isSetCompaction()) ? 131071 : 524287);
- if (isSetCompaction())
- hashCode = hashCode * 8191 + compaction.hashCode();
+ hashCode = hashCode * 8191 + ((isSetExternalCompactionId()) ? 131071 : 524287);
+ if (isSetExternalCompactionId())
+ hashCode = hashCode * 8191 + externalCompactionId.hashCode();
hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
if (isSetState())
@@ -4698,12 +4693,12 @@ public class CompactionCoordinator {
int lastComparison = 0;
- lastComparison = java.lang.Boolean.valueOf(isSetCompaction()).compareTo(other.isSetCompaction());
+ lastComparison = java.lang.Boolean.valueOf(isSetExternalCompactionId()).compareTo(other.isSetExternalCompactionId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetCompaction()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compaction, other.compaction);
+ if (isSetExternalCompactionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalCompactionId, other.externalCompactionId);
if (lastComparison != 0) {
return lastComparison;
}
@@ -4759,11 +4754,11 @@ public class CompactionCoordinator {
java.lang.StringBuilder sb = new java.lang.StringBuilder("updateCompactionStatus_args(");
boolean first = true;
- sb.append("compaction:");
- if (this.compaction == null) {
+ sb.append("externalCompactionId:");
+ if (this.externalCompactionId == null) {
sb.append("null");
} else {
- sb.append(this.compaction);
+ sb.append(this.externalCompactionId);
}
first = false;
if (!first) sb.append(", ");
@@ -4793,9 +4788,6 @@ public class CompactionCoordinator {
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
- if (compaction != null) {
- compaction.validate();
- }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -4834,11 +4826,10 @@ public class CompactionCoordinator {
break;
}
switch (schemeField.id) {
- case 1: // COMPACTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.compaction = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob();
- struct.compaction.read(iprot);
- struct.setCompactionIsSet(true);
+ case 1: // 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);
}
@@ -4882,9 +4873,9 @@ public class CompactionCoordinator {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.compaction != null) {
- oprot.writeFieldBegin(COMPACTION_FIELD_DESC);
- struct.compaction.write(oprot);
+ if (struct.externalCompactionId != null) {
+ oprot.writeFieldBegin(EXTERNAL_COMPACTION_ID_FIELD_DESC);
+ oprot.writeString(struct.externalCompactionId);
oprot.writeFieldEnd();
}
if (struct.state != null) {
@@ -4918,7 +4909,7 @@ public class CompactionCoordinator {
public void write(org.apache.thrift.protocol.TProtocol prot, updateCompactionStatus_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.isSetCompaction()) {
+ if (struct.isSetExternalCompactionId()) {
optionals.set(0);
}
if (struct.isSetState()) {
@@ -4931,8 +4922,8 @@ public class CompactionCoordinator {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
- if (struct.isSetCompaction()) {
- struct.compaction.write(oprot);
+ if (struct.isSetExternalCompactionId()) {
+ oprot.writeString(struct.externalCompactionId);
}
if (struct.isSetState()) {
oprot.writeI32(struct.state.getValue());
@@ -4950,9 +4941,8 @@ public class CompactionCoordinator {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
- struct.compaction = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob();
- struct.compaction.read(iprot);
- struct.setCompactionIsSet(true);
+ struct.externalCompactionId = iprot.readString();
+ struct.setExternalCompactionIdIsSet(true);
}
if (incoming.get(1)) {
struct.state = org.apache.accumulo.core.compaction.thrift.CompactionState.findByValue(iprot.readI32());
diff --git a/core/src/main/java/org/apache/accumulo/core/compaction/thrift/CompactionJob.java b/core/src/main/java/org/apache/accumulo/core/compaction/thrift/CompactionJob.java
deleted file mode 100644
index ece8893..0000000
--- a/core/src/main/java/org/apache/accumulo/core/compaction/thrift/CompactionJob.java
+++ /dev/null
@@ -1,1842 +0,0 @@
-/*
- * 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
- *
- * http://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.12.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.accumulo.core.compaction.thrift;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, CompactionJob._Fields>, java.io.Serializable, Cloneable, Comparable<CompactionJob> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CompactionJob");
-
- private static final org.apache.thrift.protocol.TField TRACE_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("traceInfo", 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 COMPACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("compactionId", org.apache.thrift.protocol.TType.I64, (short)3);
- 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)5);
- private static final org.apache.thrift.protocol.TField FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("files", org.apache.thrift.protocol.TType.LIST, (short)6);
- private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I32, (short)7);
- private static final org.apache.thrift.protocol.TField READ_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("readRate", org.apache.thrift.protocol.TType.I32, (short)8);
- private static final org.apache.thrift.protocol.TField WRITE_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("writeRate", org.apache.thrift.protocol.TType.I32, (short)9);
- private static final org.apache.thrift.protocol.TField ITERATOR_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("iteratorSettings", org.apache.thrift.protocol.TType.STRUCT, (short)10);
- private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)11);
- private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", org.apache.thrift.protocol.TType.I32, (short)12);
- private static final org.apache.thrift.protocol.TField OUTPUT_FILE_FIELD_DESC = new org.apache.thrift.protocol.TField("outputFile", org.apache.thrift.protocol.TType.STRING, (short)13);
- private static final org.apache.thrift.protocol.TField PROPAGATE_DELETES_FIELD_DESC = new org.apache.thrift.protocol.TField("propagateDeletes", org.apache.thrift.protocol.TType.BOOL, (short)14);
- private static final org.apache.thrift.protocol.TField KIND_FIELD_DESC = new org.apache.thrift.protocol.TField("kind", org.apache.thrift.protocol.TType.I32, (short)15);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new CompactionJobStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new CompactionJobTupleSchemeFactory();
-
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.thrift.TInfo traceInfo; // required
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
- public long compactionId; // required
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent; // required
- public @org.apache.thrift.annotation.Nullable java.util.List<InputFile> files; // required
- public int priority; // required
- public int readRate; // required
- public int writeRate; // required
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.IteratorConfig iteratorSettings; // required
- /**
- *
- * @see org.apache.accumulo.core.tabletserver.thrift.CompactionType
- */
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionType type; // required
- /**
- *
- * @see org.apache.accumulo.core.tabletserver.thrift.CompactionReason
- */
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionReason reason; // required
- public @org.apache.thrift.annotation.Nullable java.lang.String outputFile; // required
- public boolean propagateDeletes; // required
- /**
- *
- * @see CompactionKind
- */
- public @org.apache.thrift.annotation.Nullable CompactionKind kind; // 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 {
- TRACE_INFO((short)1, "traceInfo"),
- CREDENTIALS((short)2, "credentials"),
- COMPACTION_ID((short)3, "compactionId"),
- EXTENT((short)5, "extent"),
- FILES((short)6, "files"),
- PRIORITY((short)7, "priority"),
- READ_RATE((short)8, "readRate"),
- WRITE_RATE((short)9, "writeRate"),
- ITERATOR_SETTINGS((short)10, "iteratorSettings"),
- /**
- *
- * @see org.apache.accumulo.core.tabletserver.thrift.CompactionType
- */
- TYPE((short)11, "type"),
- /**
- *
- * @see org.apache.accumulo.core.tabletserver.thrift.CompactionReason
- */
- REASON((short)12, "reason"),
- OUTPUT_FILE((short)13, "outputFile"),
- PROPAGATE_DELETES((short)14, "propagateDeletes"),
- /**
- *
- * @see CompactionKind
- */
- KIND((short)15, "kind");
-
- 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: // TRACE_INFO
- return TRACE_INFO;
- case 2: // CREDENTIALS
- return CREDENTIALS;
- case 3: // COMPACTION_ID
- return COMPACTION_ID;
- case 5: // EXTENT
- return EXTENT;
- case 6: // FILES
- return FILES;
- case 7: // PRIORITY
- return PRIORITY;
- case 8: // READ_RATE
- return READ_RATE;
- case 9: // WRITE_RATE
- return WRITE_RATE;
- case 10: // ITERATOR_SETTINGS
- return ITERATOR_SETTINGS;
- case 11: // TYPE
- return TYPE;
- case 12: // REASON
- return REASON;
- case 13: // OUTPUT_FILE
- return OUTPUT_FILE;
- case 14: // PROPAGATE_DELETES
- return PROPAGATE_DELETES;
- case 15: // KIND
- return KIND;
- 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;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __COMPACTIONID_ISSET_ID = 0;
- private static final int __PRIORITY_ISSET_ID = 1;
- private static final int __READRATE_ISSET_ID = 2;
- private static final int __WRITERATE_ISSET_ID = 3;
- private static final int __PROPAGATEDELETES_ISSET_ID = 4;
- 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.TRACE_INFO, new org.apache.thrift.meta_data.FieldMetaData("traceInfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.trace.thrift.TInfo.class)));
- tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.securityImpl.thrift.TCredentials.class)));
- tmpMap.put(_Fields.COMPACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("compactionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- 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)));
- tmpMap.put(_Fields.FILES, new org.apache.thrift.meta_data.FieldMetaData("files", 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, InputFile.class))));
- tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.READ_RATE, new org.apache.thrift.meta_data.FieldMetaData("readRate", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.WRITE_RATE, new org.apache.thrift.meta_data.FieldMetaData("writeRate", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.ITERATOR_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("iteratorSettings", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.tabletserver.thrift.IteratorConfig.class)));
- tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.accumulo.core.tabletserver.thrift.CompactionType.class)));
- tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.accumulo.core.tabletserver.thrift.CompactionReason.class)));
- tmpMap.put(_Fields.OUTPUT_FILE, new org.apache.thrift.meta_data.FieldMetaData("outputFile", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PROPAGATE_DELETES, new org.apache.thrift.meta_data.FieldMetaData("propagateDeletes", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.KIND, new org.apache.thrift.meta_data.FieldMetaData("kind", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompactionKind.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CompactionJob.class, metaDataMap);
- }
-
- public CompactionJob() {
- }
-
- public CompactionJob(
- org.apache.accumulo.core.trace.thrift.TInfo traceInfo,
- org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
- long compactionId,
- org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent,
- java.util.List<InputFile> files,
- int priority,
- int readRate,
- int writeRate,
- org.apache.accumulo.core.tabletserver.thrift.IteratorConfig iteratorSettings,
- org.apache.accumulo.core.tabletserver.thrift.CompactionType type,
- org.apache.accumulo.core.tabletserver.thrift.CompactionReason reason,
- java.lang.String outputFile,
- boolean propagateDeletes,
- CompactionKind kind)
- {
- this();
- this.traceInfo = traceInfo;
- this.credentials = credentials;
- this.compactionId = compactionId;
- setCompactionIdIsSet(true);
- this.extent = extent;
- this.files = files;
- this.priority = priority;
- setPriorityIsSet(true);
- this.readRate = readRate;
- setReadRateIsSet(true);
- this.writeRate = writeRate;
- setWriteRateIsSet(true);
- this.iteratorSettings = iteratorSettings;
- this.type = type;
- this.reason = reason;
- this.outputFile = outputFile;
- this.propagateDeletes = propagateDeletes;
- setPropagateDeletesIsSet(true);
- this.kind = kind;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public CompactionJob(CompactionJob other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetTraceInfo()) {
- this.traceInfo = new org.apache.accumulo.core.trace.thrift.TInfo(other.traceInfo);
- }
- if (other.isSetCredentials()) {
- this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
- }
- this.compactionId = other.compactionId;
- if (other.isSetExtent()) {
- this.extent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent(other.extent);
- }
- if (other.isSetFiles()) {
- java.util.List<InputFile> __this__files = new java.util.ArrayList<InputFile>(other.files.size());
- for (InputFile other_element : other.files) {
- __this__files.add(new InputFile(other_element));
- }
- this.files = __this__files;
- }
- this.priority = other.priority;
- this.readRate = other.readRate;
- this.writeRate = other.writeRate;
- if (other.isSetIteratorSettings()) {
- this.iteratorSettings = new org.apache.accumulo.core.tabletserver.thrift.IteratorConfig(other.iteratorSettings);
- }
- if (other.isSetType()) {
- this.type = other.type;
- }
- if (other.isSetReason()) {
- this.reason = other.reason;
- }
- if (other.isSetOutputFile()) {
- this.outputFile = other.outputFile;
- }
- this.propagateDeletes = other.propagateDeletes;
- if (other.isSetKind()) {
- this.kind = other.kind;
- }
- }
-
- public CompactionJob deepCopy() {
- return new CompactionJob(this);
- }
-
- @Override
- public void clear() {
- this.traceInfo = null;
- this.credentials = null;
- setCompactionIdIsSet(false);
- this.compactionId = 0;
- this.extent = null;
- this.files = null;
- setPriorityIsSet(false);
- this.priority = 0;
- setReadRateIsSet(false);
- this.readRate = 0;
- setWriteRateIsSet(false);
- this.writeRate = 0;
- this.iteratorSettings = null;
- this.type = null;
- this.reason = null;
- this.outputFile = null;
- setPropagateDeletesIsSet(false);
- this.propagateDeletes = false;
- this.kind = null;
- }
-
- @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.trace.thrift.TInfo getTraceInfo() {
- return this.traceInfo;
- }
-
- public CompactionJob setTraceInfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.thrift.TInfo traceInfo) {
- this.traceInfo = traceInfo;
- return this;
- }
-
- public void unsetTraceInfo() {
- this.traceInfo = null;
- }
-
- /** Returns true if field traceInfo is set (has been assigned a value) and false otherwise */
- public boolean isSetTraceInfo() {
- return this.traceInfo != null;
- }
-
- public void setTraceInfoIsSet(boolean value) {
- if (!value) {
- this.traceInfo = null;
- }
- }
-
- @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
- return this.credentials;
- }
-
- public CompactionJob 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 getCompactionId() {
- return this.compactionId;
- }
-
- public CompactionJob setCompactionId(long compactionId) {
- this.compactionId = compactionId;
- setCompactionIdIsSet(true);
- return this;
- }
-
- public void unsetCompactionId() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPACTIONID_ISSET_ID);
- }
-
- /** Returns true if field compactionId is set (has been assigned a value) and false otherwise */
- public boolean isSetCompactionId() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPACTIONID_ISSET_ID);
- }
-
- public void setCompactionIdIsSet(boolean value) {
- __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPACTIONID_ISSET_ID, value);
- }
-
- @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.dataImpl.thrift.TKeyExtent getExtent() {
- return this.extent;
- }
-
- public CompactionJob 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;
- }
- }
-
- public int getFilesSize() {
- return (this.files == null) ? 0 : this.files.size();
- }
-
- @org.apache.thrift.annotation.Nullable
- public java.util.Iterator<InputFile> getFilesIterator() {
- return (this.files == null) ? null : this.files.iterator();
- }
-
- public void addToFiles(InputFile elem) {
- if (this.files == null) {
- this.files = new java.util.ArrayList<InputFile>();
- }
- this.files.add(elem);
- }
-
- @org.apache.thrift.annotation.Nullable
- public java.util.List<InputFile> getFiles() {
- return this.files;
- }
-
- public CompactionJob setFiles(@org.apache.thrift.annotation.Nullable java.util.List<InputFile> files) {
- this.files = files;
- return this;
- }
-
- public void unsetFiles() {
- this.files = null;
- }
-
- /** Returns true if field files is set (has been assigned a value) and false otherwise */
- public boolean isSetFiles() {
- return this.files != null;
- }
-
- public void setFilesIsSet(boolean value) {
- if (!value) {
- this.files = null;
- }
- }
-
- public int getPriority() {
- return this.priority;
- }
-
- public CompactionJob setPriority(int priority) {
- this.priority = priority;
- setPriorityIsSet(true);
- return this;
- }
-
- public void unsetPriority() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PRIORITY_ISSET_ID);
- }
-
- /** Returns true if field priority is set (has been assigned a value) and false otherwise */
- public boolean isSetPriority() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID);
- }
-
- public void setPriorityIsSet(boolean value) {
- __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PRIORITY_ISSET_ID, value);
- }
-
- public int getReadRate() {
- return this.readRate;
- }
-
- public CompactionJob setReadRate(int readRate) {
- this.readRate = readRate;
- setReadRateIsSet(true);
- return this;
- }
-
- public void unsetReadRate() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __READRATE_ISSET_ID);
- }
-
- /** Returns true if field readRate is set (has been assigned a value) and false otherwise */
- public boolean isSetReadRate() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __READRATE_ISSET_ID);
- }
-
- public void setReadRateIsSet(boolean value) {
- __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __READRATE_ISSET_ID, value);
- }
-
- public int getWriteRate() {
- return this.writeRate;
- }
-
- public CompactionJob setWriteRate(int writeRate) {
- this.writeRate = writeRate;
- setWriteRateIsSet(true);
- return this;
- }
-
- public void unsetWriteRate() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WRITERATE_ISSET_ID);
- }
-
- /** Returns true if field writeRate is set (has been assigned a value) and false otherwise */
- public boolean isSetWriteRate() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WRITERATE_ISSET_ID);
- }
-
- public void setWriteRateIsSet(boolean value) {
- __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WRITERATE_ISSET_ID, value);
- }
-
- @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.tabletserver.thrift.IteratorConfig getIteratorSettings() {
- return this.iteratorSettings;
- }
-
- public CompactionJob setIteratorSettings(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.IteratorConfig iteratorSettings) {
- this.iteratorSettings = iteratorSettings;
- return this;
- }
-
- public void unsetIteratorSettings() {
- this.iteratorSettings = null;
- }
-
- /** Returns true if field iteratorSettings is set (has been assigned a value) and false otherwise */
- public boolean isSetIteratorSettings() {
- return this.iteratorSettings != null;
- }
-
- public void setIteratorSettingsIsSet(boolean value) {
- if (!value) {
- this.iteratorSettings = null;
- }
- }
-
- /**
- *
- * @see org.apache.accumulo.core.tabletserver.thrift.CompactionType
- */
- @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.tabletserver.thrift.CompactionType getType() {
- return this.type;
- }
-
- /**
- *
- * @see org.apache.accumulo.core.tabletserver.thrift.CompactionType
- */
- public CompactionJob setType(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionType type) {
- this.type = type;
- return this;
- }
-
- public void unsetType() {
- this.type = null;
- }
-
- /** Returns true if field type is set (has been assigned a value) and false otherwise */
- public boolean isSetType() {
- return this.type != null;
- }
-
- public void setTypeIsSet(boolean value) {
- if (!value) {
- this.type = null;
- }
- }
-
- /**
- *
- * @see org.apache.accumulo.core.tabletserver.thrift.CompactionReason
- */
- @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.tabletserver.thrift.CompactionReason getReason() {
- return this.reason;
- }
-
- /**
- *
- * @see org.apache.accumulo.core.tabletserver.thrift.CompactionReason
- */
- public CompactionJob setReason(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionReason reason) {
- this.reason = reason;
- return this;
- }
-
- public void unsetReason() {
- this.reason = null;
- }
-
- /** Returns true if field reason is set (has been assigned a value) and false otherwise */
- public boolean isSetReason() {
- return this.reason != null;
- }
-
- public void setReasonIsSet(boolean value) {
- if (!value) {
- this.reason = null;
- }
- }
-
- @org.apache.thrift.annotation.Nullable
- public java.lang.String getOutputFile() {
- return this.outputFile;
- }
-
- public CompactionJob setOutputFile(@org.apache.thrift.annotation.Nullable java.lang.String outputFile) {
- this.outputFile = outputFile;
- return this;
- }
-
- public void unsetOutputFile() {
- this.outputFile = null;
- }
-
- /** Returns true if field outputFile is set (has been assigned a value) and false otherwise */
- public boolean isSetOutputFile() {
- return this.outputFile != null;
- }
-
- public void setOutputFileIsSet(boolean value) {
- if (!value) {
- this.outputFile = null;
- }
- }
-
- public boolean isPropagateDeletes() {
- return this.propagateDeletes;
- }
-
- public CompactionJob setPropagateDeletes(boolean propagateDeletes) {
- this.propagateDeletes = propagateDeletes;
- setPropagateDeletesIsSet(true);
- return this;
- }
-
- public void unsetPropagateDeletes() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PROPAGATEDELETES_ISSET_ID);
- }
-
- /** Returns true if field propagateDeletes is set (has been assigned a value) and false otherwise */
- public boolean isSetPropagateDeletes() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PROPAGATEDELETES_ISSET_ID);
- }
-
- public void setPropagateDeletesIsSet(boolean value) {
- __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PROPAGATEDELETES_ISSET_ID, value);
- }
-
- /**
- *
- * @see CompactionKind
- */
- @org.apache.thrift.annotation.Nullable
- public CompactionKind getKind() {
- return this.kind;
- }
-
- /**
- *
- * @see CompactionKind
- */
- public CompactionJob setKind(@org.apache.thrift.annotation.Nullable CompactionKind kind) {
- this.kind = kind;
- return this;
- }
-
- public void unsetKind() {
- this.kind = null;
- }
-
- /** Returns true if field kind is set (has been assigned a value) and false otherwise */
- public boolean isSetKind() {
- return this.kind != null;
- }
-
- public void setKindIsSet(boolean value) {
- if (!value) {
- this.kind = null;
- }
- }
-
- public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
- switch (field) {
- case TRACE_INFO:
- if (value == null) {
- unsetTraceInfo();
- } else {
- setTraceInfo((org.apache.accumulo.core.trace.thrift.TInfo)value);
- }
- break;
-
- case CREDENTIALS:
- if (value == null) {
- unsetCredentials();
- } else {
- setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
- }
- break;
-
- case COMPACTION_ID:
- if (value == null) {
- unsetCompactionId();
- } else {
- setCompactionId((java.lang.Long)value);
- }
- break;
-
- case EXTENT:
- if (value == null) {
- unsetExtent();
- } else {
- setExtent((org.apache.accumulo.core.dataImpl.thrift.TKeyExtent)value);
- }
- break;
-
- case FILES:
- if (value == null) {
- unsetFiles();
- } else {
- setFiles((java.util.List<InputFile>)value);
- }
- break;
-
- case PRIORITY:
- if (value == null) {
- unsetPriority();
- } else {
- setPriority((java.lang.Integer)value);
- }
- break;
-
- case READ_RATE:
- if (value == null) {
- unsetReadRate();
- } else {
- setReadRate((java.lang.Integer)value);
- }
- break;
-
- case WRITE_RATE:
- if (value == null) {
- unsetWriteRate();
- } else {
- setWriteRate((java.lang.Integer)value);
- }
- break;
-
- case ITERATOR_SETTINGS:
- if (value == null) {
- unsetIteratorSettings();
- } else {
- setIteratorSettings((org.apache.accumulo.core.tabletserver.thrift.IteratorConfig)value);
- }
- break;
-
- case TYPE:
- if (value == null) {
- unsetType();
- } else {
- setType((org.apache.accumulo.core.tabletserver.thrift.CompactionType)value);
- }
- break;
-
- case REASON:
- if (value == null) {
- unsetReason();
- } else {
- setReason((org.apache.accumulo.core.tabletserver.thrift.CompactionReason)value);
- }
- break;
-
- case OUTPUT_FILE:
- if (value == null) {
- unsetOutputFile();
- } else {
- setOutputFile((java.lang.String)value);
- }
- break;
-
- case PROPAGATE_DELETES:
- if (value == null) {
- unsetPropagateDeletes();
- } else {
- setPropagateDeletes((java.lang.Boolean)value);
- }
- break;
-
- case KIND:
- if (value == null) {
- unsetKind();
- } else {
- setKind((CompactionKind)value);
- }
- break;
-
- }
- }
-
- @org.apache.thrift.annotation.Nullable
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case TRACE_INFO:
- return getTraceInfo();
-
- case CREDENTIALS:
- return getCredentials();
-
- case COMPACTION_ID:
- return getCompactionId();
-
- case EXTENT:
- return getExtent();
-
- case FILES:
- return getFiles();
-
- case PRIORITY:
- return getPriority();
-
- case READ_RATE:
- return getReadRate();
-
- case WRITE_RATE:
- return getWriteRate();
-
- case ITERATOR_SETTINGS:
- return getIteratorSettings();
-
- case TYPE:
- return getType();
-
- case REASON:
- return getReason();
-
- case OUTPUT_FILE:
- return getOutputFile();
-
- case PROPAGATE_DELETES:
- return isPropagateDeletes();
-
- case KIND:
- return getKind();
-
- }
- throw new java.lang.IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case TRACE_INFO:
- return isSetTraceInfo();
- case CREDENTIALS:
- return isSetCredentials();
- case COMPACTION_ID:
- return isSetCompactionId();
- case EXTENT:
- return isSetExtent();
- case FILES:
- return isSetFiles();
- case PRIORITY:
- return isSetPriority();
- case READ_RATE:
- return isSetReadRate();
- case WRITE_RATE:
- return isSetWriteRate();
- case ITERATOR_SETTINGS:
- return isSetIteratorSettings();
- case TYPE:
- return isSetType();
- case REASON:
- return isSetReason();
- case OUTPUT_FILE:
- return isSetOutputFile();
- case PROPAGATE_DELETES:
- return isSetPropagateDeletes();
- case KIND:
- return isSetKind();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that == null)
- return false;
- if (that instanceof CompactionJob)
- return this.equals((CompactionJob)that);
- return false;
- }
-
- public boolean equals(CompactionJob that) {
- if (that == null)
- return false;
- if (this == that)
- return true;
-
- boolean this_present_traceInfo = true && this.isSetTraceInfo();
- boolean that_present_traceInfo = true && that.isSetTraceInfo();
- if (this_present_traceInfo || that_present_traceInfo) {
- if (!(this_present_traceInfo && that_present_traceInfo))
- return false;
- if (!this.traceInfo.equals(that.traceInfo))
- 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_compactionId = true;
- boolean that_present_compactionId = true;
- if (this_present_compactionId || that_present_compactionId) {
- if (!(this_present_compactionId && that_present_compactionId))
- return false;
- if (this.compactionId != that.compactionId)
- 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;
- }
-
- boolean this_present_files = true && this.isSetFiles();
- boolean that_present_files = true && that.isSetFiles();
- if (this_present_files || that_present_files) {
- if (!(this_present_files && that_present_files))
- return false;
- if (!this.files.equals(that.files))
- return false;
- }
-
- boolean this_present_priority = true;
- boolean that_present_priority = true;
- if (this_present_priority || that_present_priority) {
- if (!(this_present_priority && that_present_priority))
- return false;
- if (this.priority != that.priority)
- return false;
- }
-
- boolean this_present_readRate = true;
- boolean that_present_readRate = true;
- if (this_present_readRate || that_present_readRate) {
- if (!(this_present_readRate && that_present_readRate))
- return false;
- if (this.readRate != that.readRate)
- return false;
- }
-
- boolean this_present_writeRate = true;
- boolean that_present_writeRate = true;
- if (this_present_writeRate || that_present_writeRate) {
- if (!(this_present_writeRate && that_present_writeRate))
- return false;
- if (this.writeRate != that.writeRate)
- return false;
- }
-
- boolean this_present_iteratorSettings = true && this.isSetIteratorSettings();
- boolean that_present_iteratorSettings = true && that.isSetIteratorSettings();
- if (this_present_iteratorSettings || that_present_iteratorSettings) {
- if (!(this_present_iteratorSettings && that_present_iteratorSettings))
- return false;
- if (!this.iteratorSettings.equals(that.iteratorSettings))
- return false;
- }
-
- boolean this_present_type = true && this.isSetType();
- boolean that_present_type = true && that.isSetType();
- if (this_present_type || that_present_type) {
- if (!(this_present_type && that_present_type))
- return false;
- if (!this.type.equals(that.type))
- return false;
- }
-
- boolean this_present_reason = true && this.isSetReason();
- boolean that_present_reason = true && that.isSetReason();
- if (this_present_reason || that_present_reason) {
- if (!(this_present_reason && that_present_reason))
- return false;
- if (!this.reason.equals(that.reason))
- return false;
- }
-
- boolean this_present_outputFile = true && this.isSetOutputFile();
- boolean that_present_outputFile = true && that.isSetOutputFile();
- if (this_present_outputFile || that_present_outputFile) {
- if (!(this_present_outputFile && that_present_outputFile))
- return false;
- if (!this.outputFile.equals(that.outputFile))
- return false;
- }
-
- boolean this_present_propagateDeletes = true;
- boolean that_present_propagateDeletes = true;
- if (this_present_propagateDeletes || that_present_propagateDeletes) {
- if (!(this_present_propagateDeletes && that_present_propagateDeletes))
- return false;
- if (this.propagateDeletes != that.propagateDeletes)
- return false;
- }
-
- boolean this_present_kind = true && this.isSetKind();
- boolean that_present_kind = true && that.isSetKind();
- if (this_present_kind || that_present_kind) {
- if (!(this_present_kind && that_present_kind))
- return false;
- if (!this.kind.equals(that.kind))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetTraceInfo()) ? 131071 : 524287);
- if (isSetTraceInfo())
- hashCode = hashCode * 8191 + traceInfo.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
- if (isSetCredentials())
- hashCode = hashCode * 8191 + credentials.hashCode();
-
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(compactionId);
-
- hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
- if (isSetExtent())
- hashCode = hashCode * 8191 + extent.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetFiles()) ? 131071 : 524287);
- if (isSetFiles())
- hashCode = hashCode * 8191 + files.hashCode();
-
- hashCode = hashCode * 8191 + priority;
-
- hashCode = hashCode * 8191 + readRate;
-
- hashCode = hashCode * 8191 + writeRate;
-
- hashCode = hashCode * 8191 + ((isSetIteratorSettings()) ? 131071 : 524287);
- if (isSetIteratorSettings())
- hashCode = hashCode * 8191 + iteratorSettings.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
- if (isSetType())
- hashCode = hashCode * 8191 + type.getValue();
-
- hashCode = hashCode * 8191 + ((isSetReason()) ? 131071 : 524287);
- if (isSetReason())
- hashCode = hashCode * 8191 + reason.getValue();
-
- hashCode = hashCode * 8191 + ((isSetOutputFile()) ? 131071 : 524287);
- if (isSetOutputFile())
- hashCode = hashCode * 8191 + outputFile.hashCode();
-
- hashCode = hashCode * 8191 + ((propagateDeletes) ? 131071 : 524287);
-
- hashCode = hashCode * 8191 + ((isSetKind()) ? 131071 : 524287);
- if (isSetKind())
- hashCode = hashCode * 8191 + kind.getValue();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(CompactionJob other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.valueOf(isSetTraceInfo()).compareTo(other.isSetTraceInfo());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTraceInfo()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.traceInfo, other.traceInfo);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetCredentials()).compareTo(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.valueOf(isSetCompactionId()).compareTo(other.isSetCompactionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCompactionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compactionId, other.compactionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExtent()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extent, other.extent);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetFiles()).compareTo(other.isSetFiles());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFiles()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.files, other.files);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPriority()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, other.priority);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetReadRate()).compareTo(other.isSetReadRate());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReadRate()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.readRate, other.readRate);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetWriteRate()).compareTo(other.isSetWriteRate());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetWriteRate()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeRate, other.writeRate);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetIteratorSettings()).compareTo(other.isSetIteratorSettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIteratorSettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iteratorSettings, other.iteratorSettings);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetType()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetReason()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reason, other.reason);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetOutputFile()).compareTo(other.isSetOutputFile());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOutputFile()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputFile, other.outputFile);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetPropagateDeletes()).compareTo(other.isSetPropagateDeletes());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPropagateDeletes()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.propagateDeletes, other.propagateDeletes);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetKind()).compareTo(other.isSetKind());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetKind()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.kind, other.kind);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- @org.apache.thrift.annotation.Nullable
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- 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("CompactionJob(");
- boolean first = true;
-
- sb.append("traceInfo:");
- if (this.traceInfo == null) {
- sb.append("null");
- } else {
- sb.append(this.traceInfo);
- }
- 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("compactionId:");
- sb.append(this.compactionId);
- first = false;
- if (!first) sb.append(", ");
- sb.append("extent:");
- if (this.extent == null) {
- sb.append("null");
- } else {
- sb.append(this.extent);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("files:");
- if (this.files == null) {
- sb.append("null");
- } else {
- sb.append(this.files);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("priority:");
- sb.append(this.priority);
- first = false;
- if (!first) sb.append(", ");
- sb.append("readRate:");
- sb.append(this.readRate);
- first = false;
- if (!first) sb.append(", ");
- sb.append("writeRate:");
- sb.append(this.writeRate);
- first = false;
- if (!first) sb.append(", ");
- sb.append("iteratorSettings:");
- if (this.iteratorSettings == null) {
- sb.append("null");
- } else {
- sb.append(this.iteratorSettings);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("type:");
- if (this.type == null) {
- sb.append("null");
- } else {
- sb.append(this.type);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("reason:");
- if (this.reason == null) {
- sb.append("null");
- } else {
- sb.append(this.reason);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("outputFile:");
- if (this.outputFile == null) {
- sb.append("null");
- } else {
- sb.append(this.outputFile);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("propagateDeletes:");
- sb.append(this.propagateDeletes);
- first = false;
- if (!first) sb.append(", ");
- sb.append("kind:");
- if (this.kind == null) {
- sb.append("null");
- } else {
- sb.append(this.kind);
- }
- 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 (traceInfo != null) {
- traceInfo.validate();
- }
- if (credentials != null) {
- credentials.validate();
- }
- if (extent != null) {
- extent.validate();
- }
- if (iteratorSettings != null) {
- iteratorSettings.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 CompactionJobStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
- public CompactionJobStandardScheme getScheme() {
- return new CompactionJobStandardScheme();
- }
- }
-
- private static class CompactionJobStandardScheme extends org.apache.thrift.scheme.StandardScheme<CompactionJob> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionJob 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: // TRACE_INFO
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.traceInfo = new org.apache.accumulo.core.trace.thrift.TInfo();
- struct.traceInfo.read(iprot);
- struct.setTraceInfoIsSet(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: // COMPACTION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.compactionId = iprot.readI64();
- struct.setCompactionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // 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;
- case 6: // FILES
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.files = new java.util.ArrayList<InputFile>(_list0.size);
- @org.apache.thrift.annotation.Nullable InputFile _elem1;
- for (int _i2 = 0; _i2 < _list0.size; ++_i2)
- {
- _elem1 = new InputFile();
- _elem1.read(iprot);
- struct.files.add(_elem1);
- }
- iprot.readListEnd();
- }
- struct.setFilesIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // PRIORITY
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.priority = iprot.readI32();
- struct.setPriorityIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // READ_RATE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.readRate = iprot.readI32();
- struct.setReadRateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // WRITE_RATE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.writeRate = iprot.readI32();
- struct.setWriteRateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // ITERATOR_SETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.iteratorSettings = new org.apache.accumulo.core.tabletserver.thrift.IteratorConfig();
- struct.iteratorSettings.read(iprot);
- struct.setIteratorSettingsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 11: // TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.type = org.apache.accumulo.core.tabletserver.thrift.CompactionType.findByValue(iprot.readI32());
- struct.setTypeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 12: // REASON
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.reason = org.apache.accumulo.core.tabletserver.thrift.CompactionReason.findByValue(iprot.readI32());
- struct.setReasonIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 13: // OUTPUT_FILE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.outputFile = iprot.readString();
- struct.setOutputFileIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 14: // PROPAGATE_DELETES
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.propagateDeletes = iprot.readBool();
- struct.setPropagateDeletesIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 15: // KIND
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.kind = org.apache.accumulo.core.compaction.thrift.CompactionKind.findByValue(iprot.readI32());
- struct.setKindIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, CompactionJob struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.traceInfo != null) {
- oprot.writeFieldBegin(TRACE_INFO_FIELD_DESC);
- struct.traceInfo.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.credentials != null) {
- oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
- struct.credentials.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(COMPACTION_ID_FIELD_DESC);
- oprot.writeI64(struct.compactionId);
- oprot.writeFieldEnd();
- if (struct.extent != null) {
- oprot.writeFieldBegin(EXTENT_FIELD_DESC);
- struct.extent.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.files != null) {
- oprot.writeFieldBegin(FILES_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.files.size()));
- for (InputFile _iter3 : struct.files)
- {
- _iter3.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
- oprot.writeI32(struct.priority);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(READ_RATE_FIELD_DESC);
- oprot.writeI32(struct.readRate);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(WRITE_RATE_FIELD_DESC);
- oprot.writeI32(struct.writeRate);
- oprot.writeFieldEnd();
- if (struct.iteratorSettings != null) {
- oprot.writeFieldBegin(ITERATOR_SETTINGS_FIELD_DESC);
- struct.iteratorSettings.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.type != null) {
- oprot.writeFieldBegin(TYPE_FIELD_DESC);
- oprot.writeI32(struct.type.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.reason != null) {
- oprot.writeFieldBegin(REASON_FIELD_DESC);
- oprot.writeI32(struct.reason.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.outputFile != null) {
- oprot.writeFieldBegin(OUTPUT_FILE_FIELD_DESC);
- oprot.writeString(struct.outputFile);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(PROPAGATE_DELETES_FIELD_DESC);
- oprot.writeBool(struct.propagateDeletes);
- oprot.writeFieldEnd();
- if (struct.kind != null) {
- oprot.writeFieldBegin(KIND_FIELD_DESC);
- oprot.writeI32(struct.kind.getValue());
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class CompactionJobTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
- public CompactionJobTupleScheme getScheme() {
- return new CompactionJobTupleScheme();
- }
- }
-
- private static class CompactionJobTupleScheme extends org.apache.thrift.scheme.TupleScheme<CompactionJob> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, CompactionJob 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.isSetTraceInfo()) {
- optionals.set(0);
- }
- if (struct.isSetCredentials()) {
- optionals.set(1);
- }
- if (struct.isSetCompactionId()) {
- optionals.set(2);
- }
- if (struct.isSetExtent()) {
- optionals.set(3);
- }
- if (struct.isSetFiles()) {
- optionals.set(4);
- }
- if (struct.isSetPriority()) {
- optionals.set(5);
- }
- if (struct.isSetReadRate()) {
- optionals.set(6);
- }
- if (struct.isSetWriteRate()) {
- optionals.set(7);
- }
- if (struct.isSetIteratorSettings()) {
- optionals.set(8);
- }
- if (struct.isSetType()) {
- optionals.set(9);
- }
- if (struct.isSetReason()) {
- optionals.set(10);
- }
- if (struct.isSetOutputFile()) {
- optionals.set(11);
- }
- if (struct.isSetPropagateDeletes()) {
- optionals.set(12);
- }
- if (struct.isSetKind()) {
- optionals.set(13);
- }
- oprot.writeBitSet(optionals, 14);
- if (struct.isSetTraceInfo()) {
- struct.traceInfo.write(oprot);
- }
- if (struct.isSetCredentials()) {
- struct.credentials.write(oprot);
- }
- if (struct.isSetCompactionId()) {
- oprot.writeI64(struct.compactionId);
- }
- if (struct.isSetExtent()) {
- struct.extent.write(oprot);
- }
- if (struct.isSetFiles()) {
- {
- oprot.writeI32(struct.files.size());
- for (InputFile _iter4 : struct.files)
- {
- _iter4.write(oprot);
- }
- }
- }
- if (struct.isSetPriority()) {
- oprot.writeI32(struct.priority);
- }
- if (struct.isSetReadRate()) {
- oprot.writeI32(struct.readRate);
- }
- if (struct.isSetWriteRate()) {
- oprot.writeI32(struct.writeRate);
- }
- if (struct.isSetIteratorSettings()) {
- struct.iteratorSettings.write(oprot);
- }
- if (struct.isSetType()) {
- oprot.writeI32(struct.type.getValue());
- }
- if (struct.isSetReason()) {
- oprot.writeI32(struct.reason.getValue());
- }
- if (struct.isSetOutputFile()) {
- oprot.writeString(struct.outputFile);
- }
- if (struct.isSetPropagateDeletes()) {
- oprot.writeBool(struct.propagateDeletes);
- }
- if (struct.isSetKind()) {
- oprot.writeI32(struct.kind.getValue());
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, CompactionJob struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(14);
- if (incoming.get(0)) {
- struct.traceInfo = new org.apache.accumulo.core.trace.thrift.TInfo();
- struct.traceInfo.read(iprot);
- struct.setTraceInfoIsSet(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.compactionId = iprot.readI64();
- struct.setCompactionIdIsSet(true);
- }
- if (incoming.get(3)) {
- struct.extent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- struct.extent.read(iprot);
- struct.setExtentIsSet(true);
- }
- if (incoming.get(4)) {
- {
- org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.files = new java.util.ArrayList<InputFile>(_list5.size);
- @org.apache.thrift.annotation.Nullable InputFile _elem6;
- for (int _i7 = 0; _i7 < _list5.size; ++_i7)
- {
- _elem6 = new InputFile();
- _elem6.read(iprot);
- struct.files.add(_elem6);
- }
- }
- struct.setFilesIsSet(true);
- }
- if (incoming.get(5)) {
- struct.priority = iprot.readI32();
- struct.setPriorityIsSet(true);
- }
- if (incoming.get(6)) {
- struct.readRate = iprot.readI32();
- struct.setReadRateIsSet(true);
- }
- if (incoming.get(7)) {
- struct.writeRate = iprot.readI32();
- struct.setWriteRateIsSet(true);
- }
- if (incoming.get(8)) {
- struct.iteratorSettings = new org.apache.accumulo.core.tabletserver.thrift.IteratorConfig();
- struct.iteratorSettings.read(iprot);
- struct.setIteratorSettingsIsSet(true);
- }
- if (incoming.get(9)) {
- struct.type = org.apache.accumulo.core.tabletserver.thrift.CompactionType.findByValue(iprot.readI32());
- struct.setTypeIsSet(true);
- }
- if (incoming.get(10)) {
- struct.reason = org.apache.accumulo.core.tabletserver.thrift.CompactionReason.findByValue(iprot.readI32());
- struct.setReasonIsSet(true);
- }
- if (incoming.get(11)) {
- struct.outputFile = iprot.readString();
- struct.setOutputFileIsSet(true);
- }
- if (incoming.get(12)) {
- struct.propagateDeletes = iprot.readBool();
- struct.setPropagateDeletesIsSet(true);
- }
- if (incoming.get(13)) {
- struct.kind = org.apache.accumulo.core.compaction.thrift.CompactionKind.findByValue(iprot.readI32());
- struct.setKindIsSet(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/java/org/apache/accumulo/core/compaction/thrift/Compactor.java b/core/src/main/java/org/apache/accumulo/core/compaction/thrift/Compactor.java
index 7738b55..bf900db 100644
--- a/core/src/main/java/org/apache/accumulo/core/compaction/thrift/Compactor.java
+++ b/core/src/main/java/org/apache/accumulo/core/compaction/thrift/Compactor.java
@@ -29,13 +29,13 @@ public class Compactor {
public interface Iface {
- public void cancel(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction) throws org.apache.thrift.TException;
+ public void cancel(java.lang.String externalCompactionId) throws org.apache.thrift.TException;
}
public interface AsyncIface {
- public void cancel(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void cancel(java.lang.String externalCompactionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
}
@@ -59,16 +59,16 @@ public class Compactor {
super(iprot, oprot);
}
- public void cancel(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction) throws org.apache.thrift.TException
+ public void cancel(java.lang.String externalCompactionId) throws org.apache.thrift.TException
{
- send_cancel(compaction);
+ send_cancel(externalCompactionId);
recv_cancel();
}
- public void send_cancel(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction) throws org.apache.thrift.TException
+ public void send_cancel(java.lang.String externalCompactionId) throws org.apache.thrift.TException
{
cancel_args args = new cancel_args();
- args.setCompaction(compaction);
+ args.setExternalCompactionId(externalCompactionId);
sendBase("cancel", args);
}
@@ -97,24 +97,24 @@ public class Compactor {
super(protocolFactory, clientManager, transport);
}
- public void cancel(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ public void cancel(java.lang.String externalCompactionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
- cancel_call method_call = new cancel_call(compaction, resultHandler, this, ___protocolFactory, ___transport);
+ cancel_call method_call = new cancel_call(externalCompactionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class cancel_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
- private org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction;
- public cancel_call(org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction, 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 {
+ private java.lang.String externalCompactionId;
+ public cancel_call(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, false);
- this.compaction = compaction;
+ this.externalCompactionId = externalCompactionId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancel", org.apache.thrift.protocol.TMessageType.CALL, 0));
cancel_args args = new cancel_args();
- args.setCompaction(compaction);
+ args.setExternalCompactionId(externalCompactionId);
args.write(prot);
prot.writeMessageEnd();
}
@@ -166,7 +166,7 @@ public class Compactor {
public cancel_result getResult(I iface, cancel_args args) throws org.apache.thrift.TException {
cancel_result result = new cancel_result();
- iface.cancel(args.compaction);
+ iface.cancel(args.externalCompactionId);
return result;
}
}
@@ -244,7 +244,7 @@ public class Compactor {
}
public void start(I iface, cancel_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
- iface.cancel(args.compaction,resultHandler);
+ iface.cancel(args.externalCompactionId,resultHandler);
}
}
@@ -253,16 +253,16 @@ public class Compactor {
public static class cancel_args implements org.apache.thrift.TBase<cancel_args, cancel_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancel_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancel_args");
- private static final org.apache.thrift.protocol.TField COMPACTION_FIELD_DESC = new org.apache.thrift.protocol.TField("compaction", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ 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)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancel_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancel_argsTupleSchemeFactory();
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction; // 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 {
- COMPACTION((short)1, "compaction");
+ EXTERNAL_COMPACTION_ID((short)1, "externalCompactionId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -278,8 +278,8 @@ public class Compactor {
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // COMPACTION
- return COMPACTION;
+ case 1: // EXTERNAL_COMPACTION_ID
+ return EXTERNAL_COMPACTION_ID;
default:
return null;
}
@@ -324,8 +324,8 @@ public class Compactor {
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.COMPACTION, new org.apache.thrift.meta_data.FieldMetaData("compaction", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.tabletserver.thrift.CompactionJob.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(cancel_args.class, metaDataMap);
}
@@ -334,18 +334,18 @@ public class Compactor {
}
public cancel_args(
- org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction)
+ java.lang.String externalCompactionId)
{
this();
- this.compaction = compaction;
+ this.externalCompactionId = externalCompactionId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public cancel_args(cancel_args other) {
- if (other.isSetCompaction()) {
- this.compaction = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob(other.compaction);
+ if (other.isSetExternalCompactionId()) {
+ this.externalCompactionId = other.externalCompactionId;
}
}
@@ -355,41 +355,41 @@ public class Compactor {
@Override
public void clear() {
- this.compaction = null;
+ this.externalCompactionId = null;
}
@org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.tabletserver.thrift.CompactionJob getCompaction() {
- return this.compaction;
+ public java.lang.String getExternalCompactionId() {
+ return this.externalCompactionId;
}
- public cancel_args setCompaction(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.tabletserver.thrift.CompactionJob compaction) {
- this.compaction = compaction;
+ public cancel_args setExternalCompactionId(@org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId) {
+ this.externalCompactionId = externalCompactionId;
return this;
}
- public void unsetCompaction() {
- this.compaction = null;
+ public void unsetExternalCompactionId() {
+ this.externalCompactionId = null;
}
- /** Returns true if field compaction is set (has been assigned a value) and false otherwise */
- public boolean isSetCompaction() {
- return this.compaction != 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 setCompactionIsSet(boolean value) {
+ public void setExternalCompactionIdIsSet(boolean value) {
if (!value) {
- this.compaction = null;
+ this.externalCompactionId = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case COMPACTION:
+ case EXTERNAL_COMPACTION_ID:
if (value == null) {
- unsetCompaction();
+ unsetExternalCompactionId();
} else {
- setCompaction((org.apache.accumulo.core.tabletserver.thrift.CompactionJob)value);
+ setExternalCompactionId((java.lang.String)value);
}
break;
@@ -399,8 +399,8 @@ public class Compactor {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case COMPACTION:
- return getCompaction();
+ case EXTERNAL_COMPACTION_ID:
+ return getExternalCompactionId();
}
throw new java.lang.IllegalStateException();
@@ -413,8 +413,8 @@ public class Compactor {
}
switch (field) {
- case COMPACTION:
- return isSetCompaction();
+ case EXTERNAL_COMPACTION_ID:
+ return isSetExternalCompactionId();
}
throw new java.lang.IllegalStateException();
}
@@ -434,12 +434,12 @@ public class Compactor {
if (this == that)
return true;
- boolean this_present_compaction = true && this.isSetCompaction();
- boolean that_present_compaction = true && that.isSetCompaction();
- if (this_present_compaction || that_present_compaction) {
- if (!(this_present_compaction && that_present_compaction))
+ 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.compaction.equals(that.compaction))
+ if (!this.externalCompactionId.equals(that.externalCompactionId))
return false;
}
@@ -450,9 +450,9 @@ public class Compactor {
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + ((isSetCompaction()) ? 131071 : 524287);
- if (isSetCompaction())
- hashCode = hashCode * 8191 + compaction.hashCode();
+ hashCode = hashCode * 8191 + ((isSetExternalCompactionId()) ? 131071 : 524287);
+ if (isSetExternalCompactionId())
+ hashCode = hashCode * 8191 + externalCompactionId.hashCode();
return hashCode;
}
@@ -465,12 +465,12 @@ public class Compactor {
int lastComparison = 0;
- lastComparison = java.lang.Boolean.valueOf(isSetCompaction()).compareTo(other.isSetCompaction());
+ lastComparison = java.lang.Boolean.valueOf(isSetExternalCompactionId()).compareTo(other.isSetExternalCompactionId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetCompaction()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compaction, other.compaction);
+ if (isSetExternalCompactionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalCompactionId, other.externalCompactionId);
if (lastComparison != 0) {
return lastComparison;
}
@@ -496,11 +496,11 @@ public class Compactor {
java.lang.StringBuilder sb = new java.lang.StringBuilder("cancel_args(");
boolean first = true;
- sb.append("compaction:");
- if (this.compaction == null) {
+ sb.append("externalCompactionId:");
+ if (this.externalCompactionId == null) {
sb.append("null");
} else {
- sb.append(this.compaction);
+ sb.append(this.externalCompactionId);
}
first = false;
sb.append(")");
@@ -510,9 +510,6 @@ public class Compactor {
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
- if (compaction != null) {
- compaction.validate();
- }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -549,11 +546,10 @@ public class Compactor {
break;
}
switch (schemeField.id) {
- case 1: // COMPACTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.compaction = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob();
- struct.compaction.read(iprot);
- struct.setCompactionIsSet(true);
+ case 1: // 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);
}
@@ -573,9 +569,9 @@ public class Compactor {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.compaction != null) {
- oprot.writeFieldBegin(COMPACTION_FIELD_DESC);
- struct.compaction.write(oprot);
+ if (struct.externalCompactionId != null) {
+ oprot.writeFieldBegin(EXTERNAL_COMPACTION_ID_FIELD_DESC);
+ oprot.writeString(struct.externalCompactionId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -596,12 +592,12 @@ public class Compactor {
public void write(org.apache.thrift.protocol.TProtocol prot, cancel_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.isSetCompaction()) {
+ if (struct.isSetExternalCompactionId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
- if (struct.isSetCompaction()) {
- struct.compaction.write(oprot);
+ if (struct.isSetExternalCompactionId()) {
+ oprot.writeString(struct.externalCompactionId);
}
}
@@ -610,9 +606,8 @@ public class Compactor {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
- struct.compaction = new org.apache.accumulo.core.tabletserver.thrift.CompactionJob();
- struct.compaction.read(iprot);
- struct.setCompactionIsSet(true);
+ struct.externalCompactionId = iprot.readString();
+ struct.setExternalCompactionIdIsSet(true);
}
}
}
diff --git a/core/src/main/java/org/apache/accumulo/core/compaction/thrift/Status.java b/core/src/main/java/org/apache/accumulo/core/compaction/thrift/Status.java
index 88779f5..b41f72b 100644
--- a/core/src/main/java/org/apache/accumulo/core/compaction/thrift/Status.java
+++ b/core/src/main/java/org/apache/accumulo/core/compaction/thrift/Status.java
@@ -29,7 +29,7 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Status");
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)1);
- private static final org.apache.thrift.protocol.TField COMPACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("compactionId", org.apache.thrift.protocol.TType.I64, (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)2);
private static final org.apache.thrift.protocol.TField COMPACTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("compactor", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)5);
@@ -38,7 +38,7 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new StatusTupleSchemeFactory();
public long timestamp; // required
- public long compactionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId; // required
public @org.apache.thrift.annotation.Nullable java.lang.String compactor; // required
/**
*
@@ -50,7 +50,7 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TIMESTAMP((short)1, "timestamp"),
- COMPACTION_ID((short)2, "compactionId"),
+ EXTERNAL_COMPACTION_ID((short)2, "externalCompactionId"),
COMPACTOR((short)3, "compactor"),
/**
*
@@ -75,8 +75,8 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
switch(fieldId) {
case 1: // TIMESTAMP
return TIMESTAMP;
- case 2: // COMPACTION_ID
- return COMPACTION_ID;
+ case 2: // EXTERNAL_COMPACTION_ID
+ return EXTERNAL_COMPACTION_ID;
case 3: // COMPACTOR
return COMPACTOR;
case 4: // STATE
@@ -125,15 +125,14 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
// isset id assignments
private static final int __TIMESTAMP_ISSET_ID = 0;
- private static final int __COMPACTIONID_ISSET_ID = 1;
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.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.COMPACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("compactionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ 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)));
tmpMap.put(_Fields.COMPACTOR, new org.apache.thrift.meta_data.FieldMetaData("compactor", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -149,7 +148,7 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
public Status(
long timestamp,
- long compactionId,
+ java.lang.String externalCompactionId,
java.lang.String compactor,
CompactionState state,
java.lang.String message)
@@ -157,8 +156,7 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
this();
this.timestamp = timestamp;
setTimestampIsSet(true);
- this.compactionId = compactionId;
- setCompactionIdIsSet(true);
+ this.externalCompactionId = externalCompactionId;
this.compactor = compactor;
this.state = state;
this.message = message;
@@ -170,7 +168,9 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
public Status(Status other) {
__isset_bitfield = other.__isset_bitfield;
this.timestamp = other.timestamp;
- this.compactionId = other.compactionId;
+ if (other.isSetExternalCompactionId()) {
+ this.externalCompactionId = other.externalCompactionId;
+ }
if (other.isSetCompactor()) {
this.compactor = other.compactor;
}
@@ -190,8 +190,7 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
public void clear() {
setTimestampIsSet(false);
this.timestamp = 0;
- setCompactionIdIsSet(false);
- this.compactionId = 0;
+ this.externalCompactionId = null;
this.compactor = null;
this.state = null;
this.message = null;
@@ -220,27 +219,29 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
- public long getCompactionId() {
- return this.compactionId;
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getExternalCompactionId() {
+ return this.externalCompactionId;
}
- public Status setCompactionId(long compactionId) {
- this.compactionId = compactionId;
- setCompactionIdIsSet(true);
+ public Status setExternalCompactionId(@org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId) {
+ this.externalCompactionId = externalCompactionId;
return this;
}
- public void unsetCompactionId() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPACTIONID_ISSET_ID);
+ public void unsetExternalCompactionId() {
+ this.externalCompactionId = null;
}
- /** Returns true if field compactionId is set (has been assigned a value) and false otherwise */
- public boolean isSetCompactionId() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPACTIONID_ISSET_ID);
+ /** Returns true if field externalCompactionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetExternalCompactionId() {
+ return this.externalCompactionId != null;
}
- public void setCompactionIdIsSet(boolean value) {
- __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPACTIONID_ISSET_ID, value);
+ public void setExternalCompactionIdIsSet(boolean value) {
+ if (!value) {
+ this.externalCompactionId = null;
+ }
}
@org.apache.thrift.annotation.Nullable
@@ -336,11 +337,11 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
}
break;
- case COMPACTION_ID:
+ case EXTERNAL_COMPACTION_ID:
if (value == null) {
- unsetCompactionId();
+ unsetExternalCompactionId();
} else {
- setCompactionId((java.lang.Long)value);
+ setExternalCompactionId((java.lang.String)value);
}
break;
@@ -377,8 +378,8 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
case TIMESTAMP:
return getTimestamp();
- case COMPACTION_ID:
- return getCompactionId();
+ case EXTERNAL_COMPACTION_ID:
+ return getExternalCompactionId();
case COMPACTOR:
return getCompactor();
@@ -402,8 +403,8 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
switch (field) {
case TIMESTAMP:
return isSetTimestamp();
- case COMPACTION_ID:
- return isSetCompactionId();
+ case EXTERNAL_COMPACTION_ID:
+ return isSetExternalCompactionId();
case COMPACTOR:
return isSetCompactor();
case STATE:
@@ -438,12 +439,12 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
return false;
}
- boolean this_present_compactionId = true;
- boolean that_present_compactionId = true;
- if (this_present_compactionId || that_present_compactionId) {
- if (!(this_present_compactionId && that_present_compactionId))
+ 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.compactionId != that.compactionId)
+ if (!this.externalCompactionId.equals(that.externalCompactionId))
return false;
}
@@ -483,7 +484,9 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(compactionId);
+ hashCode = hashCode * 8191 + ((isSetExternalCompactionId()) ? 131071 : 524287);
+ if (isSetExternalCompactionId())
+ hashCode = hashCode * 8191 + externalCompactionId.hashCode();
hashCode = hashCode * 8191 + ((isSetCompactor()) ? 131071 : 524287);
if (isSetCompactor())
@@ -518,12 +521,12 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
return lastComparison;
}
}
- lastComparison = java.lang.Boolean.valueOf(isSetCompactionId()).compareTo(other.isSetCompactionId());
+ lastComparison = java.lang.Boolean.valueOf(isSetExternalCompactionId()).compareTo(other.isSetExternalCompactionId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetCompactionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compactionId, other.compactionId);
+ if (isSetExternalCompactionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalCompactionId, other.externalCompactionId);
if (lastComparison != 0) {
return lastComparison;
}
@@ -583,8 +586,12 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
sb.append(this.timestamp);
first = false;
if (!first) sb.append(", ");
- sb.append("compactionId:");
- sb.append(this.compactionId);
+ sb.append("externalCompactionId:");
+ if (this.externalCompactionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.externalCompactionId);
+ }
first = false;
if (!first) sb.append(", ");
sb.append("compactor:");
@@ -663,10 +670,10 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // COMPACTION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.compactionId = iprot.readI64();
- struct.setCompactionIdIsSet(true);
+ case 2: // 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);
}
@@ -713,9 +720,11 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.timestamp);
oprot.writeFieldEnd();
- oprot.writeFieldBegin(COMPACTION_ID_FIELD_DESC);
- oprot.writeI64(struct.compactionId);
- oprot.writeFieldEnd();
+ if (struct.externalCompactionId != null) {
+ oprot.writeFieldBegin(EXTERNAL_COMPACTION_ID_FIELD_DESC);
+ oprot.writeString(struct.externalCompactionId);
+ oprot.writeFieldEnd();
+ }
if (struct.compactor != null) {
oprot.writeFieldBegin(COMPACTOR_FIELD_DESC);
oprot.writeString(struct.compactor);
@@ -752,7 +761,7 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
if (struct.isSetTimestamp()) {
optionals.set(0);
}
- if (struct.isSetCompactionId()) {
+ if (struct.isSetExternalCompactionId()) {
optionals.set(1);
}
if (struct.isSetCompactor()) {
@@ -768,8 +777,8 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
if (struct.isSetTimestamp()) {
oprot.writeI64(struct.timestamp);
}
- if (struct.isSetCompactionId()) {
- oprot.writeI64(struct.compactionId);
+ if (struct.isSetExternalCompactionId()) {
+ oprot.writeString(struct.externalCompactionId);
}
if (struct.isSetCompactor()) {
oprot.writeString(struct.compactor);
@@ -791,8 +800,8 @@ public class Status implements org.apache.thrift.TBase<Status, Status._Fields>,
struct.setTimestampIsSet(true);
}
if (incoming.get(1)) {
- struct.compactionId = iprot.readI64();
- struct.setCompactionIdIsSet(true);
+ struct.externalCompactionId = iprot.readString();
+ struct.setExternalCompactionIdIsSet(true);
}
if (incoming.get(2)) {
struct.compactor = iprot.readString();
diff --git a/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java b/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java
index fe95bcf..8daa006 100644
--- a/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java
@@ -77,7 +77,8 @@ public class DefaultCompactionPlanner implements CompactionPlanner {
public static class ExecutorConfig {
String name;
String maxSize;
- int numThreads;
+ Integer numThreads;
+ String externalQueue;
}
private static class Executor {
@@ -112,10 +113,22 @@ public class DefaultCompactionPlanner implements CompactionPlanner {
List<Executor> tmpExec = new ArrayList<>();
for (ExecutorConfig executorConfig : execConfigs) {
- var ceid = params.getExecutorManager().createExecutor(executorConfig.name,
- executorConfig.numThreads);
Long maxSize = executorConfig.maxSize == null ? null
: ConfigurationTypeHelper.getFixedMemoryAsBytes(executorConfig.maxSize);
+
+ CompactionExecutorId ceid;
+
+ if (executorConfig.externalQueue == null) {
+ ceid = params.getExecutorManager().createExecutor(executorConfig.name,
+ executorConfig.numThreads);
+ } else if (executorConfig.numThreads == null) {
+ ceid = params.getExecutorManager().getExternalExecutor(executorConfig.externalQueue);
+ } else {
+ throw new IllegalArgumentException(
+ "When creating an executor must specify only one of numThreads or externalQueue. "
+ + params.getOptions().get("executors"));
+ }
+
tmpExec.add(new Executor(ceid, maxSize));
}
diff --git a/core/src/main/java/org/apache/accumulo/core/spi/compaction/ExecutorManager.java b/core/src/main/java/org/apache/accumulo/core/spi/compaction/ExecutorManager.java
index 4740ee6..3e39e55 100644
--- a/core/src/main/java/org/apache/accumulo/core/spi/compaction/ExecutorManager.java
+++ b/core/src/main/java/org/apache/accumulo/core/spi/compaction/ExecutorManager.java
@@ -31,4 +31,9 @@ public interface ExecutorManager {
* Create a thread pool executor within a compaction service.
*/
public CompactionExecutorId createExecutor(String name, int threads);
+
+ /**
+ * @return an id for a configured external execution queue.
+ */
+ public CompactionExecutorId getExternalExecutor(String name);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionQueueSummary.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TCompactionQueueSummary.java
similarity index 88%
rename from core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionQueueSummary.java
rename to core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TCompactionQueueSummary.java
index c205b22..1acf912 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionQueueSummary.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TCompactionQueueSummary.java
@@ -25,15 +25,15 @@
package org.apache.accumulo.core.tabletserver.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-public class CompactionQueueSummary implements org.apache.thrift.TBase<CompactionQueueSummary, CompactionQueueSummary._Fields>, java.io.Serializable, Cloneable, Comparable<CompactionQueueSummary> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CompactionQueueSummary");
+public class TCompactionQueueSummary implements org.apache.thrift.TBase<TCompactionQueueSummary, TCompactionQueueSummary._Fields>, java.io.Serializable, Cloneable, Comparable<TCompactionQueueSummary> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCompactionQueueSummary");
private static final org.apache.thrift.protocol.TField QUEUE_FIELD_DESC = new org.apache.thrift.protocol.TField("queue", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new CompactionQueueSummaryStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new CompactionQueueSummaryTupleSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCompactionQueueSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCompactionQueueSummaryTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String queue; // required
public long priority; // required
@@ -119,13 +119,13 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CompactionQueueSummary.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCompactionQueueSummary.class, metaDataMap);
}
- public CompactionQueueSummary() {
+ public TCompactionQueueSummary() {
}
- public CompactionQueueSummary(
+ public TCompactionQueueSummary(
java.lang.String queue,
long priority,
int count)
@@ -141,7 +141,7 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
/**
* Performs a deep copy on <i>other</i>.
*/
- public CompactionQueueSummary(CompactionQueueSummary other) {
+ public TCompactionQueueSummary(TCompactionQueueSummary other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetQueue()) {
this.queue = other.queue;
@@ -150,8 +150,8 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
this.count = other.count;
}
- public CompactionQueueSummary deepCopy() {
- return new CompactionQueueSummary(this);
+ public TCompactionQueueSummary deepCopy() {
+ return new TCompactionQueueSummary(this);
}
@Override
@@ -168,7 +168,7 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
return this.queue;
}
- public CompactionQueueSummary setQueue(@org.apache.thrift.annotation.Nullable java.lang.String queue) {
+ public TCompactionQueueSummary setQueue(@org.apache.thrift.annotation.Nullable java.lang.String queue) {
this.queue = queue;
return this;
}
@@ -192,7 +192,7 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
return this.priority;
}
- public CompactionQueueSummary setPriority(long priority) {
+ public TCompactionQueueSummary setPriority(long priority) {
this.priority = priority;
setPriorityIsSet(true);
return this;
@@ -215,7 +215,7 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
return this.count;
}
- public CompactionQueueSummary setCount(int count) {
+ public TCompactionQueueSummary setCount(int count) {
this.count = count;
setCountIsSet(true);
return this;
@@ -300,12 +300,12 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
- if (that instanceof CompactionQueueSummary)
- return this.equals((CompactionQueueSummary)that);
+ if (that instanceof TCompactionQueueSummary)
+ return this.equals((TCompactionQueueSummary)that);
return false;
}
- public boolean equals(CompactionQueueSummary that) {
+ public boolean equals(TCompactionQueueSummary that) {
if (that == null)
return false;
if (this == that)
@@ -357,7 +357,7 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
}
@Override
- public int compareTo(CompactionQueueSummary other) {
+ public int compareTo(TCompactionQueueSummary other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -412,7 +412,7 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
@Override
public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("CompactionQueueSummary(");
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TCompactionQueueSummary(");
boolean first = true;
sb.append("queue:");
@@ -457,15 +457,15 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
}
}
- private static class CompactionQueueSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
- public CompactionQueueSummaryStandardScheme getScheme() {
- return new CompactionQueueSummaryStandardScheme();
+ private static class TCompactionQueueSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public TCompactionQueueSummaryStandardScheme getScheme() {
+ return new TCompactionQueueSummaryStandardScheme();
}
}
- private static class CompactionQueueSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<CompactionQueueSummary> {
+ private static class TCompactionQueueSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCompactionQueueSummary> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionQueueSummary struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TCompactionQueueSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -510,7 +510,7 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, CompactionQueueSummary struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TCompactionQueueSummary struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -531,16 +531,16 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
}
- private static class CompactionQueueSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
- public CompactionQueueSummaryTupleScheme getScheme() {
- return new CompactionQueueSummaryTupleScheme();
+ private static class TCompactionQueueSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public TCompactionQueueSummaryTupleScheme getScheme() {
+ return new TCompactionQueueSummaryTupleScheme();
}
}
- private static class CompactionQueueSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<CompactionQueueSummary> {
+ private static class TCompactionQueueSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCompactionQueueSummary> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, CompactionQueueSummary struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, TCompactionQueueSummary 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.isSetQueue()) {
@@ -565,7 +565,7 @@ public class CompactionQueueSummary implements org.apache.thrift.TBase<Compactio
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, CompactionQueueSummary struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, TCompactionQueueSummary 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)) {
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionJob.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TExternalCompactionJob.java
similarity index 75%
rename from core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionJob.java
rename to core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TExternalCompactionJob.java
index e74ea50..1c42fe9 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionJob.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TExternalCompactionJob.java
@@ -25,30 +25,26 @@
package org.apache.accumulo.core.tabletserver.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, CompactionJob._Fields>, java.io.Serializable, Cloneable, Comparable<CompactionJob> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CompactionJob");
-
- private static final org.apache.thrift.protocol.TField TRACE_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("traceInfo", 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 COMPACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("compactionId", org.apache.thrift.protocol.TType.I64, (short)3);
- 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)5);
- private static final org.apache.thrift.protocol.TField FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("files", org.apache.thrift.protocol.TType.LIST, (short)6);
- private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I32, (short)7);
- private static final org.apache.thrift.protocol.TField READ_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("readRate", org.apache.thrift.protocol.TType.I32, (short)8);
- private static final org.apache.thrift.protocol.TField WRITE_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("writeRate", org.apache.thrift.protocol.TType.I32, (short)9);
- private static final org.apache.thrift.protocol.TField ITERATOR_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("iteratorSettings", org.apache.thrift.protocol.TType.STRUCT, (short)10);
- private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)11);
- private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", org.apache.thrift.protocol.TType.I32, (short)12);
- private static final org.apache.thrift.protocol.TField OUTPUT_FILE_FIELD_DESC = new org.apache.thrift.protocol.TField("outputFile", org.apache.thrift.protocol.TType.STRING, (short)13);
- private static final org.apache.thrift.protocol.TField PROPAGATE_DELETES_FIELD_DESC = new org.apache.thrift.protocol.TField("propagateDeletes", org.apache.thrift.protocol.TType.BOOL, (short)14);
- private static final org.apache.thrift.protocol.TField KIND_FIELD_DESC = new org.apache.thrift.protocol.TField("kind", org.apache.thrift.protocol.TType.I32, (short)15);
-
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new CompactionJobStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new CompactionJobTupleSchemeFactory();
-
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.thrift.TInfo traceInfo; // required
- public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
- public long compactionId; // required
+public class TExternalCompactionJob implements org.apache.thrift.TBase<TExternalCompactionJob, TExternalCompactionJob._Fields>, java.io.Serializable, Cloneable, Comparable<TExternalCompactionJob> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TExternalCompactionJob");
+
+ 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)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.protocol.TField FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("files", org.apache.thrift.protocol.TType.LIST, (short)3);
+ private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField READ_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("readRate", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField WRITE_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("writeRate", org.apache.thrift.protocol.TType.I32, (short)6);
+ private static final org.apache.thrift.protocol.TField ITERATOR_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("iteratorSettings", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)8);
+ private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", org.apache.thrift.protocol.TType.I32, (short)9);
+ private static final org.apache.thrift.protocol.TField OUTPUT_FILE_FIELD_DESC = new org.apache.thrift.protocol.TField("outputFile", org.apache.thrift.protocol.TType.STRING, (short)10);
+ private static final org.apache.thrift.protocol.TField PROPAGATE_DELETES_FIELD_DESC = new org.apache.thrift.protocol.TField("propagateDeletes", org.apache.thrift.protocol.TType.BOOL, (short)11);
+ private static final org.apache.thrift.protocol.TField KIND_FIELD_DESC = new org.apache.thrift.protocol.TField("kind", org.apache.thrift.protocol.TType.I32, (short)12);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TExternalCompactionJobStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TExternalCompactionJobTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId; // required
public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent; // required
public @org.apache.thrift.annotation.Nullable java.util.List<InputFile> files; // required
public int priority; // required
@@ -71,28 +67,26 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TRACE_INFO((short)1, "traceInfo"),
- CREDENTIALS((short)2, "credentials"),
- COMPACTION_ID((short)3, "compactionId"),
- EXTENT((short)5, "extent"),
- FILES((short)6, "files"),
- PRIORITY((short)7, "priority"),
- READ_RATE((short)8, "readRate"),
- WRITE_RATE((short)9, "writeRate"),
- ITERATOR_SETTINGS((short)10, "iteratorSettings"),
+ EXTERNAL_COMPACTION_ID((short)1, "externalCompactionId"),
+ EXTENT((short)2, "extent"),
+ FILES((short)3, "files"),
+ PRIORITY((short)4, "priority"),
+ READ_RATE((short)5, "readRate"),
+ WRITE_RATE((short)6, "writeRate"),
+ ITERATOR_SETTINGS((short)7, "iteratorSettings"),
/**
*
* @see CompactionType
*/
- TYPE((short)11, "type"),
+ TYPE((short)8, "type"),
/**
*
* @see CompactionReason
*/
- REASON((short)12, "reason"),
- OUTPUT_FILE((short)13, "outputFile"),
- PROPAGATE_DELETES((short)14, "propagateDeletes"),
- KIND((short)15, "kind");
+ REASON((short)9, "reason"),
+ OUTPUT_FILE((short)10, "outputFile"),
+ PROPAGATE_DELETES((short)11, "propagateDeletes"),
+ KIND((short)12, "kind");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -108,33 +102,29 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // TRACE_INFO
- return TRACE_INFO;
- case 2: // CREDENTIALS
- return CREDENTIALS;
- case 3: // COMPACTION_ID
- return COMPACTION_ID;
- case 5: // EXTENT
+ case 1: // EXTERNAL_COMPACTION_ID
+ return EXTERNAL_COMPACTION_ID;
+ case 2: // EXTENT
return EXTENT;
- case 6: // FILES
+ case 3: // FILES
return FILES;
- case 7: // PRIORITY
+ case 4: // PRIORITY
return PRIORITY;
- case 8: // READ_RATE
+ case 5: // READ_RATE
return READ_RATE;
- case 9: // WRITE_RATE
+ case 6: // WRITE_RATE
return WRITE_RATE;
- case 10: // ITERATOR_SETTINGS
+ case 7: // ITERATOR_SETTINGS
return ITERATOR_SETTINGS;
- case 11: // TYPE
+ case 8: // TYPE
return TYPE;
- case 12: // REASON
+ case 9: // REASON
return REASON;
- case 13: // OUTPUT_FILE
+ case 10: // OUTPUT_FILE
return OUTPUT_FILE;
- case 14: // PROPAGATE_DELETES
+ case 11: // PROPAGATE_DELETES
return PROPAGATE_DELETES;
- case 15: // KIND
+ case 12: // KIND
return KIND;
default:
return null;
@@ -177,21 +167,16 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
}
// isset id assignments
- private static final int __COMPACTIONID_ISSET_ID = 0;
- private static final int __PRIORITY_ISSET_ID = 1;
- private static final int __READRATE_ISSET_ID = 2;
- private static final int __WRITERATE_ISSET_ID = 3;
- private static final int __PROPAGATEDELETES_ISSET_ID = 4;
+ private static final int __PRIORITY_ISSET_ID = 0;
+ private static final int __READRATE_ISSET_ID = 1;
+ private static final int __WRITERATE_ISSET_ID = 2;
+ private static final int __PROPAGATEDELETES_ISSET_ID = 3;
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.TRACE_INFO, new org.apache.thrift.meta_data.FieldMetaData("traceInfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.trace.thrift.TInfo.class)));
- tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.securityImpl.thrift.TCredentials.class)));
- tmpMap.put(_Fields.COMPACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("compactionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ 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)));
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)));
tmpMap.put(_Fields.FILES, new org.apache.thrift.meta_data.FieldMetaData("files", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -216,16 +201,14 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
tmpMap.put(_Fields.KIND, new org.apache.thrift.meta_data.FieldMetaData("kind", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.ENUM , "CompactionKind")));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CompactionJob.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TExternalCompactionJob.class, metaDataMap);
}
- public CompactionJob() {
+ public TExternalCompactionJob() {
}
- public CompactionJob(
- org.apache.accumulo.core.trace.thrift.TInfo traceInfo,
- org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
- long compactionId,
+ public TExternalCompactionJob(
+ java.lang.String externalCompactionId,
org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent,
java.util.List<InputFile> files,
int priority,
@@ -239,10 +222,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
CompactionKind kind)
{
this();
- this.traceInfo = traceInfo;
- this.credentials = credentials;
- this.compactionId = compactionId;
- setCompactionIdIsSet(true);
+ this.externalCompactionId = externalCompactionId;
this.extent = extent;
this.files = files;
this.priority = priority;
@@ -263,15 +243,11 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
/**
* Performs a deep copy on <i>other</i>.
*/
- public CompactionJob(CompactionJob other) {
+ public TExternalCompactionJob(TExternalCompactionJob other) {
__isset_bitfield = other.__isset_bitfield;
- if (other.isSetTraceInfo()) {
- this.traceInfo = new org.apache.accumulo.core.trace.thrift.TInfo(other.traceInfo);
- }
- if (other.isSetCredentials()) {
- this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ if (other.isSetExternalCompactionId()) {
+ this.externalCompactionId = other.externalCompactionId;
}
- this.compactionId = other.compactionId;
if (other.isSetExtent()) {
this.extent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent(other.extent);
}
@@ -303,16 +279,13 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
}
}
- public CompactionJob deepCopy() {
- return new CompactionJob(this);
+ public TExternalCompactionJob deepCopy() {
+ return new TExternalCompactionJob(this);
}
@Override
public void clear() {
- this.traceInfo = null;
- this.credentials = null;
- setCompactionIdIsSet(false);
- this.compactionId = 0;
+ this.externalCompactionId = null;
this.extent = null;
this.files = null;
setPriorityIsSet(false);
@@ -331,84 +304,36 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
}
@org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.trace.thrift.TInfo getTraceInfo() {
- return this.traceInfo;
+ public java.lang.String getExternalCompactionId() {
+ return this.externalCompactionId;
}
- public CompactionJob setTraceInfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.thrift.TInfo traceInfo) {
- this.traceInfo = traceInfo;
+ public TExternalCompactionJob setExternalCompactionId(@org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId) {
+ this.externalCompactionId = externalCompactionId;
return this;
}
- public void unsetTraceInfo() {
- this.traceInfo = null;
+ public void unsetExternalCompactionId() {
+ this.externalCompactionId = null;
}
- /** Returns true if field traceInfo is set (has been assigned a value) and false otherwise */
- public boolean isSetTraceInfo() {
- return this.traceInfo != 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 setTraceInfoIsSet(boolean value) {
+ public void setExternalCompactionIdIsSet(boolean value) {
if (!value) {
- this.traceInfo = null;
+ this.externalCompactionId = null;
}
}
@org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
- return this.credentials;
- }
-
- public CompactionJob 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 getCompactionId() {
- return this.compactionId;
- }
-
- public CompactionJob setCompactionId(long compactionId) {
- this.compactionId = compactionId;
- setCompactionIdIsSet(true);
- return this;
- }
-
- public void unsetCompactionId() {
- __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPACTIONID_ISSET_ID);
- }
-
- /** Returns true if field compactionId is set (has been assigned a value) and false otherwise */
- public boolean isSetCompactionId() {
- return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPACTIONID_ISSET_ID);
- }
-
- public void setCompactionIdIsSet(boolean value) {
- __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPACTIONID_ISSET_ID, value);
- }
-
- @org.apache.thrift.annotation.Nullable
public org.apache.accumulo.core.dataImpl.thrift.TKeyExtent getExtent() {
return this.extent;
}
- public CompactionJob setExtent(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent) {
+ public TExternalCompactionJob setExtent(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent) {
this.extent = extent;
return this;
}
@@ -449,7 +374,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
return this.files;
}
- public CompactionJob setFiles(@org.apache.thrift.annotation.Nullable java.util.List<InputFile> files) {
+ public TExternalCompactionJob setFiles(@org.apache.thrift.annotation.Nullable java.util.List<InputFile> files) {
this.files = files;
return this;
}
@@ -473,7 +398,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
return this.priority;
}
- public CompactionJob setPriority(int priority) {
+ public TExternalCompactionJob setPriority(int priority) {
this.priority = priority;
setPriorityIsSet(true);
return this;
@@ -496,7 +421,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
return this.readRate;
}
- public CompactionJob setReadRate(int readRate) {
+ public TExternalCompactionJob setReadRate(int readRate) {
this.readRate = readRate;
setReadRateIsSet(true);
return this;
@@ -519,7 +444,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
return this.writeRate;
}
- public CompactionJob setWriteRate(int writeRate) {
+ public TExternalCompactionJob setWriteRate(int writeRate) {
this.writeRate = writeRate;
setWriteRateIsSet(true);
return this;
@@ -543,7 +468,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
return this.iteratorSettings;
}
- public CompactionJob setIteratorSettings(@org.apache.thrift.annotation.Nullable IteratorConfig iteratorSettings) {
+ public TExternalCompactionJob setIteratorSettings(@org.apache.thrift.annotation.Nullable IteratorConfig iteratorSettings) {
this.iteratorSettings = iteratorSettings;
return this;
}
@@ -576,7 +501,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
*
* @see CompactionType
*/
- public CompactionJob setType(@org.apache.thrift.annotation.Nullable CompactionType type) {
+ public TExternalCompactionJob setType(@org.apache.thrift.annotation.Nullable CompactionType type) {
this.type = type;
return this;
}
@@ -609,7 +534,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
*
* @see CompactionReason
*/
- public CompactionJob setReason(@org.apache.thrift.annotation.Nullable CompactionReason reason) {
+ public TExternalCompactionJob setReason(@org.apache.thrift.annotation.Nullable CompactionReason reason) {
this.reason = reason;
return this;
}
@@ -634,7 +559,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
return this.outputFile;
}
- public CompactionJob setOutputFile(@org.apache.thrift.annotation.Nullable java.lang.String outputFile) {
+ public TExternalCompactionJob setOutputFile(@org.apache.thrift.annotation.Nullable java.lang.String outputFile) {
this.outputFile = outputFile;
return this;
}
@@ -658,7 +583,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
return this.propagateDeletes;
}
- public CompactionJob setPropagateDeletes(boolean propagateDeletes) {
+ public TExternalCompactionJob setPropagateDeletes(boolean propagateDeletes) {
this.propagateDeletes = propagateDeletes;
setPropagateDeletesIsSet(true);
return this;
@@ -682,7 +607,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
return this.kind;
}
- public CompactionJob setKind(@org.apache.thrift.annotation.Nullable CompactionKind kind) {
+ public TExternalCompactionJob setKind(@org.apache.thrift.annotation.Nullable CompactionKind kind) {
this.kind = kind;
return this;
}
@@ -704,27 +629,11 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case TRACE_INFO:
- if (value == null) {
- unsetTraceInfo();
- } else {
- setTraceInfo((org.apache.accumulo.core.trace.thrift.TInfo)value);
- }
- break;
-
- case CREDENTIALS:
+ case EXTERNAL_COMPACTION_ID:
if (value == null) {
- unsetCredentials();
+ unsetExternalCompactionId();
} else {
- setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
- }
- break;
-
- case COMPACTION_ID:
- if (value == null) {
- unsetCompactionId();
- } else {
- setCompactionId((java.lang.Long)value);
+ setExternalCompactionId((java.lang.String)value);
}
break;
@@ -822,14 +731,8 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case TRACE_INFO:
- return getTraceInfo();
-
- case CREDENTIALS:
- return getCredentials();
-
- case COMPACTION_ID:
- return getCompactionId();
+ case EXTERNAL_COMPACTION_ID:
+ return getExternalCompactionId();
case EXTENT:
return getExtent();
@@ -875,12 +778,8 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
}
switch (field) {
- case TRACE_INFO:
- return isSetTraceInfo();
- case CREDENTIALS:
- return isSetCredentials();
- case COMPACTION_ID:
- return isSetCompactionId();
+ case EXTERNAL_COMPACTION_ID:
+ return isSetExternalCompactionId();
case EXTENT:
return isSetExtent();
case FILES:
@@ -911,41 +810,23 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
- if (that instanceof CompactionJob)
- return this.equals((CompactionJob)that);
+ if (that instanceof TExternalCompactionJob)
+ return this.equals((TExternalCompactionJob)that);
return false;
}
- public boolean equals(CompactionJob that) {
+ public boolean equals(TExternalCompactionJob that) {
if (that == null)
return false;
if (this == that)
return true;
- boolean this_present_traceInfo = true && this.isSetTraceInfo();
- boolean that_present_traceInfo = true && that.isSetTraceInfo();
- if (this_present_traceInfo || that_present_traceInfo) {
- if (!(this_present_traceInfo && that_present_traceInfo))
- return false;
- if (!this.traceInfo.equals(that.traceInfo))
- 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))
+ 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.credentials.equals(that.credentials))
- return false;
- }
-
- boolean this_present_compactionId = true;
- boolean that_present_compactionId = true;
- if (this_present_compactionId || that_present_compactionId) {
- if (!(this_present_compactionId && that_present_compactionId))
- return false;
- if (this.compactionId != that.compactionId)
+ if (!this.externalCompactionId.equals(that.externalCompactionId))
return false;
}
@@ -1055,15 +936,9 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + ((isSetTraceInfo()) ? 131071 : 524287);
- if (isSetTraceInfo())
- hashCode = hashCode * 8191 + traceInfo.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
- if (isSetCredentials())
- hashCode = hashCode * 8191 + credentials.hashCode();
-
- hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(compactionId);
+ hashCode = hashCode * 8191 + ((isSetExternalCompactionId()) ? 131071 : 524287);
+ if (isSetExternalCompactionId())
+ hashCode = hashCode * 8191 + externalCompactionId.hashCode();
hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
if (isSetExtent())
@@ -1105,39 +980,19 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
}
@Override
- public int compareTo(CompactionJob other) {
+ public int compareTo(TExternalCompactionJob other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- lastComparison = java.lang.Boolean.valueOf(isSetTraceInfo()).compareTo(other.isSetTraceInfo());
+ lastComparison = java.lang.Boolean.valueOf(isSetExternalCompactionId()).compareTo(other.isSetExternalCompactionId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetTraceInfo()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.traceInfo, other.traceInfo);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.valueOf(isSetCredentials()).compareTo(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.valueOf(isSetCompactionId()).compareTo(other.isSetCompactionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCompactionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compactionId, other.compactionId);
+ if (isSetExternalCompactionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalCompactionId, other.externalCompactionId);
if (lastComparison != 0) {
return lastComparison;
}
@@ -1270,29 +1125,17 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
@Override
public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("CompactionJob(");
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TExternalCompactionJob(");
boolean first = true;
- sb.append("traceInfo:");
- if (this.traceInfo == null) {
- sb.append("null");
- } else {
- sb.append(this.traceInfo);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("credentials:");
- if (this.credentials == null) {
+ sb.append("externalCompactionId:");
+ if (this.externalCompactionId == null) {
sb.append("null");
} else {
- sb.append(this.credentials);
+ sb.append(this.externalCompactionId);
}
first = false;
if (!first) sb.append(", ");
- sb.append("compactionId:");
- sb.append(this.compactionId);
- first = false;
- if (!first) sb.append(", ");
sb.append("extent:");
if (this.extent == null) {
sb.append("null");
@@ -1371,12 +1214,6 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
- if (traceInfo != null) {
- traceInfo.validate();
- }
- if (credentials != null) {
- credentials.validate();
- }
if (extent != null) {
extent.validate();
}
@@ -1403,15 +1240,15 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
}
}
- private static class CompactionJobStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
- public CompactionJobStandardScheme getScheme() {
- return new CompactionJobStandardScheme();
+ private static class TExternalCompactionJobStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public TExternalCompactionJobStandardScheme getScheme() {
+ return new TExternalCompactionJobStandardScheme();
}
}
- private static class CompactionJobStandardScheme extends org.apache.thrift.scheme.StandardScheme<CompactionJob> {
+ private static class TExternalCompactionJobStandardScheme extends org.apache.thrift.scheme.StandardScheme<TExternalCompactionJob> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionJob struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TExternalCompactionJob struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
@@ -1421,33 +1258,15 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
break;
}
switch (schemeField.id) {
- case 1: // TRACE_INFO
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.traceInfo = new org.apache.accumulo.core.trace.thrift.TInfo();
- struct.traceInfo.read(iprot);
- struct.setTraceInfoIsSet(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: // COMPACTION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.compactionId = iprot.readI64();
- struct.setCompactionIdIsSet(true);
+ case 1: // 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;
- case 5: // EXTENT
+ 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);
@@ -1456,7 +1275,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 6: // FILES
+ case 3: // FILES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list116 = iprot.readListBegin();
@@ -1475,7 +1294,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 7: // PRIORITY
+ case 4: // PRIORITY
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.priority = iprot.readI32();
struct.setPriorityIsSet(true);
@@ -1483,7 +1302,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 8: // READ_RATE
+ case 5: // READ_RATE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.readRate = iprot.readI32();
struct.setReadRateIsSet(true);
@@ -1491,7 +1310,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 9: // WRITE_RATE
+ case 6: // WRITE_RATE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.writeRate = iprot.readI32();
struct.setWriteRateIsSet(true);
@@ -1499,7 +1318,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 10: // ITERATOR_SETTINGS
+ case 7: // ITERATOR_SETTINGS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.iteratorSettings = new IteratorConfig();
struct.iteratorSettings.read(iprot);
@@ -1508,7 +1327,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 11: // TYPE
+ case 8: // TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.type = org.apache.accumulo.core.tabletserver.thrift.CompactionType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
@@ -1516,7 +1335,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 12: // REASON
+ case 9: // REASON
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.reason = org.apache.accumulo.core.tabletserver.thrift.CompactionReason.findByValue(iprot.readI32());
struct.setReasonIsSet(true);
@@ -1524,7 +1343,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 13: // OUTPUT_FILE
+ case 10: // OUTPUT_FILE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.outputFile = iprot.readString();
struct.setOutputFileIsSet(true);
@@ -1532,7 +1351,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 14: // PROPAGATE_DELETES
+ case 11: // PROPAGATE_DELETES
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.propagateDeletes = iprot.readBool();
struct.setPropagateDeletesIsSet(true);
@@ -1540,7 +1359,7 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 15: // KIND
+ case 12: // KIND
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.kind = org.apache.accumulo.core.tabletserver.thrift.CompactionKind.findByValue(iprot.readI32());
struct.setKindIsSet(true);
@@ -1559,23 +1378,15 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, CompactionJob struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TExternalCompactionJob struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.traceInfo != null) {
- oprot.writeFieldBegin(TRACE_INFO_FIELD_DESC);
- struct.traceInfo.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.credentials != null) {
- oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
- struct.credentials.write(oprot);
+ if (struct.externalCompactionId != null) {
+ oprot.writeFieldBegin(EXTERNAL_COMPACTION_ID_FIELD_DESC);
+ oprot.writeString(struct.externalCompactionId);
oprot.writeFieldEnd();
}
- oprot.writeFieldBegin(COMPACTION_ID_FIELD_DESC);
- oprot.writeI64(struct.compactionId);
- oprot.writeFieldEnd();
if (struct.extent != null) {
oprot.writeFieldBegin(EXTENT_FIELD_DESC);
struct.extent.write(oprot);
@@ -1636,69 +1447,57 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
}
- private static class CompactionJobTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
- public CompactionJobTupleScheme getScheme() {
- return new CompactionJobTupleScheme();
+ private static class TExternalCompactionJobTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public TExternalCompactionJobTupleScheme getScheme() {
+ return new TExternalCompactionJobTupleScheme();
}
}
- private static class CompactionJobTupleScheme extends org.apache.thrift.scheme.TupleScheme<CompactionJob> {
+ private static class TExternalCompactionJobTupleScheme extends org.apache.thrift.scheme.TupleScheme<TExternalCompactionJob> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, CompactionJob struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, TExternalCompactionJob 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.isSetTraceInfo()) {
+ if (struct.isSetExternalCompactionId()) {
optionals.set(0);
}
- if (struct.isSetCredentials()) {
- optionals.set(1);
- }
- if (struct.isSetCompactionId()) {
- optionals.set(2);
- }
if (struct.isSetExtent()) {
- optionals.set(3);
+ optionals.set(1);
}
if (struct.isSetFiles()) {
- optionals.set(4);
+ optionals.set(2);
}
if (struct.isSetPriority()) {
- optionals.set(5);
+ optionals.set(3);
}
if (struct.isSetReadRate()) {
- optionals.set(6);
+ optionals.set(4);
}
if (struct.isSetWriteRate()) {
- optionals.set(7);
+ optionals.set(5);
}
if (struct.isSetIteratorSettings()) {
- optionals.set(8);
+ optionals.set(6);
}
if (struct.isSetType()) {
- optionals.set(9);
+ optionals.set(7);
}
if (struct.isSetReason()) {
- optionals.set(10);
+ optionals.set(8);
}
if (struct.isSetOutputFile()) {
- optionals.set(11);
+ optionals.set(9);
}
if (struct.isSetPropagateDeletes()) {
- optionals.set(12);
+ optionals.set(10);
}
if (struct.isSetKind()) {
- optionals.set(13);
- }
- oprot.writeBitSet(optionals, 14);
- if (struct.isSetTraceInfo()) {
- struct.traceInfo.write(oprot);
- }
- if (struct.isSetCredentials()) {
- struct.credentials.write(oprot);
+ optionals.set(11);
}
- if (struct.isSetCompactionId()) {
- oprot.writeI64(struct.compactionId);
+ oprot.writeBitSet(optionals, 12);
+ if (struct.isSetExternalCompactionId()) {
+ oprot.writeString(struct.externalCompactionId);
}
if (struct.isSetExtent()) {
struct.extent.write(oprot);
@@ -1742,29 +1541,19 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, CompactionJob struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, TExternalCompactionJob struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(14);
+ java.util.BitSet incoming = iprot.readBitSet(12);
if (incoming.get(0)) {
- struct.traceInfo = new org.apache.accumulo.core.trace.thrift.TInfo();
- struct.traceInfo.read(iprot);
- struct.setTraceInfoIsSet(true);
+ struct.externalCompactionId = iprot.readString();
+ struct.setExternalCompactionIdIsSet(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.compactionId = iprot.readI64();
- struct.setCompactionIdIsSet(true);
- }
- if (incoming.get(3)) {
struct.extent = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
struct.extent.read(iprot);
struct.setExtentIsSet(true);
}
- if (incoming.get(4)) {
+ if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list121 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.files = new java.util.ArrayList<InputFile>(_list121.size);
@@ -1778,40 +1567,40 @@ public class CompactionJob implements org.apache.thrift.TBase<CompactionJob, Com
}
struct.setFilesIsSet(true);
}
- if (incoming.get(5)) {
+ if (incoming.get(3)) {
struct.priority = iprot.readI32();
struct.setPriorityIsSet(true);
}
- if (incoming.get(6)) {
+ if (incoming.get(4)) {
struct.readRate = iprot.readI32();
struct.setReadRateIsSet(true);
}
- if (incoming.get(7)) {
+ if (incoming.get(5)) {
struct.writeRate = iprot.readI32();
struct.setWriteRateIsSet(true);
}
- if (incoming.get(8)) {
+ if (incoming.get(6)) {
struct.iteratorSettings = new IteratorConfig();
struct.iteratorSettings.read(iprot);
struct.setIteratorSettingsIsSet(true);
}
- if (incoming.get(9)) {
+ if (incoming.get(7)) {
struct.type = org.apache.accumulo.core.tabletserver.thrift.CompactionType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
}
- if (incoming.get(10)) {
+ if (incoming.get(8)) {
struct.reason = org.apache.accumulo.core.tabletserver.thrift.CompactionReason.findByValue(iprot.readI32());
struct.setReasonIsSet(true);
}
- if (incoming.get(11)) {
+ if (incoming.get(9)) {
struct.outputFile = iprot.readString();
struct.setOutputFileIsSet(true);
}
- if (incoming.get(12)) {
+ if (incoming.get(10)) {
struct.propagateDeletes = iprot.readBool();
struct.setPropagateDeletesIsSet(true);
}
- if (incoming.get(13)) {
+ if (incoming.get(11)) {
struct.kind = org.apache.accumulo.core.tabletserver.thrift.CompactionKind.findByValue(iprot.readI32());
struct.setKindIsSet(true);
}
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
index f56f5ea..aec0661 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
@@ -101,11 +101,11 @@ public class TabletClientService {
public org.apache.accumulo.core.dataImpl.thrift.TSummaries contiuneGetSummaries(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessionId) throws NoSuchScanIDException, org.apache.thrift.TException;
- public java.util.List<CompactionQueueSummary> getCompactionQueueInfo() throws org.apache.thrift.TException;
+ public java.util.List<TCompactionQueueSummary> getCompactionQueueInfo(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public CompactionJob reserveCompactionJob(java.lang.String queueName, long priority, java.lang.String compactor) throws org.apache.thrift.TException;
+ public TExternalCompactionJob reserveCompactionJob(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String queueName, long priority, java.lang.String compactor) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public void compactionJobFinished(CompactionJob job) throws org.apache.thrift.TException;
+ public void compactionJobFinished(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, long fileSize, long entries) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException;
}
@@ -183,11 +183,11 @@ public class TabletClientService {
public void contiuneGetSummaries(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessionId, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.dataImpl.thrift.TSummaries> resultHandler) throws org.apache.thrift.TException;
- public void getCompactionQueueInfo(org.apache.thrift.async.AsyncMethodCallback<java.util.List<CompactionQueueSummary>> resultHandler) throws org.apache.thrift.TException;
+ public void getCompactionQueueInfo(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCompactionQueueSummary>> resultHandler) throws org.apache.thrift.TException;
- public void reserveCompactionJob(java.lang.String queueName, long priority, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<CompactionJob> resultHandler) throws org.apache.thrift.TException;
+ public void reserveCompactionJob(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String queueName, long priority, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionJob> resultHandler) throws org.apache.thrift.TException;
- public void compactionJobFinished(CompactionJob job, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void compactionJobFinished(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, long fileSize, long entries, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
}
@@ -1103,70 +1103,87 @@ public class TabletClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "contiuneGetSummaries failed: unknown result");
}
- public java.util.List<CompactionQueueSummary> getCompactionQueueInfo() throws org.apache.thrift.TException
+ public java.util.List<TCompactionQueueSummary> getCompactionQueueInfo(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
- send_getCompactionQueueInfo();
+ send_getCompactionQueueInfo(tinfo, credentials);
return recv_getCompactionQueueInfo();
}
- public void send_getCompactionQueueInfo() throws org.apache.thrift.TException
+ public void send_getCompactionQueueInfo(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.thrift.TException
{
getCompactionQueueInfo_args args = new getCompactionQueueInfo_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
sendBase("getCompactionQueueInfo", args);
}
- public java.util.List<CompactionQueueSummary> recv_getCompactionQueueInfo() throws org.apache.thrift.TException
+ public java.util.List<TCompactionQueueSummary> recv_getCompactionQueueInfo() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
getCompactionQueueInfo_result result = new getCompactionQueueInfo_result();
receiveBase(result, "getCompactionQueueInfo");
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, "getCompactionQueueInfo failed: unknown result");
}
- public CompactionJob reserveCompactionJob(java.lang.String queueName, long priority, java.lang.String compactor) throws org.apache.thrift.TException
+ public TExternalCompactionJob reserveCompactionJob(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String queueName, long priority, java.lang.String compactor) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
- send_reserveCompactionJob(queueName, priority, compactor);
+ send_reserveCompactionJob(tinfo, credentials, queueName, priority, compactor);
return recv_reserveCompactionJob();
}
- public void send_reserveCompactionJob(java.lang.String queueName, long priority, java.lang.String compactor) throws org.apache.thrift.TException
+ public void send_reserveCompactionJob(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String queueName, long priority, java.lang.String compactor) throws org.apache.thrift.TException
{
reserveCompactionJob_args args = new reserveCompactionJob_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
args.setQueueName(queueName);
args.setPriority(priority);
args.setCompactor(compactor);
sendBase("reserveCompactionJob", args);
}
- public CompactionJob recv_reserveCompactionJob() throws org.apache.thrift.TException
+ public TExternalCompactionJob recv_reserveCompactionJob() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
reserveCompactionJob_result result = new reserveCompactionJob_result();
receiveBase(result, "reserveCompactionJob");
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, "reserveCompactionJob failed: unknown result");
}
- public void compactionJobFinished(CompactionJob job) throws org.apache.thrift.TException
+ public void compactionJobFinished(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, long fileSize, long entries) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
- send_compactionJobFinished(job);
+ send_compactionJobFinished(tinfo, credentials, externalCompactionId, fileSize, entries);
recv_compactionJobFinished();
}
- public void send_compactionJobFinished(CompactionJob job) throws org.apache.thrift.TException
+ public void send_compactionJobFinished(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, long fileSize, long entries) throws org.apache.thrift.TException
{
compactionJobFinished_args args = new compactionJobFinished_args();
- args.setJob(job);
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setExternalCompactionId(externalCompactionId);
+ args.setFileSize(fileSize);
+ args.setEntries(entries);
sendBase("compactionJobFinished", args);
}
- public void recv_compactionJobFinished() throws org.apache.thrift.TException
+ public void recv_compactionJobFinished() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
compactionJobFinished_result result = new compactionJobFinished_result();
receiveBase(result, "compactionJobFinished");
+ if (result.sec != null) {
+ throw result.sec;
+ }
return;
}
@@ -2667,26 +2684,32 @@ public class TabletClientService {
}
}
- public void getCompactionQueueInfo(org.apache.thrift.async.AsyncMethodCallback<java.util.List<CompactionQueueSummary>> resultHandler) throws org.apache.thrift.TException {
+ public void getCompactionQueueInfo(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCompactionQueueSummary>> resultHandler) throws org.apache.thrift.TException {
checkReady();
- getCompactionQueueInfo_call method_call = new getCompactionQueueInfo_call(resultHandler, this, ___protocolFactory, ___transport);
+ getCompactionQueueInfo_call method_call = new getCompactionQueueInfo_call(tinfo, credentials, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getCompactionQueueInfo_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<CompactionQueueSummary>> {
- public getCompactionQueueInfo_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<CompactionQueueSummary>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getCompactionQueueInfo_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TCompactionQueueSummary>> {
+ private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
+ public getCompactionQueueInfo_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCompactionQueueSummary>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
+ this.tinfo = tinfo;
+ this.credentials = credentials;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCompactionQueueInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
getCompactionQueueInfo_args args = new getCompactionQueueInfo_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
args.write(prot);
prot.writeMessageEnd();
}
- public java.util.List<CompactionQueueSummary> getResult() throws org.apache.thrift.TException {
+ public java.util.List<TCompactionQueueSummary> 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!");
}
@@ -2696,19 +2719,23 @@ public class TabletClientService {
}
}
- public void reserveCompactionJob(java.lang.String queueName, long priority, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<CompactionJob> resultHandler) throws org.apache.thrift.TException {
+ public void reserveCompactionJob(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String queueName, long priority, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionJob> resultHandler) throws org.apache.thrift.TException {
checkReady();
- reserveCompactionJob_call method_call = new reserveCompactionJob_call(queueName, priority, compactor, resultHandler, this, ___protocolFactory, ___transport);
+ reserveCompactionJob_call method_call = new reserveCompactionJob_call(tinfo, credentials, queueName, priority, compactor, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class reserveCompactionJob_call extends org.apache.thrift.async.TAsyncMethodCall<CompactionJob> {
+ public static class reserveCompactionJob_call extends org.apache.thrift.async.TAsyncMethodCall<TExternalCompactionJob> {
+ private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
private java.lang.String queueName;
private long priority;
private java.lang.String compactor;
- public reserveCompactionJob_call(java.lang.String queueName, long priority, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<CompactionJob> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public reserveCompactionJob_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String queueName, long priority, java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionJob> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org [...]
super(client, protocolFactory, transport, resultHandler, false);
+ this.tinfo = tinfo;
+ this.credentials = credentials;
this.queueName = queueName;
this.priority = priority;
this.compactor = compactor;
@@ -2717,6 +2744,8 @@ public class TabletClientService {
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reserveCompactionJob", org.apache.thrift.protocol.TMessageType.CALL, 0));
reserveCompactionJob_args args = new reserveCompactionJob_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
args.setQueueName(queueName);
args.setPriority(priority);
args.setCompactor(compactor);
@@ -2724,7 +2753,7 @@ public class TabletClientService {
prot.writeMessageEnd();
}
- public CompactionJob getResult() throws org.apache.thrift.TException {
+ public TExternalCompactionJob 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!");
}
@@ -2734,29 +2763,41 @@ public class TabletClientService {
}
}
- public void compactionJobFinished(CompactionJob job, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+ public void compactionJobFinished(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, long fileSize, long entries, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
- compactionJobFinished_call method_call = new compactionJobFinished_call(job, resultHandler, this, ___protocolFactory, ___transport);
+ compactionJobFinished_call method_call = new compactionJobFinished_call(tinfo, credentials, externalCompactionId, fileSize, entries, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class compactionJobFinished_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
- private CompactionJob job;
- public compactionJobFinished_call(CompactionJob job, 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 {
+ private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
+ private java.lang.String externalCompactionId;
+ private long fileSize;
+ private long entries;
+ public compactionJobFinished_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String externalCompactionId, long fileSize, long entries, 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.job = job;
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ this.externalCompactionId = externalCompactionId;
+ this.fileSize = fileSize;
+ this.entries = entries;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compactionJobFinished", org.apache.thrift.protocol.TMessageType.CALL, 0));
compactionJobFinished_args args = new compactionJobFinished_args();
- args.setJob(job);
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.setExternalCompactionId(externalCompactionId);
+ args.setFileSize(fileSize);
+ args.setEntries(entries);
args.write(prot);
prot.writeMessageEnd();
}
- public Void getResult() throws org.apache.thrift.TException {
+ public Void 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!");
}
@@ -3842,7 +3883,11 @@ public class TabletClientService {
public getCompactionQueueInfo_result getResult(I iface, getCompactionQueueInfo_args args) throws org.apache.thrift.TException {
getCompactionQueueInfo_result result = new getCompactionQueueInfo_result();
- result.success = iface.getCompactionQueueInfo();
+ try {
+ result.success = iface.getCompactionQueueInfo(args.tinfo, args.credentials);
+ } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ result.sec = sec;
+ }
return result;
}
}
@@ -3867,7 +3912,11 @@ public class TabletClientService {
public reserveCompactionJob_result getResult(I iface, reserveCompactionJob_args args) throws org.apache.thrift.TException {
reserveCompactionJob_result result = new reserveCompactionJob_result();
- result.success = iface.reserveCompactionJob(args.queueName, args.priority, args.compactor);
+ try {
+ result.success = iface.reserveCompactionJob(args.tinfo, args.credentials, args.queueName, args.priority, args.compactor);
+ } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ result.sec = sec;
+ }
return result;
}
}
@@ -3892,7 +3941,11 @@ public class TabletClientService {
public compactionJobFinished_result getResult(I iface, compactionJobFinished_args args) throws org.apache.thrift.TException {
compactionJobFinished_result result = new compactionJobFinished_result();
- iface.compactionJobFinished(args.job);
+ try {
+ iface.compactionJobFinished(args.tinfo, args.credentials, args.externalCompactionId, args.fileSize, args.entries);
+ } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ result.sec = sec;
+ }
return result;
}
}
@@ -5956,7 +6009,7 @@ public class TabletClientService {
}
}
- public static class getCompactionQueueInfo<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCompactionQueueInfo_args, java.util.List<CompactionQueueSummary>> {
+ public static class getCompactionQueueInfo<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCompactionQueueInfo_args, java.util.List<TCompactionQueueSummary>> {
public getCompactionQueueInfo() {
super("getCompactionQueueInfo");
}
@@ -5965,10 +6018,10 @@ public class TabletClientService {
return new getCompactionQueueInfo_args();
}
- public org.apache.thrift.async.AsyncMethodCallback<java.util.List<CompactionQueueSummary>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCompactionQueueSummary>> 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.util.List<CompactionQueueSummary>>() {
- public void onComplete(java.util.List<CompactionQueueSummary> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCompactionQueueSummary>>() {
+ public void onComplete(java.util.List<TCompactionQueueSummary> o) {
getCompactionQueueInfo_result result = new getCompactionQueueInfo_result();
result.success = o;
try {
@@ -5985,7 +6038,11 @@ public class TabletClientService {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getCompactionQueueInfo_result result = new getCompactionQueueInfo_result();
- if (e instanceof org.apache.thrift.transport.TTransportException) {
+ 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;
@@ -6012,12 +6069,12 @@ public class TabletClientService {
return false;
}
- public void start(I iface, getCompactionQueueInfo_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<CompactionQueueSummary>> resultHandler) throws org.apache.thrift.TException {
- iface.getCompactionQueueInfo(resultHandler);
+ public void start(I iface, getCompactionQueueInfo_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TCompactionQueueSummary>> resultHandler) throws org.apache.thrift.TException {
+ iface.getCompactionQueueInfo(args.tinfo, args.credentials,resultHandler);
}
}
- public static class reserveCompactionJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, reserveCompactionJob_args, CompactionJob> {
+ public static class reserveCompactionJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, reserveCompactionJob_args, TExternalCompactionJob> {
public reserveCompactionJob() {
super("reserveCompactionJob");
}
@@ -6026,10 +6083,10 @@ public class TabletClientService {
return new reserveCompactionJob_args();
}
- public org.apache.thrift.async.AsyncMethodCallback<CompactionJob> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionJob> 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<CompactionJob>() {
- public void onComplete(CompactionJob o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionJob>() {
+ public void onComplete(TExternalCompactionJob o) {
reserveCompactionJob_result result = new reserveCompactionJob_result();
result.success = o;
try {
@@ -6046,7 +6103,11 @@ public class TabletClientService {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
reserveCompactionJob_result result = new reserveCompactionJob_result();
- if (e instanceof org.apache.thrift.transport.TTransportException) {
+ 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;
@@ -6073,8 +6134,8 @@ public class TabletClientService {
return false;
}
- public void start(I iface, reserveCompactionJob_args args, org.apache.thrift.async.AsyncMethodCallback<CompactionJob> resultHandler) throws org.apache.thrift.TException {
- iface.reserveCompactionJob(args.queueName, args.priority, args.compactor,resultHandler);
+ public void start(I iface, reserveCompactionJob_args args, org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionJob> resultHandler) throws org.apache.thrift.TException {
+ iface.reserveCompactionJob(args.tinfo, args.credentials, args.queueName, args.priority, args.compactor,resultHandler);
}
}
@@ -6106,7 +6167,11 @@ public class TabletClientService {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
compactionJobFinished_result result = new compactionJobFinished_result();
- if (e instanceof org.apache.thrift.transport.TTransportException) {
+ 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;
@@ -6134,7 +6199,7 @@ public class TabletClientService {
}
public void start(I iface, compactionJobFinished_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
- iface.compactionJobFinished(args.job,resultHandler);
+ iface.compactionJobFinished(args.tinfo, args.credentials, args.externalCompactionId, args.fileSize, args.entries,resultHandler);
}
}
@@ -44825,14 +44890,19 @@ public class TabletClientService {
public static class getCompactionQueueInfo_args implements org.apache.thrift.TBase<getCompactionQueueInfo_args, getCompactionQueueInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCompactionQueueInfo_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCompactionQueueInfo_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 getCompactionQueueInfo_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getCompactionQueueInfo_argsTupleSchemeFactory();
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.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>();
@@ -44848,6 +44918,10 @@ public class TabletClientService {
@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;
}
@@ -44887,9 +44961,15 @@ public class TabletClientService {
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.trace.thrift.TInfo.class)));
+ tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.securityImpl.thrift.TCredentials.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCompactionQueueInfo_args.class, metaDataMap);
}
@@ -44897,10 +44977,25 @@ public class TabletClientService {
public getCompactionQueueInfo_args() {
}
+ public getCompactionQueueInfo_args(
+ org.apache.accumulo.core.trace.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 getCompactionQueueInfo_args(getCompactionQueueInfo_args other) {
+ if (other.isSetTinfo()) {
+ this.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo(other.tinfo);
+ }
+ if (other.isSetCredentials()) {
+ this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ }
}
public getCompactionQueueInfo_args deepCopy() {
@@ -44909,16 +45004,90 @@ public class TabletClientService {
@Override
public void clear() {
+ this.tinfo = null;
+ this.credentials = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.trace.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
+ public getCompactionQueueInfo_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.thrift.TInfo tinfo) {
+ this.tinfo = tinfo;
+ return this;
+ }
+
+ public void unsetTinfo() {
+ this.tinfo = null;
+ }
+
+ /** Returns true if field tinfo is set (has been assigned a value) and false otherwise */
+ public boolean isSetTinfo() {
+ return this.tinfo != null;
+ }
+
+ public void setTinfoIsSet(boolean value) {
+ if (!value) {
+ this.tinfo = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
+ return this.credentials;
+ }
+
+ public getCompactionQueueInfo_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 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.trace.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
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
}
throw new java.lang.IllegalStateException();
}
@@ -44930,6 +45099,10 @@ public class TabletClientService {
}
switch (field) {
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
}
throw new java.lang.IllegalStateException();
}
@@ -44949,6 +45122,24 @@ public class TabletClientService {
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;
}
@@ -44956,6 +45147,14 @@ public class TabletClientService {
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;
}
@@ -44967,6 +45166,26 @@ public class TabletClientService {
int lastComparison = 0;
+ lastComparison = java.lang.Boolean.valueOf(isSetTinfo()).compareTo(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.valueOf(isSetCredentials()).compareTo(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;
}
@@ -44988,6 +45207,21 @@ public class TabletClientService {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getCompactionQueueInfo_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();
}
@@ -44995,6 +45229,12 @@ public class TabletClientService {
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 {
@@ -45031,6 +45271,24 @@ public class TabletClientService {
break;
}
switch (schemeField.id) {
+ case 1: // TINFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tinfo = new org.apache.accumulo.core.trace.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);
}
@@ -45046,6 +45304,16 @@ public class TabletClientService {
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();
}
@@ -45063,11 +45331,36 @@ public class TabletClientService {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getCompactionQueueInfo_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, getCompactionQueueInfo_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.trace.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);
+ }
}
}
@@ -45080,15 +45373,18 @@ public class TabletClientService {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCompactionQueueInfo_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (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 getCompactionQueueInfo_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getCompactionQueueInfo_resultTupleSchemeFactory();
- public @org.apache.thrift.annotation.Nullable java.util.List<CompactionQueueSummary> success; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<TCompactionQueueSummary> 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");
+ 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>();
@@ -45106,6 +45402,8 @@ public class TabletClientService {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
+ case 1: // SEC
+ return SEC;
default:
return null;
}
@@ -45152,7 +45450,9 @@ public class TabletClientService {
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.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionQueueSummary.class))));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCompactionQueueSummary.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(getCompactionQueueInfo_result.class, metaDataMap);
}
@@ -45161,10 +45461,12 @@ public class TabletClientService {
}
public getCompactionQueueInfo_result(
- java.util.List<CompactionQueueSummary> success)
+ java.util.List<TCompactionQueueSummary> success,
+ org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec)
{
this();
this.success = success;
+ this.sec = sec;
}
/**
@@ -45172,12 +45474,15 @@ public class TabletClientService {
*/
public getCompactionQueueInfo_result(getCompactionQueueInfo_result other) {
if (other.isSetSuccess()) {
- java.util.List<CompactionQueueSummary> __this__success = new java.util.ArrayList<CompactionQueueSummary>(other.success.size());
- for (CompactionQueueSummary other_element : other.success) {
- __this__success.add(new CompactionQueueSummary(other_element));
+ java.util.List<TCompactionQueueSummary> __this__success = new java.util.ArrayList<TCompactionQueueSummary>(other.success.size());
+ for (TCompactionQueueSummary other_element : other.success) {
+ __this__success.add(new TCompactionQueueSummary(other_element));
}
this.success = __this__success;
}
+ if (other.isSetSec()) {
+ this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
+ }
}
public getCompactionQueueInfo_result deepCopy() {
@@ -45187,6 +45492,7 @@ public class TabletClientService {
@Override
public void clear() {
this.success = null;
+ this.sec = null;
}
public int getSuccessSize() {
@@ -45194,23 +45500,23 @@ public class TabletClientService {
}
@org.apache.thrift.annotation.Nullable
- public java.util.Iterator<CompactionQueueSummary> getSuccessIterator() {
+ public java.util.Iterator<TCompactionQueueSummary> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
- public void addToSuccess(CompactionQueueSummary elem) {
+ public void addToSuccess(TCompactionQueueSummary elem) {
if (this.success == null) {
- this.success = new java.util.ArrayList<CompactionQueueSummary>();
+ this.success = new java.util.ArrayList<TCompactionQueueSummary>();
}
this.success.add(elem);
}
@org.apache.thrift.annotation.Nullable
- public java.util.List<CompactionQueueSummary> getSuccess() {
+ public java.util.List<TCompactionQueueSummary> getSuccess() {
return this.success;
}
- public getCompactionQueueInfo_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<CompactionQueueSummary> success) {
+ public getCompactionQueueInfo_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<TCompactionQueueSummary> success) {
this.success = success;
return this;
}
@@ -45230,13 +45536,46 @@ public class TabletClientService {
}
}
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() {
+ return this.sec;
+ }
+
+ public getCompactionQueueInfo_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;
+ }
+ }
+
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.util.List<CompactionQueueSummary>)value);
+ setSuccess((java.util.List<TCompactionQueueSummary>)value);
+ }
+ break;
+
+ case SEC:
+ if (value == null) {
+ unsetSec();
+ } else {
+ setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
}
break;
@@ -45249,6 +45588,9 @@ public class TabletClientService {
case SUCCESS:
return getSuccess();
+ case SEC:
+ return getSec();
+
}
throw new java.lang.IllegalStateException();
}
@@ -45262,6 +45604,8 @@ public class TabletClientService {
switch (field) {
case SUCCESS:
return isSetSuccess();
+ case SEC:
+ return isSetSec();
}
throw new java.lang.IllegalStateException();
}
@@ -45290,6 +45634,15 @@ public class TabletClientService {
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;
}
@@ -45301,6 +45654,10 @@ public class TabletClientService {
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
+
return hashCode;
}
@@ -45322,6 +45679,16 @@ public class TabletClientService {
return lastComparison;
}
}
+ lastComparison = java.lang.Boolean.valueOf(isSetSec()).compareTo(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;
}
@@ -45350,6 +45717,14 @@ public class TabletClientService {
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();
}
@@ -45397,11 +45772,11 @@ public class TabletClientService {
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list406 = iprot.readListBegin();
- struct.success = new java.util.ArrayList<CompactionQueueSummary>(_list406.size);
- @org.apache.thrift.annotation.Nullable CompactionQueueSummary _elem407;
+ struct.success = new java.util.ArrayList<TCompactionQueueSummary>(_list406.size);
+ @org.apache.thrift.annotation.Nullable TCompactionQueueSummary _elem407;
for (int _i408 = 0; _i408 < _list406.size; ++_i408)
{
- _elem407 = new CompactionQueueSummary();
+ _elem407 = new TCompactionQueueSummary();
_elem407.read(iprot);
struct.success.add(_elem407);
}
@@ -45412,6 +45787,15 @@ public class TabletClientService {
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);
}
@@ -45431,7 +45815,7 @@ public class TabletClientService {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (CompactionQueueSummary _iter409 : struct.success)
+ for (TCompactionQueueSummary _iter409 : struct.success)
{
_iter409.write(oprot);
}
@@ -45439,6 +45823,11 @@ public class TabletClientService {
}
oprot.writeFieldEnd();
}
+ if (struct.sec != null) {
+ oprot.writeFieldBegin(SEC_FIELD_DESC);
+ struct.sec.write(oprot);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -45460,36 +45849,47 @@ public class TabletClientService {
if (struct.isSetSuccess()) {
optionals.set(0);
}
- oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSec()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (CompactionQueueSummary _iter410 : struct.success)
+ for (TCompactionQueueSummary _iter410 : struct.success)
{
_iter410.write(oprot);
}
}
}
+ if (struct.isSetSec()) {
+ struct.sec.write(oprot);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getCompactionQueueInfo_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(1);
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list411 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new java.util.ArrayList<CompactionQueueSummary>(_list411.size);
- @org.apache.thrift.annotation.Nullable CompactionQueueSummary _elem412;
+ struct.success = new java.util.ArrayList<TCompactionQueueSummary>(_list411.size);
+ @org.apache.thrift.annotation.Nullable TCompactionQueueSummary _elem412;
for (int _i413 = 0; _i413 < _list411.size; ++_i413)
{
- _elem412 = new CompactionQueueSummary();
+ _elem412 = new TCompactionQueueSummary();
_elem412.read(iprot);
struct.success.add(_elem412);
}
}
struct.setSuccessIsSet(true);
}
+ if (incoming.get(1)) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ }
}
}
@@ -45501,22 +45901,28 @@ public class TabletClientService {
public static class reserveCompactionJob_args implements org.apache.thrift.TBase<reserveCompactionJob_args, reserveCompactionJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<reserveCompactionJob_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reserveCompactionJob_args");
- private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I64, (short)2);
- private static final org.apache.thrift.protocol.TField COMPACTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("compactor", org.apache.thrift.protocol.TType.STRING, (short)3);
+ 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 QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I64, (short)4);
+ private static final org.apache.thrift.protocol.TField COMPACTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("compactor", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new reserveCompactionJob_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new reserveCompactionJob_argsTupleSchemeFactory();
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.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 queueName; // required
public long priority; // required
public @org.apache.thrift.annotation.Nullable java.lang.String compactor; // 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 {
- QUEUE_NAME((short)1, "queueName"),
- PRIORITY((short)2, "priority"),
- COMPACTOR((short)3, "compactor");
+ TINFO((short)1, "tinfo"),
+ CREDENTIALS((short)2, "credentials"),
+ QUEUE_NAME((short)3, "queueName"),
+ PRIORITY((short)4, "priority"),
+ COMPACTOR((short)5, "compactor");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -45532,11 +45938,15 @@ public class TabletClientService {
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // QUEUE_NAME
+ case 1: // TINFO
+ return TINFO;
+ case 2: // CREDENTIALS
+ return CREDENTIALS;
+ case 3: // QUEUE_NAME
return QUEUE_NAME;
- case 2: // PRIORITY
+ case 4: // PRIORITY
return PRIORITY;
- case 3: // COMPACTOR
+ case 5: // COMPACTOR
return COMPACTOR;
default:
return null;
@@ -45584,6 +45994,10 @@ public class TabletClientService {
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.trace.thrift.TInfo.class)));
+ tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.securityImpl.thrift.TCredentials.class)));
tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queueName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -45598,11 +46012,15 @@ public class TabletClientService {
}
public reserveCompactionJob_args(
+ org.apache.accumulo.core.trace.thrift.TInfo tinfo,
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
java.lang.String queueName,
long priority,
java.lang.String compactor)
{
this();
+ this.tinfo = tinfo;
+ this.credentials = credentials;
this.queueName = queueName;
this.priority = priority;
setPriorityIsSet(true);
@@ -45614,6 +46032,12 @@ public class TabletClientService {
*/
public reserveCompactionJob_args(reserveCompactionJob_args other) {
__isset_bitfield = other.__isset_bitfield;
+ if (other.isSetTinfo()) {
+ this.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo(other.tinfo);
+ }
+ if (other.isSetCredentials()) {
+ this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ }
if (other.isSetQueueName()) {
this.queueName = other.queueName;
}
@@ -45629,6 +46053,8 @@ public class TabletClientService {
@Override
public void clear() {
+ this.tinfo = null;
+ this.credentials = null;
this.queueName = null;
setPriorityIsSet(false);
this.priority = 0;
@@ -45636,6 +46062,56 @@ public class TabletClientService {
}
@org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.trace.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
+ public reserveCompactionJob_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.thrift.TInfo tinfo) {
+ this.tinfo = tinfo;
+ return this;
+ }
+
+ public void unsetTinfo() {
+ this.tinfo = null;
+ }
+
+ /** Returns true if field tinfo is set (has been assigned a value) and false otherwise */
+ public boolean isSetTinfo() {
+ return this.tinfo != null;
+ }
+
+ public void setTinfoIsSet(boolean value) {
+ if (!value) {
+ this.tinfo = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
+ return this.credentials;
+ }
+
+ public reserveCompactionJob_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 getQueueName() {
return this.queueName;
}
@@ -45710,6 +46186,22 @@ public class TabletClientService {
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.trace.thrift.TInfo)value);
+ }
+ break;
+
+ case CREDENTIALS:
+ if (value == null) {
+ unsetCredentials();
+ } else {
+ setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
+ }
+ break;
+
case QUEUE_NAME:
if (value == null) {
unsetQueueName();
@@ -45740,6 +46232,12 @@ public class TabletClientService {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
case QUEUE_NAME:
return getQueueName();
@@ -45760,6 +46258,10 @@ public class TabletClientService {
}
switch (field) {
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
case QUEUE_NAME:
return isSetQueueName();
case PRIORITY:
@@ -45785,6 +46287,24 @@ public class TabletClientService {
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_queueName = true && this.isSetQueueName();
boolean that_present_queueName = true && that.isSetQueueName();
if (this_present_queueName || that_present_queueName) {
@@ -45819,6 +46339,14 @@ public class TabletClientService {
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 + ((isSetQueueName()) ? 131071 : 524287);
if (isSetQueueName())
hashCode = hashCode * 8191 + queueName.hashCode();
@@ -45840,6 +46368,26 @@ public class TabletClientService {
int lastComparison = 0;
+ lastComparison = java.lang.Boolean.valueOf(isSetTinfo()).compareTo(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.valueOf(isSetCredentials()).compareTo(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.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
if (lastComparison != 0) {
return lastComparison;
@@ -45891,6 +46439,22 @@ public class TabletClientService {
java.lang.StringBuilder sb = new java.lang.StringBuilder("reserveCompactionJob_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("queueName:");
if (this.queueName == null) {
sb.append("null");
@@ -45917,6 +46481,12 @@ public class TabletClientService {
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 {
@@ -45955,7 +46525,25 @@ public class TabletClientService {
break;
}
switch (schemeField.id) {
- case 1: // QUEUE_NAME
+ case 1: // TINFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tinfo = new org.apache.accumulo.core.trace.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: // QUEUE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.queueName = iprot.readString();
struct.setQueueNameIsSet(true);
@@ -45963,7 +46551,7 @@ public class TabletClientService {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // PRIORITY
+ case 4: // PRIORITY
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.priority = iprot.readI64();
struct.setPriorityIsSet(true);
@@ -45971,7 +46559,7 @@ public class TabletClientService {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 3: // COMPACTOR
+ case 5: // COMPACTOR
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.compactor = iprot.readString();
struct.setCompactorIsSet(true);
@@ -45994,6 +46582,16 @@ public class TabletClientService {
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.queueName != null) {
oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
oprot.writeString(struct.queueName);
@@ -46025,16 +46623,28 @@ public class TabletClientService {
public void write(org.apache.thrift.protocol.TProtocol prot, reserveCompactionJob_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.isSetQueueName()) {
+ if (struct.isSetTinfo()) {
optionals.set(0);
}
- if (struct.isSetPriority()) {
+ if (struct.isSetCredentials()) {
optionals.set(1);
}
- if (struct.isSetCompactor()) {
+ if (struct.isSetQueueName()) {
optionals.set(2);
}
- oprot.writeBitSet(optionals, 3);
+ if (struct.isSetPriority()) {
+ optionals.set(3);
+ }
+ if (struct.isSetCompactor()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetTinfo()) {
+ struct.tinfo.write(oprot);
+ }
+ if (struct.isSetCredentials()) {
+ struct.credentials.write(oprot);
+ }
if (struct.isSetQueueName()) {
oprot.writeString(struct.queueName);
}
@@ -46049,16 +46659,26 @@ public class TabletClientService {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, reserveCompactionJob_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);
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
+ struct.tinfo = new org.apache.accumulo.core.trace.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.queueName = iprot.readString();
struct.setQueueNameIsSet(true);
}
- if (incoming.get(1)) {
+ if (incoming.get(3)) {
struct.priority = iprot.readI64();
struct.setPriorityIsSet(true);
}
- if (incoming.get(2)) {
+ if (incoming.get(4)) {
struct.compactor = iprot.readString();
struct.setCompactorIsSet(true);
}
@@ -46074,15 +46694,18 @@ public class TabletClientService {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reserveCompactionJob_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 reserveCompactionJob_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new reserveCompactionJob_resultTupleSchemeFactory();
- public @org.apache.thrift.annotation.Nullable CompactionJob success; // required
+ public @org.apache.thrift.annotation.Nullable TExternalCompactionJob 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");
+ 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>();
@@ -46100,6 +46723,8 @@ public class TabletClientService {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
+ case 1: // SEC
+ return SEC;
default:
return null;
}
@@ -46145,7 +46770,9 @@ public class TabletClientService {
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, CompactionJob.class)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TExternalCompactionJob.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(reserveCompactionJob_result.class, metaDataMap);
}
@@ -46154,10 +46781,12 @@ public class TabletClientService {
}
public reserveCompactionJob_result(
- CompactionJob success)
+ TExternalCompactionJob success,
+ org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec)
{
this();
this.success = success;
+ this.sec = sec;
}
/**
@@ -46165,7 +46794,10 @@ public class TabletClientService {
*/
public reserveCompactionJob_result(reserveCompactionJob_result other) {
if (other.isSetSuccess()) {
- this.success = new CompactionJob(other.success);
+ this.success = new TExternalCompactionJob(other.success);
+ }
+ if (other.isSetSec()) {
+ this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
}
}
@@ -46176,14 +46808,15 @@ public class TabletClientService {
@Override
public void clear() {
this.success = null;
+ this.sec = null;
}
@org.apache.thrift.annotation.Nullable
- public CompactionJob getSuccess() {
+ public TExternalCompactionJob getSuccess() {
return this.success;
}
- public reserveCompactionJob_result setSuccess(@org.apache.thrift.annotation.Nullable CompactionJob success) {
+ public reserveCompactionJob_result setSuccess(@org.apache.thrift.annotation.Nullable TExternalCompactionJob success) {
this.success = success;
return this;
}
@@ -46203,13 +46836,46 @@ public class TabletClientService {
}
}
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() {
+ return this.sec;
+ }
+
+ public reserveCompactionJob_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;
+ }
+ }
+
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((CompactionJob)value);
+ setSuccess((TExternalCompactionJob)value);
+ }
+ break;
+
+ case SEC:
+ if (value == null) {
+ unsetSec();
+ } else {
+ setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
}
break;
@@ -46222,6 +46888,9 @@ public class TabletClientService {
case SUCCESS:
return getSuccess();
+ case SEC:
+ return getSec();
+
}
throw new java.lang.IllegalStateException();
}
@@ -46235,6 +46904,8 @@ public class TabletClientService {
switch (field) {
case SUCCESS:
return isSetSuccess();
+ case SEC:
+ return isSetSec();
}
throw new java.lang.IllegalStateException();
}
@@ -46263,6 +46934,15 @@ public class TabletClientService {
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;
}
@@ -46274,6 +46954,10 @@ public class TabletClientService {
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
+
return hashCode;
}
@@ -46295,6 +46979,16 @@ public class TabletClientService {
return lastComparison;
}
}
+ lastComparison = java.lang.Boolean.valueOf(isSetSec()).compareTo(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;
}
@@ -46323,6 +47017,14 @@ public class TabletClientService {
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();
}
@@ -46371,13 +47073,22 @@ public class TabletClientService {
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new CompactionJob();
+ struct.success = new TExternalCompactionJob();
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);
}
@@ -46398,6 +47109,11 @@ public class TabletClientService {
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();
}
@@ -46419,21 +47135,32 @@ public class TabletClientService {
if (struct.isSetSuccess()) {
optionals.set(0);
}
- oprot.writeBitSet(optionals, 1);
+ 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, reserveCompactionJob_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(1);
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
- struct.success = new CompactionJob();
+ struct.success = new TExternalCompactionJob();
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);
+ }
}
}
@@ -46445,16 +47172,28 @@ public class TabletClientService {
public static class compactionJobFinished_args implements org.apache.thrift.TBase<compactionJobFinished_args, compactionJobFinished_args._Fields>, java.io.Serializable, Cloneable, Comparable<compactionJobFinished_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compactionJobFinished_args");
- private static final org.apache.thrift.protocol.TField JOB_FIELD_DESC = new org.apache.thrift.protocol.TField("job", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ 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.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)4);
+ private static final org.apache.thrift.protocol.TField ENTRIES_FIELD_DESC = new org.apache.thrift.protocol.TField("entries", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new compactionJobFinished_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new compactionJobFinished_argsTupleSchemeFactory();
- public @org.apache.thrift.annotation.Nullable CompactionJob job; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.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
+ public long fileSize; // required
+ public long entries; // 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 {
- JOB((short)1, "job");
+ TINFO((short)1, "tinfo"),
+ CREDENTIALS((short)2, "credentials"),
+ EXTERNAL_COMPACTION_ID((short)3, "externalCompactionId"),
+ FILE_SIZE((short)4, "fileSize"),
+ ENTRIES((short)5, "entries");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -46470,8 +47209,16 @@ public class TabletClientService {
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // JOB
- return JOB;
+ case 1: // TINFO
+ return TINFO;
+ case 2: // CREDENTIALS
+ return CREDENTIALS;
+ case 3: // EXTERNAL_COMPACTION_ID
+ return EXTERNAL_COMPACTION_ID;
+ case 4: // FILE_SIZE
+ return FILE_SIZE;
+ case 5: // ENTRIES
+ return ENTRIES;
default:
return null;
}
@@ -46513,11 +47260,22 @@ public class TabletClientService {
}
// isset id assignments
+ private static final int __FILESIZE_ISSET_ID = 0;
+ private static final int __ENTRIES_ISSET_ID = 1;
+ 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.JOB, new org.apache.thrift.meta_data.FieldMetaData("job", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionJob.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.trace.thrift.TInfo.class)));
+ tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.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)));
+ tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.ENTRIES, new org.apache.thrift.meta_data.FieldMetaData("entries", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compactionJobFinished_args.class, metaDataMap);
}
@@ -46526,19 +47284,38 @@ public class TabletClientService {
}
public compactionJobFinished_args(
- CompactionJob job)
+ org.apache.accumulo.core.trace.thrift.TInfo tinfo,
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
+ java.lang.String externalCompactionId,
+ long fileSize,
+ long entries)
{
this();
- this.job = job;
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ this.externalCompactionId = externalCompactionId;
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ this.entries = entries;
+ setEntriesIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public compactionJobFinished_args(compactionJobFinished_args other) {
- if (other.isSetJob()) {
- this.job = new CompactionJob(other.job);
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetTinfo()) {
+ this.tinfo = new org.apache.accumulo.core.trace.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;
+ }
+ this.fileSize = other.fileSize;
+ this.entries = other.entries;
}
public compactionJobFinished_args deepCopy() {
@@ -46547,41 +47324,175 @@ public class TabletClientService {
@Override
public void clear() {
- this.job = null;
+ this.tinfo = null;
+ this.credentials = null;
+ this.externalCompactionId = null;
+ setFileSizeIsSet(false);
+ this.fileSize = 0;
+ setEntriesIsSet(false);
+ this.entries = 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.trace.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
+ public compactionJobFinished_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.trace.thrift.TInfo tinfo) {
+ this.tinfo = tinfo;
+ return this;
+ }
+
+ public void unsetTinfo() {
+ this.tinfo = null;
+ }
+
+ /** Returns true if field tinfo is set (has been assigned a value) and false otherwise */
+ public boolean isSetTinfo() {
+ return this.tinfo != null;
+ }
+
+ public void setTinfoIsSet(boolean value) {
+ if (!value) {
+ this.tinfo = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.securityImpl.thrift.TCredentials getCredentials() {
+ return this.credentials;
+ }
+
+ public compactionJobFinished_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 CompactionJob getJob() {
- return this.job;
+ public java.lang.String getExternalCompactionId() {
+ return this.externalCompactionId;
}
- public compactionJobFinished_args setJob(@org.apache.thrift.annotation.Nullable CompactionJob job) {
- this.job = job;
+ public compactionJobFinished_args setExternalCompactionId(@org.apache.thrift.annotation.Nullable java.lang.String externalCompactionId) {
+ this.externalCompactionId = externalCompactionId;
return this;
}
- public void unsetJob() {
- this.job = null;
+ public void unsetExternalCompactionId() {
+ this.externalCompactionId = null;
}
- /** Returns true if field job is set (has been assigned a value) and false otherwise */
- public boolean isSetJob() {
- return this.job != 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 setJobIsSet(boolean value) {
+ public void setExternalCompactionIdIsSet(boolean value) {
if (!value) {
- this.job = null;
+ this.externalCompactionId = null;
}
}
+ public long getFileSize() {
+ return this.fileSize;
+ }
+
+ public compactionJobFinished_args setFileSize(long fileSize) {
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ return this;
+ }
+
+ public void unsetFileSize() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
+ public boolean isSetFileSize() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ public void setFileSizeIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
+ }
+
+ public long getEntries() {
+ return this.entries;
+ }
+
+ public compactionJobFinished_args setEntries(long entries) {
+ this.entries = entries;
+ setEntriesIsSet(true);
+ return this;
+ }
+
+ public void unsetEntries() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENTRIES_ISSET_ID);
+ }
+
+ /** Returns true if field entries is set (has been assigned a value) and false otherwise */
+ public boolean isSetEntries() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENTRIES_ISSET_ID);
+ }
+
+ public void setEntriesIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENTRIES_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case JOB:
+ case TINFO:
+ if (value == null) {
+ unsetTinfo();
+ } else {
+ setTinfo((org.apache.accumulo.core.trace.thrift.TInfo)value);
+ }
+ break;
+
+ case CREDENTIALS:
if (value == null) {
- unsetJob();
+ unsetCredentials();
} else {
- setJob((CompactionJob)value);
+ 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;
+
+ case FILE_SIZE:
+ if (value == null) {
+ unsetFileSize();
+ } else {
+ setFileSize((java.lang.Long)value);
+ }
+ break;
+
+ case ENTRIES:
+ if (value == null) {
+ unsetEntries();
+ } else {
+ setEntries((java.lang.Long)value);
}
break;
@@ -46591,8 +47502,20 @@ public class TabletClientService {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case JOB:
- return getJob();
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
+ case EXTERNAL_COMPACTION_ID:
+ return getExternalCompactionId();
+
+ case FILE_SIZE:
+ return getFileSize();
+
+ case ENTRIES:
+ return getEntries();
}
throw new java.lang.IllegalStateException();
@@ -46605,8 +47528,16 @@ public class TabletClientService {
}
switch (field) {
- case JOB:
- return isSetJob();
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
+ case EXTERNAL_COMPACTION_ID:
+ return isSetExternalCompactionId();
+ case FILE_SIZE:
+ return isSetFileSize();
+ case ENTRIES:
+ return isSetEntries();
}
throw new java.lang.IllegalStateException();
}
@@ -46626,12 +47557,48 @@ public class TabletClientService {
if (this == that)
return true;
- boolean this_present_job = true && this.isSetJob();
- boolean that_present_job = true && that.isSetJob();
- if (this_present_job || that_present_job) {
- if (!(this_present_job && that_present_job))
+ 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;
+ }
+
+ boolean this_present_fileSize = true;
+ boolean that_present_fileSize = true;
+ if (this_present_fileSize || that_present_fileSize) {
+ if (!(this_present_fileSize && that_present_fileSize))
return false;
- if (!this.job.equals(that.job))
+ if (this.fileSize != that.fileSize)
+ return false;
+ }
+
+ boolean this_present_entries = true;
+ boolean that_present_entries = true;
+ if (this_present_entries || that_present_entries) {
+ if (!(this_present_entries && that_present_entries))
+ return false;
+ if (this.entries != that.entries)
return false;
}
@@ -46642,9 +47609,21 @@ public class TabletClientService {
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + ((isSetJob()) ? 131071 : 524287);
- if (isSetJob())
- hashCode = hashCode * 8191 + job.hashCode();
+ 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();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fileSize);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(entries);
return hashCode;
}
@@ -46657,12 +47636,52 @@ public class TabletClientService {
int lastComparison = 0;
- lastComparison = java.lang.Boolean.valueOf(isSetJob()).compareTo(other.isSetJob());
+ lastComparison = java.lang.Boolean.valueOf(isSetTinfo()).compareTo(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.valueOf(isSetCredentials()).compareTo(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.valueOf(isSetExternalCompactionId()).compareTo(other.isSetExternalCompactionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExternalCompactionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalCompactionId, other.externalCompactionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFileSize()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.valueOf(isSetEntries()).compareTo(other.isSetEntries());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetJob()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job, other.job);
+ if (isSetEntries()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entries, other.entries);
if (lastComparison != 0) {
return lastComparison;
}
@@ -46688,13 +47707,37 @@ public class TabletClientService {
java.lang.StringBuilder sb = new java.lang.StringBuilder("compactionJobFinished_args(");
boolean first = true;
- sb.append("job:");
- if (this.job == null) {
+ 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.job);
+ sb.append(this.externalCompactionId);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("fileSize:");
+ sb.append(this.fileSize);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("entries:");
+ sb.append(this.entries);
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -46702,8 +47745,11 @@ public class TabletClientService {
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
- if (job != null) {
- job.validate();
+ if (tinfo != null) {
+ tinfo.validate();
+ }
+ if (credentials != null) {
+ credentials.validate();
}
}
@@ -46717,6 +47763,8 @@ public class TabletClientService {
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);
@@ -46741,11 +47789,44 @@ public class TabletClientService {
break;
}
switch (schemeField.id) {
- case 1: // JOB
+ case 1: // TINFO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.job = new CompactionJob();
- struct.job.read(iprot);
- struct.setJobIsSet(true);
+ struct.tinfo = new org.apache.accumulo.core.trace.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;
+ case 4: // FILE_SIZE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // ENTRIES
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.entries = iprot.readI64();
+ struct.setEntriesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -46765,11 +47846,27 @@ public class TabletClientService {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.job != null) {
- oprot.writeFieldBegin(JOB_FIELD_DESC);
- struct.job.write(oprot);
+ 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.writeFieldBegin(FILE_SIZE_FIELD_DESC);
+ oprot.writeI64(struct.fileSize);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(ENTRIES_FIELD_DESC);
+ oprot.writeI64(struct.entries);
+ oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -46788,23 +47885,64 @@ public class TabletClientService {
public void write(org.apache.thrift.protocol.TProtocol prot, compactionJobFinished_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.isSetJob()) {
+ if (struct.isSetTinfo()) {
optionals.set(0);
}
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetJob()) {
- struct.job.write(oprot);
+ if (struct.isSetCredentials()) {
+ optionals.set(1);
+ }
+ if (struct.isSetExternalCompactionId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetFileSize()) {
+ optionals.set(3);
+ }
+ if (struct.isSetEntries()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetTinfo()) {
+ struct.tinfo.write(oprot);
+ }
+ if (struct.isSetCredentials()) {
+ struct.credentials.write(oprot);
+ }
+ if (struct.isSetExternalCompactionId()) {
+ oprot.writeString(struct.externalCompactionId);
+ }
+ if (struct.isSetFileSize()) {
+ oprot.writeI64(struct.fileSize);
+ }
+ if (struct.isSetEntries()) {
+ oprot.writeI64(struct.entries);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, compactionJobFinished_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(1);
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
- struct.job = new CompactionJob();
- struct.job.read(iprot);
- struct.setJobIsSet(true);
+ struct.tinfo = new org.apache.accumulo.core.trace.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);
+ }
+ if (incoming.get(3)) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.entries = iprot.readI64();
+ struct.setEntriesIsSet(true);
}
}
}
@@ -46817,14 +47955,16 @@ public class TabletClientService {
public static class compactionJobFinished_result implements org.apache.thrift.TBase<compactionJobFinished_result, compactionJobFinished_result._Fields>, java.io.Serializable, Cloneable, Comparable<compactionJobFinished_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compactionJobFinished_result");
+ 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 compactionJobFinished_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new compactionJobFinished_resultTupleSchemeFactory();
+ 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 {
-;
+ SEC((short)1, "sec");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -46840,6 +47980,8 @@ public class TabletClientService {
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
+ case 1: // SEC
+ return SEC;
default:
return null;
}
@@ -46879,9 +48021,13 @@ public class TabletClientService {
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.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(compactionJobFinished_result.class, metaDataMap);
}
@@ -46889,10 +48035,20 @@ public class TabletClientService {
public compactionJobFinished_result() {
}
+ public compactionJobFinished_result(
+ org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec)
+ {
+ this();
+ this.sec = sec;
+ }
+
/**
* Performs a deep copy on <i>other</i>.
*/
public compactionJobFinished_result(compactionJobFinished_result other) {
+ if (other.isSetSec()) {
+ this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
+ }
}
public compactionJobFinished_result deepCopy() {
@@ -46901,16 +48057,53 @@ public class TabletClientService {
@Override
public void clear() {
+ this.sec = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException getSec() {
+ return this.sec;
+ }
+
+ public compactionJobFinished_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;
+ }
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
+ case SEC:
+ if (value == null) {
+ unsetSec();
+ } else {
+ setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
+ }
+ break;
+
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
+ case SEC:
+ return getSec();
+
}
throw new java.lang.IllegalStateException();
}
@@ -46922,6 +48115,8 @@ public class TabletClientService {
}
switch (field) {
+ case SEC:
+ return isSetSec();
}
throw new java.lang.IllegalStateException();
}
@@ -46941,6 +48136,15 @@ public class TabletClientService {
if (this == that)
return true;
+ 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;
}
@@ -46948,6 +48152,10 @@ public class TabletClientService {
public int hashCode() {
int hashCode = 1;
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
+
return hashCode;
}
@@ -46959,6 +48167,16 @@ public class TabletClientService {
int lastComparison = 0;
+ lastComparison = java.lang.Boolean.valueOf(isSetSec()).compareTo(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;
}
@@ -46980,6 +48198,13 @@ public class TabletClientService {
java.lang.StringBuilder sb = new java.lang.StringBuilder("compactionJobFinished_result(");
boolean first = true;
+ sb.append("sec:");
+ if (this.sec == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sec);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -47023,6 +48248,15 @@ public class TabletClientService {
break;
}
switch (schemeField.id) {
+ 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);
}
@@ -47038,6 +48272,11 @@ public class TabletClientService {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.sec != null) {
+ oprot.writeFieldBegin(SEC_FIELD_DESC);
+ struct.sec.write(oprot);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -47055,11 +48294,25 @@ public class TabletClientService {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, compactionJobFinished_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.isSetSec()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSec()) {
+ struct.sec.write(oprot);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, compactionJobFinished_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(1);
+ if (incoming.get(0)) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ }
}
}
diff --git a/core/src/main/thrift/compaction-coordinator.thrift b/core/src/main/thrift/compaction-coordinator.thrift
index 1b754cf..4813a32 100644
--- a/core/src/main/thrift/compaction-coordinator.thrift
+++ b/core/src/main/thrift/compaction-coordinator.thrift
@@ -41,7 +41,7 @@ enum CompactionState {
struct Status {
1:i64 timestamp
- 2:i64 compactionId
+ 2:string externalCompactionId
3:string compactor
4:CompactionState state
5:string message
@@ -70,7 +70,7 @@ service CompactionCoordinator {
/*
* Called by Compactor to get the next compaction job
*/
- tabletserver.CompactionJob getCompactionJob(
+ tabletserver.TExternalCompactionJob getCompactionJob(
1:string queueName
2:string compactor
)
@@ -79,7 +79,7 @@ service CompactionCoordinator {
* Called by Compactor on successful completion of compaction job
*/
void compactionCompleted(
- 1:tabletserver.CompactionJob job
+ 1:string externalCompactionId
2:tabletserver.CompactionStats stats
)
@@ -87,11 +87,15 @@ service CompactionCoordinator {
* Called by Compactor to update the Coordinator with the state of the compaction
*/
void updateCompactionStatus(
- 1:tabletserver.CompactionJob compaction
+ 1:string externalCompactionId
2:CompactionState state
3:string message
4:i64 timestamp
)
+
+ /*
+ * TODO need a function to report failed compactions
+ */
}
@@ -101,7 +105,7 @@ service Compactor {
* Called by Coordinator to instruct the Compactor to stop working on the compaction.
*/
void cancel(
- 1:tabletserver.CompactionJob compaction
+ 1:string externalCompactionId
)
}
diff --git a/core/src/main/thrift/tabletserver.thrift b/core/src/main/thrift/tabletserver.thrift
index a59abfa..504aa80 100644
--- a/core/src/main/thrift/tabletserver.thrift
+++ b/core/src/main/thrift/tabletserver.thrift
@@ -165,22 +165,20 @@ struct InputFile {
4:i64 timestamp
}
-struct CompactionJob {
- 1:trace.TInfo traceInfo
- 2:security.TCredentials credentials
- 3:i64 compactionId
- 5:data.TKeyExtent extent
- 6:list<InputFile> files
- 7:i32 priority
- 8:i32 readRate
- 9:i32 writeRate
- 10:IteratorConfig iteratorSettings
- 11:CompactionType type
+struct TExternalCompactionJob {
+ 1:string externalCompactionId
+ 2:data.TKeyExtent extent
+ 3:list<InputFile> files
+ 4:i32 priority
+ 5:i32 readRate
+ 6:i32 writeRate
+ 7:IteratorConfig iteratorSettings
+ 8:CompactionType type
# Need to add SELECTOR To CompactionReason, delete CompactionKind?
- 12:CompactionReason reason
- 13:string outputFile
- 14:bool propagateDeletes
- 15:CompactionKind kind
+ 9:CompactionReason reason
+ 10:string outputFile
+ 11:bool propagateDeletes
+ 12:CompactionKind kind
}
enum CompactionKind {
@@ -190,7 +188,7 @@ enum CompactionKind {
USER
}
-struct CompactionQueueSummary {
+struct TCompactionQueueSummary {
1:string queue
2:i64 priority
3:i32 count
@@ -520,18 +518,32 @@ service TabletClientService extends client.ClientService {
1:NoSuchScanIDException nssi
)
- list<CompactionQueueSummary> getCompactionQueueInfo()
+ list<TCompactionQueueSummary> getCompactionQueueInfo(
+ 1:trace.TInfo tinfo
+ 2:security.TCredentials credentials
+ ) throws (
+ 1:client.ThriftSecurityException sec
+ )
- CompactionJob reserveCompactionJob(
- 1:string queueName
- 2:i64 priority
- 3:string compactor
+ TExternalCompactionJob reserveCompactionJob(
+ 1:trace.TInfo tinfo
+ 2:security.TCredentials credentials
+ 3:string queueName
+ 4:i64 priority
+ 5:string compactor
+ ) throws (
+ 1:client.ThriftSecurityException sec
)
void compactionJobFinished(
- 1:CompactionJob job
+ 1:trace.TInfo tinfo
+ 2:security.TCredentials credentials
+ 3:string externalCompactionId
+ 4:i64 fileSize
+ 5:i64 entries
+ ) throws (
+ 1:client.ThriftSecurityException sec
)
-
}
typedef i32 TabletID
diff --git a/core/src/test/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlannerTest.java b/core/src/test/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlannerTest.java
index 9316f58..c494f4c 100644
--- a/core/src/test/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlannerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlannerTest.java
@@ -397,6 +397,11 @@ public class DefaultCompactionPlannerTest {
}
return CompactionExecutorId.of(name);
}
+
+ @Override
+ public CompactionExecutorId getExternalExecutor(String name) {
+ throw new UnsupportedOperationException();
+ }
};
}
});
diff --git a/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java b/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
index 6c747ed..d560eb9 100644
--- a/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
+++ b/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
@@ -43,9 +43,9 @@ import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.dataImpl.thrift.TKeyExtent;
import org.apache.accumulo.core.metadata.TServerInstance;
import org.apache.accumulo.core.rpc.ThriftUtil;
-import org.apache.accumulo.core.tabletserver.thrift.CompactionJob;
-import org.apache.accumulo.core.tabletserver.thrift.CompactionQueueSummary;
import org.apache.accumulo.core.tabletserver.thrift.CompactionStats;
+import org.apache.accumulo.core.tabletserver.thrift.TCompactionQueueSummary;
+import org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob;
import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
import org.apache.accumulo.core.trace.TraceUtil;
import org.apache.accumulo.core.util.Halt;
@@ -74,20 +74,21 @@ import org.apache.zookeeper.KeeperException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class CompactionCoordinator extends AbstractServer implements
- org.apache.accumulo.core.compaction.thrift.CompactionCoordinator.Iface, LiveTServerSet.Listener {
-
+public class CompactionCoordinator extends AbstractServer
+ implements org.apache.accumulo.core.compaction.thrift.CompactionCoordinator.Iface,
+ LiveTServerSet.Listener {
+
private static class QueueAndPriority implements Comparable<QueueAndPriority> {
-
- private static WeakHashMap<Pair<String,Long>, QueueAndPriority> CACHE = new WeakHashMap<>();
-
+
+ private static WeakHashMap<Pair<String,Long>,QueueAndPriority> CACHE = new WeakHashMap<>();
+
public static QueueAndPriority get(String queue, Long priority) {
return CACHE.putIfAbsent(new Pair<>(queue, priority), new QueueAndPriority(queue, priority));
}
-
+
private final String queue;
private final Long priority;
-
+
private QueueAndPriority(String queue, Long priority) {
super();
this.queue = queue;
@@ -101,7 +102,6 @@ public class CompactionCoordinator extends AbstractServer implements
public Long getPriority() {
return priority;
}
-
@Override
public int hashCode() {
@@ -120,13 +120,13 @@ public class CompactionCoordinator extends AbstractServer implements
public boolean equals(Object obj) {
if (null == obj)
return false;
- if (obj == this)
+ if (obj == this)
return true;
if (!(obj instanceof QueueAndPriority)) {
return false;
} else {
QueueAndPriority other = (QueueAndPriority) obj;
- return this.queue.equals(other.queue) && this.priority.equals(other.priority);
+ return this.queue.equals(other.queue) && this.priority.equals(other.priority);
}
}
@@ -140,7 +140,7 @@ public class CompactionCoordinator extends AbstractServer implements
return result;
}
}
-
+
}
private static class CoordinatorLockWatcher implements ZooLock.AccumuloLockWatcher {
@@ -180,79 +180,93 @@ public class CompactionCoordinator extends AbstractServer implements
}
return address.getHost() + ":" + address.getPort();
}
-
+
private static class CompactionUpdate {
private final Long timestamp;
private final String message;
private final CompactionState state;
+
public CompactionUpdate(Long timestamp, String message, CompactionState state) {
super();
this.timestamp = timestamp;
this.message = message;
this.state = state;
}
+
public Long getTimestamp() {
return timestamp;
}
+
public String getMessage() {
return message;
}
+
public CompactionState getState() {
return state;
}
}
-
+
private static class RunningCompaction {
- private final CompactionJob job;
+ private final TExternalCompactionJob job;
private final String compactorAddress;
private final TServerInstance tserver;
- private Map<Long, CompactionUpdate> updates = new TreeMap<>();
+ private Map<Long,CompactionUpdate> updates = new TreeMap<>();
private CompactionStats stats = null;
- public RunningCompaction(CompactionJob job, String compactorAddress, TServerInstance tserver) {
+
+ public RunningCompaction(TExternalCompactionJob job, String compactorAddress,
+ TServerInstance tserver) {
super();
this.job = job;
this.compactorAddress = compactorAddress;
this.tserver = tserver;
}
+
public Map<Long,CompactionUpdate> getUpdates() {
return updates;
}
+
public void addUpdate(Long timestamp, String message, CompactionState state) {
this.updates.put(timestamp, new CompactionUpdate(timestamp, message, state));
}
+
public CompactionStats getStats() {
return stats;
}
+
public void setStats(CompactionStats stats) {
this.stats = stats;
}
- public CompactionJob getJob() {
+
+ public TExternalCompactionJob getJob() {
return job;
}
+
public String getCompactorAddress() {
return compactorAddress;
}
+
public TServerInstance getTserver() {
return tserver;
}
}
-
+
private static final Logger LOG = LoggerFactory.getLogger(CompactionCoordinator.class);
private static final long TIME_BETWEEN_CHECKS = 5000;
-
+
/* Map of external queue name -> priority -> tservers */
- private static final Map<String, TreeMap<Long, LinkedHashSet<TServerInstance>>> QUEUES = new HashMap<>();
+ private static final Map<String,TreeMap<Long,LinkedHashSet<TServerInstance>>> QUEUES =
+ new HashMap<>();
/* index of tserver to queue and priority, exists to provide O(1) lookup into QUEUES */
- private static final Map<TServerInstance, HashSet<QueueAndPriority>> INDEX = new HashMap<>();
+ private static final Map<TServerInstance,HashSet<QueueAndPriority>> INDEX = new HashMap<>();
/* Map of compactionId to RunningCompactions */
- private static final Map<Long, RunningCompaction> RUNNING = new ConcurrentHashMap<>();
-
+ private static final Map<String,RunningCompaction> RUNNING = new ConcurrentHashMap<>();
+
private final GarbageCollectionLogger gcLogger = new GarbageCollectionLogger();
private final AccumuloConfiguration aconf;
-
+
private ZooLock coordinatorLock;
private LiveTServerSet tserverSet;
-
+
protected CompactionCoordinator(ServerOpts opts, String[] args) {
super("compaction-coordinator", opts, args);
ServerContext context = super.getContext();
@@ -265,7 +279,7 @@ public class CompactionCoordinator extends AbstractServer implements
LOG.info("Version " + Constants.VERSION);
LOG.info("Instance " + context.getInstanceID());
}
-
+
/**
* Set up nodes and locks in ZooKeeper for this CompactionCoordinator
*
@@ -282,7 +296,7 @@ public class CompactionCoordinator extends AbstractServer implements
final String coordinatorClientAddress = getHostPortString(clientAddress);
final String lockPath = getContext().getZooKeeperRoot() + Constants.ZCOORDINATOR_LOCK;
final UUID zooLockUUID = UUID.randomUUID();
-
+
CoordinatorLockWatcher managerLockWatcher = new CoordinatorLockWatcher();
coordinatorLock = new ZooLock(getContext().getSiteConfiguration(), lockPath, zooLockUUID);
return coordinatorLock.tryLock(managerLockWatcher, coordinatorClientAddress.getBytes());
@@ -296,13 +310,16 @@ public class CompactionCoordinator extends AbstractServer implements
*/
private ServerAddress startCoordinatorClientService() throws UnknownHostException {
CompactionCoordinator rpcProxy = TraceUtil.wrapService(this);
- final org.apache.accumulo.core.compaction.thrift.CompactionCoordinator.Processor<CompactionCoordinator> processor;
+ final org.apache.accumulo.core.compaction.thrift.CompactionCoordinator.Processor<
+ CompactionCoordinator> processor;
if (getContext().getThriftServerType() == ThriftServerType.SASL) {
- CompactionCoordinator tcredProxy =
- TCredentialsUpdatingWrapper.service(rpcProxy, CompactionCoordinator.class, getConfiguration());
- processor = new org.apache.accumulo.core.compaction.thrift.CompactionCoordinator.Processor<>(tcredProxy);
+ CompactionCoordinator tcredProxy = TCredentialsUpdatingWrapper.service(rpcProxy,
+ CompactionCoordinator.class, getConfiguration());
+ processor = new org.apache.accumulo.core.compaction.thrift.CompactionCoordinator.Processor<>(
+ tcredProxy);
} else {
- processor = new org.apache.accumulo.core.compaction.thrift.CompactionCoordinator.Processor<>(rpcProxy);
+ processor = new org.apache.accumulo.core.compaction.thrift.CompactionCoordinator.Processor<>(
+ rpcProxy);
}
Property maxMessageSizeProperty = (aconf.get(Property.COORDINATOR_MAX_MESSAGE_SIZE) != null
? Property.COORDINATOR_MAX_MESSAGE_SIZE : Property.GENERAL_MAX_MESSAGE_SIZE);
@@ -314,7 +331,7 @@ public class CompactionCoordinator extends AbstractServer implements
LOG.info("address = {}", sp.address);
return sp;
}
-
+
@Override
public void run() {
@@ -333,55 +350,63 @@ public class CompactionCoordinator extends AbstractServer implements
} catch (KeeperException | InterruptedException e) {
throw new IllegalStateException("Exception getting Coordinator lock", e);
}
-
+
tserverSet = new LiveTServerSet(getContext(), this);
-
- // TODO: On initial startup contact all running tservers to get information about the compactions
+
+ // TODO: On initial startup contact all running tservers to get information about the
+ // compactions
// that are current running in external queues to populate the RUNNING map. This is to handle
// the case where the coordinator dies or is restarted at runtime
-
+
tserverSet.startListeningForTabletServerChanges();
while (true) {
tserverSet.getCurrentServers().forEach(tsi -> {
try {
- synchronized(QUEUES) {
+ synchronized (QUEUES) {
TabletClientService.Client client = getTabletServerConnection(tsi);
- List<CompactionQueueSummary> summaries = client.getCompactionQueueInfo();
+ // TODO credentials
+ List<TCompactionQueueSummary> summaries = client.getCompactionQueueInfo(null, null);
summaries.forEach(summary -> {
- QueueAndPriority qp = QueueAndPriority.get(summary.getQueue().intern(), summary.getPriority());
- QUEUES.putIfAbsent(qp.getQueue(), new TreeMap<>()).putIfAbsent(qp.getPriority(), new LinkedHashSet<>()).add(tsi);
+ QueueAndPriority qp =
+ QueueAndPriority.get(summary.getQueue().intern(), summary.getPriority());
+ QUEUES.putIfAbsent(qp.getQueue(), new TreeMap<>())
+ .putIfAbsent(qp.getPriority(), new LinkedHashSet<>()).add(tsi);
INDEX.putIfAbsent(tsi, new HashSet<>()).add(qp);
});
}
} catch (TException e) {
- LOG.warn("Error getting compaction summaries from tablet server: {}", tsi.getHostAndPort(), e);
+ LOG.warn("Error getting compaction summaries from tablet server: {}",
+ tsi.getHostAndPort(), e);
}
});
UtilWaitThread.sleep(60000);
}
-
+
}
-
/**
- * Callback for the LiveTServerSet object to update current set of tablet servers, including
- * ones that were deleted and added
- *
- * @param current current set of live tservers
- * @param deleted set of tservers that were removed from current since last update
- * @param added set of tservers that were added to current since last update
+ * Callback for the LiveTServerSet object to update current set of tablet servers, including ones
+ * that were deleted and added
+ *
+ * @param current
+ * current set of live tservers
+ * @param deleted
+ * set of tservers that were removed from current since last update
+ * @param added
+ * set of tservers that were added to current since last update
*/
@Override
- public void update(LiveTServerSet current, Set<TServerInstance> deleted, Set<TServerInstance> added) {
-
+ public void update(LiveTServerSet current, Set<TServerInstance> deleted,
+ Set<TServerInstance> added) {
+
// run() will iterate over the current and added tservers and add them to the internal
// data structures. For tservers that are deleted, we need to remove them from the
// internal data structures
synchronized (QUEUES) {
deleted.forEach(tsi -> {
INDEX.get(tsi).forEach(qp -> {
- TreeMap<Long, LinkedHashSet<TServerInstance>> m = QUEUES.get(qp.getQueue());
+ TreeMap<Long,LinkedHashSet<TServerInstance>> m = QUEUES.get(qp.getQueue());
if (null != m) {
LinkedHashSet<TServerInstance> tservers = m.get(qp.getPriority());
if (null != tservers) {
@@ -396,22 +421,25 @@ public class CompactionCoordinator extends AbstractServer implements
/**
* Return the next compaction job from the queue to a Compactor
- *
- * @param queueName queue
- * @param compactorAddress compactor address
+ *
+ * @param queueName
+ * queue
+ * @param compactorAddress
+ * compactor address
* @return compaction job
*/
@Override
- public CompactionJob getCompactionJob(String queueName, String compactorAddress) throws TException {
+ public TExternalCompactionJob getCompactionJob(String queueName, String compactorAddress)
+ throws TException {
String queue = queueName.intern();
TServerInstance tserver = null;
Long priority = null;
- synchronized(QUEUES) {
- TreeMap<Long, LinkedHashSet<TServerInstance>> m = QUEUES.get(queueName.intern());
+ synchronized (QUEUES) {
+ TreeMap<Long,LinkedHashSet<TServerInstance>> m = QUEUES.get(queueName.intern());
if (null != m) {
while (tserver == null) {
// Get the first TServerInstance from the highest priority queue
- Entry<Long, LinkedHashSet<TServerInstance>> entry = m.firstEntry();
+ Entry<Long,LinkedHashSet<TServerInstance>> entry = m.firstEntry();
priority = entry.getKey();
LinkedHashSet<TServerInstance> tservers = entry.getValue();
if (null == tservers || m.isEmpty()) {
@@ -437,25 +465,32 @@ public class CompactionCoordinator extends AbstractServer implements
}
}
}
-
+
if (null == tserver) {
return null;
}
TabletClientService.Client client = getTabletServerConnection(tserver);
- CompactionJob job = client.reserveCompactionJob(queue, priority, compactorAddress);
- RUNNING.put(job.getCompactionId(), new RunningCompaction(job, compactorAddress, tserver));
+ // TODO credentials
+ TExternalCompactionJob job =
+ client.reserveCompactionJob(null, null, queue, priority, compactorAddress);
+ RUNNING.put(job.getExternalCompactionId(),
+ new RunningCompaction(job, compactorAddress, tserver));
return job;
}
-
- private TabletClientService.Client getTabletServerConnection(TServerInstance tserver) throws TTransportException {
+
+ private TabletClientService.Client getTabletServerConnection(TServerInstance tserver)
+ throws TTransportException {
TServerConnection connection = tserverSet.getConnection(tserver);
- TTransport transport = ThriftTransportPool.getInstance().getTransport(connection.getAddress(), 0, getContext());
+ TTransport transport =
+ ThriftTransportPool.getInstance().getTransport(connection.getAddress(), 0, getContext());
return ThriftUtil.createClient(new TabletClientService.Client.Factory(), transport);
}
-
- private Compactor.Client getCompactorConnection(HostAndPort compactorAddress) throws TTransportException {
- TTransport transport = ThriftTransportPool.getInstance().getTransport(compactorAddress, 0, getContext());
+
+ private Compactor.Client getCompactorConnection(HostAndPort compactorAddress)
+ throws TTransportException {
+ TTransport transport =
+ ThriftTransportPool.getInstance().getTransport(compactorAddress, 0, getContext());
return ThriftUtil.createClient(new Compactor.Client.Factory(), transport);
}
@@ -465,14 +500,15 @@ public class CompactionCoordinator extends AbstractServer implements
@Override
public void cancelCompaction(TKeyExtent extent, String queueName, long priority)
throws TException {
- RunningCompaction rc = RUNNING.get(null/* compactionId */); // TODO: Need to change thrift inputs here
+ RunningCompaction rc = RUNNING.get(null/* compactionId */); // TODO: Need to change thrift
+ // inputs here
HostAndPort compactor = HostAndPort.fromString(rc.getCompactorAddress());
RetryableThriftCall<Void> cancelThriftCall = new RetryableThriftCall<>(1000,
RetryableThriftCall.MAX_WAIT_TIME, 0, new RetryableThriftFunction<Void>() {
@Override
public Void execute() throws TException {
try {
- getCompactorConnection(compactor).cancel(rc.getJob());
+ getCompactorConnection(compactor).cancel(rc.getJob().getExternalCompactionId());
return null;
} catch (TException e) {
throw e;
@@ -485,47 +521,60 @@ public class CompactionCoordinator extends AbstractServer implements
@Override
public List<Status> getCompactionStatus(TKeyExtent extent, String queueName, long priority)
throws TException {
- RunningCompaction rc = RUNNING.get(null/* compactionId */); // TODO: Need to change thrift inputs here
+ RunningCompaction rc = RUNNING.get(null/* compactionId */); // TODO: Need to change thrift
+ // inputs here
List<Status> status = new ArrayList<>();
- rc.getUpdates().forEach((k,v) -> {
- status.add(new Status(v.getTimestamp(), rc.getJob().getCompactionId(), rc.getCompactorAddress(), v.getState(), v.getMessage()));
+ rc.getUpdates().forEach((k, v) -> {
+ status.add(new Status(v.getTimestamp(), rc.getJob().getExternalCompactionId(),
+ rc.getCompactorAddress(), v.getState(), v.getMessage()));
});
return status;
}
/**
* Compactor calls compactionCompleted passing in the CompactionStats
- *
- * @param job compaction job
- * @param stats compaction stats
+ *
+ * @param job
+ * compaction job
+ * @param stats
+ * compaction stats
*/
@Override
- public void compactionCompleted(CompactionJob job, CompactionStats stats) throws TException {
- RunningCompaction rc = RUNNING.get(job.getCompactionId());
+ public void compactionCompleted(String externalCompactionId, CompactionStats stats)
+ throws TException {
+ RunningCompaction rc = RUNNING.get(externalCompactionId);
if (null != rc) {
rc.setStats(stats);
}
// TODO: What happens if tserver is no longer hosting tablet? I wonder if we should not notify
// the tserver that the compaction has finished and instead let the tserver that is hosting the
// tablet poll for state updates. That way if the tablet is re-hosted, the tserver can check as
- // part of the tablet loading process. This would also enable us to remove the running compaction
+ // part of the tablet loading process. This would also enable us to remove the running
+ // compaction
// from RUNNING when the tserver makes the call and gets the stats.
+ // TODO : rc could be null
TabletClientService.Client client = getTabletServerConnection(rc.getTserver());
- client.compactionJobFinished(rc.getJob());
+ // TODO credentials
+ client.compactionJobFinished(null, null, externalCompactionId, stats.fileSize,
+ stats.entriesWritten);
}
/**
* Compactor calls to update the status of the assigned compaction
- *
- * @param job compaction job
- * @param state compaction state
- * @param message informational message
- * @param timestamp timestamp of the message
+ *
+ * @param job
+ * compaction job
+ * @param state
+ * compaction state
+ * @param message
+ * informational message
+ * @param timestamp
+ * timestamp of the message
*/
@Override
- public void updateCompactionStatus(CompactionJob job, CompactionState state,
+ public void updateCompactionStatus(String externalCompactionId, CompactionState state,
String message, long timestamp) throws TException {
- RunningCompaction rc = RUNNING.get(job.getCompactionId());
+ RunningCompaction rc = RUNNING.get(externalCompactionId);
if (null != rc) {
rc.addUpdate(timestamp, message, state);
}
diff --git a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
index 5eb8cab..3e06e93 100644
--- a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
+++ b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
@@ -52,9 +52,9 @@ import org.apache.accumulo.core.metadata.TabletFile;
import org.apache.accumulo.core.metadata.schema.DataFileValue;
import org.apache.accumulo.core.rpc.ThriftUtil;
import org.apache.accumulo.core.spi.compaction.CompactionKind;
-import org.apache.accumulo.core.tabletserver.thrift.CompactionJob;
import org.apache.accumulo.core.tabletserver.thrift.CompactionReason;
import org.apache.accumulo.core.tabletserver.thrift.CompactionStats;
+import org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob;
import org.apache.accumulo.core.trace.TraceUtil;
import org.apache.accumulo.core.util.Halt;
import org.apache.accumulo.core.util.HostAndPort;
@@ -109,7 +109,7 @@ public class Compactor extends AbstractServer
* Object used to hold information about the current compaction
*/
private static class CompactionJobHolder {
- private CompactionJob job;
+ private TExternalCompactionJob job;
private Thread compactionThread;
private volatile Boolean cancelled = Boolean.FALSE;
private CompactionStats stats = null;
@@ -123,7 +123,7 @@ public class Compactor extends AbstractServer
stats = null;
}
- public CompactionJob getJob() {
+ public TExternalCompactionJob getJob() {
return job;
}
@@ -151,7 +151,7 @@ public class Compactor extends AbstractServer
return (null != this.job);
}
- public void set(CompactionJob job, Thread compactionThread) {
+ public void set(TExternalCompactionJob job, Thread compactionThread) {
Objects.requireNonNull(job, "CompactionJob is null");
Objects.requireNonNull(compactionThread, "Compaction thread is null");
this.job = job;
@@ -302,10 +302,11 @@ public class Compactor extends AbstractServer
* job
*/
@Override
- public void cancel(CompactionJob compactionJob) {
+ public void cancel(String externalCompactionId) {
synchronized (jobHolder) {
- if (jobHolder.isSet() && jobHolder.getJob().equals(compactionJob)) {
- LOG.info("Cancel requested for compaction job {}", compactionJob);
+ if (jobHolder.isSet()
+ && jobHolder.getJob().getExternalCompactionId().equals(externalCompactionId)) {
+ LOG.info("Cancel requested for compaction job {}", externalCompactionId);
jobHolder.cancel();
jobHolder.getThread().interrupt();
}
@@ -314,7 +315,7 @@ public class Compactor extends AbstractServer
/**
* Send an update to the coordinator for this job
- *
+ *
* @param coordinatorClient
* address of the CompactionCoordinator
* @param job
@@ -324,17 +325,18 @@ public class Compactor extends AbstractServer
* @param message
* updated message
*/
- private void updateCompactionState(CompactionJob job, CompactionState state, String message) {
- RetryableThriftCall<Void> thriftCall =
- new RetryableThriftCall<>(1000, RetryableThriftCall.MAX_WAIT_TIME, 25, new RetryableThriftFunction<Void>() {
+ private void updateCompactionState(TExternalCompactionJob job, CompactionState state,
+ String message) {
+ RetryableThriftCall<Void> thriftCall = new RetryableThriftCall<>(1000,
+ RetryableThriftCall.MAX_WAIT_TIME, 25, new RetryableThriftFunction<Void>() {
@Override
public Void execute() throws TException {
try {
if (null == coordinatorClient.get()) {
coordinatorClient.set(getCoordinatorClient());
}
- coordinatorClient.get().updateCompactionStatus(job, state, message,
- System.currentTimeMillis());
+ coordinatorClient.get().updateCompactionStatus(job.getExternalCompactionId(), state,
+ message, System.currentTimeMillis());
return null;
} catch (TException e) {
coordinatorClient.set(null);
@@ -344,23 +346,25 @@ public class Compactor extends AbstractServer
});
thriftCall.run();
}
-
+
/**
* Update the coordinator with the stats from the job
- *
- * @param job current compaction job
- * @param stats compaction stats
+ *
+ * @param job
+ * current compaction job
+ * @param stats
+ * compaction stats
*/
- private void updateCompactionCompleted(CompactionJob job, CompactionStats stats) {
- RetryableThriftCall<Void> thriftCall =
- new RetryableThriftCall<>(1000, RetryableThriftCall.MAX_WAIT_TIME, 25, new RetryableThriftFunction<Void>() {
+ private void updateCompactionCompleted(TExternalCompactionJob job, CompactionStats stats) {
+ RetryableThriftCall<Void> thriftCall = new RetryableThriftCall<>(1000,
+ RetryableThriftCall.MAX_WAIT_TIME, 25, new RetryableThriftFunction<Void>() {
@Override
public Void execute() throws TException {
try {
if (null == coordinatorClient.get()) {
coordinatorClient.set(getCoordinatorClient());
}
- coordinatorClient.get().compactionCompleted(job, stats);
+ coordinatorClient.get().compactionCompleted(job.getExternalCompactionId(), stats);
return null;
} catch (TException e) {
coordinatorClient.set(null);
@@ -380,30 +384,33 @@ public class Compactor extends AbstractServer
* address of this Compactor
* @return CompactionJob
*/
- private CompactionJob getNextJob() {
- RetryableThriftCall<CompactionJob> nextJobThriftCall = new RetryableThriftCall<>(1000,
- RetryableThriftCall.MAX_WAIT_TIME, 0, new RetryableThriftFunction<CompactionJob>() {
- @Override
- public CompactionJob execute() throws TException {
- try {
- if (null == coordinatorClient.get()) {
- coordinatorClient.set(getCoordinatorClient());
+ private TExternalCompactionJob getNextJob() {
+ RetryableThriftCall<TExternalCompactionJob> nextJobThriftCall =
+ new RetryableThriftCall<>(1000, RetryableThriftCall.MAX_WAIT_TIME, 0,
+ new RetryableThriftFunction<TExternalCompactionJob>() {
+ @Override
+ public TExternalCompactionJob execute() throws TException {
+ try {
+ if (null == coordinatorClient.get()) {
+ coordinatorClient.set(getCoordinatorClient());
+ }
+ return coordinatorClient.get().getCompactionJob(queueName,
+ getHostPortString(compactorAddress.getAddress()));
+ } catch (TException e) {
+ coordinatorClient.set(null);
+ throw e;
+ }
}
- return coordinatorClient.get().getCompactionJob(queueName, getHostPortString(compactorAddress.getAddress()));
- } catch (TException e) {
- coordinatorClient.set(null);
- throw e;
- }
- }
- });
+ });
return nextJobThriftCall.run();
}
-
+
/**
* Get the client to the CompactionCoordinator
*
* @return compaction coordinator client
- * @throws TTransportException when unable to get client
+ * @throws TTransportException
+ * when unable to get client
*/
private CompactionCoordinator.Client getCoordinatorClient() throws TTransportException {
HostAndPort coordinatorHost = ExternalCompactionUtil.findCompactionCoordinator(getContext());
@@ -411,17 +418,18 @@ public class Compactor extends AbstractServer
throw new TTransportException("Unable to get CompactionCoordinator address from ZooKeeper");
}
LOG.info("CompactionCoordinator address is: {}", coordinatorHost);
- return ThriftUtil.getClient(new CompactionCoordinator.Client.Factory(),
- coordinatorHost, getContext());
+ return ThriftUtil.getClient(new CompactionCoordinator.Client.Factory(), coordinatorHost,
+ getContext());
}
/**
* Create and return a new CompactionEnv for the current compaction job
*
- * @param job current compaction job
+ * @param job
+ * current compaction job
* @return new env
*/
- private CompactionEnv getCompactionEnvironment(CompactionJob job) {
+ private CompactionEnv getCompactionEnvironment(TExternalCompactionJob job) {
return new CompactionEnv() {
@Override
public boolean isCompactionEnabled() {
@@ -471,9 +479,9 @@ public class Compactor extends AbstractServer
return CompactionReason.SYSTEM;
}
}
- };
+ };
}
-
+
@Override
public void run() {
@@ -498,8 +506,8 @@ public class Compactor extends AbstractServer
while (true) {
err.set(null);
jobHolder.reset();
-
- final CompactionJob job = getNextJob();
+
+ final TExternalCompactionJob job = getNextJob();
LOG.info("Received next compaction job: {}", job);
final LongAdder totalInputSize = new LongAdder();
@@ -509,7 +517,7 @@ public class Compactor extends AbstractServer
Thread compactionThread = Threads.createThread(
"Compaction job for tablet " + job.getExtent().toString(), new Runnable() {
-
+
@Override
public void run() {
try {
@@ -542,7 +550,7 @@ public class Compactor extends AbstractServer
LOG.info("Starting compactor");
started.countDown();
-
+
org.apache.accumulo.server.compaction.CompactionStats stat = compactor.call();
CompactionStats cs = new CompactionStats();
cs.setEntriesRead(stat.getEntriesRead());
@@ -551,7 +559,8 @@ public class Compactor extends AbstractServer
jobHolder.setStats(cs);
LOG.info("Compaction completed successfully");
// Update state when completed
- updateCompactionState(job, CompactionState.SUCCEEDED, "Compaction completed successfully");
+ updateCompactionState(job, CompactionState.SUCCEEDED,
+ "Compaction completed successfully");
} catch (Exception e) {
LOG.error("Compaction failed", e);
err.set(e);
@@ -595,14 +604,14 @@ public class Compactor extends AbstractServer
LOG.error(
"Compactor thread was interrupted waiting for compaction to finish, cancelling job",
e);
- cancel(job);
+ cancel(job.getExternalCompactionId());
}
} catch (InterruptedException e1) {
LOG.error(
"Compactor thread was interrupted waiting for compaction to start, cancelling job",
e1);
- cancel(job);
+ cancel(job.getExternalCompactionId());
}
if (compactionThread.isInterrupted()) {
@@ -612,7 +621,8 @@ public class Compactor extends AbstractServer
Throwable thrown = err.get();
if (thrown != null) {
- updateCompactionState(job, CompactionState.FAILED, "Compaction failed due to: " + thrown.getMessage());
+ updateCompactionState(job, CompactionState.FAILED,
+ "Compaction failed due to: " + thrown.getMessage());
}
}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/ThriftClientHandler.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/ThriftClientHandler.java
index 7aff8d3..674cdef 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/ThriftClientHandler.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/ThriftClientHandler.java
@@ -34,6 +34,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.UUID;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
@@ -104,7 +105,9 @@ import org.apache.accumulo.core.tabletserver.thrift.ActiveScan;
import org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException;
import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
+import org.apache.accumulo.core.tabletserver.thrift.TCompactionQueueSummary;
import org.apache.accumulo.core.tabletserver.thrift.TDurability;
+import org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob;
import org.apache.accumulo.core.tabletserver.thrift.TSampleNotPresentException;
import org.apache.accumulo.core.tabletserver.thrift.TSamplerConfiguration;
import org.apache.accumulo.core.tabletserver.thrift.TUnloadTabletGoal;
@@ -1656,6 +1659,52 @@ class ThriftClientHandler extends ClientServiceHandler implements TabletClientSe
}
@Override
+ public List<TCompactionQueueSummary> getCompactionQueueInfo(TInfo tinfo, TCredentials credentials)
+ throws ThriftSecurityException, TException {
+
+ if (!security.canPerformSystemActions(credentials)) {
+ throw new AccumuloSecurityException(credentials.getPrincipal(),
+ SecurityErrorCode.PERMISSION_DENIED).asThriftException();
+ }
+
+ return server.getCompactionManager().getCompactionQueueSummaries();
+ }
+
+ @Override
+ public TExternalCompactionJob reserveCompactionJob(TInfo tinfo, TCredentials credentials,
+ String queueName, long priority, String compactor)
+ throws ThriftSecurityException, TException {
+
+ if (!security.canPerformSystemActions(credentials)) {
+ throw new AccumuloSecurityException(credentials.getPrincipal(),
+ SecurityErrorCode.PERMISSION_DENIED).asThriftException();
+ }
+
+ var extCompaction =
+ server.getCompactionManager().reserveExternalCompaction(queueName, priority, compactor);
+
+ if (extCompaction != null) {
+ return extCompaction.toThrift();
+ }
+
+ return null;
+ }
+
+ @Override
+ public void compactionJobFinished(TInfo tinfo, TCredentials credentials,
+ String externalCompactionId, long fileSize, long entries)
+ throws ThriftSecurityException, TException {
+
+ if (!security.canPerformSystemActions(credentials)) {
+ throw new AccumuloSecurityException(credentials.getPrincipal(),
+ SecurityErrorCode.PERMISSION_DENIED).asThriftException();
+ }
+
+ server.getCompactionManager().commitExternalCompaction(UUID.fromString(externalCompactionId),
+ server.getOnlineTablets(), fileSize, entries);
+ }
+
+ @Override
public List<String> getActiveLogs(TInfo tinfo, TCredentials credentials) {
String log = server.logger.getLogFile();
// Might be null if there no active logger
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/Compactable.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/Compactable.java
index 3469a8c..cf92d8d 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/Compactable.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/Compactable.java
@@ -24,6 +24,7 @@ import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.SortedMap;
+import java.util.UUID;
import java.util.stream.Collectors;
import org.apache.accumulo.core.client.admin.compaction.CompactableFile;
@@ -88,4 +89,9 @@ public interface Compactable {
CompactionServiceId getConfiguredService(CompactionKind kind);
double getCompactionRatio();
+
+ ExternalCompactionJob reserveExternalCompaction(CompactionServiceId service, CompactionJob job,
+ String compactorId);
+
+ void commitExternalCompaction(UUID extCompactionId, long fileSize, long entries);
}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java
index 2346cd8..3cab489 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java
@@ -1,216 +1,19 @@
-/*
- * 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
- *
- * http://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.tserver.compactions;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.OptionalInt;
-import java.util.Set;
-import java.util.concurrent.PriorityBlockingQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
-import org.apache.accumulo.core.spi.compaction.CompactionExecutorId;
import org.apache.accumulo.core.spi.compaction.CompactionJob;
import org.apache.accumulo.core.spi.compaction.CompactionServiceId;
-import org.apache.accumulo.core.util.compaction.CompactionJobPrioritizer;
-import org.apache.accumulo.core.util.ratelimit.RateLimiter;
-import org.apache.accumulo.core.util.threads.ThreadPools;
-import org.apache.accumulo.tserver.metrics.CompactionExecutorsMetrics;
-import org.apache.htrace.wrappers.TraceRunnable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import com.google.common.base.Preconditions;
+public interface CompactionExecutor {
-public class CompactionExecutor {
+ SubmittedJob submit(CompactionServiceId csid, CompactionJob job, Compactable compactable,
+ Consumer<Compactable> completionCallback);
- private static final Logger log = LoggerFactory.getLogger(CompactionExecutor.class);
+ int getCompactionsRunning();
- private PriorityBlockingQueue<Runnable> queue;
- private final CompactionExecutorId ceid;
- private AtomicLong cancelCount = new AtomicLong();
- private ThreadPoolExecutor threadPool;
+ int getCompactionsQueued();
- // This exist to provide an accurate count of queued compactions for metrics. The PriorityQueue is
- // not used because its size may be off due to it containing cancelled compactions. The collection
- // below should not contain cancelled compactions. A concurrent set was not used because those do
- // not have constant time size operations.
- private Set<CompactionTask> queuedTask = Collections.synchronizedSet(new HashSet<>());
+ void stop();
- private AutoCloseable metricCloser;
-
- private RateLimiter readLimiter;
- private RateLimiter writeLimiter;
-
- private class CompactionTask extends SubmittedJob implements Runnable {
-
- private AtomicReference<Status> status = new AtomicReference<>(Status.QUEUED);
- private Compactable compactable;
- private CompactionServiceId csid;
- private Consumer<Compactable> completionCallback;
- private final long queuedTime;
-
- public CompactionTask(CompactionJob job, Compactable compactable, CompactionServiceId csid,
- Consumer<Compactable> completionCallback) {
- super(job);
- this.compactable = compactable;
- this.csid = csid;
- this.completionCallback = completionCallback;
- queuedTask.add(this);
- queuedTime = System.currentTimeMillis();
- }
-
- @Override
- public void run() {
-
- try {
- if (status.compareAndSet(Status.QUEUED, Status.RUNNING)) {
- queuedTask.remove(this);
- compactable.compact(csid, getJob(), readLimiter, writeLimiter, queuedTime);
- completionCallback.accept(compactable);
- }
- } catch (Exception e) {
- log.warn("Compaction failed for {} on {}", compactable.getExtent(), getJob(), e);
- status.compareAndSet(Status.RUNNING, Status.FAILED);
- } finally {
- status.compareAndSet(Status.RUNNING, Status.COMPLETE);
- }
- }
-
- @Override
- public Status getStatus() {
- return status.get();
- }
-
- @Override
- public boolean cancel(Status expectedStatus) {
-
- boolean canceled = false;
-
- if (expectedStatus == Status.QUEUED) {
- canceled = status.compareAndSet(expectedStatus, Status.CANCELED);
- }
-
- if (canceled)
- queuedTask.remove(this);
-
- if (canceled && cancelCount.incrementAndGet() % 1024 == 0) {
- // Occasionally clean the queue of canceled tasks that have hung around because of their low
- // priority. This runs periodically, instead of every time something is canceled, to avoid
- // hurting performance.
- queue.removeIf(runnable -> {
- CompactionTask compactionTask;
- if (runnable instanceof TraceRunnable) {
- runnable = ((TraceRunnable) runnable).getRunnable();
- }
- if (runnable instanceof CompactionTask) {
- compactionTask = (CompactionTask) runnable;
- } else {
- throw new IllegalArgumentException(
- "Unknown runnable type " + runnable.getClass().getName());
- }
- return compactionTask.getStatus() == Status.CANCELED;
- });
- }
-
- return canceled;
- }
- }
-
- private static CompactionJob getJob(Runnable r) {
- if (r instanceof TraceRunnable) {
- return getJob(((TraceRunnable) r).getRunnable());
- }
-
- if (r instanceof CompactionTask) {
- return ((CompactionTask) r).getJob();
- }
-
- throw new IllegalArgumentException("Unknown runnable type " + r.getClass().getName());
- }
-
- CompactionExecutor(CompactionExecutorId ceid, int threads, CompactionExecutorsMetrics ceMetrics,
- RateLimiter readLimiter, RateLimiter writeLimiter) {
- this.ceid = ceid;
- var comparator =
- Comparator.comparing(CompactionExecutor::getJob, CompactionJobPrioritizer.JOB_COMPARATOR);
-
- queue = new PriorityBlockingQueue<Runnable>(100, comparator);
-
- threadPool = ThreadPools.createThreadPool(threads, threads, 60, TimeUnit.SECONDS,
- "compaction." + ceid, queue, OptionalInt.empty(), true);
-
- metricCloser =
- ceMetrics.addExecutor(ceid, () -> threadPool.getActiveCount(), () -> queuedTask.size());
-
- this.readLimiter = readLimiter;
- this.writeLimiter = writeLimiter;
-
- log.debug("Created compaction executor {} with {} threads", ceid, threads);
- }
-
- public SubmittedJob submit(CompactionServiceId csid, CompactionJob job, Compactable compactable,
- Consumer<Compactable> completionCallback) {
- Preconditions.checkArgument(job.getExecutor().equals(ceid));
- var ctask = new CompactionTask(job, compactable, csid, completionCallback);
- threadPool.execute(ctask);
- return ctask;
- }
-
- public void setThreads(int numThreads) {
-
- int coreSize = threadPool.getCorePoolSize();
-
- if (numThreads < coreSize) {
- threadPool.setCorePoolSize(numThreads);
- threadPool.setMaximumPoolSize(numThreads);
- } else if (numThreads > coreSize) {
- threadPool.setMaximumPoolSize(numThreads);
- threadPool.setCorePoolSize(numThreads);
- }
-
- if (numThreads != coreSize) {
- log.debug("Adjusted compaction executor {} threads from {} to {}", ceid, coreSize,
- numThreads);
- }
- }
-
- public int getCompactionsRunning() {
- return threadPool.getActiveCount();
- }
-
- public int getCompactionsQueued() {
- return queuedTask.size();
- }
-
- public void stop() {
- threadPool.shutdownNow();
- log.debug("Stopped compaction executor {}", ceid);
- try {
- metricCloser.close();
- } catch (Exception e) {
- log.warn("Failed to close metrics {}", ceid, e);
- }
- }
}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java
index 47e390a..63ddf75 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java
@@ -19,24 +19,31 @@
package org.apache.accumulo.tserver.compactions;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.ConfigurationTypeHelper;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.dataImpl.KeyExtent;
+import org.apache.accumulo.core.spi.compaction.CompactionExecutorId;
import org.apache.accumulo.core.spi.compaction.CompactionKind;
import org.apache.accumulo.core.spi.compaction.CompactionServiceId;
import org.apache.accumulo.core.spi.compaction.CompactionServices;
import org.apache.accumulo.core.spi.compaction.DefaultCompactionPlanner;
+import org.apache.accumulo.core.tabletserver.thrift.TCompactionQueueSummary;
import org.apache.accumulo.core.util.threads.Threads;
import org.apache.accumulo.fate.util.Retry;
import org.apache.accumulo.server.ServerContext;
import org.apache.accumulo.tserver.metrics.CompactionExecutorsMetrics;
+import org.apache.accumulo.tserver.tablet.Tablet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -65,6 +72,11 @@ public class CompactionManager {
private String lastDeprecationWarning = "";
+ private Map<CompactionExecutorId,ExternalCompactionExecutor> externalExecutors;
+
+ // TODO this may need to be garbage collected... also will need to be populated when tablet load
+ private Map<UUID,KeyExtent> runningExternalCompactions;
+
private class Config {
Map<String,String> planners = new HashMap<>();
Map<String,Long> rateLimits = new HashMap<>();
@@ -286,6 +298,10 @@ public class CompactionManager {
this.ceMetrics = ceMetrics;
+ this.externalExecutors = new ConcurrentHashMap<>();
+
+ this.runningExternalCompactions = new ConcurrentHashMap<>();
+
Map<CompactionServiceId,CompactionService> tmpServices = new HashMap<>();
currentCfg.planners.forEach((serviceName, plannerClassName) -> {
@@ -293,7 +309,8 @@ public class CompactionManager {
tmpServices.put(CompactionServiceId.of(serviceName),
new CompactionService(serviceName, plannerClassName,
currentCfg.getRateLimit(serviceName),
- currentCfg.options.getOrDefault(serviceName, Map.of()), ctx, ceMetrics));
+ currentCfg.options.getOrDefault(serviceName, Map.of()), ctx, ceMetrics,
+ this::getExternalExecutor));
} catch (RuntimeException e) {
log.error("Failed to create compaction service {} with planner:{} options:{}", serviceName,
plannerClassName, currentCfg.options.getOrDefault(serviceName, Map.of()));
@@ -331,7 +348,8 @@ public class CompactionManager {
tmpServices.put(csid,
new CompactionService(serviceName, plannerClassName,
tmpCfg.getRateLimit(serviceName),
- tmpCfg.options.getOrDefault(serviceName, Map.of()), ctx, ceMetrics));
+ tmpCfg.options.getOrDefault(serviceName, Map.of()), ctx, ceMetrics,
+ this::getExternalExecutor));
} else {
service.configurationChanged(plannerClassName, tmpCfg.getRateLimit(serviceName),
tmpCfg.options.getOrDefault(serviceName, Map.of()));
@@ -386,4 +404,41 @@ public class CompactionManager {
public int getCompactionsQueued() {
return services.values().stream().mapToInt(CompactionService::getCompactionsQueued).sum();
}
+
+ public ExternalCompactionJob reserveExternalCompaction(String queueName, long priority,
+ String compactorId) {
+ ExternalCompactionExecutor extCE = getExternalExecutor(queueName);
+ var ecJob = extCE.reserveExternalCompaction(priority, compactorId);
+ if (ecJob != null) {
+ runningExternalCompactions.put(ecJob.getExternalCompactionId(), ecJob.getExtent());
+ }
+ return ecJob;
+ }
+
+ ExternalCompactionExecutor getExternalExecutor(CompactionExecutorId ceid) {
+ return externalExecutors.computeIfAbsent(ceid, id -> new ExternalCompactionExecutor(id));
+ }
+
+ ExternalCompactionExecutor getExternalExecutor(String queueName) {
+ // TODO put prefix for external executor in one place
+ return getExternalExecutor(CompactionExecutorId.of("e." + queueName));
+ }
+
+ public void commitExternalCompaction(UUID extCompactionId, Map<KeyExtent,Tablet> currentTablets,
+ long fileSize, long entries) {
+ KeyExtent extent = runningExternalCompactions.get(extCompactionId);
+ if (extent != null) {
+ Tablet tablet = currentTablets.get(extent);
+ if (tablet != null) {
+ tablet.asCompactable().commitExternalCompaction(extCompactionId, fileSize, entries);
+ }
+ runningExternalCompactions.remove(extCompactionId);
+ }
+ }
+
+ public List<TCompactionQueueSummary> getCompactionQueueSummaries() {
+ // TODO Auto-generated method stub
+ return externalExecutors.values().stream().map(ece -> ece.summarize())
+ .collect(Collectors.toList());
+ }
}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionService.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionService.java
index 4df1c56..0a7246f 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionService.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionService.java
@@ -36,6 +36,7 @@ import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Consumer;
+import java.util.function.Function;
import org.apache.accumulo.core.client.admin.compaction.CompactableFile;
import org.apache.accumulo.core.conf.ConfigurationTypeHelper;
@@ -80,6 +81,7 @@ public class CompactionService {
private RateLimiter readLimiter;
private RateLimiter writeLimiter;
private AtomicLong rateLimit = new AtomicLong(0);
+ private Function<CompactionExecutorId,ExternalCompactionExecutor> externExecutorSupplier;
private static final Logger log = LoggerFactory.getLogger(CompactionService.class);
@@ -87,10 +89,12 @@ public class CompactionService {
private final Map<String,String> plannerOpts;
private final Map<CompactionExecutorId,Integer> requestedExecutors;
+ private final Set<CompactionExecutorId> requestedExternalExecutors;
CpInitParams(Map<String,String> plannerOpts) {
this.plannerOpts = plannerOpts;
this.requestedExecutors = new HashMap<>();
+ this.requestedExternalExecutors = new HashSet<>();
}
@Override
@@ -115,18 +119,27 @@ public class CompactionService {
public CompactionExecutorId createExecutor(String executorName, int threads) {
Preconditions.checkArgument(threads > 0, "Positive number of threads required : %s",
threads);
- var ceid = CompactionExecutorId.of(myId + "." + executorName);
+ var ceid = CompactionExecutorId.of("i." + myId + "." + executorName);
Preconditions.checkState(!requestedExecutors.containsKey(ceid));
requestedExecutors.put(ceid, threads);
return ceid;
}
+
+ @Override
+ public CompactionExecutorId getExternalExecutor(String name) {
+ var ceid = CompactionExecutorId.of("e." + name);
+ Preconditions.checkArgument(!requestedExternalExecutors.contains(ceid));
+ requestedExternalExecutors.add(ceid);
+ return ceid;
+ }
};
}
}
public CompactionService(String serviceName, String plannerClass, Long maxRate,
- Map<String,String> plannerOptions, ServerContext sctx, CompactionExecutorsMetrics ceMetrics) {
+ Map<String,String> plannerOptions, ServerContext sctx, CompactionExecutorsMetrics ceMetrics,
+ Function<CompactionExecutorId,ExternalCompactionExecutor> externExecutorSupplier) {
Preconditions.checkArgument(maxRate >= 0);
@@ -135,6 +148,7 @@ public class CompactionService {
this.plannerClassName = plannerClass;
this.plannerOpts = plannerOptions;
this.ceMetrics = ceMetrics;
+ this.externExecutorSupplier = externExecutorSupplier;
var initParams = new CpInitParams(plannerOpts);
planner = createPlanner(plannerClass);
@@ -144,6 +158,8 @@ public class CompactionService {
this.rateLimit.set(maxRate);
+ // TODO it may make sense to move the rate limit config to the planner and executors... it makes
+ // no sense at the service level for a mix of internal and external compactions
this.readLimiter = SharedRateLimiterFactory.getInstance(this.serverCtx.getConfiguration())
.create("CS_" + serviceName + "_read", () -> rateLimit.get());
this.writeLimiter = SharedRateLimiterFactory.getInstance(this.serverCtx.getConfiguration())
@@ -151,7 +167,11 @@ public class CompactionService {
initParams.requestedExecutors.forEach((ceid, numThreads) -> {
tmpExecutors.put(ceid,
- new CompactionExecutor(ceid, numThreads, ceMetrics, readLimiter, writeLimiter));
+ new InternalCompactionExecutor(ceid, numThreads, ceMetrics, readLimiter, writeLimiter));
+ });
+
+ initParams.requestedExternalExecutors.forEach((ceid) -> {
+ tmpExecutors.put(ceid, externExecutorSupplier.apply(ceid));
});
this.executors = Map.copyOf(tmpExecutors);
@@ -364,16 +384,26 @@ public class CompactionService {
Map<CompactionExecutorId,CompactionExecutor> tmpExecutors = new HashMap<>();
initParams.requestedExecutors.forEach((ceid, numThreads) -> {
- var executor = executors.get(ceid);
+ InternalCompactionExecutor executor = (InternalCompactionExecutor) executors.get(ceid);
if (executor == null) {
- executor = new CompactionExecutor(ceid, numThreads, ceMetrics, readLimiter, writeLimiter);
+ executor =
+ new InternalCompactionExecutor(ceid, numThreads, ceMetrics, readLimiter, writeLimiter);
} else {
executor.setThreads(numThreads);
}
tmpExecutors.put(ceid, executor);
});
+ initParams.requestedExternalExecutors.forEach(ceid -> {
+ ExternalCompactionExecutor executor = (ExternalCompactionExecutor) executors.get(ceid);
+ if (executor == null) {
+ executor = externExecutorSupplier.apply(ceid);
+ }
+ tmpExecutors.put(ceid, executor);
+ });
+
Sets.difference(executors.keySet(), tmpExecutors.keySet()).forEach(ceid -> {
+ // TODO may not make sense for external
executors.get(ceid).stop();
});
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionExecutor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionExecutor.java
new file mode 100644
index 0000000..ca680ba
--- /dev/null
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionExecutor.java
@@ -0,0 +1,132 @@
+package org.apache.accumulo.tserver.compactions;
+
+import java.util.concurrent.PriorityBlockingQueue;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+
+import org.apache.accumulo.core.spi.compaction.CompactionExecutorId;
+import org.apache.accumulo.core.spi.compaction.CompactionJob;
+import org.apache.accumulo.core.spi.compaction.CompactionServiceId;
+import org.apache.accumulo.core.tabletserver.thrift.TCompactionQueueSummary;
+import org.apache.accumulo.tserver.compactions.SubmittedJob.Status;
+
+public class ExternalCompactionExecutor implements CompactionExecutor {
+
+ private class ExternalJob extends SubmittedJob implements Comparable<ExternalJob> {
+ private AtomicReference<Status> status = new AtomicReference<>(Status.QUEUED);
+ private Compactable compactable;
+ private CompactionServiceId csid;
+ private Consumer<Compactable> completionCallback;
+ private final long queuedTime;
+
+ public ExternalJob(CompactionJob job, Compactable compactable, CompactionServiceId csid,
+ Consumer<Compactable> completionCallback) {
+ super(job);
+ this.compactable = compactable;
+ this.csid = csid;
+ this.completionCallback = completionCallback;
+ queuedTime = System.currentTimeMillis();
+ }
+
+ @Override
+ public Status getStatus() {
+ return status.get();
+ }
+
+ @Override
+ public boolean cancel(Status expectedStatus) {
+
+ boolean canceled = false;
+
+ if (expectedStatus == Status.QUEUED) {
+ canceled = status.compareAndSet(expectedStatus, Status.CANCELED);
+ }
+
+ return canceled;
+ }
+
+ @Override
+ public int compareTo(ExternalJob o) {
+ return Long.compare(o.getJob().getPriority(), getJob().getPriority());
+ }
+
+ }
+
+ private PriorityBlockingQueue<ExternalJob> queue;
+ private CompactionExecutorId ceid;
+
+ ExternalCompactionExecutor() {
+ queue = new PriorityBlockingQueue<ExternalJob>();
+ }
+
+ public ExternalCompactionExecutor(CompactionExecutorId ceid) {
+ this.ceid = ceid;
+ this.queue = new PriorityBlockingQueue<ExternalJob>();
+ }
+
+ @Override
+ public SubmittedJob submit(CompactionServiceId csid, CompactionJob job, Compactable compactable,
+ Consumer<Compactable> completionCallback) {
+ ExternalJob extJob = new ExternalJob(job, compactable, csid, completionCallback);
+ queue.add(extJob);
+ return extJob;
+ }
+
+ @Override
+ public int getCompactionsRunning() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int getCompactionsQueued() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public void stop() {
+ // TODO Auto-generated method stub
+
+ }
+
+ ExternalCompactionJob reserveExternalCompaction(long priority, String compactorId) {
+
+ ExternalJob extJob = queue.poll();
+ while (extJob.getStatus() != Status.QUEUED) {
+ extJob = queue.poll();
+ }
+
+ if (extJob.getJob().getPriority() >= priority) {
+ if (extJob.status.compareAndSet(Status.QUEUED, Status.RUNNING)) {
+ return extJob.compactable.reserveExternalCompaction(extJob.csid, extJob.getJob(),
+ compactorId);
+ } else {
+ // TODO try again
+ }
+ } else {
+ // TODO this messes with the ordering.. maybe make the comparator compare on time also
+ queue.add(extJob);
+ }
+
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ // TODO maybe create non-thrift type to avoid thrift types all over the code
+ public TCompactionQueueSummary summarize() {
+ // TODO maybe try to keep this precomputed to avoid looping over entire queue for each request
+ // TODO if count is not needed would not even need to loop over entire queue
+ // TODO cast to int is problematic
+ int count = (int) queue.stream().filter(extJob -> extJob.status.get() == Status.QUEUED).count();
+
+ // TODO is there a better way to get prio w/o looping over everything? seems a stream over the
+ // queue is not in particular order
+ long priority = queue.stream().filter(extJob -> extJob.status.get() == Status.QUEUED)
+ .mapToLong(extJob -> extJob.getJob().getPriority()).max().orElse(0);
+
+ // TODO put extraction of queue name in one place
+ return new TCompactionQueueSummary(ceid.canonical().substring(2), priority, count);
+ }
+
+}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionJob.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionJob.java
new file mode 100644
index 0000000..f7d8646
--- /dev/null
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionJob.java
@@ -0,0 +1,87 @@
+package org.apache.accumulo.tserver.compactions;
+
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.dataImpl.KeyExtent;
+import org.apache.accumulo.core.iteratorsImpl.system.SystemIteratorUtil;
+import org.apache.accumulo.core.metadata.StoredTabletFile;
+import org.apache.accumulo.core.metadata.TabletFile;
+import org.apache.accumulo.core.spi.compaction.CompactionKind;
+import org.apache.accumulo.core.tabletserver.thrift.CompactionReason;
+import org.apache.accumulo.core.tabletserver.thrift.CompactionType;
+import org.apache.accumulo.core.tabletserver.thrift.InputFile;
+import org.apache.accumulo.core.tabletserver.thrift.IteratorConfig;
+import org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob;
+
+public class ExternalCompactionJob {
+
+ private Set<StoredTabletFile> jobFiles;
+ private boolean propogateDeletes;
+ private TabletFile compactTmpName;
+ private KeyExtent extent;
+ private UUID externalCompactionId;
+ private long priority;
+ private CompactionKind kind;
+ private List<IteratorSetting> iters;
+
+ public ExternalCompactionJob(Set<StoredTabletFile> jobFiles, boolean propogateDeletes,
+ TabletFile compactTmpName, KeyExtent extent, UUID externalCompactionId, long priority,
+ CompactionKind kind, List<IteratorSetting> iters) {
+ this.jobFiles = jobFiles;
+ this.propogateDeletes = propogateDeletes;
+ this.compactTmpName = compactTmpName;
+ this.extent = extent;
+ this.externalCompactionId = externalCompactionId;
+ this.priority = priority;
+ this.kind = kind;
+ this.iters = iters;
+ }
+
+ public TExternalCompactionJob toThrift() {
+
+ // TODO read and write rate
+ int readRate = 0;
+ int writeRate = 0;
+
+ // TODO how are these two used?
+ CompactionType type = propogateDeletes ? CompactionType.MAJOR : CompactionType.FULL;
+ CompactionReason reason;
+ switch (kind) {
+ case USER:
+ reason = CompactionReason.USER;
+ break;
+ case CHOP:
+ reason = CompactionReason.CHOP;
+ break;
+ case SYSTEM:
+ case SELECTOR:
+ reason = CompactionReason.SYSTEM;
+ break;
+ default:
+ throw new IllegalStateException();
+ }
+
+ IteratorConfig iteratorSettings = SystemIteratorUtil.toIteratorConfig(iters);
+
+ // TODO what are things that are zeros below needed for
+ List<InputFile> files = jobFiles.stream().map(stf -> new InputFile(stf.getPathStr(), 0, 0, 0))
+ .collect(Collectors.toList());
+
+ // TODO priority cast and compactionId cast... compactionId could be null I think
+ return new TExternalCompactionJob(externalCompactionId.toString(), extent.toThrift(), files,
+ (int) priority, readRate, writeRate, iteratorSettings, type, reason,
+ compactTmpName.getPathStr(), propogateDeletes, null);
+ }
+
+ public UUID getExternalCompactionId() {
+ return externalCompactionId;
+ }
+
+ public KeyExtent getExtent() {
+ return extent;
+ }
+}
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/InternalCompactionExecutor.java
similarity index 93%
copy from server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java
copy to server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/InternalCompactionExecutor.java
index 2346cd8..ace93d8 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionExecutor.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/InternalCompactionExecutor.java
@@ -43,9 +43,9 @@ import org.slf4j.LoggerFactory;
import com.google.common.base.Preconditions;
-public class CompactionExecutor {
+public class InternalCompactionExecutor implements CompactionExecutor {
- private static final Logger log = LoggerFactory.getLogger(CompactionExecutor.class);
+ private static final Logger log = LoggerFactory.getLogger(InternalCompactionExecutor.class);
private PriorityBlockingQueue<Runnable> queue;
private final CompactionExecutorId ceid;
@@ -150,11 +150,11 @@ public class CompactionExecutor {
throw new IllegalArgumentException("Unknown runnable type " + r.getClass().getName());
}
- CompactionExecutor(CompactionExecutorId ceid, int threads, CompactionExecutorsMetrics ceMetrics,
- RateLimiter readLimiter, RateLimiter writeLimiter) {
+ InternalCompactionExecutor(CompactionExecutorId ceid, int threads,
+ CompactionExecutorsMetrics ceMetrics, RateLimiter readLimiter, RateLimiter writeLimiter) {
this.ceid = ceid;
- var comparator =
- Comparator.comparing(CompactionExecutor::getJob, CompactionJobPrioritizer.JOB_COMPARATOR);
+ var comparator = Comparator.comparing(InternalCompactionExecutor::getJob,
+ CompactionJobPrioritizer.JOB_COMPARATOR);
queue = new PriorityBlockingQueue<Runnable>(100, comparator);
@@ -170,6 +170,7 @@ public class CompactionExecutor {
log.debug("Created compaction executor {} with {} threads", ceid, threads);
}
+ @Override
public SubmittedJob submit(CompactionServiceId csid, CompactionJob job, Compactable compactable,
Consumer<Compactable> completionCallback) {
Preconditions.checkArgument(job.getExecutor().equals(ceid));
@@ -196,14 +197,17 @@ public class CompactionExecutor {
}
}
+ @Override
public int getCompactionsRunning() {
return threadPool.getActiveCount();
}
+ @Override
public int getCompactionsQueued() {
return queuedTask.size();
}
+ @Override
public void stop() {
threadPool.shutdownNow();
log.debug("Stopped compaction executor {}", ceid);
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
index cd6e373..687566a 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
@@ -30,6 +30,8 @@ import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.SortedMap;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Supplier;
@@ -46,6 +48,7 @@ import org.apache.accumulo.core.logging.TabletLogger;
import org.apache.accumulo.core.master.thrift.TabletLoadState;
import org.apache.accumulo.core.metadata.CompactableFileImpl;
import org.apache.accumulo.core.metadata.StoredTabletFile;
+import org.apache.accumulo.core.metadata.TabletFile;
import org.apache.accumulo.core.metadata.schema.DataFileValue;
import org.apache.accumulo.core.spi.common.ServiceEnvironment;
import org.apache.accumulo.core.spi.compaction.CompactionDispatcher.DispatchParameters;
@@ -61,7 +64,9 @@ import org.apache.accumulo.server.compaction.Compactor.CompactionCanceledExcepti
import org.apache.accumulo.server.util.MetadataTableUtil;
import org.apache.accumulo.tserver.compactions.Compactable;
import org.apache.accumulo.tserver.compactions.CompactionManager;
+import org.apache.accumulo.tserver.compactions.ExternalCompactionJob;
import org.apache.accumulo.tserver.managermessage.TabletStatusMessage;
+import org.apache.hadoop.fs.Path;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -540,29 +545,34 @@ public class CompactableImpl implements Compactable {
}
}
- @Override
- public void compact(CompactionServiceId service, CompactionJob job, RateLimiter readLimiter,
- RateLimiter writeLimiter, long queuedTime) {
-
- Set<StoredTabletFile> jobFiles = job.getFiles().stream()
- .map(cf -> ((CompactableFileImpl) cf).getStortedTabletFile()).collect(Collectors.toSet());
-
+ private static class CompactionInfo {
+ Set<StoredTabletFile> jobFiles;
Long compactionId = null;
Long checkCompactionId = null;
boolean propogateDeletes = true;
CompactionHelper localHelper;
List<IteratorSetting> iters = List.of();
CompactionConfig localCompactionCfg;
+ public TabletFile compactTmpName;
+ public CompactionJob job;
+ public TabletFile newFile;
+ }
+
+ private CompactionInfo reserveFilesForCompaction(CompactionServiceId service, CompactionJob job) {
+ CompactionInfo cInfo = new CompactionInfo();
+
+ Set<StoredTabletFile> jobFiles = job.getFiles().stream()
+ .map(cf -> ((CompactableFileImpl) cf).getStortedTabletFile()).collect(Collectors.toSet());
if (job.getKind() == CompactionKind.USER)
checkIfUserCompactionCanceled();
synchronized (this) {
if (closed)
- return;
+ return null;
if (!service.equals(getConfiguredService(job.getKind())))
- return;
+ return null;
switch (selectStatus) {
case NEW:
@@ -570,24 +580,24 @@ public class CompactableImpl implements Compactable {
log.trace(
"Ignoring compaction because files are being selected for user compaction {} {}",
getExtent(), job);
- return;
+ return null;
case SELECTED: {
if (job.getKind() == CompactionKind.USER || job.getKind() == CompactionKind.SELECTOR) {
if (selectKind == job.getKind()) {
if (!selectedFiles.containsAll(jobFiles)) {
log.error("Ignoring {} compaction that does not contain selected files {} {} {}",
job.getKind(), getExtent(), asFileNames(selectedFiles), asFileNames(jobFiles));
- return;
+ return null;
}
} else {
log.trace("Ingoring {} compaction because not selected kind {}", job.getKind(),
getExtent());
- return;
+ return null;
}
} else if (!Collections.disjoint(selectedFiles, jobFiles)) {
log.trace("Ingoring compaction that overlaps with selected files {} {} {}", getExtent(),
job.getKind(), asFileNames(Sets.intersection(selectedFiles, jobFiles)));
- return;
+ return null;
}
break;
}
@@ -596,7 +606,7 @@ public class CompactableImpl implements Compactable {
if (job.getKind() == CompactionKind.USER || job.getKind() == CompactionKind.SELECTOR) {
log.trace("Ignoring {} compaction because selectStatus is {} for {}", job.getKind(),
selectStatus, getExtent());
- return;
+ return null;
}
break;
}
@@ -608,7 +618,7 @@ public class CompactableImpl implements Compactable {
allCompactingFiles.addAll(jobFiles);
runnningJobs.add(job);
} else {
- return;
+ return null;
}
compactionRunning = !allCompactingFiles.isEmpty();
@@ -618,43 +628,80 @@ public class CompactableImpl implements Compactable {
case USER:
Preconditions.checkState(selectStatus == SpecialStatus.SELECTED);
if (job.getKind() == selectKind && selectedAll && jobFiles.containsAll(selectedFiles)) {
- propogateDeletes = false;
+ cInfo.propogateDeletes = false;
}
break;
default:
if (((CompactionJobImpl) job).selectedAll()) {
// At the time when the job was created all files were selected, so deletes can be
// dropped.
- propogateDeletes = false;
+ cInfo.propogateDeletes = false;
}
}
if (job.getKind() == CompactionKind.USER && selectKind == job.getKind()
&& selectedFiles.equals(jobFiles)) {
- compactionId = this.compactionId;
+ cInfo.compactionId = this.compactionId;
}
if (job.getKind() == CompactionKind.USER) {
- iters = compactionConfig.getIterators();
- checkCompactionId = this.compactionId;
+ cInfo.iters = compactionConfig.getIterators();
+ cInfo.checkCompactionId = this.compactionId;
}
- localHelper = this.chelper;
- localCompactionCfg = this.compactionConfig;
+ cInfo.localHelper = this.chelper;
+ cInfo.localCompactionCfg = this.compactionConfig;
}
+ return cInfo;
+ }
+
+ private void completeCompaction(CompactionJob job, Set<StoredTabletFile> jobFiles,
+ StoredTabletFile metaFile) {
+ synchronized (this) {
+ Preconditions.checkState(allCompactingFiles.removeAll(jobFiles));
+ Preconditions.checkState(runnningJobs.remove(job));
+ compactionRunning = !allCompactingFiles.isEmpty();
+
+ if (allCompactingFiles.isEmpty()) {
+ notifyAll();
+ }
+
+ if (metaFile != null) {
+ choppedFiles.add(metaFile);
+ }
+ }
+
+ checkifChopComplete(tablet.getDatafiles().keySet());
+
+ if ((job.getKind() == CompactionKind.USER || job.getKind() == CompactionKind.SELECTOR)
+ && metaFile != null)
+ selectedCompactionCompleted(job, jobFiles, metaFile);
+ else
+ selectFiles();
+ }
+
+ @Override
+ public void compact(CompactionServiceId service, CompactionJob job, RateLimiter readLimiter,
+ RateLimiter writeLimiter, long queuedTime) {
+
+ CompactionInfo cInfo = reserveFilesForCompaction(service, job);
+ if (cInfo == null)
+ return;
+
StoredTabletFile metaFile = null;
long startTime = System.currentTimeMillis();
// create an empty stats object to be populated by CompactableUtils.compact()
CompactionStats stats = new CompactionStats();
try {
- TabletLogger.compacting(getExtent(), job, localCompactionCfg);
+ TabletLogger.compacting(getExtent(), job, cInfo.localCompactionCfg);
tablet.incrementStatusMajor();
- metaFile = CompactableUtils.compact(tablet, job, jobFiles, compactionId, propogateDeletes,
- localHelper, iters, new CompactionCheck(service, job.getKind(), checkCompactionId),
- readLimiter, writeLimiter, stats);
+ metaFile = CompactableUtils.compact(tablet, job, cInfo.jobFiles, cInfo.compactionId,
+ cInfo.propogateDeletes, cInfo.localHelper, cInfo.iters,
+ new CompactionCheck(service, job.getKind(), cInfo.checkCompactionId), readLimiter,
+ writeLimiter, stats);
TabletLogger.compacted(getExtent(), job, metaFile);
@@ -665,29 +712,64 @@ public class CompactableImpl implements Compactable {
metaFile = null;
throw new RuntimeException(e);
} finally {
- synchronized (this) {
- Preconditions.checkState(allCompactingFiles.removeAll(jobFiles));
- Preconditions.checkState(runnningJobs.remove(job));
- compactionRunning = !allCompactingFiles.isEmpty();
+ completeCompaction(job, cInfo.jobFiles, metaFile);
+ // TODO should this be in completeCompaction
+ tablet.updateTimer(MAJOR, queuedTime, startTime, stats.getEntriesRead(), metaFile == null);
+ }
+ }
- if (allCompactingFiles.isEmpty()) {
- notifyAll();
- }
+ // TODO move to top of class
+ private Map<UUID,CompactionInfo> externalCompactions = new ConcurrentHashMap<>();
- if (metaFile != null) {
- choppedFiles.add(metaFile);
- }
- }
+ @Override
+ public ExternalCompactionJob reserveExternalCompaction(CompactionServiceId service,
+ CompactionJob job, String compactorId) {
- checkifChopComplete(tablet.getDatafiles().keySet());
+ CompactionInfo cInfo = reserveFilesForCompaction(service, job);
+ if (cInfo == null)
+ return null;
- if ((job.getKind() == CompactionKind.USER || job.getKind() == CompactionKind.SELECTOR)
- && metaFile != null)
- selectedCompactionCompleted(job, jobFiles, metaFile);
- else
- selectFiles();
+ // TODO add external compaction info to metadata table
+ try {
+ // TODO share code w/ CompactableUtil and/or move there
+ cInfo.newFile = tablet.getNextMapFilename(!cInfo.propogateDeletes ? "A" : "C");
+ cInfo.compactTmpName = new TabletFile(new Path(cInfo.newFile.getMetaInsert() + "_tmp"));
- tablet.updateTimer(MAJOR, queuedTime, startTime, stats.getEntriesRead(), metaFile == null);
+ UUID externalCompactionId = UUID.randomUUID();
+
+ cInfo.job = job;
+
+ externalCompactions.put(externalCompactionId, cInfo);
+
+ // TODO because this is an RPC the return may never get to the caller... however the caller
+ // may be alive.... maybe the caller can set the externalCompactionId it working on in ZK
+ return new ExternalCompactionJob(cInfo.jobFiles, cInfo.propogateDeletes, cInfo.compactTmpName,
+ getExtent(), externalCompactionId, job.getPriority(), job.getKind(), cInfo.iters);
+
+ } catch (Exception e) {
+ // TODO unreserve files for compaction!
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
+ public void commitExternalCompaction(UUID extCompactionId, long fileSize, long entries) {
+ // TODO double check w/ java docs that only one thread can remove
+ CompactionInfo cInfo = externalCompactions.remove(extCompactionId);
+
+ if (cInfo != null) {
+ // TODO do a sanity check that files exists in dfs?
+ StoredTabletFile metaFile = null;
+ try {
+ metaFile = tablet.getDatafileManager().bringMajorCompactionOnline(cInfo.jobFiles,
+ cInfo.compactTmpName, cInfo.newFile, compactionId,
+ new DataFileValue(fileSize, entries));
+ } catch (Exception e) {
+ metaFile = null;
+ throw new RuntimeException(e);
+ } finally {
+ completeCompaction(cInfo.job, cInfo.jobFiles, metaFile);
+ }
}
}
diff --git a/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java b/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java
index a6ad15f..26f108a 100644
--- a/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java
+++ b/test/src/main/java/org/apache/accumulo/test/performance/NullTserver.java
@@ -30,6 +30,7 @@ import java.util.concurrent.TimeUnit;
import org.apache.accumulo.core.cli.Help;
import org.apache.accumulo.core.clientImpl.Tables;
+import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException;
import org.apache.accumulo.core.conf.DefaultConfiguration;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.conf.SiteConfiguration;
@@ -61,7 +62,9 @@ import org.apache.accumulo.core.metadata.schema.Ample.DataLevel;
import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
import org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction;
import org.apache.accumulo.core.tabletserver.thrift.ActiveScan;
+import org.apache.accumulo.core.tabletserver.thrift.TCompactionQueueSummary;
import org.apache.accumulo.core.tabletserver.thrift.TDurability;
+import org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob;
import org.apache.accumulo.core.tabletserver.thrift.TSamplerConfiguration;
import org.apache.accumulo.core.tabletserver.thrift.TUnloadTabletGoal;
import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
@@ -80,6 +83,7 @@ import org.apache.accumulo.server.metrics.Metrics;
import org.apache.accumulo.server.rpc.TServerUtils;
import org.apache.accumulo.server.rpc.ThriftServerType;
import org.apache.accumulo.server.zookeeper.TransactionWatcher;
+import org.apache.thrift.TException;
import com.beust.jcommander.Parameter;
@@ -276,6 +280,29 @@ public class NullTserver {
public TSummaries contiuneGetSummaries(TInfo tinfo, long sessionId) {
return null;
}
+
+ @Override
+ public List<TCompactionQueueSummary> getCompactionQueueInfo(TInfo tinfo,
+ TCredentials credentials) throws ThriftSecurityException, TException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public TExternalCompactionJob reserveCompactionJob(TInfo tinfo, TCredentials credentials,
+ String queueName, long priority, String compactor)
+ throws ThriftSecurityException, TException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void compactionJobFinished(TInfo tinfo, TCredentials credentials,
+ String externalCompactionId, long fileSize, long entries)
+ throws ThriftSecurityException, TException {
+ // TODO Auto-generated method stub
+
+ }
}
static class Opts extends Help {