You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2019/08/17 01:39:51 UTC
[hadoop] 01/02: HDFS-14723. Add helper method
FSNamesystem#setBlockManagerForTesting() in branch-2. Contributed by
Wei-Chiu Chuang.
This is an automated email from the ASF dual-hosted git repository.
weichiu pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/hadoop.git
commit f27d040ce329894d14ce7caf42a64816df0a9455
Author: Wei-Chiu Chuang <we...@apache.org>
AuthorDate: Fri Aug 16 18:33:26 2019 -0700
HDFS-14723. Add helper method FSNamesystem#setBlockManagerForTesting() in branch-2. Contributed by Wei-Chiu Chuang.
Reviewed-by: Chao Sun <su...@apache.org>
Reviewed-by: He Xiaoqiao <he...@apache.org>
Reviewed-by: Erik Krogen <xk...@apache.org>
---
.../java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
index e4d7b9c..7fda676 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
@@ -425,7 +425,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
/** The namespace tree. */
FSDirectory dir;
- private final BlockManager blockManager;
+ private BlockManager blockManager;
private final SnapshotManager snapshotManager;
private final CacheManager cacheManager;
private final DatanodeStatistics datanodeStatistics;
@@ -5808,6 +5808,11 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
return blockManager;
}
+ @VisibleForTesting
+ public void setBlockManagerForTesting(BlockManager bm) {
+ this.blockManager = bm;
+ }
+
/** @return the FSDirectory. */
@Override
public FSDirectory getFSDirectory() {
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org