浏览代码

HADOOP-12519. hadoop-azure tests should avoid creating a metrics configuration fiale in the module root directory. Contributed by Chris Nauroth.

cnauroth 9 年之前
父节点
当前提交
2d10cb8e00

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -1293,6 +1293,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()

+ 3 - 1
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;
     }
   }