tisonkun commented on code in PR #2086: URL: https://github.com/apache/zookeeper/pull/2086#discussion_r1400657176
########## zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java: ########## @@ -99,35 +102,34 @@ public class PrometheusMetricsProvider implements MetricsProvider { * </p> */ private final CollectorRegistry collectorRegistry = CollectorRegistry.defaultRegistry; - private final RateLogger rateLogger = new RateLogger(LOG, 60 * 1000); private String host = "0.0.0.0"; private int port = 7000; private boolean exportJvmInfo = true; private Server server; private final MetricsServletImpl servlet = new MetricsServletImpl(); private final Context rootContext = new Context(); - private int numWorkerThreads = 1; - private int maxQueueSize = 1000000; private long workerShutdownTimeoutMs = 1000; - private Optional<ExecutorService> executorOptional = Optional.empty(); + private int summaryRotateSeconds = 60; + private ScheduledExecutorService executorService; @Override public void configure(Properties configuration) throws MetricsProviderLifeCycleException { LOG.info("Initializing metrics, configuration: {}", configuration); this.host = configuration.getProperty("httpHost", "0.0.0.0"); this.port = Integer.parseInt(configuration.getProperty("httpPort", "7000")); this.exportJvmInfo = Boolean.parseBoolean(configuration.getProperty("exportJvmInfo", "true")); - this.numWorkerThreads = Integer.parseInt( - configuration.getProperty(NUM_WORKER_THREADS, "1")); - this.maxQueueSize = Integer.parseInt( - configuration.getProperty(MAX_QUEUE_SIZE, "1000000")); + if (configuration.containsKey(NUM_WORKER_THREADS) || configuration.containsKey(MAX_QUEUE_SIZE)) { + LOG.warn("The configuration {} and {} are deprecated, it is ignored. See details in ZOOKEEPER-4741", Review Comment: OK I see that these two options are ignored. Please add to the field comment also. -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org