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/trunk@1603016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
082c2ab8b8
commit
45c52ef924
|
@ -443,6 +443,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