Skip to content

Commit

Permalink
Avro 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
fharenheit committed Sep 7, 2023
1 parent eb90f23 commit a0b2f59
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,20 @@ public WriteParquetResult(final Schema avroSchema, final RecordSchema recordSche
ParquetUtils.applyCommonConfig(writerBuilder, conf, parquetConfig);
parquetWriter = writerBuilder.build();

if (componentLogger.isInfoEnabled()) { // FIXED
componentLogger.info("[DFM] WriteParquetResult : Schema = {}", schema);
componentLogger.info("[DFM] WriteParquetResult : timestampFormatPropertyKeyName = {}, addHours = {}", this.timestampFormatPropertyKeyName, this.addHours);
if (componentLogger.isDebugEnabled()) {
componentLogger.debug("[DFM] WriteParquetResult : Schema = {}", schema);
componentLogger.debug("[DFM] WriteParquetResult : timestampFormatPropertyKeyName = {}, addHours = {}", this.timestampFormatPropertyKeyName, this.addHours);
}
}

@Override
protected Map<String, String> writeRecord(final Record record) throws IOException {
if (componentLogger.isInfoEnabled()) {
this.componentLogger.info("[DFM] [Write] Record = {}", record);
if (componentLogger.isDebugEnabled()) {
this.componentLogger.debug("[DFM] [Write] Record = {}", record);
}

final GenericRecord genericRecord = AvroTypeUtil.createAvroRecord(record, schema, timestampFormatPropertyKeyName, addHours);
parquetWriter.write(genericRecord);
return Collections.emptyMap();
}

Expand All @@ -81,5 +82,4 @@ public String getMimeType() {
return "application/parquet";
}

}

}

0 comments on commit a0b2f59

Please sign in to comment.