Repository: hbase Updated Branches: refs/heads/0.98 117a30ca0 -> 433672a67
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/433672a6 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/433672a6 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/433672a6 Branch: refs/heads/0.98 Commit: 433672a67b2589bc77d80007c219d03f6a6bf656 Parents: 117a30c Author: Enis Soztutar <e...@apache.org> Authored: Mon Feb 9 17:14:02 2015 -0800 Committer: Enis Soztutar <e...@apache.org> Committed: Mon Feb 9 18:25:28 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/433672a6/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 3f5b1f1..89fa760 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 @@ -167,11 +167,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; } } }