From c7f87dc2d0434605adc6885055218f666d10ff7f Mon Sep 17 00:00:00 2001 From: cnauroth Date: Wed, 28 Oct 2015 09:44:10 -0700 Subject: [PATCH] HADOOP-12519. hadoop-azure tests should avoid creating a metrics configuration fiale in the module root directory. Contributed by Chris Nauroth. (cherry picked from commit 2d10cb8e00fd84be26b51f9fba819e3e5b6cdcbf) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../apache/hadoop/fs/azure/AzureBlobStorageTestAccount.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index e77d7c7af9d..9fcc13ec7dc 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -693,6 +693,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12178. NPE during handling of SASL setup if problem with SASL resolver class. (Steve Loughran via zxu) + HADOOP-12519. hadoop-azure tests should avoid creating a metrics + configuration file in the module root directory. (cnauroth) + OPTIMIZATIONS HADOOP-12051. ProtobufRpcEngine.invoke() should use Exception.toString() diff --git a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/AzureBlobStorageTestAccount.java b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/AzureBlobStorageTestAccount.java index 635c024185e..628fe7e4569 100644 --- a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/AzureBlobStorageTestAccount.java +++ b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/AzureBlobStorageTestAccount.java @@ -38,6 +38,7 @@ import org.apache.hadoop.metrics2.AbstractMetric; import org.apache.hadoop.metrics2.MetricsRecord; import org.apache.hadoop.metrics2.MetricsSink; import org.apache.hadoop.metrics2.MetricsTag; +import org.apache.hadoop.metrics2.impl.TestMetricsConfig; import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; import com.microsoft.azure.storage.AccessCondition; @@ -252,7 +253,8 @@ public final class AzureBlobStorageTestAccount { new org.apache.hadoop.metrics2.impl.ConfigBuilder() .add("azure-file-system.sink.azuretestcollector.class", StandardCollector.class.getName()) - .save("hadoop-metrics2-azure-file-system.properties"); + .save(TestMetricsConfig.getTestFilename( + "hadoop-metrics2-azure-file-system.properties")); metricsConfigSaved = true; } }