desaikomal commented on code in PR #2339:
URL: https://github.com/apache/helix/pull/2339#discussion_r1080545253
##########
meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/ZkMetaClient.java:
##########
@@ -236,6 +239,10 @@ public ConnectState getClientConnectionState() {
@Override
public boolean subscribeDataChange(String key, DataChangeListener listener,
boolean skipWatchingNonExistNode, boolean persistListener) {
+ if (!persistListener) {
+ throw new NotImplementedException("Non-persist (one-time) listener is
not supported in ZkMetaClient.");
+ }
+ _zkClient.subscribeDataChanges(key, new DataListenerConverter(listener));
Review Comment:
i may remember it wrong, but i thought there are 2 variations of this
method, one explicitly taking listener-type. if so, can we use that variant,
please
##########
meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/ZkMetaClient.java:
##########
@@ -236,6 +239,10 @@ public ConnectState getClientConnectionState() {
@Override
public boolean subscribeDataChange(String key, DataChangeListener listener,
boolean skipWatchingNonExistNode, boolean persistListener) {
+ if (!persistListener) {
+ throw new NotImplementedException("Non-persist (one-time) listener is
not supported in ZkMetaClient.");
Review Comment:
nit: should we add "currently" or we will never support it?
##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java:
##########
@@ -2489,7 +2489,7 @@ public Object call() throws Exception {
});
}
- protected void connect(final long maxMsToWaitUntilConnected)
+ public void connect(final long maxMsToWaitUntilConnected)
Review Comment:
Any reason why this method was protected earlier? I would assume this method
to be public in first place.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]