MasterAdminProtos.DeleteTableRequest request = RequestConverter
.buildDeleteTableRequest(byteName);
responses.add(masterAdminKeepAliveConnection.deleteTable(null,
request));
} else {
throw new TableNotDisabledException(tableName);
}
}
return ResponseConverter.buildListExecuteResponse(responses);
} else if (executePlan instanceof TruncateTablePlan) {
List<TruncateTableResponse> responses = new ArrayList<TruncateTableResponse>();
for (String tableName : ((TruncateTablePlan) executePlan)
.getTableNames()) {
byte[] byteName = Bytes.toBytes(tableName);
if (this.connection.isTableDisabled(byteName)) {
MasterAdminProtos.TruncateTableRequest request = RequestConverter
.buildTruncateTableRequest(byteName);
responses.add(masterAdminKeepAliveConnection.truncateTable(null,
request));
} else {
throw new TableNotDisabledException(tableName);
}
}
}
}