keith-turner commented on a change in pull request #2096:
URL: https://github.com/apache/accumulo/pull/2096#discussion_r633932801



##########
File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/ThriftClientHandler.java
##########
@@ -1654,6 +1658,79 @@ public void compact(TInfo tinfo, TCredentials 
credentials, String lock, String t
     return ret;
   }
 
+  @Override
+  public List<TCompactionQueueSummary> getCompactionQueueInfo(TInfo tinfo, 
TCredentials credentials)
+      throws ThriftSecurityException, TException {
+
+    if (!security.canPerformSystemActions(credentials)) {
+      throw new AccumuloSecurityException(credentials.getPrincipal(),
+          SecurityErrorCode.PERMISSION_DENIED).asThriftException();
+    }
+
+    return server.getCompactionManager().getCompactionQueueSummaries();
+  }
+
+  @Override
+  public TExternalCompactionJob reserveCompactionJob(TInfo tinfo, TCredentials 
credentials,
+      String queueName, long priority, String compactor, String 
externalCompactionId)
+      throws ThriftSecurityException, TException {
+
+    if (!security.canPerformSystemActions(credentials)) {
+      throw new AccumuloSecurityException(credentials.getPrincipal(),
+          SecurityErrorCode.PERMISSION_DENIED).asThriftException();
+    }
+
+    ExternalCompactionId eci = ExternalCompactionId.of(externalCompactionId);
+
+    var extCompaction = 
server.getCompactionManager().reserveExternalCompaction(queueName, priority,
+        compactor, eci);
+
+    if (extCompaction != null) {
+      return extCompaction.toThrift();
+    }
+
+    return new TExternalCompactionJob();
+  }
+
+  @Override
+  public void compactionJobFinished(TInfo tinfo, TCredentials credentials,
+      String externalCompactionId, TKeyExtent extent, long fileSize, long 
entries)
+      throws ThriftSecurityException, TException {
+
+    if (!security.canPerformSystemActions(credentials)) {
+      throw new AccumuloSecurityException(credentials.getPrincipal(),
+          SecurityErrorCode.PERMISSION_DENIED).asThriftException();
+    }
+
+    server.getCompactionManager().commitExternalCompaction(
+        ExternalCompactionId.of(externalCompactionId), 
KeyExtent.fromThrift(extent),
+        server.getOnlineTablets(), fileSize, entries);
+  }
+
+  @Override
+  public void compactionJobFailed(TInfo tinfo, TCredentials credentials,
+      String externalCompactionId, TKeyExtent extent) throws TException {
+    if (!security.canPerformSystemActions(credentials)) {
+      throw new AccumuloSecurityException(credentials.getPrincipal(),
+          SecurityErrorCode.PERMISSION_DENIED).asThriftException();
+    }
+
+    server.getCompactionManager().externalCompactionFailed(
+        ExternalCompactionId.of(externalCompactionId), 
KeyExtent.fromThrift(extent),
+        server.getOnlineTablets());
+  }
+
+  @Override
+  public boolean isRunningExternalCompaction(TInfo tinfo, TCredentials 
credentials,

Review comment:
       This thrift method may not be called by anything.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to