Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

garamon/php-thrift-hive-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

php-thrift-hive-client

Wrap ThriftHiveClient

Usage

Sample

<?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();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages