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 2023/10/06 22:53:08 UTC
[accumulo] branch elasticity updated: restores ability to list minor compactions (#3827)
This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch elasticity
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/elasticity by this push:
new 31323e5e5e restores ability to list minor compactions (#3827)
31323e5e5e is described below
commit 31323e5e5ecd870aff94fa6aa3579730031a651b
Author: Keith Turner <kt...@apache.org>
AuthorDate: Fri Oct 6 18:53:01 2023 -0400
restores ability to list minor compactions (#3827)
Partially reverts some changes from
ec5d51803f37e062eab2ae2eb5425842b8d92cee in order to restore listing
minor compactions.
Fixes #3797
---
.../core/clientImpl/InstanceOperationsImpl.java | 29 +-
.../thrift/TabletServerClientService.java | 1653 +++++++++++++++++---
core/src/main/thrift/tabletserver.thrift | 7 +
.../accumulo/tserver/TabletClientHandler.java | 23 +
.../accumulo/test/performance/NullTserver.java | 6 +
5 files changed, 1492 insertions(+), 226 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
index bd630a9e11..52389ad365 100644
--- a/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
@@ -273,9 +273,25 @@ public class InstanceOperationsImpl implements InstanceOperations {
@Override
public List<ActiveCompaction> getActiveCompactions(String tserver)
throws AccumuloException, AccumuloSecurityException {
- // ELASTICITY_TODO may need to deprecate this method in 3.x and remove it 4.0. Tservers no
- // longer run compactions. See #3593
- return List.of();
+ final var parsedTserver = HostAndPort.fromString(tserver);
+ Client client = null;
+ try {
+ client = getClient(ThriftClientTypes.TABLET_SERVER, parsedTserver, context);
+
+ List<ActiveCompaction> as = new ArrayList<>();
+ for (var tac : client.getActiveCompactions(TraceUtil.traceInfo(), context.rpcCreds())) {
+ as.add(new ActiveCompactionImpl(context, tac, parsedTserver, CompactionHost.Type.TSERVER));
+ }
+ return as;
+ } catch (ThriftSecurityException e) {
+ throw new AccumuloSecurityException(e.user, e.code, e);
+ } catch (TException e) {
+ throw new AccumuloException(e);
+ } finally {
+ if (client != null) {
+ returnClient(client, context);
+ }
+ }
}
@Override
@@ -283,13 +299,18 @@ public class InstanceOperationsImpl implements InstanceOperations {
throws AccumuloException, AccumuloSecurityException {
Map<String,List<HostAndPort>> compactors = ExternalCompactionUtil.getCompactorAddrs(context);
+ List<String> tservers = getTabletServers();
- int numThreads = Math.max(4, Math.min(compactors.size() / 10, 256));
+ int numThreads = Math.max(4, Math.min((tservers.size() + compactors.size()) / 10, 256));
var executorService =
context.threadPools().createFixedThreadPool(numThreads, "getactivecompactions", false);
try {
List<Future<List<ActiveCompaction>>> futures = new ArrayList<>();
+ for (String tserver : tservers) {
+ futures.add(executorService.submit(() -> getActiveCompactions(tserver)));
+ }
+
compactors.values().forEach(compactorList -> {
for (HostAndPort compactorAddr : compactorList) {
Callable<List<ActiveCompaction>> task =
diff --git a/core/src/main/thrift-gen-java/org/apache/accumulo/core/tabletserver/thrift/TabletServerClientService.java b/core/src/main/thrift-gen-java/org/apache/accumulo/core/tabletserver/thrift/TabletServerClientService.java
index b9cb50df14..20fd406ada 100644
--- a/core/src/main/thrift-gen-java/org/apache/accumulo/core/tabletserver/thrift/TabletServerClientService.java
+++ b/core/src/main/thrift-gen-java/org/apache/accumulo/core/tabletserver/thrift/TabletServerClientService.java
@@ -41,6 +41,8 @@ public class TabletServerClientService {
public void fastHalt(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String lock) throws org.apache.thrift.TException;
+ public java.util.List<ActiveCompaction> getActiveCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException;
+
public void removeLogs(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<java.lang.String> filenames) throws org.apache.thrift.TException;
public java.util.List<java.lang.String> getActiveLogs(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.thrift.TException;
@@ -71,6 +73,8 @@ public class TabletServerClientService {
public void fastHalt(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.lang.String lock, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+ public void getActiveCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ActiveCompaction>> resultHandler) throws org.apache.thrift.TException;
+
public void removeLogs(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<java.lang.String> filenames, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
public void getActiveLogs(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
@@ -253,6 +257,34 @@ public class TabletServerClientService {
sendBaseOneway("fastHalt", args);
}
+ @Override
+ public java.util.List<ActiveCompaction> getActiveCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ {
+ send_getActiveCompactions(tinfo, credentials);
+ return recv_getActiveCompactions();
+ }
+
+ public void send_getActiveCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) throws org.apache.thrift.TException
+ {
+ getActiveCompactions_args args = new getActiveCompactions_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ sendBase("getActiveCompactions", args);
+ }
+
+ public java.util.List<ActiveCompaction> recv_getActiveCompactions() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ {
+ getActiveCompactions_result result = new getActiveCompactions_result();
+ receiveBase(result, "getActiveCompactions");
+ 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, "getActiveCompactions failed: unknown result");
+ }
+
@Override
public void removeLogs(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<java.lang.String> filenames) throws org.apache.thrift.TException
{
@@ -709,6 +741,44 @@ public class TabletServerClientService {
}
}
+ @Override
+ public void getActiveCompactions(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ActiveCompaction>> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getActiveCompactions_call method_call = new getActiveCompactions_call(tinfo, credentials, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getActiveCompactions_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ActiveCompaction>> {
+ private org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo;
+ private org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials;
+ public getActiveCompactions_call(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ActiveCompaction>> 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("getActiveCompactions", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getActiveCompactions_args args = new getActiveCompactions_args();
+ args.setTinfo(tinfo);
+ args.setCredentials(credentials);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ @Override
+ public java.util.List<ActiveCompaction> getResult() throws org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getActiveCompactions();
+ }
+ }
+
@Override
public void removeLogs(org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo, org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials, java.util.List<java.lang.String> filenames, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
@@ -1018,6 +1088,7 @@ public class TabletServerClientService {
processMap.put("getHistoricalStats", new getHistoricalStats());
processMap.put("halt", new halt());
processMap.put("fastHalt", new fastHalt());
+ processMap.put("getActiveCompactions", new getActiveCompactions());
processMap.put("removeLogs", new removeLogs());
processMap.put("getActiveLogs", new getActiveLogs());
processMap.put("startGetSummaries", new startGetSummaries());
@@ -1210,6 +1281,38 @@ public class TabletServerClientService {
}
}
+ public static class getActiveCompactions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveCompactions_args> {
+ public getActiveCompactions() {
+ super("getActiveCompactions");
+ }
+
+ @Override
+ public getActiveCompactions_args getEmptyArgsInstance() {
+ return new getActiveCompactions_args();
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
+ public getActiveCompactions_result getResult(I iface, getActiveCompactions_args args) throws org.apache.thrift.TException {
+ getActiveCompactions_result result = new getActiveCompactions_result();
+ try {
+ result.success = iface.getActiveCompactions(args.tinfo, args.credentials);
+ } catch (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ result.sec = sec;
+ }
+ return result;
+ }
+ }
+
public static class removeLogs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeLogs_args> {
public removeLogs() {
super("removeLogs");
@@ -1442,6 +1545,7 @@ public class TabletServerClientService {
processMap.put("getHistoricalStats", new getHistoricalStats());
processMap.put("halt", new halt());
processMap.put("fastHalt", new fastHalt());
+ processMap.put("getActiveCompactions", new getActiveCompactions());
processMap.put("removeLogs", new removeLogs());
processMap.put("getActiveLogs", new getActiveLogs());
processMap.put("startGetSummaries", new startGetSummaries());
@@ -1815,6 +1919,77 @@ public class TabletServerClientService {
}
}
+ public static class getActiveCompactions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getActiveCompactions_args, java.util.List<ActiveCompaction>> {
+ public getActiveCompactions() {
+ super("getActiveCompactions");
+ }
+
+ @Override
+ public getActiveCompactions_args getEmptyArgsInstance() {
+ return new getActiveCompactions_args();
+ }
+
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ActiveCompaction>> 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<ActiveCompaction>>() {
+ @Override
+ public void onComplete(java.util.List<ActiveCompaction> o) {
+ getActiveCompactions_result result = new getActiveCompactions_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;
+ getActiveCompactions_result result = new getActiveCompactions_result();
+ if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) {
+ result.sec = (org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException) e;
+ result.setSecIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ public void start(I iface, getActiveCompactions_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ActiveCompaction>> resultHandler) throws org.apache.thrift.TException {
+ iface.getActiveCompactions(args.tinfo, args.credentials,resultHandler);
+ }
+ }
+
public static class removeLogs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeLogs_args, Void> {
public removeLogs() {
super("removeLogs");
@@ -7905,25 +8080,22 @@ public class TabletServerClientService {
}
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
- public static class removeLogs_args implements org.apache.thrift.TBase<removeLogs_args, removeLogs_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeLogs_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeLogs_args");
+ public static class getActiveCompactions_args implements org.apache.thrift.TBase<getActiveCompactions_args, getActiveCompactions_args._Fields>, java.io.Serializable, Cloneable, Comparable<getActiveCompactions_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCompactions_args");
- private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final org.apache.thrift.protocol.TField FILENAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("filenames", org.apache.thrift.protocol.TType.LIST, (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)2);
+ private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeLogs_argsStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeLogs_argsTupleSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getActiveCompactions_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getActiveCompactions_argsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
- public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> filenames; // 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"),
- FILENAMES((short)3, "filenames");
+ TINFO((short)2, "tinfo"),
+ CREDENTIALS((short)1, "credentials");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -7939,12 +8111,10 @@ public class TabletServerClientService {
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // TINFO
+ case 2: // TINFO
return TINFO;
- case 2: // CREDENTIALS
+ case 1: // CREDENTIALS
return CREDENTIALS;
- case 3: // FILENAMES
- return FILENAMES;
default:
return null;
}
@@ -7995,53 +8165,43 @@ public class TabletServerClientService {
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.TInfo.class)));
tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.securityImpl.thrift.TCredentials.class)));
- tmpMap.put(_Fields.FILENAMES, new org.apache.thrift.meta_data.FieldMetaData("filenames", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- 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(removeLogs_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveCompactions_args.class, metaDataMap);
}
- public removeLogs_args() {
+ public getActiveCompactions_args() {
}
- public removeLogs_args(
+ public getActiveCompactions_args(
org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
- org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
- java.util.List<java.lang.String> filenames)
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials)
{
this();
this.tinfo = tinfo;
this.credentials = credentials;
- this.filenames = filenames;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public removeLogs_args(removeLogs_args other) {
+ public getActiveCompactions_args(getActiveCompactions_args other) {
if (other.isSetTinfo()) {
this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
}
if (other.isSetCredentials()) {
this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
}
- if (other.isSetFilenames()) {
- java.util.List<java.lang.String> __this__filenames = new java.util.ArrayList<java.lang.String>(other.filenames);
- this.filenames = __this__filenames;
- }
}
@Override
- public removeLogs_args deepCopy() {
- return new removeLogs_args(this);
+ public getActiveCompactions_args deepCopy() {
+ return new getActiveCompactions_args(this);
}
@Override
public void clear() {
this.tinfo = null;
this.credentials = null;
- this.filenames = null;
}
@org.apache.thrift.annotation.Nullable
@@ -8049,7 +8209,7 @@ public class TabletServerClientService {
return this.tinfo;
}
- public removeLogs_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) {
+ public getActiveCompactions_args setTinfo(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo) {
this.tinfo = tinfo;
return this;
}
@@ -8074,7 +8234,7 @@ public class TabletServerClientService {
return this.credentials;
}
- public removeLogs_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
+ public getActiveCompactions_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
this.credentials = credentials;
return this;
}
@@ -8094,47 +8254,6 @@ public class TabletServerClientService {
}
}
- public int getFilenamesSize() {
- return (this.filenames == null) ? 0 : this.filenames.size();
- }
-
- @org.apache.thrift.annotation.Nullable
- public java.util.Iterator<java.lang.String> getFilenamesIterator() {
- return (this.filenames == null) ? null : this.filenames.iterator();
- }
-
- public void addToFilenames(java.lang.String elem) {
- if (this.filenames == null) {
- this.filenames = new java.util.ArrayList<java.lang.String>();
- }
- this.filenames.add(elem);
- }
-
- @org.apache.thrift.annotation.Nullable
- public java.util.List<java.lang.String> getFilenames() {
- return this.filenames;
- }
-
- public removeLogs_args setFilenames(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> filenames) {
- this.filenames = filenames;
- return this;
- }
-
- public void unsetFilenames() {
- this.filenames = null;
- }
-
- /** Returns true if field filenames is set (has been assigned a value) and false otherwise */
- public boolean isSetFilenames() {
- return this.filenames != null;
- }
-
- public void setFilenamesIsSet(boolean value) {
- if (!value) {
- this.filenames = null;
- }
- }
-
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
@@ -8154,14 +8273,6 @@ public class TabletServerClientService {
}
break;
- case FILENAMES:
- if (value == null) {
- unsetFilenames();
- } else {
- setFilenames((java.util.List<java.lang.String>)value);
- }
- break;
-
}
}
@@ -8175,9 +8286,6 @@ public class TabletServerClientService {
case CREDENTIALS:
return getCredentials();
- case FILENAMES:
- return getFilenames();
-
}
throw new java.lang.IllegalStateException();
}
@@ -8194,20 +8302,18 @@ public class TabletServerClientService {
return isSetTinfo();
case CREDENTIALS:
return isSetCredentials();
- case FILENAMES:
- return isSetFilenames();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
- if (that instanceof removeLogs_args)
- return this.equals((removeLogs_args)that);
+ if (that instanceof getActiveCompactions_args)
+ return this.equals((getActiveCompactions_args)that);
return false;
}
- public boolean equals(removeLogs_args that) {
+ public boolean equals(getActiveCompactions_args that) {
if (that == null)
return false;
if (this == that)
@@ -8231,15 +8337,6 @@ public class TabletServerClientService {
return false;
}
- boolean this_present_filenames = true && this.isSetFilenames();
- boolean that_present_filenames = true && that.isSetFilenames();
- if (this_present_filenames || that_present_filenames) {
- if (!(this_present_filenames && that_present_filenames))
- return false;
- if (!this.filenames.equals(that.filenames))
- return false;
- }
-
return true;
}
@@ -8255,15 +8352,11 @@ public class TabletServerClientService {
if (isSetCredentials())
hashCode = hashCode * 8191 + credentials.hashCode();
- hashCode = hashCode * 8191 + ((isSetFilenames()) ? 131071 : 524287);
- if (isSetFilenames())
- hashCode = hashCode * 8191 + filenames.hashCode();
-
return hashCode;
}
@Override
- public int compareTo(removeLogs_args other) {
+ public int compareTo(getActiveCompactions_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -8290,16 +8383,6 @@ public class TabletServerClientService {
return lastComparison;
}
}
- lastComparison = java.lang.Boolean.compare(isSetFilenames(), other.isSetFilenames());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFilenames()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filenames, other.filenames);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -8321,7 +8404,1133 @@ public class TabletServerClientService {
@Override
public java.lang.String toString() {
- java.lang.StringBuilder sb = new java.lang.StringBuilder("removeLogs_args(");
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getActiveCompactions_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 getActiveCompactions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getActiveCompactions_argsStandardScheme getScheme() {
+ return new getActiveCompactions_argsStandardScheme();
+ }
+ }
+
+ private static class getActiveCompactions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getActiveCompactions_args> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getActiveCompactions_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 2: // TINFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo();
+ struct.tinfo.read(iprot);
+ struct.setTinfoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // CREDENTIALS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.credentials = new org.apache.accumulo.core.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, getActiveCompactions_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.credentials != null) {
+ oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+ struct.credentials.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tinfo != null) {
+ oprot.writeFieldBegin(TINFO_FIELD_DESC);
+ struct.tinfo.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getActiveCompactions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getActiveCompactions_argsTupleScheme getScheme() {
+ return new getActiveCompactions_argsTupleScheme();
+ }
+ }
+
+ private static class getActiveCompactions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getActiveCompactions_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getActiveCompactions_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, getActiveCompactions_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 getActiveCompactions_result implements org.apache.thrift.TBase<getActiveCompactions_result, getActiveCompactions_result._Fields>, java.io.Serializable, Cloneable, Comparable<getActiveCompactions_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCompactions_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 getActiveCompactions_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getActiveCompactions_resultTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable java.util.List<ActiveCompaction> success; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ SEC((short)1, "sec");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // SEC
+ return SEC;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActiveCompaction.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(getActiveCompactions_result.class, metaDataMap);
+ }
+
+ public getActiveCompactions_result() {
+ }
+
+ public getActiveCompactions_result(
+ java.util.List<ActiveCompaction> success,
+ org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec)
+ {
+ this();
+ this.success = success;
+ this.sec = sec;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getActiveCompactions_result(getActiveCompactions_result other) {
+ if (other.isSetSuccess()) {
+ java.util.List<ActiveCompaction> __this__success = new java.util.ArrayList<ActiveCompaction>(other.success.size());
+ for (ActiveCompaction other_element : other.success) {
+ __this__success.add(new ActiveCompaction(other_element));
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetSec()) {
+ this.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException(other.sec);
+ }
+ }
+
+ @Override
+ public getActiveCompactions_result deepCopy() {
+ return new getActiveCompactions_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.sec = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<ActiveCompaction> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(ActiveCompaction elem) {
+ if (this.success == null) {
+ this.success = new java.util.ArrayList<ActiveCompaction>();
+ }
+ this.success.add(elem);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<ActiveCompaction> getSuccess() {
+ return this.success;
+ }
+
+ public getActiveCompactions_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ActiveCompaction> 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 getActiveCompactions_result setSec(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException sec) {
+ this.sec = sec;
+ return this;
+ }
+
+ public void unsetSec() {
+ this.sec = null;
+ }
+
+ /** Returns true if field sec is set (has been assigned a value) and false otherwise */
+ public boolean isSetSec() {
+ return this.sec != null;
+ }
+
+ public void setSecIsSet(boolean value) {
+ if (!value) {
+ this.sec = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((java.util.List<ActiveCompaction>)value);
+ }
+ break;
+
+ case SEC:
+ if (value == null) {
+ unsetSec();
+ } else {
+ setSec((org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case SEC:
+ return getSec();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case SEC:
+ return isSetSec();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof getActiveCompactions_result)
+ return this.equals((getActiveCompactions_result)that);
+ return false;
+ }
+
+ public boolean equals(getActiveCompactions_result that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_sec = true && this.isSetSec();
+ boolean that_present_sec = true && that.isSetSec();
+ if (this_present_sec || that_present_sec) {
+ if (!(this_present_sec && that_present_sec))
+ return false;
+ if (!this.sec.equals(that.sec))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getActiveCompactions_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetSec(), other.isSetSec());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSec()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, other.sec);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getActiveCompactions_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("sec:");
+ if (this.sec == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sec);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ 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 getActiveCompactions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getActiveCompactions_resultStandardScheme getScheme() {
+ return new getActiveCompactions_resultStandardScheme();
+ }
+ }
+
+ private static class getActiveCompactions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getActiveCompactions_result> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getActiveCompactions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<ActiveCompaction>(_list80.size);
+ @org.apache.thrift.annotation.Nullable ActiveCompaction _elem81;
+ for (int _i82 = 0; _i82 < _list80.size; ++_i82)
+ {
+ _elem81 = new ActiveCompaction();
+ _elem81.read(iprot);
+ struct.success.add(_elem81);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // SEC
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, getActiveCompactions_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
+ for (ActiveCompaction _iter83 : struct.success)
+ {
+ _iter83.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.sec != null) {
+ oprot.writeFieldBegin(SEC_FIELD_DESC);
+ struct.sec.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getActiveCompactions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getActiveCompactions_resultTupleScheme getScheme() {
+ return new getActiveCompactions_resultTupleScheme();
+ }
+ }
+
+ private static class getActiveCompactions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getActiveCompactions_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getActiveCompactions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetSec()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (ActiveCompaction _iter84 : struct.success)
+ {
+ _iter84.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetSec()) {
+ struct.sec.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getActiveCompactions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list85 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<ActiveCompaction>(_list85.size);
+ @org.apache.thrift.annotation.Nullable ActiveCompaction _elem86;
+ for (int _i87 = 0; _i87 < _list85.size; ++_i87)
+ {
+ _elem86 = new ActiveCompaction();
+ _elem86.read(iprot);
+ struct.success.add(_elem86);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.sec = new org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException();
+ struct.sec.read(iprot);
+ struct.setSecIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class removeLogs_args implements org.apache.thrift.TBase<removeLogs_args, removeLogs_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeLogs_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeLogs_args");
+
+ private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField FILENAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("filenames", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeLogs_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeLogs_argsTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo; // required
+ public @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> filenames; // 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"),
+ FILENAMES((short)3, "filenames");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TINFO
+ return TINFO;
+ case 2: // CREDENTIALS
+ return CREDENTIALS;
+ case 3: // FILENAMES
+ return FILENAMES;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.clientImpl.thrift.TInfo.class)));
+ tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.securityImpl.thrift.TCredentials.class)));
+ tmpMap.put(_Fields.FILENAMES, new org.apache.thrift.meta_data.FieldMetaData("filenames", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ 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(removeLogs_args.class, metaDataMap);
+ }
+
+ public removeLogs_args() {
+ }
+
+ public removeLogs_args(
+ org.apache.accumulo.core.clientImpl.thrift.TInfo tinfo,
+ org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials,
+ java.util.List<java.lang.String> filenames)
+ {
+ this();
+ this.tinfo = tinfo;
+ this.credentials = credentials;
+ this.filenames = filenames;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public removeLogs_args(removeLogs_args other) {
+ if (other.isSetTinfo()) {
+ this.tinfo = new org.apache.accumulo.core.clientImpl.thrift.TInfo(other.tinfo);
+ }
+ if (other.isSetCredentials()) {
+ this.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials(other.credentials);
+ }
+ if (other.isSetFilenames()) {
+ java.util.List<java.lang.String> __this__filenames = new java.util.ArrayList<java.lang.String>(other.filenames);
+ this.filenames = __this__filenames;
+ }
+ }
+
+ @Override
+ public removeLogs_args deepCopy() {
+ return new removeLogs_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tinfo = null;
+ this.credentials = null;
+ this.filenames = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public org.apache.accumulo.core.clientImpl.thrift.TInfo getTinfo() {
+ return this.tinfo;
+ }
+
+ public removeLogs_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 removeLogs_args setCredentials(@org.apache.thrift.annotation.Nullable org.apache.accumulo.core.securityImpl.thrift.TCredentials credentials) {
+ this.credentials = credentials;
+ return this;
+ }
+
+ public void unsetCredentials() {
+ this.credentials = null;
+ }
+
+ /** Returns true if field credentials is set (has been assigned a value) and false otherwise */
+ public boolean isSetCredentials() {
+ return this.credentials != null;
+ }
+
+ public void setCredentialsIsSet(boolean value) {
+ if (!value) {
+ this.credentials = null;
+ }
+ }
+
+ public int getFilenamesSize() {
+ return (this.filenames == null) ? 0 : this.filenames.size();
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getFilenamesIterator() {
+ return (this.filenames == null) ? null : this.filenames.iterator();
+ }
+
+ public void addToFilenames(java.lang.String elem) {
+ if (this.filenames == null) {
+ this.filenames = new java.util.ArrayList<java.lang.String>();
+ }
+ this.filenames.add(elem);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getFilenames() {
+ return this.filenames;
+ }
+
+ public removeLogs_args setFilenames(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> filenames) {
+ this.filenames = filenames;
+ return this;
+ }
+
+ public void unsetFilenames() {
+ this.filenames = null;
+ }
+
+ /** Returns true if field filenames is set (has been assigned a value) and false otherwise */
+ public boolean isSetFilenames() {
+ return this.filenames != null;
+ }
+
+ public void setFilenamesIsSet(boolean value) {
+ if (!value) {
+ this.filenames = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case TINFO:
+ if (value == null) {
+ unsetTinfo();
+ } else {
+ setTinfo((org.apache.accumulo.core.clientImpl.thrift.TInfo)value);
+ }
+ break;
+
+ case CREDENTIALS:
+ if (value == null) {
+ unsetCredentials();
+ } else {
+ setCredentials((org.apache.accumulo.core.securityImpl.thrift.TCredentials)value);
+ }
+ break;
+
+ case FILENAMES:
+ if (value == null) {
+ unsetFilenames();
+ } else {
+ setFilenames((java.util.List<java.lang.String>)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TINFO:
+ return getTinfo();
+
+ case CREDENTIALS:
+ return getCredentials();
+
+ case FILENAMES:
+ return getFilenames();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TINFO:
+ return isSetTinfo();
+ case CREDENTIALS:
+ return isSetCredentials();
+ case FILENAMES:
+ return isSetFilenames();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof removeLogs_args)
+ return this.equals((removeLogs_args)that);
+ return false;
+ }
+
+ public boolean equals(removeLogs_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_tinfo = true && this.isSetTinfo();
+ boolean that_present_tinfo = true && that.isSetTinfo();
+ if (this_present_tinfo || that_present_tinfo) {
+ if (!(this_present_tinfo && that_present_tinfo))
+ return false;
+ if (!this.tinfo.equals(that.tinfo))
+ return false;
+ }
+
+ boolean this_present_credentials = true && this.isSetCredentials();
+ boolean that_present_credentials = true && that.isSetCredentials();
+ if (this_present_credentials || that_present_credentials) {
+ if (!(this_present_credentials && that_present_credentials))
+ return false;
+ if (!this.credentials.equals(that.credentials))
+ return false;
+ }
+
+ boolean this_present_filenames = true && this.isSetFilenames();
+ boolean that_present_filenames = true && that.isSetFilenames();
+ if (this_present_filenames || that_present_filenames) {
+ if (!(this_present_filenames && that_present_filenames))
+ return false;
+ if (!this.filenames.equals(that.filenames))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetFilenames()) ? 131071 : 524287);
+ if (isSetFilenames())
+ hashCode = hashCode * 8191 + filenames.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(removeLogs_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTinfo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCredentials()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetFilenames(), other.isSetFilenames());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFilenames()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filenames, other.filenames);
+ 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("removeLogs_args(");
boolean first = true;
sb.append("tinfo:");
@@ -8419,13 +9628,13 @@ public class TabletServerClientService {
case 3: // FILENAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
- struct.filenames = new java.util.ArrayList<java.lang.String>(_list80.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _elem81;
- for (int _i82 = 0; _i82 < _list80.size; ++_i82)
+ org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
+ struct.filenames = new java.util.ArrayList<java.lang.String>(_list88.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem89;
+ for (int _i90 = 0; _i90 < _list88.size; ++_i90)
{
- _elem81 = iprot.readString();
- struct.filenames.add(_elem81);
+ _elem89 = iprot.readString();
+ struct.filenames.add(_elem89);
}
iprot.readListEnd();
}
@@ -8464,9 +9673,9 @@ public class TabletServerClientService {
oprot.writeFieldBegin(FILENAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filenames.size()));
- for (java.lang.String _iter83 : struct.filenames)
+ for (java.lang.String _iter91 : struct.filenames)
{
- oprot.writeString(_iter83);
+ oprot.writeString(_iter91);
}
oprot.writeListEnd();
}
@@ -8510,9 +9719,9 @@ public class TabletServerClientService {
if (struct.isSetFilenames()) {
{
oprot.writeI32(struct.filenames.size());
- for (java.lang.String _iter84 : struct.filenames)
+ for (java.lang.String _iter92 : struct.filenames)
{
- oprot.writeString(_iter84);
+ oprot.writeString(_iter92);
}
}
}
@@ -8534,13 +9743,13 @@ public class TabletServerClientService {
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list85 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
- struct.filenames = new java.util.ArrayList<java.lang.String>(_list85.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _elem86;
- for (int _i87 = 0; _i87 < _list85.size; ++_i87)
+ org.apache.thrift.protocol.TList _list93 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.filenames = new java.util.ArrayList<java.lang.String>(_list93.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem94;
+ for (int _i95 = 0; _i95 < _list93.size; ++_i95)
{
- _elem86 = iprot.readString();
- struct.filenames.add(_elem86);
+ _elem94 = iprot.readString();
+ struct.filenames.add(_elem94);
}
}
struct.setFilenamesIsSet(true);
@@ -9373,13 +10582,13 @@ public class TabletServerClientService {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
- struct.success = new java.util.ArrayList<java.lang.String>(_list88.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _elem89;
- for (int _i90 = 0; _i90 < _list88.size; ++_i90)
+ org.apache.thrift.protocol.TList _list96 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<java.lang.String>(_list96.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem97;
+ for (int _i98 = 0; _i98 < _list96.size; ++_i98)
{
- _elem89 = iprot.readString();
- struct.success.add(_elem89);
+ _elem97 = iprot.readString();
+ struct.success.add(_elem97);
}
iprot.readListEnd();
}
@@ -9408,9 +10617,9 @@ public class TabletServerClientService {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (java.lang.String _iter91 : struct.success)
+ for (java.lang.String _iter99 : struct.success)
{
- oprot.writeString(_iter91);
+ oprot.writeString(_iter99);
}
oprot.writeListEnd();
}
@@ -9442,9 +10651,9 @@ public class TabletServerClientService {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (java.lang.String _iter92 : struct.success)
+ for (java.lang.String _iter100 : struct.success)
{
- oprot.writeString(_iter92);
+ oprot.writeString(_iter100);
}
}
}
@@ -9456,13 +10665,13 @@ public class TabletServerClientService {
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list93 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
- struct.success = new java.util.ArrayList<java.lang.String>(_list93.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _elem94;
- for (int _i95 = 0; _i95 < _list93.size; ++_i95)
+ org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.success = new java.util.ArrayList<java.lang.String>(_list101.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem102;
+ for (int _i103 = 0; _i103 < _list101.size; ++_i103)
{
- _elem94 = iprot.readString();
- struct.success.add(_elem94);
+ _elem102 = iprot.readString();
+ struct.success.add(_elem102);
}
}
struct.setSuccessIsSet(true);
@@ -12586,26 +13795,26 @@ public class TabletServerClientService {
case 4: // FILES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map96 = iprot.readMapBegin();
- struct.files = new java.util.HashMap<java.lang.String,java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange>>(2*_map96.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _key97;
- @org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange> _val98;
- for (int _i99 = 0; _i99 < _map96.size; ++_i99)
+ org.apache.thrift.protocol.TMap _map104 = iprot.readMapBegin();
+ struct.files = new java.util.HashMap<java.lang.String,java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange>>(2*_map104.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key105;
+ @org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange> _val106;
+ for (int _i107 = 0; _i107 < _map104.size; ++_i107)
{
- _key97 = iprot.readString();
+ _key105 = iprot.readString();
{
- org.apache.thrift.protocol.TList _list100 = iprot.readListBegin();
- _val98 = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TRowRange>(_list100.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TRowRange _elem101;
- for (int _i102 = 0; _i102 < _list100.size; ++_i102)
+ org.apache.thrift.protocol.TList _list108 = iprot.readListBegin();
+ _val106 = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TRowRange>(_list108.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TRowRange _elem109;
+ for (int _i110 = 0; _i110 < _list108.size; ++_i110)
{
- _elem101 = new org.apache.accumulo.core.dataImpl.thrift.TRowRange();
- _elem101.read(iprot);
- _val98.add(_elem101);
+ _elem109 = new org.apache.accumulo.core.dataImpl.thrift.TRowRange();
+ _elem109.read(iprot);
+ _val106.add(_elem109);
}
iprot.readListEnd();
}
- struct.files.put(_key97, _val98);
+ struct.files.put(_key105, _val106);
}
iprot.readMapEnd();
}
@@ -12649,14 +13858,14 @@ public class TabletServerClientService {
oprot.writeFieldBegin(FILES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.files.size()));
- for (java.util.Map.Entry<java.lang.String, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange>> _iter103 : struct.files.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange>> _iter111 : struct.files.entrySet())
{
- oprot.writeString(_iter103.getKey());
+ oprot.writeString(_iter111.getKey());
{
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter103.getValue().size()));
- for (org.apache.accumulo.core.dataImpl.thrift.TRowRange _iter104 : _iter103.getValue())
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter111.getValue().size()));
+ for (org.apache.accumulo.core.dataImpl.thrift.TRowRange _iter112 : _iter111.getValue())
{
- _iter104.write(oprot);
+ _iter112.write(oprot);
}
oprot.writeListEnd();
}
@@ -12709,14 +13918,14 @@ public class TabletServerClientService {
if (struct.isSetFiles()) {
{
oprot.writeI32(struct.files.size());
- for (java.util.Map.Entry<java.lang.String, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange>> _iter105 : struct.files.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange>> _iter113 : struct.files.entrySet())
{
- oprot.writeString(_iter105.getKey());
+ oprot.writeString(_iter113.getKey());
{
- oprot.writeI32(_iter105.getValue().size());
- for (org.apache.accumulo.core.dataImpl.thrift.TRowRange _iter106 : _iter105.getValue())
+ oprot.writeI32(_iter113.getValue().size());
+ for (org.apache.accumulo.core.dataImpl.thrift.TRowRange _iter114 : _iter113.getValue())
{
- _iter106.write(oprot);
+ _iter114.write(oprot);
}
}
}
@@ -12745,25 +13954,25 @@ public class TabletServerClientService {
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TMap _map107 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST);
- struct.files = new java.util.HashMap<java.lang.String,java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange>>(2*_map107.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _key108;
- @org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange> _val109;
- for (int _i110 = 0; _i110 < _map107.size; ++_i110)
+ org.apache.thrift.protocol.TMap _map115 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST);
+ struct.files = new java.util.HashMap<java.lang.String,java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange>>(2*_map115.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key116;
+ @org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.dataImpl.thrift.TRowRange> _val117;
+ for (int _i118 = 0; _i118 < _map115.size; ++_i118)
{
- _key108 = iprot.readString();
+ _key116 = iprot.readString();
{
- org.apache.thrift.protocol.TList _list111 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
- _val109 = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TRowRange>(_list111.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TRowRange _elem112;
- for (int _i113 = 0; _i113 < _list111.size; ++_i113)
+ org.apache.thrift.protocol.TList _list119 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ _val117 = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TRowRange>(_list119.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TRowRange _elem120;
+ for (int _i121 = 0; _i121 < _list119.size; ++_i121)
{
- _elem112 = new org.apache.accumulo.core.dataImpl.thrift.TRowRange();
- _elem112.read(iprot);
- _val109.add(_elem112);
+ _elem120 = new org.apache.accumulo.core.dataImpl.thrift.TRowRange();
+ _elem120.read(iprot);
+ _val117.add(_elem120);
}
}
- struct.files.put(_key108, _val109);
+ struct.files.put(_key116, _val117);
}
}
struct.setFilesIsSet(true);
@@ -14758,14 +15967,14 @@ public class TabletServerClientService {
case 3: // TABLETS_TO_REFRESH
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list114 = iprot.readListBegin();
- struct.tabletsToRefresh = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list114.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem115;
- for (int _i116 = 0; _i116 < _list114.size; ++_i116)
+ org.apache.thrift.protocol.TList _list122 = iprot.readListBegin();
+ struct.tabletsToRefresh = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list122.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem123;
+ for (int _i124 = 0; _i124 < _list122.size; ++_i124)
{
- _elem115 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _elem115.read(iprot);
- struct.tabletsToRefresh.add(_elem115);
+ _elem123 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _elem123.read(iprot);
+ struct.tabletsToRefresh.add(_elem123);
}
iprot.readListEnd();
}
@@ -14804,9 +16013,9 @@ public class TabletServerClientService {
oprot.writeFieldBegin(TABLETS_TO_REFRESH_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tabletsToRefresh.size()));
- for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter117 : struct.tabletsToRefresh)
+ for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter125 : struct.tabletsToRefresh)
{
- _iter117.write(oprot);
+ _iter125.write(oprot);
}
oprot.writeListEnd();
}
@@ -14850,9 +16059,9 @@ public class TabletServerClientService {
if (struct.isSetTabletsToRefresh()) {
{
oprot.writeI32(struct.tabletsToRefresh.size());
- for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter118 : struct.tabletsToRefresh)
+ for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter126 : struct.tabletsToRefresh)
{
- _iter118.write(oprot);
+ _iter126.write(oprot);
}
}
}
@@ -14874,14 +16083,14 @@ public class TabletServerClientService {
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list119 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
- struct.tabletsToRefresh = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list119.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem120;
- for (int _i121 = 0; _i121 < _list119.size; ++_i121)
+ org.apache.thrift.protocol.TList _list127 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.tabletsToRefresh = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list127.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem128;
+ for (int _i129 = 0; _i129 < _list127.size; ++_i129)
{
- _elem120 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _elem120.read(iprot);
- struct.tabletsToRefresh.add(_elem120);
+ _elem128 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _elem128.read(iprot);
+ struct.tabletsToRefresh.add(_elem128);
}
}
struct.setTabletsToRefreshIsSet(true);
@@ -15223,14 +16432,14 @@ public class TabletServerClientService {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list122 = iprot.readListBegin();
- struct.success = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list122.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem123;
- for (int _i124 = 0; _i124 < _list122.size; ++_i124)
+ org.apache.thrift.protocol.TList _list130 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list130.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem131;
+ for (int _i132 = 0; _i132 < _list130.size; ++_i132)
{
- _elem123 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _elem123.read(iprot);
- struct.success.add(_elem123);
+ _elem131 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _elem131.read(iprot);
+ struct.success.add(_elem131);
}
iprot.readListEnd();
}
@@ -15259,9 +16468,9 @@ public class TabletServerClientService {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter125 : struct.success)
+ for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter133 : struct.success)
{
- _iter125.write(oprot);
+ _iter133.write(oprot);
}
oprot.writeListEnd();
}
@@ -15293,9 +16502,9 @@ public class TabletServerClientService {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter126 : struct.success)
+ for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter134 : struct.success)
{
- _iter126.write(oprot);
+ _iter134.write(oprot);
}
}
}
@@ -15307,14 +16516,14 @@ public class TabletServerClientService {
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list127 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
- struct.success = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list127.size);
- @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem128;
- for (int _i129 = 0; _i129 < _list127.size; ++_i129)
+ org.apache.thrift.protocol.TList _list135 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(_list135.size);
+ @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _elem136;
+ for (int _i137 = 0; _i137 < _list135.size; ++_i137)
{
- _elem128 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
- _elem128.read(iprot);
- struct.success.add(_elem128);
+ _elem136 = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent();
+ _elem136.read(iprot);
+ struct.success.add(_elem136);
}
}
struct.setSuccessIsSet(true);
diff --git a/core/src/main/thrift/tabletserver.thrift b/core/src/main/thrift/tabletserver.thrift
index accb311c8b..eb394c95a6 100644
--- a/core/src/main/thrift/tabletserver.thrift
+++ b/core/src/main/thrift/tabletserver.thrift
@@ -179,6 +179,13 @@ service TabletServerClientService {
2:string lock
)
+ list<ActiveCompaction> getActiveCompactions(
+ 2:client.TInfo tinfo
+ 1:security.TCredentials credentials
+ ) throws (
+ 1:client.ThriftSecurityException sec
+ )
+
oneway void removeLogs(
1:client.TInfo tinfo
2:security.TCredentials credentials
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
index 233299b0e5..d1b7b7c114 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
@@ -84,6 +84,7 @@ import org.apache.accumulo.core.tablet.thrift.TUnloadTabletGoal;
import org.apache.accumulo.core.tablet.thrift.TabletManagementClientService;
import org.apache.accumulo.core.tabletingest.thrift.TDurability;
import org.apache.accumulo.core.tabletingest.thrift.TabletIngestClientService;
+import org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction;
import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
import org.apache.accumulo.core.tabletserver.thrift.TabletServerClientService;
import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
@@ -92,6 +93,8 @@ import org.apache.accumulo.core.util.ByteBufferUtil;
import org.apache.accumulo.core.util.Halt;
import org.apache.accumulo.core.util.threads.Threads;
import org.apache.accumulo.server.ServerContext;
+import org.apache.accumulo.server.compaction.CompactionInfo;
+import org.apache.accumulo.server.compaction.FileCompactor;
import org.apache.accumulo.server.conf.TableConfiguration;
import org.apache.accumulo.server.data.ServerConditionalMutation;
import org.apache.accumulo.server.data.ServerMutation;
@@ -1062,6 +1065,26 @@ public class TabletClientHandler implements TabletServerClientService.Iface,
return server.statsKeeper.getTabletStats();
}
+ @Override
+ public List<ActiveCompaction> getActiveCompactions(TInfo tinfo, TCredentials credentials)
+ throws ThriftSecurityException, TException {
+ try {
+ checkPermission(security, context, server, credentials, null, "getActiveCompactions");
+ } catch (ThriftSecurityException e) {
+ log.error("Caller doesn't have permission to get active compactions", e);
+ throw e;
+ }
+
+ List<CompactionInfo> compactions = FileCompactor.getRunningCompactions();
+ List<ActiveCompaction> ret = new ArrayList<>(compactions.size());
+
+ for (CompactionInfo compactionInfo : compactions) {
+ ret.add(compactionInfo.toThrift());
+ }
+
+ return ret;
+ }
+
@Override
public List<TKeyExtent> refreshTablets(TInfo tinfo, TCredentials credentials,
List<TKeyExtent> refreshes) throws TException {
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 88eb567693..63175fb26c 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
@@ -66,6 +66,7 @@ import org.apache.accumulo.core.tabletingest.thrift.TabletIngestClientService;
import org.apache.accumulo.core.tabletscan.thrift.ActiveScan;
import org.apache.accumulo.core.tabletscan.thrift.TSamplerConfiguration;
import org.apache.accumulo.core.tabletscan.thrift.TabletScanClientService;
+import org.apache.accumulo.core.tabletserver.thrift.ActiveCompaction;
import org.apache.accumulo.core.tabletserver.thrift.TabletServerClientService;
import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
import org.apache.accumulo.core.util.threads.ThreadPools;
@@ -194,6 +195,11 @@ public class NullTserver {
}
+ @Override
+ public List<ActiveCompaction> getActiveCompactions(TInfo tinfo, TCredentials credentials) {
+ return new ArrayList<>();
+ }
+
@Override
public TConditionalSession startConditionalUpdate(TInfo tinfo, TCredentials credentials,
List<ByteBuffer> authorizations, String tableID, TDurability durability,