use of org.apache.accumulo.core.security.thrift.TCredentials in project accumulo by apache.
the class ReplicationOperationsImpl method drain.
@Override
public void drain(final String tableName, final Set<String> wals) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
requireNonNull(tableName);
final TInfo tinfo = Tracer.traceInfo();
final TCredentials rpcCreds = context.rpcCreds();
// Ask the master if the table is fully replicated given these WALs, but don't poll inside the master
boolean drained = false;
while (!drained) {
drained = getMasterDrain(tinfo, rpcCreds, tableName, wals);
if (!drained) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("Thread interrupted", e);
}
}
}
}
Aggregations