Class TimeGranularitySpec
- java.lang.Object
-
- org.apache.pinot.spi.data.TimeGranularitySpec
-
- All Implemented Interfaces:
Serializable
public class TimeGranularitySpec extends Object implements Serializable
Deprecated.Use DateTimeFieldSpec instead. TheTimeGranularitySpecclass contains all specs related to time field.-
DataType: data type of the time column (e.g. INT, LONG).-
TimeType: time unit of the time column (e.g. MINUTES, HOURS).-
TimeUnitSize: size of the time buckets (e.g. 10 MINUTES, 2 HOURS). By default this is set to 1.-
TimeFormat: Can be either EPOCH (default) or SIMPLE_DATE_FORMAT:pattern e.g SIMPLE_DATE_FORMAT:yyyyMMdd-
Name: name of the time column.E.g.
If the time column is in millisecondsSinceEpoch, constructor can be invoked as:
TimeGranularitySpec(LONG, MILLISECONDS, timeColumnName)If the time column is in tenMinutesSinceEpoch, constructor can be invoked as:
TimeGranularitySpec(LONG, 10, MINUTES, timeColumnName)If the time column is in Simple Date Format:
new TimeGranularitySpec(DataType.STRING, 1, TimeUnit.HOURS, TimeFormat.SIMPLE_DATE_FORMAT.toString() +":yyyyMMdd", "hour");- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTimeGranularitySpec.TimeFormatDeprecated.
-
Constructor Summary
Constructors Constructor Description TimeGranularitySpec()Deprecated.TimeGranularitySpec(FieldSpec.DataType dataType, int timeUnitSize, TimeUnit timeType, String name)Deprecated.TimeGranularitySpec(FieldSpec.DataType dataType, int timeUnitSize, TimeUnit timeType, String timeFormat, String name)Deprecated.TimeGranularitySpec(FieldSpec.DataType dataType, TimeUnit timeType, String name)Deprecated.TimeGranularitySpec(FieldSpec.DataType dataType, TimeUnit timeType, String timeFormat, String name)Deprecated.
-
Method Summary
Modifier and Type Method Description booleanequals(Object o)Deprecated.FieldSpec.DataTypegetDataType()Deprecated.StringgetName()Deprecated.StringgetTimeFormat()Deprecated.TimeUnitgetTimeType()Deprecated.intgetTimeUnitSize()Deprecated.inthashCode()Deprecated.voidsetDataType(FieldSpec.DataType dataType)Deprecated.voidsetName(String name)Deprecated.voidsetTimeFormat(String timeFormat)Deprecated.voidsetTimeType(TimeUnit timeType)Deprecated.voidsetTimeunitSize(int timeUnitSize)Deprecated.voidsetTimeUnitSize(int timeUnitSize)Deprecated.com.fasterxml.jackson.databind.node.ObjectNodetoJsonObject()Deprecated.Returns theObjectNoderepresenting the time granularity spec.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
TimeGranularitySpec
public TimeGranularitySpec()
Deprecated.
-
TimeGranularitySpec
public TimeGranularitySpec(FieldSpec.DataType dataType, TimeUnit timeType, String name)
Deprecated.
-
TimeGranularitySpec
public TimeGranularitySpec(FieldSpec.DataType dataType, TimeUnit timeType, String timeFormat, String name)
Deprecated.
-
TimeGranularitySpec
public TimeGranularitySpec(FieldSpec.DataType dataType, int timeUnitSize, TimeUnit timeType, String name)
Deprecated.
-
TimeGranularitySpec
public TimeGranularitySpec(FieldSpec.DataType dataType, int timeUnitSize, TimeUnit timeType, String timeFormat, String name)
Deprecated.
-
-
Method Detail
-
getName
public String getName()
Deprecated.
-
setName
public void setName(String name)
Deprecated.
-
getDataType
public FieldSpec.DataType getDataType()
Deprecated.
-
setDataType
public void setDataType(FieldSpec.DataType dataType)
Deprecated.
-
getTimeType
public TimeUnit getTimeType()
Deprecated.
-
setTimeType
public void setTimeType(TimeUnit timeType)
Deprecated.
-
getTimeUnitSize
public int getTimeUnitSize()
Deprecated.
-
setTimeUnitSize
public void setTimeUnitSize(int timeUnitSize)
Deprecated.
-
setTimeunitSize
public void setTimeunitSize(int timeUnitSize)
Deprecated.
-
getTimeFormat
public String getTimeFormat()
Deprecated.
-
setTimeFormat
public void setTimeFormat(String timeFormat)
Deprecated.
-
toJsonObject
public com.fasterxml.jackson.databind.node.ObjectNode toJsonObject()
Deprecated.Returns theObjectNoderepresenting the time granularity spec.Only contains fields with non-default value.
NOTE: here we use
ObjectNodeto preserve the insertion order.
-
-