kokonguyen191 commented on code in PR #6861:
URL: https://github.com/apache/hadoop/pull/6861#discussion_r1636165686


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/site/markdown/HDFSRouterFederation.md:
##########
@@ -288,6 +288,7 @@ For deciding where to create a new file/folder it uses the 
order parameter, it c
 * RANDOM: Random subcluster. This is usually useful for balancing the load 
across. Folders are created in all subclusters.
 * HASH_ALL: Follow consistent hashing at all the levels. This approach tries 
to balance the reads and writes evenly across subclusters. Folders are created 
in all subclusters.
 * SPACE: Try to write data in the subcluster with the most available space. 
Folders are created in all subclusters.
+* LEADER_FOLLOWER: Try to write data in the leader sub-cluster as many as 
possible, if failed, try follower sub-clusters then. Folders are created in all 
sub-clusters.

Review Comment:
   `Try to write data in the leader subcluster as much as possible, if failed, 
try follower subclusters. Folders are created in all subclusters.`



##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/site/markdown/HDFSRouterFederation.md:
##########
@@ -297,6 +298,9 @@ RANDOM can be used for reading and writing data from/into 
different subclusters.
 The common use for this approach is to have the same data in multiple 
subclusters and balance the reads across subclusters.
 For example, if thousands of containers need to read the same data (e.g., a 
library), one can use RANDOM to read the data from any of the subclusters.
 
+LEADER_FOLLOWER can be used in cross-cluster disaster tolerance, it's not for 
sharing overloads among sub-clusters. When using this mode like `-add /data 
ns2,ns1 /data -order LEADER_FOLLOWER`,
+`ns2` is considered as a active sub-cluster and `ns1` is considered as a 
follower sub-cluster. The order of namespaces is always 
`leader,follower,follower...`

Review Comment:
   ```
   `ns2` is considered an active subcluster and `ns1` is considered a follower 
subcluster. The order of namespaces is always `leader,follower,follower...`.
   ```



##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/order/DestinationOrder.java:
##########
@@ -29,11 +29,14 @@ public enum DestinationOrder {
   LOCAL, // Local first
   RANDOM, // Random order
   HASH_ALL, // Follow consistent hashing
-  SPACE; // Available space based order
+  SPACE, // Available space based order
+  LEADER_FOLLOWER; // try leader sub-cluster first, if failed, try followers

Review Comment:
   Small nitpick but should capitalize the first letter of the comment to keep 
it consistent with the other comments



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to