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 yq...@apache.org on 2018/05/18 02:44:17 UTC

hadoop git commit: HDFS-13573. Javadoc for BlockPlacementPolicyDefault is inaccurate. Contributed by Zsolt Venczel.

Repository: hadoop
Updated Branches:
  refs/heads/trunk 878361369 -> f749517cc


HDFS-13573. Javadoc for BlockPlacementPolicyDefault is inaccurate. Contributed by Zsolt Venczel.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f749517c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f749517c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f749517c

Branch: refs/heads/trunk
Commit: f749517cc78fc761cecff21e8b7f65fb719bfca2
Parents: 8783613
Author: Yiqun Lin <yq...@apache.org>
Authored: Fri May 18 10:43:53 2018 +0800
Committer: Yiqun Lin <yq...@apache.org>
Committed: Fri May 18 10:43:53 2018 +0800

----------------------------------------------------------------------
 .../blockmanagement/BlockPlacementPolicyDefault.java   | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f749517c/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
index a37cda4..518e62c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java
@@ -41,10 +41,15 @@ import com.google.common.annotations.VisibleForTesting;
  * The class is responsible for choosing the desired number of targets
  * for placing block replicas.
  * The replica placement strategy is that if the writer is on a datanode,
- * the 1st replica is placed on the local machine, 
- * otherwise a random datanode. The 2nd replica is placed on a datanode
- * that is on a different rack. The 3rd replica is placed on a datanode
- * which is on a different node of the rack as the second replica.
+ * the 1st replica is placed on the local machine by default
+ * (By passing the {@link org.apache.hadoop.fs.CreateFlag#NO_LOCAL_WRITE} flag
+ * the client can request not to put a block replica on the local datanode.
+ * Subsequent replicas will still follow default block placement policy.).
+ * If the writer is not on a datanode, the 1st replica is placed on a random
+ * node.
+ * The 2nd replica is placed on a datanode that is on a different rack.
+ * The 3rd replica is placed on a datanode which is on a different node of the
+ * rack as the second replica.
  */
 @InterfaceAudience.Private
 public class BlockPlacementPolicyDefault extends BlockPlacementPolicy {


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