hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yu Li (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17212) Should add null checker on table name in HTable and RegionServerCallable constructor
Date Thu, 01 Dec 2016 03:15:58 GMT

    [ https://issues.apache.org/jira/browse/HBASE-17212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15710701#comment-15710701

Yu Li commented on HBASE-17212:

Checking the post commit UT report, the change here has introduced a regression failure on
TestHTableMultiplexer (thanks [~tedyu] for the reminder), and we could see below exception
in the UT log:
2016-11-30 22:53:00,301 ERROR [htable-pool20-t1] client.AsyncRequestFutureImpl$SingleServerRequestRunnable(259):
Internal AsyncProcess #24 error for null processing for asf902.gq1.ygridcore.net,44046,1480546369625
java.lang.IllegalArgumentException: Given tableName is null
	at org.apache.hadoop.hbase.client.RegionServerCallable.<init>(RegionServerCallable.java:82)
	at org.apache.hadoop.hbase.client.ClientServiceCallable.<init>(ClientServiceCallable.java:38)
	at org.apache.hadoop.hbase.client.CancellableRegionServerCallable.<init>(CancellableRegionServerCallable.java:44)
	at org.apache.hadoop.hbase.client.MultiServerCallable.<init>(MultiServerCallable.java:59)
	at org.apache.hadoop.hbase.client.AsyncRequestFutureImpl.createCallable(AsyncRequestFutureImpl.java:1298)
	at org.apache.hadoop.hbase.client.AsyncRequestFutureImpl.access$1000(AsyncRequestFutureImpl.java:70)
	at org.apache.hadoop.hbase.client.AsyncRequestFutureImpl$SingleServerRequestRunnable.run(AsyncRequestFutureImpl.java:223)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

After investigation, there's some case we allow cross-table Rpc call through {{AsyncProcess#submitMultiActions}},
just like it does in {{HTableMultiplexer}}, which will group the puts from different tables
against the same RS and send in a batch. And we could also see special handling for such cross-table
call in {{AsyncRequestFutureImpl#receiveGlobalFailure}}:
    if (tableName == null && ClientExceptionsUtil.isMetaClearingException(t)) {
      // tableName is null when we made a cross-table RPC call.

So instead of forbidding table name to be null in RegionServerCallable constructor, we should
add null checker on table name wherever it's used inside RegionServerCallable.

Will make an addendum soon.

> Should add null checker on table name in HTable and RegionServerCallable constructor
> ------------------------------------------------------------------------------------
>                 Key: HBASE-17212
>                 URL: https://issues.apache.org/jira/browse/HBASE-17212
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 2.0.0
>            Reporter: Yu Li
>            Assignee: Yu Li
>             Fix For: 2.0.0, 1.4.0
>         Attachments: HBASE-17212.patch, HBASE-17212.v2.patch
> If we run below codes:
> {code}
> Table table = connection.getTable(null);
> {code}
> we will see below exception:
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:221)
> 	at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:182)
> 	at org.apache.hadoop.hbase.client.ConnectionImplementation.getTable(ConnectionImplementation.java:298)
> 	at org.apache.hadoop.hbase.client.ConnectionImplementation.getTable(ConnectionImplementation.java:293)
> {noformat}
> And in this JIRA we will add a null checker and throw a more graceful {{IllegalArgumentException}}

This message was sent by Atlassian JIRA

View raw message