You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2018/10/12 23:10:07 UTC
[1/2] hbase git commit: Revert "HBASE-21242 [amv2] Miscellaneous
minor log and assign procedure create improvements;
ADDENDUM Fix TestHRegionInfo"
Repository: hbase
Updated Branches:
refs/heads/branch-2.1 19cb105a7 -> 7f3ca4643
Revert "HBASE-21242 [amv2] Miscellaneous minor log and assign procedure create improvements; ADDENDUM Fix TestHRegionInfo"
This reverts commit a9d3ac23d84dcd728ee08f4262e3d9b31df26b7e.
Let me do a better fix, one that does TestHRegionInfo and
TestHRegionInfoDisplay
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5762f879
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5762f879
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5762f879
Branch: refs/heads/branch-2.1
Commit: 5762f879d2e2c4b2152ce124aa3cdf7dd44f2819
Parents: 19cb105
Author: Michael Stack <st...@apache.org>
Authored: Fri Oct 12 16:07:55 2018 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Fri Oct 12 16:09:53 2018 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/5762f879/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
index 48b0ff3..50b675d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
@@ -339,12 +339,7 @@ public class TestHRegionInfo {
origDesc.indexOf(Bytes.toStringBinary(startKey)) +
Bytes.toStringBinary(startKey).length());
assert(firstPart.equals(firstPartOrig));
- // The elapsed time may be different in the two Strings since they were calculated at different
- // times... so, don't include that portion when we compare. It starts with a '('.
- int indexOfElapsedTime = secondPart.indexOf("(");
- assertTrue(indexOfElapsedTime > 0);
- assert(secondPart.substring(0, indexOfElapsedTime).
- equals(secondPartOrig.substring(0, indexOfElapsedTime)));
+ assert(secondPart.equals(secondPartOrig));
}
private void checkEquality(HRegionInfo h, Configuration conf) throws IOException {
[2/2] hbase git commit: HBASE-21242 [amv2] Miscellaneous minor log
and assign procedure create improvements;
ADDENDUM Fix TestHRegionInfo AND TestRegionInfoDisplay
Posted by st...@apache.org.
HBASE-21242 [amv2] Miscellaneous minor log and assign procedure create improvements; ADDENDUM Fix TestHRegionInfo AND TestRegionInfoDisplay
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7f3ca464
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7f3ca464
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7f3ca464
Branch: refs/heads/branch-2.1
Commit: 7f3ca4643d2a247b8665dd5e56271a2f52e60f2c
Parents: 5762f87
Author: Michael Stack <st...@apache.org>
Authored: Fri Oct 12 16:09:37 2018 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Fri Oct 12 16:09:54 2018 -0700
----------------------------------------------------------------------
.../hadoop/hbase/client/TestRegionInfoDisplay.java | 13 ++++++++++++-
.../hadoop/hbase/regionserver/TestHRegionInfo.java | 3 +++
2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/7f3ca464/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRegionInfoDisplay.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRegionInfoDisplay.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRegionInfoDisplay.java
index 1a6f2f7..8390b40 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRegionInfoDisplay.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRegionInfoDisplay.java
@@ -34,6 +34,8 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
+import static org.junit.Assert.assertTrue;
+
@Category({MasterTests.class, SmallTests.class})
public class TestRegionInfoDisplay {
@@ -92,7 +94,16 @@ public class TestRegionInfoDisplay {
origDesc.indexOf(Bytes.toStringBinary(startKey)) +
Bytes.toStringBinary(startKey).length());
assert(firstPart.equals(firstPartOrig));
- assert(secondPart.equals(secondPartOrig));
+ // The elapsed time may be different in the two Strings since they were calculated at different
+ // times... so, don't include that portion when we compare. It starts with a '('.
+ // Second part looks like this:
+ // ",1539385518431.9d15487c60247dc3876b8b2a842929ed. state=OPEN,
+ // ts=Fri Oct 12 16:05:18 PDT 2018 (PT0S ago), server=null"
+ int indexOfElapsedTime = secondPart.indexOf("(");
+ assertTrue(indexOfElapsedTime > 0);
+ assertTrue(secondPart + " " + secondPartOrig,
+ secondPart.substring(0, indexOfElapsedTime).equals(secondPartOrig.
+ substring(0, indexOfElapsedTime)));
}
private void checkEquality(RegionInfo ri, Configuration conf) throws IOException {
http://git-wip-us.apache.org/repos/asf/hbase/blob/7f3ca464/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
index 50b675d..8239f01 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
@@ -296,6 +296,7 @@ public class TestHRegionInfo {
assertEquals(expectedHri, convertedHri);
}
+<<<<<<< Updated upstream
@Test
public void testRegionDetailsForDisplay() throws IOException {
byte[] startKey = new byte[] {0x01, 0x01, 0x02, 0x03};
@@ -362,5 +363,7 @@ public class TestHRegionInfo {
}
}
}
+=======
+>>>>>>> Stashed changes
}