public class TimeFormatExtractionFunction extends ExtractionFunction
Visit http://druid.io/docs/0.10.1/querying/dimensionspecs.html#time-format-extraction-function for more details on Time Format Extraction Function.
ExtractionFunction.DefaultExtractionFunctionType
Constructor and Description |
---|
TimeFormatExtractionFunction()
Constructor.
|
TimeFormatExtractionFunction(String format,
Locale locale,
org.joda.time.DateTimeZone timeZone,
Granularity granularity,
Boolean asMillis)
Constructor.
|
getType
public TimeFormatExtractionFunction()
Druid only requires "type" parameter in dimension spec. Other fields can all be null. See http://druid.io/docs/0.10.1/querying/dimensionspecs.html#time-format-extraction-function for more details.
public TimeFormatExtractionFunction(String format, Locale locale, org.joda.time.DateTimeZone timeZone, Granularity granularity, Boolean asMillis)
format
- The date time format for the resulting dimension value, in
Joda Time DateTimeFormat
, or null to use the default ISO8601 format.locale
- Locale (language and country) to use, given as a
IETF
BCP 47 language tag, e.g. en-US, en-GB, fr-FR, fr-CA, etc.timeZone
- Time zone to use in
IANA tz database format
, e.g. Europe/Berlin (this can possibly be different than the aggregation time-zone)granularity
- Granularity
to apply before formatting.asMillis
- Boolean value, set to true to treat input strings as millis rather than ISO8601 strings.public String getFormat()
TimeFormatExtractionFunction
.TimeFormatExtractionFunction
public Locale getLocale()
locale
of this TimeFormatExtractionFunction
.locale
of this TimeFormatExtractionFunction
public org.joda.time.DateTimeZone getTimeZone()
time zone
of this TimeFormatExtractionFunction
.time zone
of this TimeFormatExtractionFunction
public Granularity getGranularity()
granularity
of this
TimeFormatExtractionFunction
.granularity
of this
TimeFormatExtractionFunction
public Boolean isAsMillis()
public TimeFormatExtractionFunction withFormat(String format)
TimeFormatExtractionFunction
with a specified format.format
- The date time format for the resulting dimension value, in
Joda Time DateTimeFormat
, or null to use the default ISO8601 format.TimeFormatExtractionFunction
with the specified formatpublic TimeFormatExtractionFunction withLocale(Locale locale)
TimeFormatExtractionFunction
with a specified locale
.locale
- Locale (language and country) to use, given as a
IETF
BCP 47 language tag, e.g. en-US, en-GB, fr-FR, fr-CA, etc.TimeFormatExtractionFunction
with the specified locale
public TimeFormatExtractionFunction withTimeZone(org.joda.time.DateTimeZone timeZone)
TimeFormatExtractionFunction
with a specified time zone
.timeZone
- Time zone to use in
IANA tz database format
, e.g. Europe/Berlin (this can possibly be different than the aggregation time-zone)TimeFormatExtractionFunction
with the specified
time zone
public TimeFormatExtractionFunction withGranularity(Granularity granularity)
TimeFormatExtractionFunction
with a specified
granularity
.granularity
- Granularity
to apply before formatting.TimeFormatExtractionFunction
with the specified
granularity
public TimeFormatExtractionFunction withAsMillis(Boolean asMillis)
TimeFormatExtractionFunction
with a specified config on "asMillis".asMillis
- Boolean value, set to true to treat input strings as millis rather than ISO8601 strings.TimeFormatExtractionFunction
with the specified config on "asMillis"public int hashCode()
hashCode
in class ExtractionFunction
public boolean equals(Object other)
equals
in class ExtractionFunction
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.