pkuwm commented on a change in pull request #1079:
URL: https://github.com/apache/helix/pull/1079#discussion_r437767800
##########
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:
helix-style won't be able to limit such long string within 100 chars per
line. We just need to do it manually. If we have checkstyle for 100 chars
check, this won't pass.
----------------------------------------------------------------
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]