public static class AvroCoder.JodaTimestampConversion extends Conversion<DateTime>
This is a copy from Avro 1.8's TimestampConversion, which is renamed in Avro 1.9. Defining own copy gives flexibility for Beam Java SDK to work with Avro 1.8 and 1.9 at runtime.
Constructor and Description |
---|
JodaTimestampConversion() |
Modifier and Type | Method and Description |
---|---|
DateTime |
fromLong(java.lang.Long millisFromEpoch,
Schema schema,
LogicalType type) |
java.lang.Class<DateTime> |
getConvertedType() |
java.lang.String |
getLogicalTypeName() |
java.lang.Long |
toLong(DateTime timestamp,
Schema schema,
LogicalType type) |
fromArray, fromBoolean, fromBytes, fromCharSequence, fromDouble, fromEnumSymbol, fromFixed, fromFloat, fromInt, fromMap, fromRecord, getRecommendedSchema, toArray, toBoolean, toBytes, toCharSequence, toDouble, toEnumSymbol, toFixed, toFloat, toInt, toMap, toRecord
public java.lang.Class<DateTime> getConvertedType()
getConvertedType
in class Conversion<DateTime>
public java.lang.String getLogicalTypeName()
getLogicalTypeName
in class Conversion<DateTime>
public DateTime fromLong(java.lang.Long millisFromEpoch, Schema schema, LogicalType type)
fromLong
in class Conversion<DateTime>
public java.lang.Long toLong(DateTime timestamp, Schema schema, LogicalType type)
toLong
in class Conversion<DateTime>