[英]Error connecting with hive, to a cosmos server of fiware
我無法通過配置單元連接到 PHP 中的 Cosmos 服務器:
// Load this lib
require_once __DIR__ . '/php-thrift-sql-master/ThriftSQL.phar';
// Try out a Hive query
$usuario="user@user";
$clave="pass";
$hive = new \ThriftSQL\Hive( 'cosmos.lab.fiware.org', 10000, $usuario, $clave, 1);
$hiveTables = $hive
->setSasl( false ) // To turn SASL auth off, on by default
->connect()
->queryAndFetchAll( 'SHOW TABLES' );
print_r( $hiveTables );
// Don't forget to clear the client and close socket.
$hive->disconnect();
Error produced is Thrift\Exception\TTransportException: TSocket: timed out reading 4 bytes from cosmos.lab.fiware.org:10000 in phar://C:/Users/.../php-thrift-sql-master/ThriftSQL.phar/Thrift/Transport/TSocket.php on line 274
我嘗試使用其他服務器,如 storage.cosmos.lab.fiware.org 和 computing.cosmos.lab.fiware.org。 如果我設置了很長的超時時間,那么腳本將永遠等待。
能幫我用php連接cosmos的hive服務器嗎?
問題出在你的 port..write port 你在哪里使用 hadoop。 我的是8088。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.