incubator-chukwa-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Graham <billgra...@gmail.com>
Subject Making TsProcessor's date format configurable
Date Tue, 06 Apr 2010 16:55:39 GMT
Hi,

I'd like to be able to configure the date format for TSProcessor. Looking at
the code, others have had the same thought:

  public TsProcessor() {
    // TODO move that to config
    sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
  }

I can write a patch to support this change, but how do we want to make the
date configurable? Currently there is a single config (AFAIK) that binds the
processor class to a data type in chukwa-demux-conf.xml that looks like
this:

  <property>
    <name>some_data_type</name>

<value>org.apache.hadoop.chukwa.extraction.demux.processor.mapper.TsProcessor</value>
    <description>Parser for some_data_type</description>
  </property>


Any suggestions for how we'd incorporate date format into that config? Or
perhaps it would be a separate conf. Are there any examples in the code of
processors that take configurations currently?

As a side note, I'd also like to add a configuration for what the default
processor should be, since I'd prefer to change ours from DefaultProcessor
to TsProcessor. Maybe 'chukwa.demux.default.processor'? Thoughts?

thanks,
Bill

Mime
View raw message