narendly commented on a change in pull request #819: Make RealmAwareZkClient
implementations use HttpRoutingDataReader for routing data
URL: https://github.com/apache/helix/pull/819#discussion_r387489615
##########
File path:
zookeeper-api/src/main/java/org/apache/helix/zookeeper/impl/client/FederatedZkClient.java
##########
@@ -80,19 +83,17 @@
private PathBasedZkSerializer _pathBasedZkSerializer;
// TODO: support capacity of ZkClient number in one FederatedZkClient and do
garbage collection.
- public FederatedZkClient(RealmAwareZkClient.RealmAwareZkClientConfig
clientConfig,
- MetadataStoreRoutingData metadataStoreRoutingData) {
- if (metadataStoreRoutingData == null) {
- throw new IllegalArgumentException("MetadataStoreRoutingData cannot be
null!");
- }
+ public FederatedZkClient(RealmAwareZkClient.RealmAwareZkClientConfig
clientConfig)
+ throws IOException, InvalidRoutingDataException {
Review comment:
Here's one example where using checked exceptions is beneficial.
1) You could imagine a scenario where in the future we might have different
sources from which we could obtain routing data. There is MSDS-1, MSDS-2, and
MSDS-3 with different endpoints. In this case, we could add logic for trying
options 1, 2, and 3 in order in case we run into IOException. Now, this logic
won't apply to InvalidRoutingDataException because that implies that a data
source is available but the actual routing data is invalid. This way, we could
handle different exceptions differently.
----------------------------------------------------------------
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]