hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: assert in hbase 1.4
Date Tue, 26 Dec 2017 01:10:39 GMT
I got the following if I use your code directly:

testAssert(org.apache.hadoop.hbase.client.TestHCM)  Time elapsed: 0.096
sec  <<< ERROR!
java.io.UncheckedIOException:
org.apache.hadoop.hbase.TableNotFoundException: AssertionTest
at org.apache.hadoop.hbase.client.TestHCM.testAssert(TestHCM.java:243)

If I create the table at the beginning of the test, the test passes without
triggering assertion.

I tried both master branch and branch-1.4

As I mentioned previously, the assertion in your case was probably related
to the formation of row keys in hbase:meta table.
See if you can reproduce the assertion by presplitting the table, etc.

Here is the diff I used based on branch-1.4

diff --git
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
index a5e3a65..2944c8e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
@@ -246,6 +246,18 @@ public class TestHCM {
     TEST_UTIL.shutdownMiniCluster();
   }

+  @Test
+  public void testAssert() throws IOException{
+    Configuration hbaseConfig = TEST_UTIL.getConfiguration();
+    final TableName tableName = TableName.valueOf("assert");
+    TEST_UTIL.createTable(tableName, FAM_NAM).close();
+    String zkQuorum = "hbase123.docker";
+    //hbaseConfig.set(HConstants.ZOOKEEPER_QUORUM, zkQuorum);
+    Connection connection =
ConnectionFactory.createConnection(hbaseConfig);
+    Table table = connection.getTable(tableName);
+    ResultScanner scanner = table.getScanner(new Scan());
+    scanner.iterator().hasNext(); // Exception thrown here
+  }

   private static int getHConnectionManagerCacheSize(){
     return HConnectionTestingUtility.getConnectionCount();

On Mon, Dec 25, 2017 at 4:16 PM, Clément Guillaume <clement@guillaume.bzh>
wrote:

> Here is a unit test, note that the AssertionTest table can exit or not
> exit, assertion will fail un both case.
>
> > @Test
> > public void test() throws IOException{
> > Configuration hbaseConfig = HBaseConfiguration.create();
> > String zkQuorum = "hbase123.docker";
> > hbaseConfig.set(HConstants.ZOOKEEPER_QUORUM, zkQuorum);
> > Connection connection = ConnectionFactory.createConnection(hbaseConfig);
> > Table table = connection.getTable(TableName.valueOf("AssertionTest"));
> > ResultScanner scanner = table.getScanner(new Scan());
> > scanner.iterator().hasNext(); // Exception thrown here
> > }
> >
>
> PS: I'm not receiving email when a response is posted here. I'm not
> subscribed at the hbase-user mailing list but I would have hope that answer
> get sent to me as direct email.
>
> 2017-12-21 12:28 GMT-08:00 Clément Guillaume <clement@guillaume.bzh>:
>
> > I'm upgrading my projects from 1.2.6 to 1.4, and I have a system
> assertion
> > failure (in a failsafe test that run with system assertion enable)
> >
> > java.lang.AssertionError
> > at org.apache.hadoop.hbase.client.ClientScanner.
> > loadCache(ClientScanner.java:484) ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.ClientScanner.next(
> ClientScanner.java:312)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.ConnectionManager$
> > HConnectionImplementation.locateRegionInMeta(
> ConnectionManager.java:1324)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.ConnectionManager$
> > HConnectionImplementation.locateRegion(ConnectionManager.java:1221)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.AsyncProcess$AsyncRequestFutureImpl.
> > findAllLocationsOrFail(AsyncProcess.java:1063)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.AsyncProcess$AsyncRequestFutureImpl.
> > groupAndSendMultiAction(AsyncProcess.java:980)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.AsyncProcess$
> > AsyncRequestFutureImpl.access$200(AsyncProcess.java:667)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.AsyncProcess.submitAll(
> AsyncProcess.java:649)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.AsyncProcess.submitAll(
> AsyncProcess.java:612)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.ConnectionManager$
> > HConnectionImplementation.processBatchCallback(
> ConnectionManager.java:2392)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> > at org.apache.hadoop.hbase.client.HTable.batchCallback(HTable.java:950)
> > ~[hbase-shaded-client-1.4.0.jar:1.4.0]
> >
> > I have one Put action that look like that : {"totalColumns":1,"row":"
> > a7ttxdQY9euS-KEaPIMvKsRUWANCmigsaiT8_-V0Sgc\\x00visited\\x00\\xFF\\
> > xFF\\xFE\\x9F\\x85Dh\\x19","families":{"a":[{"qualifier":"
> > value","vlen":17,"tag":[],"timestamp":9223372036854775807}]}}
> > The cluster is a local standalone instance.
> >
> > I haven't dig into it yet, but it looks like the data is correctly
> written
> > in hbase if I disable assertion.
> > Any idea of what's causing the issue?
> >
> > Thank you.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message