我无法通过配置单元连接到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服务器吗?
1条答案
按热度按时间cwtwac6a1#
问题出在你的端口..写端口你在哪里使用hadoop。我的电话号码是8088。