chukwa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Corbin Hoenes <cor...@tynt.com>
Subject ChukwaStorer
Date Wed, 10 Nov 2010 23:31:36 GMT
I'm using the chukwa-pig7 contrib in my pig scripts and noticed it trys to compress the chukwa
output when I do a store.


@Override
  public void setStoreLocation(String location, Job job) throws IOException {
    FileOutputFormat.setOutputPath(job, new Path(location));
    FileOutputFormat.setCompressOutput(job, true);
    FileOutputFormat.setOutputCompressorClass(job, DefaultCodec.class);
    job.setOutputKeyClass(ChukwaRecordKey.class);
    job.setOutputValueClass(ChukwaRecord.class);
  }

What is the best way to make this configurable? I was hoping I could do something like this:

@Override
  public void setStoreLocation(String location, Job job) throws IOException {
    FileOutputFormat.setOutputPath(job, new Path(location));
    FileOutputFormat.setCompressOutput(job, this.compress);
    if(this.compress)
      FileOutputFormat.setOutputCompressorClass(job, DefaultCodec.class);
    job.setOutputKeyClass(ChukwaRecordKey.class);
    job.setOutputValueClass(ChukwaRecord.class);
  }

How to make the codec class pluggable/configurable as well--for example if one wanted to use
LZO?


Mime
View raw message