narendly commented on a change in pull request #770: WIP: Add SharedZkClient
and update SharedZkClientFactory
URL: https://github.com/apache/helix/pull/770#discussion_r380875012
##########
File path:
zookeeper-api/src/main/java/org/apache/helix/zookeeper/api/client/HelixZkClient.java
##########
@@ -89,32 +88,17 @@ public int getSessionTimeout() {
* Deprecated - please use RealmAwareZkClient and RealmAwareZkClientConfig
instead.
*
* Configuration for creating a new HelixZkClient with serializer and
monitor.
- *
- * TODO: If possible, try to merge with RealmAwareZkClient's
RealmAwareZkClientConfig to reduce duplicate logic/code (without breaking
backward-compatibility).
- * Simply making this a subclass of RealmAwareZkClientConfig will break
backward-compatiblity.
*/
@Deprecated
- class ZkClientConfig {
- // For client to init the connection
- private long _connectInitTimeout = DEFAULT_CONNECTION_TIMEOUT;
-
- // Data access configs
- private long _operationRetryTimeout = DEFAULT_OPERATION_TIMEOUT;
-
- // Others
- private PathBasedZkSerializer _zkSerializer;
-
- // Monitoring
- private String _monitorType;
- private String _monitorKey;
- private String _monitorInstanceName = null;
- private boolean _monitorRootPathOnly = true;
+ class ZkClientConfig extends RealmAwareZkClientConfig {
+ @Override
Review comment:
As I explained, the issue was trying to
> cast superclass to subclass which is not allowed
I had to override so that these setters return an instance of
HelixZkClient.ZkClientConfig instead of RealmAwareZkClientConfig. I suggest
thinking more carefully about the return types and their inheritance
relationships.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]