S
S
SergioMaroni2019-08-12 12:12:42
linux
SergioMaroni, 2019-08-12 12:12:42

Is it possible to run sqlline.py without installing Hbase on the machine?

Good afternoon!
There is a server with installed HBase and Phoenix. It is necessary to install sqlline on a local Ubuntu PC to work with the HBase server through Phoenix.
I downloaded and unpacked apache-phoenix-4.14.2-HBase-1.4-bin.tar.gz on a local PC, when I try to run ./sqlline.py an error appears:

Traceback (most recent call last):
  File "./sqlline.py", line 25, in <module>
    import phoenix_utils
  File "/root/apache-phoenix-4.14.2-HBase-1.4-bin/bin/phoenix_utils.py", line 208
    print "phoenix_class_path:", phoenix_class_path
                              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("phoenix_class_path:", phoenix_class_path)?

Can Sqlline work with remote hbase via Phoenix ? And if so, how ?
What are the best ways to connect to the hbase database?
which articles I didn’t read, everyone connects to localhost for some reason, no one connects remotely to hbase + phoenix ...
I will be grateful for any links on the subject ....

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2019-08-12
@SergioMaroni

The error is typical for running python 2.x scripts in python 3.x environment
Run in version 2 of python.

S
SergioMaroni, 2019-08-12
@SergioMaroni

Thanks for the answer!
indeed, the problem is in the compatibility of python 2 and python 3 - I figured out the problem by slightly tweaking the sqlline.py script

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question