Class MNodeLevelCounter
- java.lang.Object
-
- org.apache.iotdb.db.metadata.mtree.traverser.Traverser
-
- org.apache.iotdb.db.metadata.mtree.traverser.counter.CounterTraverser
-
- org.apache.iotdb.db.metadata.mtree.traverser.counter.MNodeLevelCounter
-
- Direct Known Subclasses:
MNodeAboveSGLevelCounter
public class MNodeLevelCounter extends CounterTraverser
This Traverser implements node count function. On finding a path matching the given pattern, if the path is longer than the specified level, MNodeLevelCounter finds the node of the specified level on the path and counts it. The same node will not be counted more than once.
-
-
Field Summary
Fields Modifier and Type Field Description protected inttargetLevel-
Fields inherited from class org.apache.iotdb.db.metadata.mtree.traverser.counter.CounterTraverser
count
-
Fields inherited from class org.apache.iotdb.db.metadata.mtree.traverser.Traverser
isInTemplate, isPrefixMatch, isPrefixStart, nodes, shouldTraverseTemplate, startIndex, startLevel, startNode, store, templateMap, traverseContext
-
-
Constructor Summary
Constructors Constructor Description MNodeLevelCounter(IMNode startNode, org.apache.iotdb.commons.path.PartialPath path, IMTreeStore store, int targetLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanprocessFullMatchedMNode(IMNode node, int idx, int level)full match: root.sg.d full match root.sg.**(pattern)protected booleanprocessInternalMatchedMNode(IMNode node, int idx, int level)internal match: root.sg internal match root.sg.**(pattern)-
Methods inherited from class org.apache.iotdb.db.metadata.mtree.traverser.counter.CounterTraverser
getCount
-
Methods inherited from class org.apache.iotdb.db.metadata.mtree.traverser.Traverser
getCurrentPartialPath, getCurrentPathNodes, getStorageGroupNodeInTraversePath, getUpperTemplate, processMultiLevelWildcard, processNameMatch, processOneLevelWildcard, setPrefixMatch, setTemplateMap, traverse, traverse
-
-
-
-
Constructor Detail
-
MNodeLevelCounter
public MNodeLevelCounter(IMNode startNode, org.apache.iotdb.commons.path.PartialPath path, IMTreeStore store, int targetLevel) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
-
Method Detail
-
processInternalMatchedMNode
protected boolean processInternalMatchedMNode(IMNode node, int idx, int level)
Description copied from class:Traverserinternal match: root.sg internal match root.sg.**(pattern)- Specified by:
processInternalMatchedMNodein classTraverser- Returns:
- whether this branch of recursive traversal should stop; if true, stop
-
processFullMatchedMNode
protected boolean processFullMatchedMNode(IMNode node, int idx, int level)
Description copied from class:Traverserfull match: root.sg.d full match root.sg.**(pattern)- Specified by:
processFullMatchedMNodein classTraverser- Returns:
- whether this branch of recursive traversal should stop; if true, stop
-
-