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
|
HDFS-6499. Use NativeIO#renameTo instead of File#renameTo in
|
||||||
FileJournalManager. (Yongjun Zhang via atm)
|
FileJournalManager. (Yongjun Zhang via atm)
|
||||||
|
|
||||||
|
HDFS-6518. TestCacheDirectives#testExceedsCapacity should
|
||||||
|
take FSN read lock when accessing pendingCached list.
|
||||||
|
(wang)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)
|
HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)
|
||||||
|
|
|
@ -1408,12 +1408,17 @@ public class TestCacheDirectives {
|
||||||
*/
|
*/
|
||||||
private void checkPendingCachedEmpty(MiniDFSCluster cluster)
|
private void checkPendingCachedEmpty(MiniDFSCluster cluster)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
final DatanodeManager datanodeManager =
|
cluster.getNamesystem().readLock();
|
||||||
cluster.getNamesystem().getBlockManager().getDatanodeManager();
|
try {
|
||||||
for (DataNode dn : cluster.getDataNodes()) {
|
final DatanodeManager datanodeManager =
|
||||||
DatanodeDescriptor descriptor =
|
cluster.getNamesystem().getBlockManager().getDatanodeManager();
|
||||||
datanodeManager.getDatanode(dn.getDatanodeId());
|
for (DataNode dn : cluster.getDataNodes()) {
|
||||||
Assert.assertTrue(descriptor.getPendingCached().isEmpty());
|
DatanodeDescriptor descriptor =
|
||||||
|
datanodeManager.getDatanode(dn.getDatanodeId());
|
||||||
|
Assert.assertTrue(descriptor.getPendingCached().isEmpty());
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
cluster.getNamesystem().readUnlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue