我尝试使用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。我错过了什么?