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 2022/05/26 22:29:00 UTC

[hadoop] branch branch-3.2 updated: HDFS-16585.Add @VisibleForTesting in Dispatcher.java (#4337)

This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new cc52627ad43 HDFS-16585.Add @VisibleForTesting in Dispatcher.java (#4337)
cc52627ad43 is described below

commit cc52627ad43d6fb6c129a0ec94850bcbd14593dc
Author: Ashutosh Gupta <as...@st.niituniversity.in>
AuthorDate: Thu May 26 22:18:15 2022 +0100

    HDFS-16585.Add @VisibleForTesting in Dispatcher.java (#4337)
    
    Co-authored-by: Ashutosh Gupta <as...@amazon.com>
    
    Reviewed-by: Tao Li <to...@apache.org>
    Reviewed-by: Ayush Saxena <ay...@apache.org>
    Signed-off-by: Wei-Chiu Chuang <we...@apache.org>
    (cherry picked from commit bee538f785c012794a2dcf122dc8717b18beb0f0)
    (cherry picked from commit d921cc71fdd2422fdf9f5417fd622580eb4438a2)
---
 .../main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java
index 05817936cc0..6713cf0248d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java
@@ -238,6 +238,7 @@ public class Dispatcher {
     private DDatanode proxySource;
     private StorageGroup target;
 
+    @VisibleForTesting
     PendingMove(Source source, StorageGroup target) {
       this.source = source;
       this.target = target;
@@ -279,6 +280,7 @@ public class Dispatcher {
     /**
      * @return true if the given block is good for the tentative move.
      */
+    @VisibleForTesting
     boolean markMovedIfGoodBlock(DBlock block, StorageType targetStorageType) {
       synchronized (block) {
         synchronized (movedBlocks) {
@@ -1355,6 +1357,7 @@ public class Dispatcher {
    * 2. the block does not have a replica/internalBlock on the target;
    * 3. doing the move does not reduce the number of racks that the block has
    */
+  @VisibleForTesting
   boolean isGoodBlockCandidate(StorageGroup source, StorageGroup target,
       StorageType targetStorageType, DBlock block) {
     if (source.equals(target)) {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org