@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();
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);
}
}
}
}