[
https://issues.apache.org/jira/browse/HBASE-14048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14620941#comment-14620941
]
Matteo Bertozzi commented on HBASE-14048:
-----------------------------------------
this is similar to HBASE-13885
interesting to see the code of isPBMagicPrefix(byte, offset, len) that has the
null check. while the isPBMagicPrefix() assumes bytes != null
{code}
public static boolean isPBMagicPrefix(final byte [] bytes) {
return isPBMagicPrefix(bytes, 0, bytes.length);
}
/**
* @param bytes Bytes to check.
* @return True if passed <code>bytes</code> has {@link #PB_MAGIC} for a
prefix.
*/
public static boolean isPBMagicPrefix(final byte [] bytes, int offset, int
len) {
if (bytes == null || len < PB_MAGIC.length) return false;
{code}
(proc-v2 has nothing to do with this stuff)
> Procedure framework doesn't always check for null return from ZK getData
> ------------------------------------------------------------------------
>
> Key: HBASE-14048
> URL: https://issues.apache.org/jira/browse/HBASE-14048
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.98.13
> Reporter: Andrew Purtell
> Assignee: Andrew Purtell
> Fix For: 0.98.14
>
>
> Example:
> {noformat}
> 2015-07-09 04:20:30,649 ERROR [ver60020-EventThread] zookeeper.ClientCnxn -
> Error while calling watcher
> java.lang.NullPointerException
> at
> org.apache.hadoop.hbase.protobuf.ProtobufUtil.isPBMagicPrefix(ProtobufUtil.java:241)
> 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:358)
> at
> org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522)
> at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)
> {noformat}
> This is observed with 0.98.
> There may be a deeper cause but let's start by fixing the obvious problem.
> Audit ProcedureV2 also on later branches.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)