narendly commented on a change in pull request #1079:
URL: https://github.com/apache/helix/pull/1079#discussion_r437765360
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/PropertyStoreAccessor.java
##########
@@ -134,4 +135,28 @@ public Response putPropertyByPath(@PathParam("clusterId")
String clusterId,
return serverError(e);
}
}
+
+ /**
+ * Recursively deletes the PropertyStore path. If the node does not exist,
it returns OK().
+ * @param clusterId
+ * @param path
+ * @return
+ */
+ @DELETE
+ @Path("{path: .+}")
+ public Response deletePropertyByPath(@PathParam("clusterId") String
clusterId,
+ @PathParam("path") String path) {
+ path = "/" + path;
+ if (!ZkValidationUtil.isPathValid(path)) {
+ LOG.info("The propertyStore path {} is invalid for cluster {}", path,
clusterId);
+ return badRequest(
+ "Invalid path string. Valid path strings use slash as the directory
separator and names the location of ZNode");
Review comment:
This has been formatted with helix-style, so I don't think we need to do
a string concatenation.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]