Apache pig 如何在Pig中读取生成的序列文件

Apache pig 如何在Pig中读取生成的序列文件,apache-pig,Apache Pig,我想知道如何在Pig中读取生成的序列文件?我想可能有一个UDF,但我还找不到 我最终使用象鸟(v2.2.3)如下: register '/usr/share/dse/mahout/mahout-core-0.6-job.jar'; register './elephant-bird-2.2.3.jar'; %declare SEQFILE_LOADER 'com.twitter.elephantbird.pig.load.SequenceFileLoader'; %declare LONG

我想知道如何在Pig中读取生成的序列文件?我想可能有一个UDF,但我还找不到

我最终使用象鸟(v2.2.3)如下:

register '/usr/share/dse/mahout/mahout-core-0.6-job.jar';
register './elephant-bird-2.2.3.jar';

%declare SEQFILE_LOADER   'com.twitter.elephantbird.pig.load.SequenceFileLoader';
%declare LONG_CONVERTER   'com.twitter.elephantbird.pig.util.LongWritableConverter';
%declare INT_CONVERTER    'com.twitter.elephantbird.pig.util.IntWritableConverter';
%declare VECTOR_CONVERTER 'com.twitter.elephantbird.pig.mahout.VectorWritableConverter';
%declare TEXT_CONVERTER   'com.twitter.elephantbird.pig.util.TextConverter';

....

sets = LOAD '$INPUT_SETS' USING $SEQFILE_LOADER ( '-c $INT_CONVERTER', '-c $VECTOR_CONVERTER') AS (thing_id:int, recommendations:chararray);

...
你登记入住了吗?