hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject hbase git commit: HBASE-12998 Compilation with Hdfs-2.7.0-SNAPSHOT is broken after HDFS-7647
Date Tue, 10 Feb 2015 02:18:04 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 e06c0d006 -> 66ccc2211


HBASE-12998 Compilation with Hdfs-2.7.0-SNAPSHOT is broken after HDFS-7647


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

Branch: refs/heads/branch-1
Commit: 66ccc22117beb9908057f941c9e3ea3fbd6880c0
Parents: e06c0d0
Author: Enis Soztutar <enis@apache.org>
Authored: Mon Feb 9 17:14:02 2015 -0800
Committer: Enis Soztutar <enis@apache.org>
Committed: Mon Feb 9 18:18:01 2015 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/fs/TestBlockReorder.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/66ccc221/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java
index 3379dff..c99f6ba 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/fs/TestBlockReorder.java
@@ -174,11 +174,12 @@ public class TestBlockReorder {
           public void reorderBlocks(Configuration c, LocatedBlocks lbs, String src) {
             for (LocatedBlock lb : lbs.getLocatedBlocks()) {
               if (lb.getLocations().length > 1) {
-                if (lb.getLocations()[0].getHostName().equals(lookup)) {
+                DatanodeInfo[] infos = lb.getLocations();
+                if (infos[0].getHostName().equals(lookup)) {
                   LOG.info("HFileSystem bad host, inverting");
-                  DatanodeInfo tmp = lb.getLocations()[0];
-                  lb.getLocations()[0] = lb.getLocations()[1];
-                  lb.getLocations()[1] = tmp;
+                  DatanodeInfo tmp = infos[0];
+                  infos[0] = infos[1];
+                  infos[1] = tmp;
                 }
               }
             }


Mime
View raw message