4

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?

3
  • Hey @Mayank, I have exactly the same requirement as you. Did you find a solution to this problem? Commented Nov 21, 2015 at 2:34
  • @MatthewMoisen Sorry for the late response but, I didn't find an answer yet. Commented Dec 15, 2015 at 8:00
  • 1
    I 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. Commented Dec 15, 2015 at 18:57

1 Answer 1

4

In my experience, Pyro4 is the easiest CPython/Jython interop package.

Sign up to request clarification or add additional context in comments.

1 Comment

Make sure to use only Pyro4.34 at most, on both Python and Jython, or else it will fail in the later versions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.