Search code examples
hbasejdbctemplateapache-phoenix

JDBC Template as client of Apache Phoenix


Is it possible to use the JDBC Template to interact with the Phoenix over HBase. If yes, what will be the pros and cons of that. If not, why and what should be the alternative for that?


Solution

  • Phoenix works with JDBCTemplate and Spring, using the JDBC driver org.apache.phoenix.jdbc.PhoenixDriver. Here is an example spring implementation http://blog.csdn.net/eric_sunah/article/details/44494321 with connection pooling (the blog post is in Chinese but it translates well on chrome).

    It's important to mention upsert, delete and update only seemed to work when executing as a block query.

    I'm not certain of the pros and cons at this point, but I hope you find this helpful.