Top Inners Constructors Methods
org.apache.avro.data

public Class TimeConversions

extends Object
Class Inheritance
Imports
org.apache.avro.Conversion, .LogicalType, .LogicalTypes, .Schema, java.time.Instant, .LocalDate, .LocalDateTime, .LocalTime, .ZoneOffset, java.util.concurrent.TimeUnit

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
public static class
public static class
public static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TimeConversionsback to summary
public TimeConversions()
org.apache.avro.data back to summary

public Class TimeConversions.DateConversion

extends Conversion<LocalDate>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public LocalDate
fromInt(Integer daysFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromInt.

public Class<LocalDate>
getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.
public String
getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.
public Schema
public Integer
Inherited from org.apache.avro.Conversion:
adjustAndSetValuefromArrayfromBooleanfromBytesfromCharSequencefromDoublefromEnumSymbolfromFixedfromFloatfromLongfromMapfromRecordtoArraytoBooleantoBytestoCharSequencetoDoubletoEnumSymboltoFixedtoFloattoLongtoMaptoRecord

Constructor Detail

DateConversionback to summary
public DateConversion()

Method Detail

fromIntback to summary
public LocalDate fromInt(Integer daysFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromInt.

Annotations
@Override
getConvertedTypeback to summary
public Class<LocalDate> getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Doc from org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.

Returns:Class<LocalDate>

a Java class returned by from methods and accepted by to methods

Annotations
@Override
getLogicalTypeNameback to summary
public String getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Doc from org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.

Returns:String

a String logical type name

Annotations
@Override
getRecommendedSchemaback to summary
public Schema getRecommendedSchema()

Overrides org.apache.avro.Conversion.getRecommendedSchema.

Annotations
@Override
toIntback to summary
public Integer toInt(LocalDate date, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.toInt.

Annotations
@Override
org.apache.avro.data back to summary

public Class TimeConversions.LocalTimestampMicrosConversion

extends Conversion<LocalDateTime>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final TimeConversions.TimestampMicrosConversion

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public LocalDateTime
fromLong(Long microsFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

public Class<LocalDateTime>
getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.
public String
getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.
public Schema
public Long
Inherited from org.apache.avro.Conversion:
adjustAndSetValuefromArrayfromBooleanfromBytesfromCharSequencefromDoublefromEnumSymbolfromFixedfromFloatfromIntfromMapfromRecordtoArraytoBooleantoBytestoCharSequencetoDoubletoEnumSymboltoFixedtoFloattoInttoMaptoRecord

Field Detail

timestampMicrosConversionback to summary
private final TimeConversions.TimestampMicrosConversion timestampMicrosConversion

Constructor Detail

LocalTimestampMicrosConversionback to summary
public LocalTimestampMicrosConversion()

Method Detail

fromLongback to summary
public LocalDateTime fromLong(Long microsFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

Annotations
@Override
getConvertedTypeback to summary
public Class<LocalDateTime> getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Doc from org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.

Returns:Class<LocalDateTime>

a Java class returned by from methods and accepted by to methods

Annotations
@Override
getLogicalTypeNameback to summary
public String getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Doc from org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.

Returns:String

a String logical type name

Annotations
@Override
getRecommendedSchemaback to summary
public Schema getRecommendedSchema()

Overrides org.apache.avro.Conversion.getRecommendedSchema.

Annotations
@Override
toLongback to summary
public Long toLong(LocalDateTime timestamp, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.toLong.

Annotations
@Override
org.apache.avro.data back to summary

public Class TimeConversions.LocalTimestampMillisConversion

extends Conversion<LocalDateTime>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final TimeConversions.TimestampMillisConversion

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public LocalDateTime
fromLong(Long millisFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

public Class<LocalDateTime>
getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.
public String
getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.
public Schema
public Long
Inherited from org.apache.avro.Conversion:
adjustAndSetValuefromArrayfromBooleanfromBytesfromCharSequencefromDoublefromEnumSymbolfromFixedfromFloatfromIntfromMapfromRecordtoArraytoBooleantoBytestoCharSequencetoDoubletoEnumSymboltoFixedtoFloattoInttoMaptoRecord

Field Detail

timestampMillisConversionback to summary
private final TimeConversions.TimestampMillisConversion timestampMillisConversion

Constructor Detail

LocalTimestampMillisConversionback to summary
public LocalTimestampMillisConversion()

Method Detail

fromLongback to summary
public LocalDateTime fromLong(Long millisFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

Annotations
@Override
getConvertedTypeback to summary
public Class<LocalDateTime> getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Doc from org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.

Returns:Class<LocalDateTime>

a Java class returned by from methods and accepted by to methods

Annotations
@Override
getLogicalTypeNameback to summary
public String getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Doc from org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.

Returns:String

a String logical type name

Annotations
@Override
getRecommendedSchemaback to summary
public Schema getRecommendedSchema()

Overrides org.apache.avro.Conversion.getRecommendedSchema.

Annotations
@Override
toLongback to summary
public Long toLong(LocalDateTime timestamp, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.toLong.

Annotations
@Override
org.apache.avro.data back to summary

public Class TimeConversions.TimeMicrosConversion

extends Conversion<LocalTime>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
adjustAndSetValue(String
the name of the variable holding the converted value
varName
,
String
the name of the parameter with the new converted value
valParamName
)

Overrides org.apache.avro.Conversion.adjustAndSetValue.

Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted.
public LocalTime
fromLong(Long microsFromMidnight, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

public Class<LocalTime>
getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.
public String
getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.
public Schema
public Long
Inherited from org.apache.avro.Conversion:
fromArrayfromBooleanfromBytesfromCharSequencefromDoublefromEnumSymbolfromFixedfromFloatfromIntfromMapfromRecordtoArraytoBooleantoBytestoCharSequencetoDoubletoEnumSymboltoFixedtoFloattoInttoMaptoRecord

Constructor Detail

TimeMicrosConversionback to summary
public TimeMicrosConversion()

Method Detail

adjustAndSetValueback to summary
public String adjustAndSetValue(String varName, String valParamName)

Overrides org.apache.avro.Conversion.adjustAndSetValue.

Doc from org.apache.avro.Conversion.adjustAndSetValue.

Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted. This method allows the Conversion to generate custom setter code if required.

Parameters
varName:String

the name of the variable holding the converted value

valParamName:String

the name of the parameter with the new converted value

Returns:String

a String for the body of the setter method

Annotations
@Override
fromLongback to summary
public LocalTime fromLong(Long microsFromMidnight, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

Annotations
@Override
getConvertedTypeback to summary
public Class<LocalTime> getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Doc from org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.

Returns:Class<LocalTime>

a Java class returned by from methods and accepted by to methods

Annotations
@Override
getLogicalTypeNameback to summary
public String getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Doc from org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.

Returns:String

a String logical type name

Annotations
@Override
getRecommendedSchemaback to summary
public Schema getRecommendedSchema()

Overrides org.apache.avro.Conversion.getRecommendedSchema.

Annotations
@Override
toLongback to summary
public Long toLong(LocalTime time, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.toLong.

Annotations
@Override
org.apache.avro.data back to summary

public Class TimeConversions.TimeMillisConversion

extends Conversion<LocalTime>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
adjustAndSetValue(String
the name of the variable holding the converted value
varName
,
String
the name of the parameter with the new converted value
valParamName
)

Overrides org.apache.avro.Conversion.adjustAndSetValue.

Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted.
public LocalTime
fromInt(Integer millisFromMidnight, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromInt.

public Class<LocalTime>
getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.
public String
getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.
public Schema
public Integer
Inherited from org.apache.avro.Conversion:
fromArrayfromBooleanfromBytesfromCharSequencefromDoublefromEnumSymbolfromFixedfromFloatfromLongfromMapfromRecordtoArraytoBooleantoBytestoCharSequencetoDoubletoEnumSymboltoFixedtoFloattoLongtoMaptoRecord

Constructor Detail

TimeMillisConversionback to summary
public TimeMillisConversion()

Method Detail

adjustAndSetValueback to summary
public String adjustAndSetValue(String varName, String valParamName)

Overrides org.apache.avro.Conversion.adjustAndSetValue.

Doc from org.apache.avro.Conversion.adjustAndSetValue.

Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted. This method allows the Conversion to generate custom setter code if required.

Parameters
varName:String

the name of the variable holding the converted value

valParamName:String

the name of the parameter with the new converted value

Returns:String

a String for the body of the setter method

Annotations
@Override
fromIntback to summary
public LocalTime fromInt(Integer millisFromMidnight, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromInt.

Annotations
@Override
getConvertedTypeback to summary
public Class<LocalTime> getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Doc from org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.

Returns:Class<LocalTime>

a Java class returned by from methods and accepted by to methods

Annotations
@Override
getLogicalTypeNameback to summary
public String getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Doc from org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.

Returns:String

a String logical type name

Annotations
@Override
getRecommendedSchemaback to summary
public Schema getRecommendedSchema()

Overrides org.apache.avro.Conversion.getRecommendedSchema.

Annotations
@Override
toIntback to summary
public Integer toInt(LocalTime time, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.toInt.

Annotations
@Override
org.apache.avro.data back to summary

public Class TimeConversions.TimestampMicrosConversion

extends Conversion<Instant>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
adjustAndSetValue(String
the name of the variable holding the converted value
varName
,
String
the name of the parameter with the new converted value
valParamName
)

Overrides org.apache.avro.Conversion.adjustAndSetValue.

Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted.
public Instant
fromLong(Long microsFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

public Class<Instant>
getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.
public String
getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.
public Schema
public Long
Inherited from org.apache.avro.Conversion:
fromArrayfromBooleanfromBytesfromCharSequencefromDoublefromEnumSymbolfromFixedfromFloatfromIntfromMapfromRecordtoArraytoBooleantoBytestoCharSequencetoDoubletoEnumSymboltoFixedtoFloattoInttoMaptoRecord

Constructor Detail

TimestampMicrosConversionback to summary
public TimestampMicrosConversion()

Method Detail

adjustAndSetValueback to summary
public String adjustAndSetValue(String varName, String valParamName)

Overrides org.apache.avro.Conversion.adjustAndSetValue.

Doc from org.apache.avro.Conversion.adjustAndSetValue.

Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted. This method allows the Conversion to generate custom setter code if required.

Parameters
varName:String

the name of the variable holding the converted value

valParamName:String

the name of the parameter with the new converted value

Returns:String

a String for the body of the setter method

Annotations
@Override
fromLongback to summary
public Instant fromLong(Long microsFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

Annotations
@Override
getConvertedTypeback to summary
public Class<Instant> getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Doc from org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.

Returns:Class<Instant>

a Java class returned by from methods and accepted by to methods

Annotations
@Override
getLogicalTypeNameback to summary
public String getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Doc from org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.

Returns:String

a String logical type name

Annotations
@Override
getRecommendedSchemaback to summary
public Schema getRecommendedSchema()

Overrides org.apache.avro.Conversion.getRecommendedSchema.

Annotations
@Override
toLongback to summary
public Long toLong(Instant instant, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.toLong.

Annotations
@Override
org.apache.avro.data back to summary

public Class TimeConversions.TimestampMillisConversion

extends Conversion<Instant>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
adjustAndSetValue(String
the name of the variable holding the converted value
varName
,
String
the name of the parameter with the new converted value
valParamName
)

Overrides org.apache.avro.Conversion.adjustAndSetValue.

Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted.
public Instant
fromLong(Long millisFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

public Class<Instant>
getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.
public String
getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.
public Schema
public Long
Inherited from org.apache.avro.Conversion:
fromArrayfromBooleanfromBytesfromCharSequencefromDoublefromEnumSymbolfromFixedfromFloatfromIntfromMapfromRecordtoArraytoBooleantoBytestoCharSequencetoDoubletoEnumSymboltoFixedtoFloattoInttoMaptoRecord

Constructor Detail

TimestampMillisConversionback to summary
public TimestampMillisConversion()

Method Detail

adjustAndSetValueback to summary
public String adjustAndSetValue(String varName, String valParamName)

Overrides org.apache.avro.Conversion.adjustAndSetValue.

Doc from org.apache.avro.Conversion.adjustAndSetValue.

Certain logical types may require adjusting the code within the "setter" methods to make sure the data that is set is properly formatted. This method allows the Conversion to generate custom setter code if required.

Parameters
varName:String

the name of the variable holding the converted value

valParamName:String

the name of the parameter with the new converted value

Returns:String

a String for the body of the setter method

Annotations
@Override
fromLongback to summary
public Instant fromLong(Long millisFromEpoch, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.fromLong.

Annotations
@Override
getConvertedTypeback to summary
public Class<Instant> getConvertedType()

Implements abstract org.apache.avro.Conversion.getConvertedType.

Doc from org.apache.avro.Conversion.getConvertedType.

Return the Java class representing the logical type.

Returns:Class<Instant>

a Java class returned by from methods and accepted by to methods

Annotations
@Override
getLogicalTypeNameback to summary
public String getLogicalTypeName()

Implements abstract org.apache.avro.Conversion.getLogicalTypeName.

Doc from org.apache.avro.Conversion.getLogicalTypeName.

Return the logical type this class converts.

Returns:String

a String logical type name

Annotations
@Override
getRecommendedSchemaback to summary
public Schema getRecommendedSchema()

Overrides org.apache.avro.Conversion.getRecommendedSchema.

Annotations
@Override
toLongback to summary
public Long toLong(Instant timestamp, Schema schema, LogicalType type)

Overrides org.apache.avro.Conversion.toLong.

Annotations
@Override