Enum Class GranularityType
- All Implemented Interfaces:
Serializable,Comparable<GranularityType>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
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 class with the specified name.static GranularityType[]values()Returns an array containing the constants of this enum class, 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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
-