HDFS-7940. Add tracing to DFSClient#setQuotaByStorageType (Rakesh R via Colin P. McCabe)

(cherry picked from commit d8846707c5)
This commit is contained in:
Colin Patrick Mccabe 2015-03-17 10:47:21 -07:00
parent 1c601e492f
commit 455d4aa8a1
2 changed files with 6 additions and 0 deletions

View File

@ -451,6 +451,9 @@ Release 2.7.0 - UNRELEASED
HDFS-2605. Remove redundant "Release 0.21.1" section from CHANGES.txt. HDFS-2605. Remove redundant "Release 0.21.1" section from CHANGES.txt.
(Allen Wittenauer via shv) (Allen Wittenauer via shv)
HDFS-7940. Add tracing to DFSClient#setQuotaByStorageType (Rakesh R via
Colin P. McCabe)
OPTIMIZATIONS OPTIMIZATIONS
HDFS-7454. Reduce memory footprint for AclEntries in NameNode. HDFS-7454. Reduce memory footprint for AclEntries in NameNode.

View File

@ -3088,6 +3088,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
throw new IllegalArgumentException("Don't support Quota for storage type : " throw new IllegalArgumentException("Don't support Quota for storage type : "
+ type.toString()); + type.toString());
} }
TraceScope scope = getPathTraceScope("setQuotaByStorageType", src);
try { try {
namenode.setQuota(src, HdfsConstants.QUOTA_DONT_SET, quota, type); namenode.setQuota(src, HdfsConstants.QUOTA_DONT_SET, quota, type);
} catch (RemoteException re) { } catch (RemoteException re) {
@ -3096,6 +3097,8 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
QuotaByStorageTypeExceededException.class, QuotaByStorageTypeExceededException.class,
UnresolvedPathException.class, UnresolvedPathException.class,
SnapshotAccessControlException.class); SnapshotAccessControlException.class);
} finally {
scope.close();
} }
} }
/** /**