phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Yates (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-5) HRegion.put() on Phoenix table from within endpoint coprocessor fails with NPE
Date Mon, 20 Jan 2014 18:37:19 GMT


Jesse Yates commented on PHOENIX-5:

If you know you are on the same server, can you just try using HTable#put (where the HTable
came from CoprocessorEnvironment)? The HTable should have the logic to short-circuit the lookups
and just go through the hregion correctly, rather than even touching the loopback interface,
touching the right hooks in the Indexer to make sure your stuff works too.

The reason for all this is the way HBase handles WALs in batch updates (general batch or and
number of puts) - if there aren't any WALEdits added by the CP its thrown away after the prePut
hook, leading to NPEs in the preBatch hook; I think this is what you are running into. We
had to add a special little bit to prePut that just puts in a dummy KV into the WAL so the
indexer will be able to do its work correctly.

> HRegion.put() on Phoenix table from within endpoint coprocessor fails with NPE
> ------------------------------------------------------------------------------
>                 Key: PHOENIX-5
>                 URL:
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 2.2
>            Reporter: Bruno Dumon
>         Attachments: phoenix-coprocessor-compatibility-test.tar.gz
> See also mailing list:
> I have an HBase table created by Phoenix, onto which I added another CF
> which is unknown to Phoenix.
> I also have a custom endpoint coprocessor, which does puts on this table in
> the CF which is unknown by Phoenix.
> However, this doesn't work, it throws an NPE because the WALEdit contains a
> KeyValue with null bytes, which I found is the BATCH_MARKER added by
> Indexer.prePut. (I'm not using indexes)
> I don't have this problem if I do the put via an HTable, it is only when
> doing the put directly from the coprocessor via HRegion.put().
> *Workaround*: disabling the Indexer coprocessor avoids the issue.
> I will attach a testcase.

This message was sent by Atlassian JIRA

View raw message