[
https://issues.apache.org/jira/browse/PHOENIX-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14185596#comment-14185596
]
Jeffrey Zhong edited comment on PHOENIX-1381 at 10/27/14 6:50 PM:
------------------------------------------------------------------
Thanks [~jesse_yates] for the comments! In existing/old code, we have following
matchingFamily which will make IndexedKV being skipped for replay/replication
so the change won't have any effect.
{code}
/**
* This is a KeyValue that shouldn't actually be replayed/replicated, so we
always mark it as
* an {@link WALEdit#METAFAMILY} so it isn't replayed/replicated via the
normal replay mechanism
*/
@Override
public boolean matchingFamily(final byte[] family) {
return Bytes.equals(family, WALEdit.METAFAMILY);
}
{code}
was (Author: jeffreyz):
Thanks [~jesse_yates] for the comments! In existing/old code, we have following
matchingFamily which will make IndexedKV being skipped for replay/replication
so the change won't have any effect.
{node}
/**
* This is a KeyValue that shouldn't actually be replayed/replicated, so we
always mark it as
* an {@link WALEdit#METAFAMILY} so it isn't replayed/replicated via the
normal replay mechanism
*/
@Override
public boolean matchingFamily(final byte[] family) {
return Bytes.equals(family, WALEdit.METAFAMILY);
}
{code}
> NPE in CellUtil.matchingFamily() for IndexedKeyValue
> ----------------------------------------------------
>
> Key: PHOENIX-1381
> URL: https://issues.apache.org/jira/browse/PHOENIX-1381
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.1
> Environment: hbase 0.98.4+
> Reporter: Shunsuke Nakamura
> Assignee: Jeffrey Zhong
> Priority: Critical
> Fix For: 5.0.0, 4.2
>
> Attachments: PHOENIX-1381.patch
>
>
> NPE in replayRecoveredEdits of phoenix table with local index:
> {code}
> 2014-10-16 10:54:29,871 ERROR [RS_OPEN_REGION-XX.XX.XX.XX:53489-1]
> handler.OpenRegionHandler: Failed open of
> region=USERTABLE,,1413366337840.f170ee16e795c42b607b962a557a8c2c., starting
> to roll back the global memstore size.
> java.lang.NullPointerException
> at org.apache.hadoop.hbase.util.Bytes.toShort(Bytes.java:845)
> at org.apache.hadoop.hbase.util.Bytes.toShort(Bytes.java:832)
> at org.apache.hadoop.hbase.KeyValue.getRowLength(KeyValue.java:1303)
> at
> org.apache.hadoop.hbase.KeyValue.getFamilyOffset(KeyValue.java:1319)
> at org.apache.hadoop.hbase.CellUtil.matchingFamily(CellUtil.java:329)
> at org.apache.hadoop.hbase.CellUtil.matchingColumn(CellUtil.java:344)
> at
> org.apache.hadoop.hbase.regionserver.wal.WALEdit.getCompaction(WALEdit.java:285)
> at
> org.apache.hadoop.hbase.regionserver.HRegion.replayRecoveredEdits(HRegion.java:3271)
> at
> org.apache.hadoop.hbase.regionserver.HRegion.replayRecoveredEditsIfAny(HRegion.java:3135)
> {code}
> IndexedKeyValue is an incomplete Cell implementation. Then a part of CellUtil
> methods such as matchingFamily don't work well for the IndexedKeyValue.
> With HBase-0.98.4+, this issue can be caused because the matching by
> kv.matchingColumn in WALEdit.getCompaction was replaced with CellUtils's one
> at HBASE-11475.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)