Class MetaUtils
- java.lang.Object
-
- org.apache.iotdb.db.metadata.utils.MetaUtils
-
public class MetaUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcollectLastNode(IMNode node, java.util.List<IMNode> lastNodeList)static java.util.List<java.lang.String>getMultiFullPaths(IMNode node)static org.apache.iotdb.commons.path.PartialPathgetStorageGroupPathByLevel(org.apache.iotdb.commons.path.PartialPath path, int level)Get storage group path when creating schema automatically is enablestatic java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.List<java.lang.Integer>>groupAggregationsBySeries(java.util.List<? extends org.apache.iotdb.tsfile.read.common.Path> selectedPaths)Merge same series and convert to series map.static java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.List<AggregationDescriptor>>groupAlignedAggregations(java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.List<AggregationDescriptor>> pathToAggregations)static java.util.List<org.apache.iotdb.commons.path.PartialPath>groupAlignedPaths(java.util.List<org.apache.iotdb.commons.path.PartialPath> fullPaths)PartialPath of aligned time series will be organized to one AlignedPath.static java.util.List<org.apache.iotdb.commons.path.PartialPath>groupAlignedSeries(java.util.List<org.apache.iotdb.commons.path.PartialPath> fullPaths)static java.util.Map<AlignedPath,java.util.List<java.util.List<java.lang.Integer>>>groupAlignedSeriesWithAggregations(java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.List<java.lang.Integer>> pathToAggrIndexesMap)Group all the series under an aligned entity into one AlignedPath and remove these series from pathToAggrIndexesMap.
-
-
-
Method Detail
-
getStorageGroupPathByLevel
public static org.apache.iotdb.commons.path.PartialPath getStorageGroupPathByLevel(org.apache.iotdb.commons.path.PartialPath path, int level) throws org.apache.iotdb.commons.exception.MetadataExceptionGet storage group path when creating schema automatically is enablee.g., path = root.a.b.c and level = 1, return root.a
- Parameters:
path- pathlevel- level- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
groupAlignedPaths
public static java.util.List<org.apache.iotdb.commons.path.PartialPath> groupAlignedPaths(java.util.List<org.apache.iotdb.commons.path.PartialPath> fullPaths)
PartialPath of aligned time series will be organized to one AlignedPath. BEFORE this method, all the aligned time series is NOT united. For example, given root.sg.d1.vector1[s1] and root.sg.d1.vector1[s2], they will be organized to root.sg.d1.vector1 [s1,s2]- Parameters:
fullPaths- full path list without uniting the sub measurement under the same aligned time series. The list has been sorted by the alphabetical order, so all the aligned time series of one device has already been placed contiguously.- Returns:
- Size of partial path list could NOT equal to the input list size. For example, the vector1 (s1,s2) would be returned once.
-
groupAlignedSeries
public static java.util.List<org.apache.iotdb.commons.path.PartialPath> groupAlignedSeries(java.util.List<org.apache.iotdb.commons.path.PartialPath> fullPaths)
-
getMultiFullPaths
public static java.util.List<java.lang.String> getMultiFullPaths(IMNode node)
-
collectLastNode
public static void collectLastNode(IMNode node, java.util.List<IMNode> lastNodeList)
-
groupAggregationsBySeries
public static java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.List<java.lang.Integer>> groupAggregationsBySeries(java.util.List<? extends org.apache.iotdb.tsfile.read.common.Path> selectedPaths)
Merge same series and convert to series map. For example: Given: paths: s1, s2, s3, s1 and aggregations: count, sum, count, sum. Then: pathToAggrIndexesMap: s1 -> 0, 3; s2 -> 1; s3 -> 2- Parameters:
selectedPaths- selected series- Returns:
- path to aggregation indexes map
-
groupAlignedSeriesWithAggregations
public static java.util.Map<AlignedPath,java.util.List<java.util.List<java.lang.Integer>>> groupAlignedSeriesWithAggregations(java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.List<java.lang.Integer>> pathToAggrIndexesMap)
Group all the series under an aligned entity into one AlignedPath and remove these series from pathToAggrIndexesMap. For example, input map: d1[s1] -> [1, 3], d1[s2] -> [2,4], will return d1[s1,s2], [[1,3], [2,4]]
-
groupAlignedAggregations
public static java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.List<AggregationDescriptor>> groupAlignedAggregations(java.util.Map<org.apache.iotdb.commons.path.PartialPath,java.util.List<AggregationDescriptor>> pathToAggregations)
-
-