zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolivelli <...@git.apache.org>
Subject [GitHub] zookeeper pull request #601: WIP - ZOOKEEPER-3123 MetricsProvider Lifecycle ...
Date Fri, 24 Aug 2018 07:43:28 GMT
Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/601#discussion_r212545767
  
    --- Diff: src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java ---
    @@ -117,13 +121,23 @@ public void runFromConfig(ServerConfig config)
             LOG.info("Starting server");
             FileTxnSnapLog txnLog = null;
             try {
    +            try {
    +                metricsProvider = MetricsProviderBootstrap
    +                        .startMetricsProvider(config.metricsProviderClassName, new Properties());
    +            } catch (MetricsProviderLifeCycleException error) {
    +                LOG.error("Cannot boot MetricsProvider {}", config.metricsProviderClassName,
error);
    +                throw new IOException("Cannot boot MetricsProvider "+config.metricsProviderClassName,
    --- End diff --
    
    Personally I don't like IOException, here in ZK  it is like a RuntimeException, with no
explicitly meaning. I would prefer not to throw such generic exceptions from nee code


---

Mime
View raw message