I used thrift to operate Tachyon via perl in my code below.here are my
operation steps.
1.install, build,tachyon0.6.4
2.install,make,make install thrift0.9.2
3. ./bin/tachyon thriftGen
4.cd $THRIFT_HOME, thrift -gen perl
{$TACHYON_HOME}/core/src/thrift/tachyon.thrift
5.write below code test.pl and run "perl test.pl", and got an exception
my code :
#!/bin/env perl
#use strict;
#use warnings;
#use lib ¨./perl-src¨;
#use lib ¨./perl-src/packages¨;
#push (@INC,"/usr/lib/thrift/gen-perl");
BEGIN{push(@INC,"/usr/lib/thrift/gen-perl")};
use Data::Dumper;
use Thrift;
use Thrift::BinaryProtocol;
use Thrift::Socket;
use Thrift::BufferedTransport;
use MasterService;
use WorkerService;
my $host="192.168.100.7";
my $port="19998";
my $socket = new Thrift::Socket($host,$port);
my $transport = new Thrift::BufferedTransport($socket,1024,1024);
my $protocol = new Thrift::BinaryProtocol($transport);
my $client = new MasterServiceClient($protocol);
my $newFilePath = "/newfile";
my $newFileUfsPath = "/";
my $blockSizeByte = "1024";
my $recursive = "false";
eval { $transport->open () };
my $file = $client->user_createFile("/newfile","/",1024,false);
my exception:
[root@master thrift]# perl test.pl
Thrift::TException=HASH(0x1c33560)
Best wishes.
San.Luo
Celloud
Mailbox:[email protected]
Website:www.celloud.org
Address:2109,Building 4,Zhubang 2000, Chao Yang Road,Chao Yang
District,Beijing,China
ZipCode:100020