public class TimestampedRecordTimeBasedWriterPartitioner<P> extends org.apache.gobblin.writer.partitioner.TimeBasedWriterPartitioner<TimestampedRecord<P>>
TimeBasedWriterPartitioner
for byte[] containing json.
The json field that contains the timestamp can be specified using TIMESTAMP_COLUMN_KEY.
The format of the json field that contains the timestamp can be specified using TIMESTAMP_FORMAT_KEY.
If a record doesn't contain the specified field, or if no field is specified, the current timestamp will be used.DEFAULT_WRITER_PARTITION_GRANULARITY, DEFAULT_WRITER_PARTITION_TIMEUNIT, DEFAULT_WRITER_PARTITION_TIMEZONE, PARTITIONED_PATH, PREFIX, SUFFIX, timeUnit, WRITER_PARTITION_GRANULARITY, WRITER_PARTITION_PATTERN, WRITER_PARTITION_PREFIX, WRITER_PARTITION_SUFFIX, WRITER_PARTITION_TIMEUNIT, WRITER_PARTITION_TIMEZONE
Constructor and Description |
---|
TimestampedRecordTimeBasedWriterPartitioner(org.apache.gobblin.configuration.State state) |
TimestampedRecordTimeBasedWriterPartitioner(org.apache.gobblin.configuration.State state,
int numBranches,
int branchId) |
Modifier and Type | Method and Description |
---|---|
protected long |
getNonKafkaTimestamp(P payload) |
long |
getRecordTimestamp(TimestampedRecord<P> rec) |
public TimestampedRecordTimeBasedWriterPartitioner(org.apache.gobblin.configuration.State state)
public TimestampedRecordTimeBasedWriterPartitioner(org.apache.gobblin.configuration.State state, int numBranches, int branchId)
public long getRecordTimestamp(TimestampedRecord<P> rec)
getRecordTimestamp
in class org.apache.gobblin.writer.partitioner.TimeBasedWriterPartitioner<TimestampedRecord<P>>
protected long getNonKafkaTimestamp(P payload)
Copyright © 2021. All rights reserved.