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-13050) Hbase shell create_namespace command throws ArrayIndexOutOfBoundException for (invalid) empty text input.
Date Mon, 16 Feb 2015 16:27:12 GMT

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

Hadoop QA commented on HBASE-13050:
-----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12699108/0001-HBASE-13050.patch
  against master branch at commit 9b2e4ed064e5a832af12616167ce9dee794cdb33.
  ATTACHMENT ID: 12699108

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified
tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.
    {color:green}+1 hadoop versions{color}. The patch compiles with all supported hadoop versions
(2.4.1 2.5.2 2.6.0)

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings.

    {color:green}+1 javadoc{color}.  The javadoc tool did not generate any warning messages.

    {color:green}+1 checkstyle{color}.  The applied patch does not increase the total number
of checkstyle errors

    {color:green}+1 findbugs{color}.  The patch does not introduce any new Findbugs (version
2.0.3) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number
of release audit warnings.

    {color:green}+1 lineLengths{color}.  The patch does not introduce lines longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
     

     {color:red}-1 core zombie tests{color}.  There are 2 zombie test(s): 	at org.apache.hadoop.hbase.coprocessor.TestRegionObserverInterface.testRecovery(TestRegionObserverInterface.java:594)

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//artifact/patchprocess/checkstyle-aggregate.html

  Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/12863//console

This message is automatically generated.

> Hbase shell create_namespace command throws ArrayIndexOutOfBoundException for (invalid)
empty text input.
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-13050
>                 URL: https://issues.apache.org/jira/browse/HBASE-13050
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Abhishek Kumar
>            Priority: Trivial
>         Attachments: 0001-HBASE-13050.patch
>
>
> {noformat}
> hbase(main):008:0> create_namespace ''
> ERROR: java.io.IOException: 0
>         at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2072)
>         at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
>         at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
>         at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>         at org.apache.hadoop.hbase.TableName.isLegalNamespaceName(TableName.java:222)
>         at org.apache.hadoop.hbase.TableName.isLegalNamespaceName(TableName.java:205)
> {noformat}
> TableName.isLegalNamespaceName tries to access namespaceName[offset] in case of empty
text input and also this check for 'offset==length' in this method seems to be unnecessary
and an empty  input validation check can be put in the beginning of this method instead:
> {noformat}
>  public static void isLegalNamespaceName(byte[] namespaceName, int offset, int length)
{
> // can add empty check in the beginning 
>   if(length == 0) {
>       throw new IllegalArgumentException("Namespace name must not be empty");
>     }
> // end
>     for (int i = offset; i < length; i++) {
>       if (Character.isLetterOrDigit(namespaceName[i])|| namespaceName[i] == '_') {
>         continue;
>       }
>       throw new IllegalArgumentException("Illegal character <" + namespaceName[i]
+
>         "> at " + i + ". Namespaces can only contain " +
>         "'alphanumeric characters': i.e. [a-zA-Z_0-9]: " + Bytes.toString(namespaceName,
>           offset, length));
>     }
>  //  can remove below check
>    if(offset == length)
>       throw new IllegalArgumentException("Illegal character <" + _namespaceName[offset]
_+
>           "> at " + offset + ". Namespaces can only contain " +
>           "'alphanumeric characters': i.e. [a-zA-Z_0-9]: " + Bytes.toString(namespaceName,
>             offset, length));
>  // 
> }
> {noformat}



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

Mime
View raw message