Package org.yamcs.yarch
Class TimePartitionSchema
java.lang.Object
org.yamcs.yarch.TimePartitionSchema
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TimePartitionSchema
getInstance
(String schema) getName()
name for the partitioning schema (YYYY/DOY, YYYY/MM, etc)abstract TimePartitionInfo
getPartitionInfo
(long instant) returns the directory where this instant shall be written.abstract TimePartitionInfo
Parses a string of the shape "A/B/..." into a PartitionInfo.
-
Constructor Details
-
TimePartitionSchema
public TimePartitionSchema()
-
-
Method Details
-
getPartitionInfo
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
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. -
getInstance
-
getName
name for the partitioning schema (YYYY/DOY, YYYY/MM, etc)- Returns:
- the name of the partitioning schema
-