@PathParam("name") String name) {
DatasetInstanceConfiguration creationProperties = getInstanceConfiguration(request);
LOG.info("Update dataset {}, type name: {}, typeAndProps: {}",
name, creationProperties.getTypeName(), creationProperties.getProperties());
DatasetSpecification existing = instanceManager.get(name);
if (existing == null) {
// update is true , but dataset instance does not exist, return 404.
responder.sendError(HttpResponseStatus.NOT_FOUND,
String.format("Dataset Instance %s does not exist to update", name));
return;
}
if (!existing.getType().equals(creationProperties.getTypeName())) {
String message = String.format("Cannot update dataset %s instance with a different type, existing type is %s",
name, existing.getType());
LOG.warn(message);
responder.sendError(HttpResponseStatus.CONFLICT, message);
return;
}