Package org.yamcs.archive
Class TmPartitionGroups
java.lang.Object
org.yamcs.archive.TmPartitionGroups
Assigns the packets recorded in the tm table to partition groups, as configured with the
partitionGroups
option of the XtceTmRecorder.
The group of a packet is determined from its packet name (pname): starting with the container having that name and
going up in the XTCE hierarchy, the first container listed in a group determines the group. If no container is
listed, the packet goes into the DEFAULT_GROUP.
The groups are computed from the current configuration and MDB. If the configuration is changed such that a packet moves to another group, the retrievals filtering on that packet name will not find the data recorded before the change.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddGroupFilter(String yamcsInstance, SqlBuilder sqlb, Collection<String> pnames) If the tm table of the instance is partitioned by group, adds a condition on the pgroup column such that only the partitions which may contain the given packet names are read.Returns the group in which the packets with the given name are recorded.getGroups(Collection<String> pnames) Returns the groups containing the given packet names or null if all groups have to be read (because the groups of some packet names cannot be determined or because all groups are concerned).static TmPartitionGroupsgetInstance(String yamcsInstance) Returns the partition groups of the given instance, or null if the tm table is not partitioned by group or if noXtceTmRecorderis running in the instance.
-
Field Details
-
PGROUP_COLUMN
- See Also:
-
DEFAULT_GROUP
- See Also:
-
-
Constructor Details
-
TmPartitionGroups
- Parameters:
yamcsInstance- used for loggingmdb- used to navigate the container hierarchygroupDefinitions- group name -> list of container qualified names
-
-
Method Details
-
getGroup
Returns the group in which the packets with the given name are recorded. -
getGroups
Returns the groups containing the given packet names or null if all groups have to be read (because the groups of some packet names cannot be determined or because all groups are concerned). -
addGroupFilter
If the tm table of the instance is partitioned by group, adds a condition on the pgroup column such that only the partitions which may contain the given packet names are read.This only limits which partitions are read; the caller has to filter on the packet names itself.
-
getInstance
Returns the partition groups of the given instance, or null if the tm table is not partitioned by group or if noXtceTmRecorderis running in the instance.
-