I have created one UI using Bootstrap in that UI i wanted to connect HIVE to take the existing tables and display in drop down.
My Question is it possible to connect HIVE through PHP and if yes than how to do this.
Thanks & Regards
Snehal
<?php
$GLOBALS['THRIFT_ROOT'] = dirname(__FILE__) . '/lib';
require_once $GLOBALS['THRIFT_ROOT'] . '/packages/hive_service/ThriftHive.php';
require_once $GLOBALS['THRIFT_ROOT'] . '/transport/TSocket.php';
require_once $GLOBALS['THRIFT_ROOT'] . '/protocol/TBinaryProtocol.php';
require_once dirname(__FILE__) . '/ThriftHiveClientEx.php';
$transport = new TSocket('localhost', 10000);
$transport->setSendTimeout(600 * 1000);
$transport->setRecvTimeout(600 * 1000);
$client = new ThriftHiveClientEx(new TBinaryProtocol($transport));
$client->open();
$client->execute('SHOW DATABASES');
var_dump($client->fetchAll());
$client->close();
?>
Users browsing this forum: No registered users and 24 guests