HADOOP-15442. ITestS3AMetrics.testMetricsRegister can't know metrics source's name.
Contributed by Sean Mackrory.
This commit is contained in:
parent
2bb647bb91
commit
b670837469
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue