Class TimePartitionSchema


  • public abstract class TimePartitionSchema
    extends Object
    Implements different schemes for partitioning by time. It gives back a partition start/end and a directory where data shall be stored. Currently the following are implemented: YYYY YYYY/DOY YYYY/MM
    • Constructor Detail

      • TimePartitionSchema

        public TimePartitionSchema()
    • Method Detail

      • getPartitionInfo

        public abstract TimePartitionInfo getPartitionInfo​(long instant)
        returns the directory where this instant shall be written. This is likely to be expensive operation - since instant has to be converted into a calendar taking into accounts leap seconds and all the rest.
        Parameters:
        instant -
      • parseDir

        public abstract TimePartitionInfo parseDir​(String dir)
        Parses a string of the shape "A/B/..." into a PartitionInfo. It is used by the storage engines to parse the partitions from disk at startup. Returns null if the given string does not match the expected directory.
      • getName

        public String getName()
        name for the partitioning schema (YYYY/DOY, YYYY/MM, etc)
        Returns:
        the name of the partitioning schema