lakshmi-manasa-g commented on a change in pull request #938: SAMZA-1531:
Support run.id in standalone for batch processing.
URL: https://github.com/apache/samza/pull/938#discussion_r281294412
##########
File path: samza-core/src/main/java/org/apache/samza/zk/ZkDistributedLock.java
##########
@@ -114,4 +107,29 @@ public void unlockAndSet() {
LOG.warn("Ephemeral lock node you want to delete doesn't exist");
}
}
+
+ /**
+ * Listener for changes in children of LOCK
+ * children are the ephemeral nodes created to acquire the lock
+ */
+ class ParticipantChangeHandler extends
ZkUtils.GenerationAwareZkChildListener {
+
+ public ParticipantChangeHandler(ZkUtils zkUtils) {
+ super(zkUtils, "ParticipantChangeHandler");
+ }
+
+ // Called when the children of the given path changed.
+ @Override
+ public void doHandleChildChange(String parentPath, List<String>
currentChildren)
+ throws Exception {
+ synchronized (mutex) {
+ if (currentChildren == null) {
Review comment:
When the Znode at parentPath has been deleted.
https://github.com/sgroschupf/zkclient/blob/03ccf12c70aca2f771bfcd94d44dc7c4d4a1495e/src/main/java/org/I0Itec/zkclient/ZkClient.java#L846
since Im logging the currentChildren and then later fetching the list of
children in lock, thought it might be best to warn and avoid going to lock with
null children.
----------------------------------------------------------------
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]
With regards,
Apache Git Services