S
S
Sergey Zolotarev2021-12-28 10:27:12
PHP
Sergey Zolotarev, 2021-12-28 10:27:12

How to connect to Apache Hive in PHP code?

Good afternoon!

The second day I come across this piece of PHP code:

$hive = (new \ThriftSQL\Hive('localhost', 10000,'root',''))->connect();


This piece is responsible for connecting to the Apache Hive server running on the local side using the PHP-ThriftSQL library. The server itself is running in a separate Docker container , just like Apache Hadoop. The compiler itself brought this surprise:
Cannot assign requested address

He touched most of all on the TSocket library method and the port itself was applied in accordance with the instructions from the creators of the library. What parameters should be applied correctly when connecting to Hive from a non-PHP web application?

Problematic Hive-server configuration code in the comments to this question!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question