From d8846707c58c5c3ec542128df13a82ddc05fb347 Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Tue, 17 Mar 2015 10:47:21 -0700 Subject: [PATCH] HDFS-7940. Add tracing to DFSClient#setQuotaByStorageType (Rakesh R via Colin P. McCabe) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/hdfs/DFSClient.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index bbe1f026fc..3e11356e32 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -756,6 +756,9 @@ Release 2.7.0 - UNRELEASED HDFS-2605. Remove redundant "Release 0.21.1" section from CHANGES.txt. (Allen Wittenauer via shv) + HDFS-7940. Add tracing to DFSClient#setQuotaByStorageType (Rakesh R via + Colin P. McCabe) + OPTIMIZATIONS HDFS-7454. Reduce memory footprint for AclEntries in NameNode. 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 f970fef472..3c8fd31854 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 @@ -3089,6 +3089,7 @@ void setQuotaByStorageType(String src, StorageType type, long quota) throw new IllegalArgumentException("Don't support Quota for storage type : " + type.toString()); } + TraceScope scope = getPathTraceScope("setQuotaByStorageType", src); try { namenode.setQuota(src, HdfsConstants.QUOTA_DONT_SET, quota, type); } catch (RemoteException re) { @@ -3097,6 +3098,8 @@ void setQuotaByStorageType(String src, StorageType type, long quota) QuotaByStorageTypeExceededException.class, UnresolvedPathException.class, SnapshotAccessControlException.class); + } finally { + scope.close(); } } /**