hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikas Vishwakarma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13388) Handling NullPointer in ZKProcedureMemberRpcs while getting ZNode data
Date Thu, 02 Apr 2015 13:30:16 GMT

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

Vikas Vishwakarma commented on HBASE-13388:
-------------------------------------------

ZKUtil.getData can return null because of which the next debug log can hit NullPointer at
data.length
{noformat}
      byte[] data = ZKUtil.getData(zkController.getWatcher(), path);
      LOG.debug("start proc data length is " + data.length);
      if (!ProtobufUtil.isPBMagicPrefix(data)) {
{noformat}
Null check for data is handled in ProtobufUtil.isPBMagicPrefix(data) which will ultimately
throw IllegalArgumentException, so moving the debug log to after this check should avoid the
Nullpointer. Does not have a functional impact but is cleaner.


> Handling NullPointer in ZKProcedureMemberRpcs while getting ZNode data
> ----------------------------------------------------------------------
>
>                 Key: HBASE-13388
>                 URL: https://issues.apache.org/jira/browse/HBASE-13388
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Vikas Vishwakarma
>            Assignee: Vikas Vishwakarma
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: HBASE-13388.patch
>
>
> Handling a minor NullPointer in ZKProcedureMemberRpcs while getting ZNode data. Does
not have any functional impact is just a little cleaner
> 2015-04-01 10:04:32,913 INFO  [ver60020-EventThread] procedure.ZKProcedureMemberRpcs
- Received procedure start children changed event: /hbase/online-snapshot/acquired
> 2015-04-01 10:04:32,913 DEBUG [ver60020-EventThread] procedure.ZKProcedureMemberRpcs
- Looking for new procedures under znode:'/hbase/online-snapshot/acquired'
> 2015-04-01 10:04:32,916 DEBUG [ver60020-EventThread] procedure.ZKProcedureMemberRpcs
- Found procedure znode: /hbase/online-snapshot/acquired/test13
> 2015-04-01 10:04:32,917 ERROR [ver60020-EventThread] zookeeper.ClientCnxn - Error while
calling watcher
> java.lang.NullPointerException
>         at org.apache.hadoop.hbase.procedure.ZKProcedureMemberRpcs.startNewSubprocedure(ZKProcedureMemberRpcs.java:203)
>         at org.apache.hadoop.hbase.procedure.ZKProcedureMemberRpcs.waitForNewProcedures(ZKProcedureMemberRpcs.java:172)
>         at org.apache.hadoop.hbase.procedure.ZKProcedureMemberRpcs.access$100(ZKProcedureMemberRpcs.java:55)
>         at org.apache.hadoop.hbase.procedure.ZKProcedureMemberRpcs$1.nodeChildrenChanged(ZKProcedureMemberRpcs.java:107)
>         at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.process(ZooKeeperWatcher.java:351)
>         at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522)
>         at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)
> 2015-04-01 10:04:32,917 INFO  [ver60020-EventThread] procedure.ZKProcedureMemberRpcs
- Received procedure start children changed event: /hbase/online-snapshot/acquired
> 2015-04-01 10:04:32,917 DEBUG [ver60020-EventThread] procedure.ZKProcedureMemberRpcs
- Looking for new procedures under znode:'/hbase/online-snapshot/acquired'
> 2015-04-01 10:04:32,918 INFO  [ver60020-EventThread] procedure.ZKProcedureMemberRpcs
- Received procedure abort children changed event: /hbase/online-snapshot/abort
> 2015-04-01 10:04:32,918 DEBUG [ver60020-EventThread] procedure.ZKProcedureMemberRpcs
- Checking for aborted procedures on node: '/hbase/online-snapshot/abort'



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

Mime
View raw message