Browse Source

Fix for HADOOP-102. Contributed by Konstantin.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@390290 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 19 years ago
parent
commit
3f5b4c0626
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/java/org/apache/hadoop/dfs/FSNamesystem.java

+ 2 - 2
src/java/org/apache/hadoop/dfs/FSNamesystem.java

@@ -1310,7 +1310,7 @@ class FSNamesystem implements FSConstants {
             //
             for (Iterator it = targetList.iterator(); it.hasNext(); ) {
                 DatanodeInfo node = (DatanodeInfo) it.next();
-                if ((node.getRemaining() > BLOCK_SIZE * MIN_BLOCKS_FOR_WRITE)) {
+                if (node.getRemaining() > BLOCK_SIZE * MIN_BLOCKS_FOR_WRITE) {
                     return node;
                 }
             }
@@ -1322,7 +1322,7 @@ class FSNamesystem implements FSConstants {
             //
             for (Iterator it = targetList.iterator(); it.hasNext(); ) {
                 DatanodeInfo node = (DatanodeInfo) it.next();
-                if (node.getRemaining() > BLOCK_SIZE * MIN_BLOCKS_FOR_WRITE) {
+                if (node.getRemaining() > BLOCK_SIZE) {
                     return node;
                 }
             }