From 1ceb3269337e321e352b7cd9f946c5c52dcfddfa Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Fri, 10 Oct 2014 13:03:29 -0700 Subject: [PATCH] HDFS-7198. Fix "unchecked conversion" warning in DFSClient#getPathTraceScope (cmccabe) --- .../java/org/apache/hadoop/tracing/TraceSamplerFactory.java | 2 +- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/hdfs/DFSClient.java | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/TraceSamplerFactory.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/TraceSamplerFactory.java index 0de7d3e6df..54bcb81b2c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/TraceSamplerFactory.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/TraceSamplerFactory.java @@ -30,7 +30,7 @@ public class TraceSamplerFactory { private static final Logger LOG = LoggerFactory.getLogger(TraceSamplerFactory.class); - public static Sampler createSampler(Configuration conf) { + public static Sampler createSampler(Configuration conf) { String samplerStr = conf.get(CommonConfigurationKeys.HADOOP_TRACE_SAMPLER, CommonConfigurationKeys.HADOOP_TRACE_SAMPLER_DEFAULT); if (samplerStr.equals("NeverSampler")) { diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 47577848f9..ae9f4817a7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -386,6 +386,9 @@ Release 2.7.0 - UNRELEASED HDFS-7194. Fix findbugs "inefficient new String constructor" warning in DFSClient#PATH (yzhang via cmccabe) + HDFS-7198. Fix or suppress findbugs "unchecked conversion" warning in + DFSClient#getPathTraceScope (cmccabe) + Release 2.6.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index 94a68e239d..8a7c8ebcb8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -277,7 +277,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory, @VisibleForTesting KeyProvider provider; private final SpanReceiverHost spanReceiverHost; - private final Sampler traceSampler; + private final Sampler traceSampler; /** * DFSClient configuration