'缺少版本标识符'连接到Hive时出错,使用Perl的Thrift模块

时间:2017-04-25 09:50:12

标签: apache perl hive thrift-protocol bigdata

我尝试使用Thrift :: API :: HiveClient2连接到Hive。

写下以下内容:

#!usr/bin/perl

use strict;
use warnings;
use Thrift::API::HiveClient2;

my $port = 12345;
my $host = '123:456:789:987';

my $client = Thrift::API::HiveClient2->new(
host     =>  $host ,
port     =>  $port,
);

$client->connect() or die "Failed to connect\n";

my $query = "hive query;";

my $rh = $client->execute($query);

我收到以下错误 - >

Thrift::TException error: Missing version identifier (code 0)   (in cleanup) 
Thrift::TException error: Missing version identifier (code 0) at (eval 144) 
line 31.

我的Hive客户端是HiveClient2。我错过了什么?

0 个答案:

没有答案