use of org.apache.accumulo.core.client.admin.ActiveScan in project accumulo by apache.
the class InstanceOperationsImpl method getActiveScans.
@Override
public List<ActiveScan> getActiveScans(String tserver) throws AccumuloException, AccumuloSecurityException {
final HostAndPort parsedTserver = HostAndPort.fromString(tserver);
Client client = null;
try {
client = ThriftUtil.getTServerClient(parsedTserver, context);
List<ActiveScan> as = new ArrayList<>();
for (org.apache.accumulo.core.tabletserver.thrift.ActiveScan activeScan : client.getActiveScans(Tracer.traceInfo(), context.rpcCreds())) {
try {
as.add(new ActiveScanImpl(context.getInstance(), activeScan));
} catch (TableNotFoundException e) {
throw new AccumuloException(e);
}
}
return as;
} catch (TTransportException e) {
throw new AccumuloException(e);
} catch (ThriftSecurityException e) {
throw new AccumuloSecurityException(e.user, e.code, e);
} catch (TException e) {
throw new AccumuloException(e);
} finally {
if (client != null)
ThriftUtil.returnClient(client);
}
}
Aggregations