[ 
https://issues.apache.org/jira/browse/HDFS-6685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14079374#comment-14079374
 ] 

Tsz Wo Nicholas Sze commented on HDFS-6685:
-------------------------------------------

> ... But I haven't seen this condition while matching the targets for movement 
> ...

It is in isGoodBlockCandidate(..)
{code}
   private boolean isGoodBlockCandidate(Source source, 
-      BalancerDatanode target, BalancerBlock block) {
+      BalancerDatanode.StorageGroup target, BalancerBlock block) {
+    if (source.storageType != target.storageType) {
+      return false;
+    }
...
{code}

> ... Here r is not used. I feel this and related changes can be removed.

Good catch.  I forgot to remove it after simplified the calculation.

> Balancer should preserve storage type of replicas
> -------------------------------------------------
>
>                 Key: HDFS-6685
>                 URL: https://issues.apache.org/jira/browse/HDFS-6685
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: balancer
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>         Attachments: h6685_20140728.patch, h6685_20140729.patch, 
> h6685_20140730.patch
>
>
> When Balancer moves replicas to balance the cluster, it should always move 
> replicas from a storage with any type to another storage with the same type, 
> i.e. it preserves storage type of replicas.  It does not make sense to move 
> replicas to a different storage type.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to