...
The returned partitions have an extra method to retrieve the partition time as a long.
The start and end times of
getPartitionsByTime()
do not correspond directly to a single partition filter, but to a series of partition filters. For example, to retrieve the partitions between November 2014 and March 2015, you need two partition filters: one for the months of November through December of 2014, and one for January through March of 2015. This method converts a given time range into the corresponding set of partition filters, retrieves the partitions for each filter, and returns the superset of all these partitions.
Using TimePartitionedFileSets in MapReduce
Using time-partitioned file sets in MapReduce is similar to partitioned file sets; however, instead of setting an input partition filter and an output partition key, you configure an input time range and an output partition time in the initialize()
of the MapReduce:
...
Note that the values for these times are milliseconds since the Epoch; the two times in this example represent the midnight time of January 1st, 2015 and February 1st, 2015.
Exploring TimePartitionedFileSets
A time-partitioned file set can be explored with ad-hoc queries if you enable it at creation time, similar to a FileSet, as described under “FileSet Exploration”.