bhattmanish98 commented on code in PR #8137:
URL: https://github.com/apache/hadoop/pull/8137#discussion_r2647760456


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -281,42 +303,84 @@ private AbfsClient(final URL baseUrl,
         new ThreadFactoryBuilder().setNameFormat("AbfsClient Lease 
Ops").setDaemon(true).build();
     this.executorService = MoreExecutors.listeningDecorator(
         
HadoopExecutors.newScheduledThreadPool(this.abfsConfiguration.getNumLeaseThreads(),
 tf));
-    this.metricFormat = abfsConfiguration.getMetricFormat();
+    
this.isMetricCollectionEnabled.set(abfsConfiguration.isMetricsCollectionEnabled());
     this.isMetricCollectionStopped = new AtomicBoolean(false);
     this.metricAnalysisPeriod = abfsConfiguration.getMetricAnalysisTimeout();
     this.metricIdlePeriod = abfsConfiguration.getMetricIdleTimeout();
-    if (StringUtils.isNotEmpty(metricFormat.toString())) {
-      String metricAccountName = abfsConfiguration.getMetricAccount();
-      String metricAccountKey = abfsConfiguration.getMetricAccountKey();
-      if (StringUtils.isNotEmpty(metricAccountName) && 
StringUtils.isNotEmpty(metricAccountKey)) {
-        isMetricCollectionEnabled = true;
-        abfsCounters.initializeMetrics(metricFormat);
-        int dotIndex = metricAccountName.indexOf(AbfsHttpConstants.DOT);
-        if (dotIndex <= 0) {
-          throw new InvalidUriException(
-              metricAccountName + " - account name is not fully qualified.");
+    if (isMetricCollectionEnabled()) {

Review Comment:
   Okay, let me check the feasibility of this.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to