HDFS-13898 Addendum: add a missing test helper method

This commit is contained in:
Chen Liang 2019-08-12 10:31:37 -07:00
parent 585b6de637
commit 0d153dcb8c
1 changed files with 6 additions and 1 deletions

View File

@ -428,7 +428,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
/** The namespace tree. */ /** The namespace tree. */
FSDirectory dir; FSDirectory dir;
private final BlockManager blockManager; private BlockManager blockManager;
private final SnapshotManager snapshotManager; private final SnapshotManager snapshotManager;
private final CacheManager cacheManager; private final CacheManager cacheManager;
private final DatanodeStatistics datanodeStatistics; private final DatanodeStatistics datanodeStatistics;
@ -5830,6 +5830,11 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
return blockManager; return blockManager;
} }
@VisibleForTesting
public void setBlockManagerForTesting(BlockManager bm) {
this.blockManager = bm;
}
/** @return the FSDirectory. */ /** @return the FSDirectory. */
@Override @Override
public FSDirectory getFSDirectory() { public FSDirectory getFSDirectory() {