I was writing some code in python that needs to write/read to HBase. I thought of using HappyBase to interact with the HBase before I found out that it is not yet for python3.
What I'm thinking is to write a tiny package in jython to interact with the HBase. Rest of the business logic will remain in Cpython.
Is it possible to call a jython code from python. I want my code to be on CPython except from the section that should interact with HBase
I would be highly grateful if you could give me some hints/examples on how to do that? Do I need specific version of jython interpreter to mix with python3?
Edit: Could anybody please recommend how should HBase be accessed using python3?
-
Hey @Mayank, I have exactly the same requirement as you. Did you find a solution to this problem?Matthew Moisen– Matthew Moisen2015年11月21日 02:34:27 +00:00Commented Nov 21, 2015 at 2:34
-
@MatthewMoisen Sorry for the late response but, I didn't find an answer yet.Mayank– Mayank2015年12月15日 08:00:52 +00:00Commented Dec 15, 2015 at 8:00
-
1I ended up implementing Pyro4 to get this accomplished. You have to use version 4.34 on both the Jython and Python side. There are some limitations, notably you cant send a huge payload from python to jython (but you can from jython to python) or it will throw an error -- so you have to batch up payloads and send them over one at a time to jython.Matthew Moisen– Matthew Moisen2015年12月15日 18:57:10 +00:00Commented Dec 15, 2015 at 18:57
1 Answer 1
In my experience, Pyro4 is the easiest CPython/Jython interop package.