use of org.apache.cassandra.exceptions.TruncateException in project cassandra by apache.
the class TruncateResponseHandler method get.
public void get() throws TimeoutException {
long timeoutNanos = getTruncateRpcTimeout(NANOSECONDS) - (nanoTime() - start);
boolean completedInTime;
try {
// TODO truncate needs a much longer timeout
completedInTime = condition.await(timeoutNanos, NANOSECONDS);
} catch (InterruptedException e) {
throw new UncheckedInterruptedException(e);
}
if (!completedInTime) {
throw new TimeoutException("Truncate timed out - received only " + responses.get() + " responses");
}
if (truncateFailingReplica != null) {
throw new TruncateException("Truncate failed on replica " + truncateFailingReplica);
}
}
Aggregations