Enum GranularityType
- All Implemented Interfaces:
Serializable,Comparable<GranularityType>
Only to create a mapping of the granularity and all the supported file patterns
namely: default, lowerDefault and hive.
NOTE:
When a new granularity type is added to following type, DO remember document it here: docs/querying/granularities.md#simple-granularities
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic GranularityTypefromPeriod(org.joda.time.Period period) Note: This is only an estimate based on the values in period.org.joda.time.DateTimegetDateTime(Integer[] vals) static booleanisStandard(Granularity granularity) For a select subset of granularites, users can specify them directly as string.static GranularityTypeReturns the enum constant of this type with the specified name.static GranularityType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SECOND
-
MINUTE
-
FIVE_MINUTE
-
TEN_MINUTE
-
FIFTEEN_MINUTE
-
THIRTY_MINUTE
-
HOUR
-
SIX_HOUR
-
EIGHT_HOUR
-
DAY
-
WEEK
-
MONTH
-
QUARTER
-
YEAR
-
ALL
-
NONE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getDefaultGranularity
-
getDateTime
-
isStandard
For a select subset of granularites, users can specify them directly as string. These are "predefined granularities" or "standard" granularities. For all others, the users will have to use "Duration" or "Period" type granularities -
fromPeriod
Note: This is only an estimate based on the values in period. This will not work for complicated periods that represent say 1 year 1 day -
getHiveFormat
-
getLowerDefaultFormat
-
getDefaultFormat
-