HDFS-6518. TestCacheDirectives#testExceedsCapacity should take FSN read lock when accessing pendingCached list. (wang)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1603017 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce88f5d63a
commit
88344f9b06
|
@ -186,6 +186,10 @@ Release 2.5.0 - UNRELEASED
|
|||
HDFS-6499. Use NativeIO#renameTo instead of File#renameTo in
|
||||
FileJournalManager. (Yongjun Zhang via atm)
|
||||
|
||||
HDFS-6518. TestCacheDirectives#testExceedsCapacity should
|
||||
take FSN read lock when accessing pendingCached list.
|
||||
(wang)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)
|
||||
|
|
|
@ -1408,12 +1408,17 @@ public class TestCacheDirectives {
|
|||
*/
|
||||
private void checkPendingCachedEmpty(MiniDFSCluster cluster)
|
||||
throws Exception {
|
||||
final DatanodeManager datanodeManager =
|
||||
cluster.getNamesystem().getBlockManager().getDatanodeManager();
|
||||
for (DataNode dn : cluster.getDataNodes()) {
|
||||
DatanodeDescriptor descriptor =
|
||||
datanodeManager.getDatanode(dn.getDatanodeId());
|
||||
Assert.assertTrue(descriptor.getPendingCached().isEmpty());
|
||||
cluster.getNamesystem().readLock();
|
||||
try {
|
||||
final DatanodeManager datanodeManager =
|
||||
cluster.getNamesystem().getBlockManager().getDatanodeManager();
|
||||
for (DataNode dn : cluster.getDataNodes()) {
|
||||
DatanodeDescriptor descriptor =
|
||||
datanodeManager.getDatanode(dn.getDatanodeId());
|
||||
Assert.assertTrue(descriptor.getPendingCached().isEmpty());
|
||||
}
|
||||
} finally {
|
||||
cluster.getNamesystem().readUnlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue