You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by GitBox <gi...@apache.org> on 2022/11/16 01:41:21 UTC

[GitHub] [ambari-metrics] kevinw66 commented on a diff in pull request #57: AMBARI-25549 NegativeArraySizeException thrown when invoking CurrentC…

kevinw66 commented on code in PR #57:
URL: https://github.com/apache/ambari-metrics/pull/57#discussion_r1023418944


##########
ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java:
##########
@@ -513,72 +537,59 @@ protected void loadTruststore(String trustStorePath, String trustStoreType,
    *
    * @return String Collector hostname
    */
-  protected synchronized String findPreferredCollectHost() {
-    if (!isInitializedForHA) {
-      init();
-    }
-
-    shardExpired = false;
-    // Auto expire and re-calculate after 1 hour
-    if (targetCollectorHostSupplier != null) {
-      String targetCollector = targetCollectorHostSupplier.get();
-      if (targetCollector != null) {
-        return targetCollector;
+protected String findPreferredCollectHost() {

Review Comment:
   Indent problem here



-- 
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: commits-unsubscribe@ambari.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org