@POST
@Path("/data/datasets/{name}/admin/truncate")
public void truncate(HttpRequest request, HttpResponder responder, @PathParam("name") String instanceName) {
try {
DatasetAdmin datasetAdmin = getDatasetAdmin(instanceName);
datasetAdmin.truncate();
responder.sendJson(HttpResponseStatus.OK, new DatasetAdminOpResponse(null, null));
} catch (HandlerException e) {
LOG.debug("Got handler exception", e);
responder.sendError(e.getFailureStatus(), StringUtils.defaultIfEmpty(e.getMessage(), ""));
} catch (Exception e) {