2016-05-05 8 views
0

PHPアプリケーションでHadoopのデータを使用してレポートを作成する必要があります。ローカルマシンにhiveserver2をインストールしました。次のサンプルを使用してPHPコードからhiveserver2に接続する方法を見つけようとしました。PHPを使用してhiveserver2に接続

  1. https://github.com/dryangkun/php-hiveserver2

https://github.com/QwertyManiac/hive-hs2-php-thrift

  • しかし、それらのいずれかは、私のために動作しませんでした。第1リンクで述べたhive-site.xmlの設定を以下のように変更しました。

    <property> 
    <name>hive.server2.authentication</name> 
    <value>NOSASL</value> 
    <description> 
        Expects one of [nosasl, none, ldap, kerberos, pam, custom] 
    

    第1リンクでPHPファイルを実行すると、次のエラーが発生します。

    Uncaught exception 'Thrift\Exception\TTransportException' with message 'TSocket: timed out reading 4 bytes from localhost:10000' in /Users/lazhcm10385/projects/hive/hive-hs2-php-thrift/thrift/Thrift/Transport/TSocket.php:274 
    

    PHPを使用してhiveserver2に接続するための適切なドキュメントがある場合は、どうか教えてください。

  • 答えて

    0

    https://github.com/QwertyManiac/hive-hs2-php-thriftを使ってPHPからハイブサーバーに接続できました。 hiveサーバーの構成を変更した後、ターミナルを閉じて再度開いて、新しく開かれたターミナルを使ってサーバーを起動しました。

    関連する問題