128129130131132133134135136137138
responder.sendError(HttpResponseStatus.BAD_REQUEST, msg); return; } DatasetAdmin admin = type.getAdmin(spec); admin.drop(); responder.sendJson(HttpResponseStatus.OK, spec); } @POST @Path("/data/datasets/{name}/admin/truncate")
6970717273747576777879
if (type == null) { throw new IllegalArgumentException("Dataset type cannot be instantiated for provided type meta: " + typeMeta); } DatasetAdmin admin = type.getAdmin(spec); admin.drop(); } @Override public void truncate(String instanceName) throws Exception { getAdmin(instanceName).truncate();