You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Nicholas Whitehead <wh...@gmail.com> on 2015/07/28 11:00:55 UTC

Invoke Phoenix SQL Operations from Custom RegionObserver

I am looking to capture in-flight native HBase puts in postPut callbacks
and then issue some Phoenix SQL upserts as a means of enriching some
current data feeds, effectively implemnting a native HBase table trigger
that captures bits of data into a Phoenix table. Rather than using the JDBC
driver in the region, is it possible to locally invoke the Phoenix
coprocessors ?

It seems I should be able to acquire the CoprocessorEnvironment through the
RegionObserver's ObserverContext, and then acquire the target Phoenix
table's HTableInterface, which in turn would provide a reference to the
table's Coprocessors. However, the relationship between the SQL I want to
issue and the coprocessors installed in Phoenix tables seems rather opaque
to me. I naively thought there might be a SQL remoting interface exposed.

Any suggestions ?

Thanks.

//Nicholas