hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shrijeet Paliwal (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5035) Runtime exceptions during meta scan
Date Wed, 21 Dec 2011 02:17:30 GMT

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

Shrijeet Paliwal commented on HBASE-5035:
-----------------------------------------

Amm you might be right. 

{noformat}
final String serverAddress = Bytes.toString(value);

// instantiate the location
HRegionLocation loc = new HRegionLocation(regionInfo,
                new HServerAddress(serverAddress));
{noformat}

The Bytes.toString call, in theory, may return both an empty string or a null string.
In the case when it returns a null (see below), it tries to log an error which I didn't see
in my log file. 
So I am not still 100% sure this is out guy. 
{noformat}
 try {
      return new String(b, off, len, HConstants.UTF8_ENCODING);
    } catch (UnsupportedEncodingException e) {
      LOG.error("UTF-8 not supported?", e);
      return null;
    }
{noformat}

Nonetheless it will be good to put a check against serverAddress variable for emptiness as
well nullness since HServerAddress construtor may throw runtime error otherwise. Interesting
point is - it can throw both ArrayIndexOutOfBoundsException and NPE and I saw both cases.

{noformat}
/**
   * @param hostAndPort Hostname and port formatted as <code>&lt;hostname> ':'
&lt;port></code>
   */
  public HServerAddress(String hostAndPort) {
    int colonIndex = hostAndPort.lastIndexOf(':');
{noformat}


I will open a subtask to make the trace more helpful. 
                
> Runtime exceptions during meta scan
> -----------------------------------
>
>                 Key: HBASE-5035
>                 URL: https://issues.apache.org/jira/browse/HBASE-5035
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.90.3
>            Reporter: Shrijeet Paliwal
>
> Version: 0.90.3 + patches back ported 
> The other day our client started spitting these two runtime exceptions. Not all clients
connected to the cluster were under impact. Only 4 of them. While 3 of them were throwing
NPE, one of them was throwing ArrayIndexOutOfBoundsException. The errors are : 
> 1. http://pastie.org/2987926
> 2. http://pastie.org/2987927
> Clients did not recover from this and I had to restart them. 
> Motive of this jira is to identify and put null checks at appropriate places. Also with
the given stack trace I can not tell which line caused NPE of AIOBE, hence additional motive
is to make the trace more helpful. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message