}
}
public void truncate(String cfname) throws InvalidRequestException, UnavailableException, TimedOutException, TException
{
ClientState cState = state();
try
{
String keyspace = cState.getKeyspace();
cState.hasColumnFamilyAccess(keyspace, cfname, Permission.MODIFY);
if (startSessionIfRequested())
{
Tracing.instance().begin("truncate", ImmutableMap.of("cf", cfname, "ks", keyspace));
}
else
{
logger.debug("truncating {}.{}", cState.getKeyspace(), cfname);
}
schedule(DatabaseDescriptor.getTruncateRpcTimeout());
try
{
StorageProxy.truncateBlocking(cState.getKeyspace(), cfname);
}
finally
{
release();
}