accumulo: The `listcompactions` command error is not helpful

One improvement for the listcompactions command could be to provide a tserver parameter and only list the compactions on that tserver.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

@DomGarguilo I mean we don’t need the full stack trace you had included. If you have already removed it, then we’re on the same page. For the exceptions logged at DEBUG, I was thinking we could do that in addition. If you open a PR with your fix for this issue, I can make more specific suggestions in a code review, if necessary.

I added the stack trace to the message which now reads:

root@uno> listcompactions -ts nonExistantTserver TABLET SERVER | AGE | TYPE | REASON | READ | WROTE | TABLE | TABLET | INPUT | OUTPUT | ITERATORS | ITERATOR OPTIONS ERROR: null. The specified tServer, ‘nonExistantTserver’, was not found. java.lang.IllegalStateException at com.google.common.base.Preconditions.checkState(Preconditions.java:492) at org.apache.accumulo.core.util.HostAndPort.getPort(HostAndPort.java:108) at org.apache.accumulo.core.rpc.TTimeoutTransport.create(TTimeoutTransport.java:67) at org.apache.accumulo.core.rpc.ThriftUtil.createClientTransport(ThriftUtil.java:373) at org.apache.accumulo.core.clientImpl.ThriftTransportPool.createNewTransport(ThriftTransportPool.java:737) at org.apache.accumulo.core.clientImpl.ThriftTransportPool.getTransport(ThriftTransportPool.java:676) at org.apache.accumulo.core.rpc.ThriftUtil.getClient(ThriftUtil.java:131) at org.apache.accumulo.core.rpc.ThriftUtil.getTServerClient(ThriftUtil.java:178) at org.apache.accumulo.core.clientImpl.InstanceOperationsImpl.getActiveCompactions(InstanceOperationsImpl.java:176) at org.apache.accumulo.shell.commands.ActiveCompactionHelper.activeCompactionsForServer(ActiveCompactionHelper.java:88) at org.apache.accumulo.shell.commands.ActiveCompactionHelper.lambda$stream$1(ActiveCompactionHelper.java:119) -------------------------- hit any key to continue or ‘q’ to quit -------------------------- at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.accumulo.fate.util.LoggingRunnable.run(LoggingRunnable.java:37) at java.base/java.lang.Thread.run(Thread.java:834) Not sure if anything else should be added to the message or if this formatting is okay.

This stack trace implies that the error we’re seeing in this example is that HostAndPort.java’s getPort method should use the version of checkState that allows us to provide a more meaningful message, such as the address does not include a port.

Seeing the stack trace is useful for finding out where we can improve the messages, such as that one, but I’m not sure we want to keep the full stack trace here once we’ve improved the messages. Maybe we can log the stack trace as a warning, but otherwise keep the regular listing with just with the message from the exception.