use of org.komamitsu.fluency.aws.s3.recordformat.CsvRecordFormatter in project fluency by komamitsu.
the class FluencyBuilderForAwsS3 method createRecordFormatter.
private AwsS3RecordFormatter createRecordFormatter() {
if (formatType == null) {
throw new IllegalArgumentException("format type must be set");
}
AwsS3RecordFormatter recordFormatter;
switch(getFormatType()) {
case MESSAGE_PACK:
recordFormatter = new MessagePackRecordFormatter();
break;
case JSONL:
recordFormatter = new JsonlRecordFormatter();
break;
case CSV:
CsvRecordFormatter.Config config = new CsvRecordFormatter.Config();
config.setColumnNames(getFormatCsvColumnNames());
recordFormatter = new CsvRecordFormatter(config);
break;
default:
throw new IllegalArgumentException("Unexpected format type: " + getFormatType());
}
return recordFormatter;
}
Aggregations