HADOOP-15442. ITestS3AMetrics.testMetricsRegister can't know metrics source's name.

Contributed by Sean Mackrory.
This commit is contained in:
Steve Loughran 2018-05-15 16:13:56 +01:00
parent 2bb647bb91
commit b670837469
2 changed files with 0 additions and 8 deletions

View File

@ -267,9 +267,6 @@ public class S3AInstrumentation implements Closeable, MetricsSource {
number = ++metricsSourceNameCounter;
}
String msName = METRICS_SOURCE_BASENAME + number;
if (number > 1) {
msName = msName + number;
}
metricsSourceName = msName + "-" + name.getHost();
metricsSystem.register(metricsSourceName, "", this);
}

View File

@ -38,11 +38,6 @@ public class ITestS3AMetrics extends AbstractS3ATestBase {
Path dest = path("testMetricsRegister");
ContractTestUtils.touch(fs, dest);
String targetMetricSource = "S3AMetrics1" + "-" + fs.getBucket();
assertNotNull("No metrics under test fs for " + targetMetricSource,
fs.getInstrumentation().getMetricsSystem()
.getSource(targetMetricSource));
MutableCounterLong fileCreated =
(MutableCounterLong) fs.getInstrumentation().getRegistry()
.get(Statistic.FILES_CREATED.getSymbol());