hbase-issues mailing list archives

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

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

Hadoop QA commented on HBASE-17212:
-----------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s {color} | {color:blue}
Docker mode activated. {color} |
| {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 4s {color} | {color:red}
HBASE-17212 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/0.3.0/precommit-patchnames
for help. {color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12841224/HBASE-17212.addendum.patch
|
| JIRA Issue | HBASE-17212 |
| Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/4738/console |
| Powered by | Apache Yetus 0.3.0   http://yetus.apache.org |


This message was automatically generated.



> Should add null checker on table name in HTable constructor and RegionServerCallable
> ------------------------------------------------------------------------------------
>
>                 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.addendum.patch, HBASE-17212.addendum.patch, 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}}
> For RegionServerCallable, we're lacking of some null checker when using table name, such
as in {{RegionServerCallable#prepare}}:
> {code}
>    public void prepare(final boolean reload) throws IOException {
>      // check table state if this is a retry
>     if (reload && !tableName.equals(TableName.META_TABLE_NAME) &&
>         getConnection().isTableDisabled(tableName)) {
>        throw new TableNotEnabledException(tableName.getNameAsString() + " is disabled.");
>      }
> {code}
> It will throw NPE if tableName is null and invoking {{tableName.equals}}. We'll add null
checker in such places.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message