This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 4db7170c44 removes coordinator RPC to obtain running cache (#6242)
4db7170c44 is described below
commit 4db7170c44b9d2145276026932760257189ae4b6
Author: Keith Turner <[email protected]>
AuthorDate: Wed Mar 25 10:41:09 2026 -0700
removes coordinator RPC to obtain running cache (#6242)
Modified code that used this RPC to get the same information directly
from compactors instead. Making this change in support of #6217
---
.../thrift/CompactionCoordinatorService.java | 1275 --------------------
core/src/main/thrift/compaction-coordinator.thrift | 10 -
.../accumulo/server/util/ListCompactions.java | 19 +-
.../coordinator/CompactionCoordinator.java | 25 -
.../apache/accumulo/test/ListCompactionsIT.java | 21 +-
.../compaction/ExternalCompactionProgressIT.java | 13 +-
.../compaction/ExternalCompactionTestUtils.java | 36 +-
.../test/compaction/ExternalCompaction_3_IT.java | 9 +-
.../test/functional/GracefulShutdownIT.java | 8 +-
9 files changed, 30 insertions(+), 1386 deletions(-)
diff --git
a/core/src/main/thrift-gen-java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinatorService.java
b/core/src/main/thrift-gen-java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinatorService.java
index 5117723ee0..cf40536be8 100644
---
a/core/src/main/thrift-gen-java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinatorService.java
+++
b/core/src/main/thrift-gen-java/org/apache/accumulo/core/compaction/thrift/CompactionCoordinatorService.java
@@ -37,8 +37,6 @@ public class CompactionCoordinatorService {
public void
compactionFailed(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
java.lang.String externalCompactionId,
org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent, java.lang.String
exceptionClassName, TCompactionState failureState, java.lang.String groupName,
java.lang.String compactor) throws
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException,
org.apache.accumulo.core.clientImp [...]
- public TExternalCompactionMap
getRunningCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException,
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException,
org.apache.thrift.TException;
-
public void
recordCompletion(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
java.lang.String externalCompactionId) throws org.apache.thrift.TException;
}
@@ -53,8 +51,6 @@ public class CompactionCoordinatorService {
public void
compactionFailed(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
java.lang.String externalCompactionId,
org.apache.accumulo.core.dataImpl.thrift.TKeyExtent extent, java.lang.String
exceptionClassName, TCompactionState failureState, java.lang.String groupName,
java.lang.String compactor, org.apache.thrift.async.AsyncMethodCallback<Void>
resultHandler) throws org.apache.thrift.TException;
- public void
getRunningCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionMap>
resultHandler) throws org.apache.thrift.TException;
-
public void
recordCompletion(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
java.lang.String externalCompactionId,
org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws
org.apache.thrift.TException;
}
@@ -213,37 +209,6 @@ public class CompactionCoordinatorService {
return;
}
- @Override
- public TExternalCompactionMap
getRunningCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException,
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException,
org.apache.thrift.TException
- {
- send_getRunningCompactions(tinfo, credentials);
- return recv_getRunningCompactions();
- }
-
- public void
send_getRunningCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo
tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials)
throws org.apache.thrift.TException
- {
- getRunningCompactions_args args = new getRunningCompactions_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- sendBase("getRunningCompactions", args);
- }
-
- public TExternalCompactionMap recv_getRunningCompactions() throws
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException,
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException,
org.apache.thrift.TException
- {
- getRunningCompactions_result result = new getRunningCompactions_result();
- receiveBase(result, "getRunningCompactions");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.sec != null) {
- throw result.sec;
- }
- if (result.tnase != null) {
- throw result.tnase;
- }
- throw new
org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT,
"getRunningCompactions failed: unknown result");
- }
-
@Override
public void
recordCompletion(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
java.lang.String externalCompactionId) throws org.apache.thrift.TException
{
@@ -484,44 +449,6 @@ public class CompactionCoordinatorService {
}
}
- @Override
- public void
getRunningCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionMap>
resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getRunningCompactions_call method_call = new
getRunningCompactions_call(tinfo, credentials, resultHandler, this,
___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getRunningCompactions_call extends
org.apache.thrift.async.TAsyncMethodCall<TExternalCompactionMap> {
- private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo;
- private org.apache.accumulo.core.securityImpl.thrift.TCredentials
credentials;
- public
getRunningCompactions_call(org.apache.accumulo.core.clientImpl.thrift.TInfo
tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionMap>
resultHandler, org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.TNonblockingTransport transport) throws
org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.tinfo = tinfo;
- this.credentials = credentials;
- }
-
- @Override
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws
org.apache.thrift.TException {
- prot.writeMessageBegin(new
org.apache.thrift.protocol.TMessage("getRunningCompactions",
org.apache.thrift.protocol.TMessageType.CALL, 0));
- getRunningCompactions_args args = new getRunningCompactions_args();
- args.setTinfo(tinfo);
- args.setCredentials(credentials);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- @Override
- public TExternalCompactionMap getResult() throws
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException,
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException,
org.apache.thrift.TException {
- if (getState() !=
org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new java.lang.IllegalStateException("Method call not
finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot =
client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_getRunningCompactions();
- }
- }
-
@Override
public void
recordCompletion(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
java.lang.String externalCompactionId,
org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws
org.apache.thrift.TException {
checkReady();
@@ -580,7 +507,6 @@ public class CompactionCoordinatorService {
processMap.put("getCompactionJob", new getCompactionJob());
processMap.put("updateCompactionStatus", new updateCompactionStatus());
processMap.put("compactionFailed", new compactionFailed());
- processMap.put("getRunningCompactions", new getRunningCompactions());
processMap.put("recordCompletion", new recordCompletion());
return processMap;
}
@@ -721,40 +647,6 @@ public class CompactionCoordinatorService {
}
}
- public static class getRunningCompactions<I extends Iface> extends
org.apache.thrift.ProcessFunction<I, getRunningCompactions_args> {
- public getRunningCompactions() {
- super("getRunningCompactions");
- }
-
- @Override
- public getRunningCompactions_args getEmptyArgsInstance() {
- return new getRunningCompactions_args();
- }
-
- @Override
- protected boolean isOneway() {
- return false;
- }
-
- @Override
- protected boolean rethrowUnhandledExceptions() {
- return false;
- }
-
- @Override
- public getRunningCompactions_result getResult(I iface,
getRunningCompactions_args args) throws org.apache.thrift.TException {
- getRunningCompactions_result result = new
getRunningCompactions_result();
- try {
- result.success = iface.getRunningCompactions(args.tinfo,
args.credentials);
- } catch
(org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
- result.sec = sec;
- } catch
(org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException
tnase) {
- result.tnase = tnase;
- }
- return result;
- }
- }
-
public static class recordCompletion<I extends Iface> extends
org.apache.thrift.ProcessFunction<I, recordCompletion_args> {
public recordCompletion() {
super("recordCompletion");
@@ -799,7 +691,6 @@ public class CompactionCoordinatorService {
processMap.put("getCompactionJob", new getCompactionJob());
processMap.put("updateCompactionStatus", new updateCompactionStatus());
processMap.put("compactionFailed", new compactionFailed());
- processMap.put("getRunningCompactions", new getRunningCompactions());
processMap.put("recordCompletion", new recordCompletion());
return processMap;
}
@@ -1101,81 +992,6 @@ public class CompactionCoordinatorService {
}
}
- public static class getRunningCompactions<I extends AsyncIface> extends
org.apache.thrift.AsyncProcessFunction<I, getRunningCompactions_args,
TExternalCompactionMap> {
- public getRunningCompactions() {
- super("getRunningCompactions");
- }
-
- @Override
- public getRunningCompactions_args getEmptyArgsInstance() {
- return new getRunningCompactions_args();
- }
-
- @Override
- public
org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionMap>
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<TExternalCompactionMap>() {
- @Override
- public void onComplete(TExternalCompactionMap o) {
- getRunningCompactions_result result = new
getRunningCompactions_result();
- result.success = o;
- try {
- fcall.sendResponse(fb, result,
org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- } catch (org.apache.thrift.transport.TTransportException e) {
- _LOGGER.error("TTransportException writing to internal frame
buffer", e);
- fb.close();
- } catch (java.lang.Exception e) {
- _LOGGER.error("Exception writing to internal frame buffer", e);
- onError(e);
- }
- }
- @Override
- public void onError(java.lang.Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TSerializable msg;
- getRunningCompactions_result result = new
getRunningCompactions_result();
- if (e instanceof
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) {
- result.sec =
(org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) e;
- result.setSecIsSet(true);
- msg = result;
- } else if (e instanceof
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException) {
- result.tnase =
(org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException) e;
- result.setTnaseIsSet(true);
- msg = result;
- } else if (e instanceof
org.apache.thrift.transport.TTransportException) {
- _LOGGER.error("TTransportException inside handler", e);
- fb.close();
- return;
- } else if (e instanceof org.apache.thrift.TApplicationException) {
- _LOGGER.error("TApplicationException inside handler", e);
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TApplicationException)e;
- } else {
- _LOGGER.error("Exception inside handler", e);
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = new
org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR,
e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- } catch (java.lang.Exception ex) {
- _LOGGER.error("Exception writing to internal frame buffer", ex);
- fb.close();
- }
- }
- };
- }
-
- @Override
- protected boolean isOneway() {
- return false;
- }
-
- @Override
- public void start(I iface, getRunningCompactions_args args,
org.apache.thrift.async.AsyncMethodCallback<TExternalCompactionMap>
resultHandler) throws org.apache.thrift.TException {
- iface.getRunningCompactions(args.tinfo,
args.credentials,resultHandler);
- }
- }
-
public static class recordCompletion<I extends AsyncIface> extends
org.apache.thrift.AsyncProcessFunction<I, recordCompletion_args, Void> {
public recordCompletion() {
super("recordCompletion");
@@ -7068,1097 +6884,6 @@ public class CompactionCoordinatorService {
}
}
- @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
- public static class getRunningCompactions_args implements
org.apache.thrift.TBase<getRunningCompactions_args,
getRunningCompactions_args._Fields>, java.io.Serializable, Cloneable,
Comparable<getRunningCompactions_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("getRunningCompactions_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 getRunningCompactions_argsStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new getRunningCompactions_argsTupleSchemeFactory();
-
- public @org.apache.thrift.annotation.Nullable
org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
- public @org.apache.thrift.annotation.Nullable
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; //
required
-
- /** The set of fields this struct contains, along with convenience methods
for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TINFO((short)1, "tinfo"),
- CREDENTIALS((short)2, "credentials");
-
- private static final java.util.Map<java.lang.String, _Fields> byName =
new java.util.HashMap<java.lang.String, _Fields>();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not
found.
- */
- @org.apache.thrift.annotation.Nullable
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TINFO
- return TINFO;
- case 2: // CREDENTIALS
- return CREDENTIALS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new
java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- @org.apache.thrift.annotation.Nullable
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- @Override
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- @Override
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields,
org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap
= new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TINFO, new
org.apache.thrift.meta_data.FieldMetaData("tinfo",
org.apache.thrift.TFieldRequirementType.DEFAULT,
- new
org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
org.apache.accumulo.core.clientImpl.thrift.TInfo.class)));
- tmpMap.put(_Fields.CREDENTIALS, new
org.apache.thrift.meta_data.FieldMetaData("credentials",
org.apache.thrift.TFieldRequirementType.DEFAULT,
- new
org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
org.apache.accumulo.core.securityImpl.thrift.TCredentials.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRunningCompactions_args.class,
metaDataMap);
- }
-
- public getRunningCompactions_args() {
- }
-
- public getRunningCompactions_args(
- org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
- org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials)
- {
- this();
- this.tinfo = tinfo;
- this.credentials = credentials;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getRunningCompactions_args(getRunningCompactions_args other) {
- if (other.isSetTinfo()) {
- this.tinfo = new
org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
- }
- if (other.isSetCredentials()) {
- this.credentials = new
org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
- }
- }
-
- @Override
- public getRunningCompactions_args deepCopy() {
- return new getRunningCompactions_args(this);
- }
-
- @Override
- public void clear() {
- this.tinfo = null;
- this.credentials = null;
- }
-
- @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() {
- return this.tinfo;
- }
-
- public getRunningCompactions_args
setTinfo(@org.apache.thrift.annotation.Nullable
org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) {
- this.tinfo = tinfo;
- return this;
- }
-
- public void unsetTinfo() {
- this.tinfo = null;
- }
-
- /** Returns true if field tinfo is set (has been assigned a value) and
false otherwise */
- public boolean isSetTinfo() {
- return this.tinfo != null;
- }
-
- public void setTinfoIsSet(boolean value) {
- if (!value) {
- this.tinfo = null;
- }
- }
-
- @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.securityImpl.thrift.TCredentials
getCredentials() {
- return this.credentials;
- }
-
- public getRunningCompactions_args
setCredentials(@org.apache.thrift.annotation.Nullable
org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
- this.credentials = credentials;
- return this;
- }
-
- public void unsetCredentials() {
- this.credentials = null;
- }
-
- /** Returns true if field credentials is set (has been assigned a value)
and false otherwise */
- public boolean isSetCredentials() {
- return this.credentials != null;
- }
-
- public void setCredentialsIsSet(boolean value) {
- if (!value) {
- this.credentials = null;
- }
- }
-
- @Override
- public void setFieldValue(_Fields field,
@org.apache.thrift.annotation.Nullable java.lang.Object value) {
- switch (field) {
- case TINFO:
- if (value == null) {
- unsetTinfo();
- } else {
- setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value);
- }
- break;
-
- case CREDENTIALS:
- if (value == null) {
- unsetCredentials();
- } else {
-
setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
- }
- break;
-
- }
- }
-
- @org.apache.thrift.annotation.Nullable
- @Override
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case TINFO:
- return getTinfo();
-
- case CREDENTIALS:
- return getCredentials();
-
- }
- throw new java.lang.IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been
assigned a value) and false otherwise */
- @Override
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case TINFO:
- return isSetTinfo();
- case CREDENTIALS:
- return isSetCredentials();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that instanceof getRunningCompactions_args)
- return this.equals((getRunningCompactions_args)that);
- return false;
- }
-
- public boolean equals(getRunningCompactions_args that) {
- if (that == null)
- return false;
- if (this == that)
- return true;
-
- boolean this_present_tinfo = true && this.isSetTinfo();
- boolean that_present_tinfo = true && that.isSetTinfo();
- if (this_present_tinfo || that_present_tinfo) {
- if (!(this_present_tinfo && that_present_tinfo))
- return false;
- if (!this.tinfo.equals(that.tinfo))
- return false;
- }
-
- boolean this_present_credentials = true && this.isSetCredentials();
- boolean that_present_credentials = true && that.isSetCredentials();
- if (this_present_credentials || that_present_credentials) {
- if (!(this_present_credentials && that_present_credentials))
- return false;
- if (!this.credentials.equals(that.credentials))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
- if (isSetTinfo())
- hashCode = hashCode * 8191 + tinfo.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
- if (isSetCredentials())
- hashCode = hashCode * 8191 + credentials.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(getRunningCompactions_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.compare(isSetTinfo(),
other.isSetTinfo());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTinfo()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo,
other.tinfo);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.compare(isSetCredentials(),
other.isSetCredentials());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCredentials()) {
- lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- @org.apache.thrift.annotation.Nullable
- @Override
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws
org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws
org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new
java.lang.StringBuilder("getRunningCompactions_args(");
- boolean first = true;
-
- sb.append("tinfo:");
- if (this.tinfo == null) {
- sb.append("null");
- } else {
- sb.append(this.tinfo);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("credentials:");
- if (this.credentials == null) {
- sb.append("null");
- } else {
- sb.append(this.credentials);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (tinfo != null) {
- tinfo.validate();
- }
- if (credentials != null) {
- credentials.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws
java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new
org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws
java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new
org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getRunningCompactions_argsStandardSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
- @Override
- public getRunningCompactions_argsStandardScheme getScheme() {
- return new getRunningCompactions_argsStandardScheme();
- }
- }
-
- private static class getRunningCompactions_argsStandardScheme extends
org.apache.thrift.scheme.StandardScheme<getRunningCompactions_args> {
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol iprot,
getRunningCompactions_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TINFO
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT)
{
- struct.tinfo = new
org.apache.accumulo.core.clientImpl.thrift.TInfo();
- struct.tinfo.read(iprot);
- struct.setTinfoIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
- }
- break;
- case 2: // CREDENTIALS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT)
{
- struct.credentials = new
org.apache.accumulo.core.securityImpl.thrift.TCredentials();
- struct.credentials.read(iprot);
- struct.setCredentialsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked
in the validate method
- struct.validate();
- }
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol oprot,
getRunningCompactions_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.tinfo != null) {
- oprot.writeFieldBegin(TINFO_FIELD_DESC);
- struct.tinfo.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.credentials != null) {
- oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
- struct.credentials.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getRunningCompactions_argsTupleSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
- @Override
- public getRunningCompactions_argsTupleScheme getScheme() {
- return new getRunningCompactions_argsTupleScheme();
- }
- }
-
- private static class getRunningCompactions_argsTupleScheme extends
org.apache.thrift.scheme.TupleScheme<getRunningCompactions_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot,
getRunningCompactions_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,
getRunningCompactions_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.tinfo = new
org.apache.accumulo.core.clientImpl.thrift.TInfo();
- struct.tinfo.read(iprot);
- struct.setTinfoIsSet(true);
- }
- if (incoming.get(1)) {
- struct.credentials = new
org.apache.accumulo.core.securityImpl.thrift.TCredentials();
- struct.credentials.read(iprot);
- struct.setCredentialsIsSet(true);
- }
- }
- }
-
- private static <S extends org.apache.thrift.scheme.IScheme> S
scheme(org.apache.thrift.protocol.TProtocol proto) {
- return
(org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ?
STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
- }
- }
-
- @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
- public static class getRunningCompactions_result implements
org.apache.thrift.TBase<getRunningCompactions_result,
getRunningCompactions_result._Fields>, java.io.Serializable, Cloneable,
Comparable<getRunningCompactions_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("getRunningCompactions_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.protocol.TField TNASE_FIELD_DESC =
new org.apache.thrift.protocol.TField("tnase",
org.apache.thrift.protocol.TType.STRUCT, (short)2);
-
- private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new
getRunningCompactions_resultStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new getRunningCompactions_resultTupleSchemeFactory();
-
- public @org.apache.thrift.annotation.Nullable TExternalCompactionMap
success; // required
- public @org.apache.thrift.annotation.Nullable
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec; //
required
- public @org.apache.thrift.annotation.Nullable
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException
tnase; // required
-
- /** The set of fields this struct contains, along with convenience methods
for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
- SEC((short)1, "sec"),
- TNASE((short)2, "tnase");
-
- private static final java.util.Map<java.lang.String, _Fields> byName =
new java.util.HashMap<java.lang.String, _Fields>();
-
- static {
- for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not
found.
- */
- @org.apache.thrift.annotation.Nullable
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // SEC
- return SEC;
- case 2: // TNASE
- return TNASE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new
java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- @org.apache.thrift.annotation.Nullable
- public static _Fields findByName(java.lang.String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final java.lang.String _fieldName;
-
- _Fields(short thriftId, java.lang.String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- @Override
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- @Override
- public java.lang.String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final java.util.Map<_Fields,
org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap
= new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new
org.apache.thrift.meta_data.FieldMetaData("success",
org.apache.thrift.TFieldRequirementType.DEFAULT,
- new
org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
TExternalCompactionMap.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)));
- tmpMap.put(_Fields.TNASE, new
org.apache.thrift.meta_data.FieldMetaData("tnase",
org.apache.thrift.TFieldRequirementType.DEFAULT,
- new
org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException.class)));
- metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRunningCompactions_result.class,
metaDataMap);
- }
-
- public getRunningCompactions_result() {
- }
-
- public getRunningCompactions_result(
- TExternalCompactionMap success,
- org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec,
-
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException
tnase)
- {
- this();
- this.success = success;
- this.sec = sec;
- this.tnase = tnase;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getRunningCompactions_result(getRunningCompactions_result other) {
- if (other.isSetSuccess()) {
- this.success = new TExternalCompactionMap(other.success);
- }
- if (other.isSetSec()) {
- this.sec = new
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
- }
- if (other.isSetTnase()) {
- this.tnase = new
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException(other.tnase);
- }
- }
-
- @Override
- public getRunningCompactions_result deepCopy() {
- return new getRunningCompactions_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- this.sec = null;
- this.tnase = null;
- }
-
- @org.apache.thrift.annotation.Nullable
- public TExternalCompactionMap getSuccess() {
- return this.success;
- }
-
- public getRunningCompactions_result
setSuccess(@org.apache.thrift.annotation.Nullable TExternalCompactionMap
success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and
false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- @org.apache.thrift.annotation.Nullable
- public org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException
getSec() {
- return this.sec;
- }
-
- public getRunningCompactions_result
setSec(@org.apache.thrift.annotation.Nullable
org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
- this.sec = sec;
- return this;
- }
-
- public void unsetSec() {
- this.sec = null;
- }
-
- /** Returns true if field sec is set (has been assigned a value) and false
otherwise */
- public boolean isSetSec() {
- return this.sec != null;
- }
-
- public void setSecIsSet(boolean value) {
- if (!value) {
- this.sec = null;
- }
- }
-
- @org.apache.thrift.annotation.Nullable
- public
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException
getTnase() {
- return this.tnase;
- }
-
- public getRunningCompactions_result
setTnase(@org.apache.thrift.annotation.Nullable
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException
tnase) {
- this.tnase = tnase;
- return this;
- }
-
- public void unsetTnase() {
- this.tnase = null;
- }
-
- /** Returns true if field tnase is set (has been assigned a value) and
false otherwise */
- public boolean isSetTnase() {
- return this.tnase != null;
- }
-
- public void setTnaseIsSet(boolean value) {
- if (!value) {
- this.tnase = null;
- }
- }
-
- @Override
- public void setFieldValue(_Fields field,
@org.apache.thrift.annotation.Nullable java.lang.Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((TExternalCompactionMap)value);
- }
- break;
-
- case SEC:
- if (value == null) {
- unsetSec();
- } else {
-
setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
- }
- break;
-
- case TNASE:
- if (value == null) {
- unsetTnase();
- } else {
-
setTnase((org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException)value);
- }
- break;
-
- }
- }
-
- @org.apache.thrift.annotation.Nullable
- @Override
- public java.lang.Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- case SEC:
- return getSec();
-
- case TNASE:
- return getTnase();
-
- }
- throw new java.lang.IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been
assigned a value) and false otherwise */
- @Override
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new java.lang.IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case SEC:
- return isSetSec();
- case TNASE:
- return isSetTnase();
- }
- throw new java.lang.IllegalStateException();
- }
-
- @Override
- public boolean equals(java.lang.Object that) {
- if (that instanceof getRunningCompactions_result)
- return this.equals((getRunningCompactions_result)that);
- return false;
- }
-
- public boolean equals(getRunningCompactions_result that) {
- if (that == null)
- return false;
- if (this == that)
- return true;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- boolean this_present_sec = true && this.isSetSec();
- boolean that_present_sec = true && that.isSetSec();
- if (this_present_sec || that_present_sec) {
- if (!(this_present_sec && that_present_sec))
- return false;
- if (!this.sec.equals(that.sec))
- return false;
- }
-
- boolean this_present_tnase = true && this.isSetTnase();
- boolean that_present_tnase = true && that.isSetTnase();
- if (this_present_tnase || that_present_tnase) {
- if (!(this_present_tnase && that_present_tnase))
- return false;
- if (!this.tnase.equals(that.tnase))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 1;
-
- hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
- if (isSetSuccess())
- hashCode = hashCode * 8191 + success.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
- if (isSetSec())
- hashCode = hashCode * 8191 + sec.hashCode();
-
- hashCode = hashCode * 8191 + ((isSetTnase()) ? 131071 : 524287);
- if (isSetTnase())
- hashCode = hashCode * 8191 + tnase.hashCode();
-
- return hashCode;
- }
-
- @Override
- public int compareTo(getRunningCompactions_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = java.lang.Boolean.compare(isSetSuccess(),
other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success,
other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSec()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec,
other.sec);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = java.lang.Boolean.compare(isSetTnase(),
other.isSetTnase());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTnase()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tnase,
other.tnase);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- @org.apache.thrift.annotation.Nullable
- @Override
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws
org.apache.thrift.TException {
- scheme(iprot).read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws
org.apache.thrift.TException {
- scheme(oprot).write(oprot, this);
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder sb = new
java.lang.StringBuilder("getRunningCompactions_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("sec:");
- if (this.sec == null) {
- sb.append("null");
- } else {
- sb.append(this.sec);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("tnase:");
- if (this.tnase == null) {
- sb.append("null");
- } else {
- sb.append(this.tnase);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws
java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new
org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws
java.io.IOException, java.lang.ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new
org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getRunningCompactions_resultStandardSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
- @Override
- public getRunningCompactions_resultStandardScheme getScheme() {
- return new getRunningCompactions_resultStandardScheme();
- }
- }
-
- private static class getRunningCompactions_resultStandardScheme extends
org.apache.thrift.scheme.StandardScheme<getRunningCompactions_result> {
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol iprot,
getRunningCompactions_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT)
{
- struct.success = new TExternalCompactionMap();
- 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;
- case 2: // TNASE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT)
{
- struct.tnase = new
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException();
- struct.tnase.read(iprot);
- struct.setTnaseIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked
in the validate method
- struct.validate();
- }
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol oprot,
getRunningCompactions_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.sec != null) {
- oprot.writeFieldBegin(SEC_FIELD_DESC);
- struct.sec.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.tnase != null) {
- oprot.writeFieldBegin(TNASE_FIELD_DESC);
- struct.tnase.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getRunningCompactions_resultTupleSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
- @Override
- public getRunningCompactions_resultTupleScheme getScheme() {
- return new getRunningCompactions_resultTupleScheme();
- }
- }
-
- private static class getRunningCompactions_resultTupleScheme extends
org.apache.thrift.scheme.TupleScheme<getRunningCompactions_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot,
getRunningCompactions_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet optionals = new java.util.BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetSec()) {
- optionals.set(1);
- }
- if (struct.isSetTnase()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- if (struct.isSetSec()) {
- struct.sec.write(oprot);
- }
- if (struct.isSetTnase()) {
- struct.tnase.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot,
getRunningCompactions_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.success = new TExternalCompactionMap();
- 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);
- }
- if (incoming.get(2)) {
- struct.tnase = new
org.apache.accumulo.core.clientImpl.thrift.ThriftNotActiveServiceException();
- struct.tnase.read(iprot);
- struct.setTnaseIsSet(true);
- }
- }
- }
-
- private static <S extends org.apache.thrift.scheme.IScheme> S
scheme(org.apache.thrift.protocol.TProtocol proto) {
- return
(org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ?
STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
- }
- }
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class recordCompletion_args implements
org.apache.thrift.TBase<recordCompletion_args, recordCompletion_args._Fields>,
java.io.Serializable, Cloneable, Comparable<recordCompletion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("recordCompletion_args");
diff --git a/core/src/main/thrift/compaction-coordinator.thrift
b/core/src/main/thrift/compaction-coordinator.thrift
index 65b162ec3c..29e4dde868 100644
--- a/core/src/main/thrift/compaction-coordinator.thrift
+++ b/core/src/main/thrift/compaction-coordinator.thrift
@@ -136,16 +136,6 @@ service CompactionCoordinatorService {
2:client.ThriftNotActiveServiceException tnase
)
- /*
- * Called by the Monitor to get progress information
- */
- TExternalCompactionMap getRunningCompactions(
- 1:client.TInfo tinfo
- 2:security.TCredentials credentials
- )throws(
- 1:client.ThriftSecurityException sec
- 2:client.ThriftNotActiveServiceException tnase
- )
oneway void recordCompletion(
1:client.TInfo tinfo
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/util/ListCompactions.java
b/server/base/src/main/java/org/apache/accumulo/server/util/ListCompactions.java
index 5d9547f860..635339f842 100644
---
a/server/base/src/main/java/org/apache/accumulo/server/util/ListCompactions.java
+++
b/server/base/src/main/java/org/apache/accumulo/server/util/ListCompactions.java
@@ -21,17 +21,14 @@ package org.apache.accumulo.server.util;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
import org.apache.accumulo.core.cli.ServerOpts;
import org.apache.accumulo.core.compaction.thrift.CompactionCoordinatorService;
import org.apache.accumulo.core.compaction.thrift.TExternalCompaction;
-import org.apache.accumulo.core.compaction.thrift.TExternalCompactionMap;
import org.apache.accumulo.core.data.ResourceGroupId;
import org.apache.accumulo.core.dataImpl.KeyExtent;
import org.apache.accumulo.core.rpc.ThriftUtil;
import org.apache.accumulo.core.tabletserver.thrift.TCompactionKind;
-import org.apache.accumulo.core.trace.TraceUtil;
import org.apache.accumulo.core.util.compaction.ExternalCompactionUtil;
import org.apache.accumulo.core.util.compaction.RunningCompactionInfo;
import org.apache.accumulo.server.ServerContext;
@@ -190,25 +187,15 @@ public class ListCompactions extends
ServerKeywordExecutable<RunningCommandOpts>
coordinatorClient = ExternalCompactionUtil.getCoordinatorClient(context);
// Fetch running compactions as a list and convert to a map
- TExternalCompactionMap running =
- coordinatorClient.getRunningCompactions(TraceUtil.traceInfo(),
context.rpcCreds());
-
List<RunningCompactionSummary> results = new ArrayList<>();
+ ExternalCompactionUtil.getCompactionsRunningOnCompactors(context,
+ tec -> results.add(new RunningCompactionSummary(tec, details)));
- if (running == null || running.getCompactions() == null
- || running.getCompactions().isEmpty()) {
+ if (results.isEmpty()) {
System.out.println("No running compactions found.");
return results;
}
- for (Map.Entry<String,TExternalCompaction> entry :
running.getCompactions().entrySet()) {
- TExternalCompaction ec = entry.getValue();
- if (ec == null) {
- continue;
- }
- var summary = new RunningCompactionSummary(ec, details);
- results.add(summary);
- }
return results;
} catch (Exception e) {
throw new IllegalStateException("Unable to get running compactions.", e);
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
index 78ecfab86e..0ff67d4850 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
@@ -70,7 +70,6 @@ import
org.apache.accumulo.core.compaction.thrift.CompactionCoordinatorService;
import org.apache.accumulo.core.compaction.thrift.TCompactionState;
import org.apache.accumulo.core.compaction.thrift.TCompactionStatusUpdate;
import org.apache.accumulo.core.compaction.thrift.TExternalCompaction;
-import org.apache.accumulo.core.compaction.thrift.TExternalCompactionMap;
import org.apache.accumulo.core.compaction.thrift.TNextCompactionJob;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
@@ -970,30 +969,6 @@ public class CompactionCoordinator
}
}
- /**
- * Return information about running compactions
- *
- * @param tinfo trace info
- * @param credentials tcredentials object
- * @return map of ECID to TExternalCompaction objects
- * @throws ThriftSecurityException permission error
- */
- @Override
- public TExternalCompactionMap getRunningCompactions(TInfo tinfo,
TCredentials credentials)
- throws ThriftSecurityException {
- // do not expect users to call this directly, expect other tservers to
call this method
- if (!security.canPerformSystemActions(credentials)) {
- throw new AccumuloSecurityException(credentials.getPrincipal(),
- SecurityErrorCode.PERMISSION_DENIED).asThriftException();
- }
-
- final TExternalCompactionMap result = new TExternalCompactionMap();
- RUNNING_CACHE.forEach((ecid, tec) -> {
- result.putToCompactions(ecid.canonical(), tec);
- });
- return result;
- }
-
/* Method exists to be called from test */
public CompactionJobQueues getJobQueues() {
return jobQueues;
diff --git a/test/src/main/java/org/apache/accumulo/test/ListCompactionsIT.java
b/test/src/main/java/org/apache/accumulo/test/ListCompactionsIT.java
index 6c57190e5c..56dcc135ae 100644
--- a/test/src/main/java/org/apache/accumulo/test/ListCompactionsIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ListCompactionsIT.java
@@ -31,14 +31,11 @@ import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Optional;
import org.apache.accumulo.core.client.Accumulo;
import org.apache.accumulo.core.client.AccumuloClient;
import org.apache.accumulo.core.client.IteratorSetting;
-import org.apache.accumulo.core.compaction.thrift.TExternalCompactionMap;
import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
-import org.apache.accumulo.core.util.compaction.ExternalCompactionUtil;
import org.apache.accumulo.harness.MiniClusterConfigurationCallback;
import org.apache.accumulo.harness.SharedMiniClusterBase;
import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
@@ -52,7 +49,6 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
-import com.google.common.net.HostAndPort;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
@@ -100,16 +96,13 @@ public class ListCompactionsIT extends
SharedMiniClusterBase {
writeData(client, tableName);
compact(client, tableName, 2, GROUP7, false);
- Optional<HostAndPort> coordinatorHost =
-
ExternalCompactionUtil.findCompactionCoordinator(getCluster().getServerContext());
-
// wait for the compaction to start
- TExternalCompactionMap expected = ExternalCompactionTestUtils
- .getRunningCompactions(getCluster().getServerContext(),
coordinatorHost);
- while (expected == null || expected.getCompactionsSize() == 0) {
+ var expected =
+
ExternalCompactionTestUtils.getRunningCompactions(getCluster().getServerContext());
+ while (expected.isEmpty()) {
Thread.sleep(1000);
- expected = ExternalCompactionTestUtils
- .getRunningCompactions(getCluster().getServerContext(),
coordinatorHost);
+ expected =
+
ExternalCompactionTestUtils.getRunningCompactions(getCluster().getServerContext());
}
final List<RunningCompactionSummary> running =
@@ -117,8 +110,8 @@ public class ListCompactionsIT extends
SharedMiniClusterBase {
final Map<String,RunningCompactionSummary> compactionsByEcid = new
HashMap<>();
running.forEach(rcs -> compactionsByEcid.put(rcs.getEcid(), rcs));
- assertEquals(expected.getCompactionsSize(), compactionsByEcid.size());
- expected.getCompactions().values().forEach(tec -> {
+ assertEquals(expected.size(), compactionsByEcid.size());
+ expected.values().forEach(tec -> {
RunningCompactionSummary rcs =
compactionsByEcid.get(tec.job.getExternalCompactionId());
assertNotNull(rcs);
assertEquals(tec.getJob().getExternalCompactionId(), rcs.getEcid());
diff --git
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionProgressIT.java
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionProgressIT.java
index 073406c147..531fd30751 100644
---
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionProgressIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionProgressIT.java
@@ -37,7 +37,6 @@ import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
@@ -49,13 +48,11 @@ import
org.apache.accumulo.core.client.admin.CompactionConfig;
import org.apache.accumulo.core.client.admin.servers.ServerId;
import org.apache.accumulo.core.compaction.thrift.TCompactionState;
import org.apache.accumulo.core.compaction.thrift.TExternalCompaction;
-import org.apache.accumulo.core.compaction.thrift.TExternalCompactionMap;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.TableId;
import org.apache.accumulo.core.iterators.IteratorUtil;
import org.apache.accumulo.core.metadata.schema.TabletMetadata;
import org.apache.accumulo.core.metadata.schema.TabletsMetadata;
-import org.apache.accumulo.core.util.compaction.ExternalCompactionUtil;
import org.apache.accumulo.core.util.compaction.RunningCompactionInfo;
import org.apache.accumulo.core.util.threads.Threads;
import org.apache.accumulo.harness.AccumuloClusterHarness;
@@ -67,7 +64,6 @@ import org.apache.accumulo.test.metrics.TestStatsDSink;
import org.apache.accumulo.test.util.Wait;
import org.apache.hadoop.conf.Configuration;
import org.apache.thrift.TException;
-import org.apache.thrift.transport.TTransportException;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
@@ -75,8 +71,6 @@ import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.net.HostAndPort;
-
/**
* Tests that external compactions report progress from start to finish. To
prevent flaky test
* failures, we only measure progress in quarter segments: STARTED, QUARTER,
HALF, THREE_QUARTERS.
@@ -327,13 +321,8 @@ public class ExternalCompactionProgressIT extends
AccumuloClusterHarness {
*/
private void checkRunning() throws TException {
ServerContext ctx = getCluster().getServerContext();
- Optional<HostAndPort> coordinatorHost =
ExternalCompactionUtil.findCompactionCoordinator(ctx);
- if (coordinatorHost.isEmpty()) {
- throw new TTransportException("Unable to get CompactionCoordinator
address from ZooKeeper");
- }
- TExternalCompactionMap ecList = getRunningCompactions(ctx,
coordinatorHost);
- Map<String,TExternalCompaction> ecMap = ecList.getCompactions();
+ Map<String,TExternalCompaction> ecMap = getRunningCompactions(ctx);
if (ecMap != null) {
ecMap.forEach((ecid, ec) -> {
// returns null if it's a new mapping
diff --git
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTestUtils.java
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTestUtils.java
index fab985bced..07d3ea60fb 100644
---
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTestUtils.java
+++
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionTestUtils.java
@@ -25,6 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -49,10 +50,8 @@ import
org.apache.accumulo.core.client.admin.InstanceOperations;
import org.apache.accumulo.core.client.admin.NewTableConfiguration;
import org.apache.accumulo.core.client.admin.servers.ServerId;
import org.apache.accumulo.core.clientImpl.ClientContext;
-import org.apache.accumulo.core.compaction.thrift.CompactionCoordinatorService;
import org.apache.accumulo.core.compaction.thrift.TCompactionState;
import org.apache.accumulo.core.compaction.thrift.TExternalCompaction;
-import org.apache.accumulo.core.compaction.thrift.TExternalCompactionMap;
import org.apache.accumulo.core.conf.ClientProperty;
import org.apache.accumulo.core.conf.ConfigurationCopy;
import org.apache.accumulo.core.conf.Property;
@@ -64,11 +63,8 @@ import
org.apache.accumulo.core.metadata.schema.ExternalCompactionId;
import org.apache.accumulo.core.metadata.schema.TabletMetadata;
import org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType;
import org.apache.accumulo.core.metadata.schema.TabletsMetadata;
-import org.apache.accumulo.core.rpc.ThriftUtil;
-import org.apache.accumulo.core.rpc.clients.ThriftClientTypes;
import org.apache.accumulo.core.spi.compaction.RatioBasedCompactionPlanner;
import org.apache.accumulo.core.spi.compaction.SimpleCompactionDispatcher;
-import org.apache.accumulo.core.trace.TraceUtil;
import org.apache.accumulo.core.util.UtilWaitThread;
import org.apache.accumulo.core.util.compaction.ExternalCompactionUtil;
import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
@@ -79,7 +75,6 @@ import org.apache.accumulo.test.util.Wait;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.RawLocalFileSystem;
import org.apache.hadoop.io.Text;
-import org.apache.thrift.TException;
import org.apache.thrift.transport.TTransportException;
import com.beust.jcommander.internal.Maps;
@@ -252,16 +247,14 @@ public class ExternalCompactionTestUtils {
coreSite.set("fs.file.impl", RawLocalFileSystem.class.getName());
}
- public static TExternalCompactionMap getRunningCompactions(ClientContext
context,
- Optional<HostAndPort> coordinatorHost) throws TException {
- CompactionCoordinatorService.Client client =
- ThriftUtil.getClient(ThriftClientTypes.COORDINATOR,
coordinatorHost.orElseThrow(), context);
+ public static Map<String,TExternalCompaction>
getRunningCompactions(ClientContext context) {
+ Map<String,TExternalCompaction> running = new HashMap<>();
try {
- TExternalCompactionMap running =
- client.getRunningCompactions(TraceUtil.traceInfo(),
context.rpcCreds());
+ ExternalCompactionUtil.getCompactionsRunningOnCompactors(context,
+ tec -> running.put(tec.getJob().getExternalCompactionId(), tec));
return running;
- } finally {
- ThriftUtil.returnClient(client, context);
+ } catch (InterruptedException e) {
+ throw new IllegalStateException(e);
}
}
@@ -318,15 +311,12 @@ public class ExternalCompactionTestUtils {
throw new TTransportException("Unable to get CompactionCoordinator
address from ZooKeeper");
}
while (matches == 0) {
- TExternalCompactionMap running =
- ExternalCompactionTestUtils.getRunningCompactions(ctx,
coordinatorHost);
- if (running.getCompactions() != null) {
- for (ExternalCompactionId ecid : ecids) {
- TExternalCompaction tec =
running.getCompactions().get(ecid.canonical());
- if (tec != null && tec.getUpdates() != null &&
!tec.getUpdates().isEmpty()) {
- matches++;
- assertEquals(TCompactionState.STARTED,
ExternalCompactionTestUtils.getLastState(tec));
- }
+ var running = ExternalCompactionTestUtils.getRunningCompactions(ctx);
+ for (ExternalCompactionId ecid : ecids) {
+ TExternalCompaction tec = running.get(ecid.canonical());
+ if (tec != null && tec.getUpdates() != null &&
!tec.getUpdates().isEmpty()) {
+ matches++;
+ assertEquals(TCompactionState.STARTED,
ExternalCompactionTestUtils.getLastState(tec));
}
}
if (matches == 0) {
diff --git
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompaction_3_IT.java
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompaction_3_IT.java
index 840fab3148..0101865b3f 100644
---
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompaction_3_IT.java
+++
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompaction_3_IT.java
@@ -45,7 +45,6 @@ import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.compaction.thrift.TCompactionState;
import org.apache.accumulo.core.compaction.thrift.TCompactionStatusUpdate;
import org.apache.accumulo.core.compaction.thrift.TExternalCompaction;
-import org.apache.accumulo.core.compaction.thrift.TExternalCompactionMap;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.TableId;
import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
@@ -231,8 +230,8 @@ public class ExternalCompaction_3_IT extends
SharedMiniClusterBase {
final Map<ExternalCompactionId,RunningCompactionInfo> results = new
HashMap<>();
while (results.isEmpty()) {
- TExternalCompactionMap running = null;
- while (running == null || running.getCompactions() == null) {
+ Map<String,TExternalCompaction> running = null;
+ while (running == null || running.isEmpty()) {
try {
Optional<HostAndPort> coordinatorHost =
ExternalCompactionUtil.findCompactionCoordinator(ctx);
@@ -240,14 +239,14 @@ public class ExternalCompaction_3_IT extends
SharedMiniClusterBase {
throw new TTransportException(
"Unable to get CompactionCoordinator address from ZooKeeper");
}
- running = getRunningCompactions(ctx, coordinatorHost);
+ running = getRunningCompactions(ctx);
} catch (TException t) {
running = null;
Thread.sleep(2000);
}
}
for (ExternalCompactionId ecid : ecids) {
- final TExternalCompaction tec =
running.getCompactions().get(ecid.canonical());
+ final TExternalCompaction tec = running.get(ecid.canonical());
if (tec != null && tec.getUpdatesSize() > 0) {
// When the coordinator restarts it inserts a message into the
updates. If this
// is the last message, then don't insert this into the results. We
want to get
diff --git
a/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java
b/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java
index 289b2c06a5..338a75fcbc 100644
---
a/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java
+++
b/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java
@@ -239,13 +239,9 @@ public class GracefulShutdownIT extends
SharedMiniClusterBase {
client.instanceOperations().getServers(ServerId.Type.MANAGER);
assertNotNull(newManagerLocations);
assertEquals(1, newManagerLocations.size());
- final HostAndPort newManagerAddress =
-
HostAndPort.fromString(newManagerLocations.iterator().next().toHostPortString());
- assertEquals(0, ExternalCompactionTestUtils
- .getRunningCompactions(ctx,
Optional.of(newManagerAddress)).getCompactionsSize());
+ assertEquals(0,
ExternalCompactionTestUtils.getRunningCompactions(ctx).size());
client.tableOperations().compact(tableName, cc);
- Wait.waitFor(() -> ExternalCompactionTestUtils
- .getRunningCompactions(ctx,
Optional.of(newManagerAddress)).getCompactionsSize() > 0);
+ Wait.waitFor(() ->
!ExternalCompactionTestUtils.getRunningCompactions(ctx).isEmpty());
StopServers.signalGracefulShutdown(ctx, compactorAddress);
Wait.waitFor(() -> {
control.refreshProcesses(ServerType.COMPACTOR);