ctubbsii commented on code in PR #6423:
URL: https://github.com/apache/accumulo/pull/6423#discussion_r3415706591
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java:
##########
@@ -1470,12 +1476,17 @@ public TExternalCompactionJob
reserveCompactionJob(TInfo tinfo, TCredentials cre
@Override
public void compactionJobFinished(TInfo tinfo, TCredentials credentials,
- String externalCompactionId, TKeyExtent extent, long fileSize, long
entries)
- throws ThriftSecurityException, TException {
+ String externalCompactionId, TKeyExtent extent, long fileSize, long
entries) {
- if (!security.canPerformSystemActions(credentials)) {
- throw new AccumuloSecurityException(credentials.getPrincipal(),
- SecurityErrorCode.PERMISSION_DENIED).asThriftException();
+ try {
+ if (!security.canPerformSystemActions(credentials)) {
+ throw new ThriftSecurityException(credentials.getPrincipal(),
+ SecurityErrorCode.PERMISSION_DENIED);
+ }
+ } catch (ThriftSecurityException e) {
+ log.warn(
+ "Received compaction job finished message (id: {}) from user ({})
with bad credentials",
+ externalCompactionId, credentials.getPrincipal());
}
Review Comment:
Fixed in fc3826356c8e2171919db07050035495b2a3f741
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java:
##########
@@ -1485,10 +1496,16 @@ public void compactionJobFinished(TInfo tinfo,
TCredentials credentials,
@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();
+ String externalCompactionId, TKeyExtent extent) {
+ try {
+ if (!security.canPerformSystemActions(credentials)) {
+ throw new ThriftSecurityException(credentials.getPrincipal(),
+ SecurityErrorCode.PERMISSION_DENIED);
+ }
+ } catch (ThriftSecurityException e) {
+ log.warn(
+ "Received compaction job failed message (id: {}) from user ({}) with
bad credentials",
+ externalCompactionId, credentials.getPrincipal());
}
Review Comment:
Fixed in fc3826356c8e2171919db07050035495b2a3f741
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]