浏览代码

HDFS-4917. Merge 1494433 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1494434 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 12 年之前
父节点
当前提交
cd5b7bdf06

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -397,6 +397,9 @@ Release 2.1.0-beta - UNRELEASED
     HDFS-4906. HDFS Output streams should not accept writes after being
     closed. (atm)
 
+    HDFS-4917. Start-dfs.sh cannot pass the parameters correctly.
+    (Fengdong Yu via suresh)
+
   BREAKDOWN OF HDFS-347 SUBTASKS AND RELATED JIRAS
 
     HDFS-4353. Encapsulate connections to peers in Peer and PeerServer classes.

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-dfs.sh

@@ -47,7 +47,7 @@ if [ $# -ge 1 ]; then
 fi
 
 #Add other possible options
-nameStartOpt="$nameStartOpts $@"
+nameStartOpt="$nameStartOpt $@"
 
 #---------------------------------------------------------
 # namenodes

+ 3 - 3
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/UnderReplicatedBlocks.java

@@ -190,7 +190,7 @@ class UnderReplicatedBlocks implements Iterable<Block> {
     assert curReplicas >= 0 : "Negative replicas!";
     int priLevel = getPriority(block, curReplicas, decomissionedReplicas,
                                expectedReplicas);
-    if(priLevel != LEVEL && priorityQueues.get(priLevel).add(block)) {
+    if(priorityQueues.get(priLevel).add(block)) {
       if(NameNode.blockStateChangeLog.isDebugEnabled()) {
         NameNode.blockStateChangeLog.debug(
           "BLOCK* NameSystem.UnderReplicationBlock.add:"
@@ -293,10 +293,10 @@ class UnderReplicatedBlocks implements Iterable<Block> {
         " curPri  " + curPri +
         " oldPri  " + oldPri);
     }
-    if(oldPri != LEVEL && oldPri != curPri) {
+    if(oldPri != curPri) {
       remove(block, oldPri);
     }
-    if(curPri != LEVEL && priorityQueues.get(curPri).add(block)) {
+    if(priorityQueues.get(curPri).add(block)) {
       if(NameNode.blockStateChangeLog.isDebugEnabled()) {
         NameNode.blockStateChangeLog.debug(
           "BLOCK* NameSystem.UnderReplicationBlock.update:"