Class MetadataIndexConstructor
- java.lang.Object
-
- org.apache.iotdb.tsfile.file.metadata.MetadataIndexConstructor
-
public class MetadataIndexConstructor extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddCurrentIndexNodeToQueue(MetadataIndexNode currentIndexNode, java.util.Queue<MetadataIndexNode> metadataIndexNodeQueue, TsFileOutput out)static MetadataIndexNodecheckAndBuildLevelIndex(java.util.Map<java.lang.String,MetadataIndexNode> deviceMetadataIndexMap, TsFileOutput out)static MetadataIndexNodeconstructMetadataIndex(java.util.Map<java.lang.String,java.util.List<TimeseriesMetadata>> deviceTimeseriesMetadataMap, TsFileOutput out)Construct metadata index tree.static MetadataIndexNodegenerateRootNode(java.util.Queue<MetadataIndexNode> metadataIndexNodeQueue, TsFileOutput out, MetadataIndexNodeType type)Generate root node, using the nodes in the queue as leaf nodes.
-
-
-
Method Detail
-
constructMetadataIndex
public static MetadataIndexNode constructMetadataIndex(java.util.Map<java.lang.String,java.util.List<TimeseriesMetadata>> deviceTimeseriesMetadataMap, TsFileOutput out) throws java.io.IOException
Construct metadata index tree.- Parameters:
deviceTimeseriesMetadataMap- device => TimeseriesMetadata listout- tsfile output- Throws:
java.io.IOException- exception when operating stream
-
checkAndBuildLevelIndex
public static MetadataIndexNode checkAndBuildLevelIndex(java.util.Map<java.lang.String,MetadataIndexNode> deviceMetadataIndexMap, TsFileOutput out) throws java.io.IOException
- Throws:
java.io.IOException
-
generateRootNode
public static MetadataIndexNode generateRootNode(java.util.Queue<MetadataIndexNode> metadataIndexNodeQueue, TsFileOutput out, MetadataIndexNodeType type) throws java.io.IOException
Generate root node, using the nodes in the queue as leaf nodes. The final metadata tree has two levels: measurement leaf nodes will generate to measurement root node; device leaf nodes will generate to device root node- Parameters:
metadataIndexNodeQueue- queue of metadataIndexNodeout- tsfile outputtype- MetadataIndexNode type- Throws:
java.io.IOException- exception when operating stream
-
addCurrentIndexNodeToQueue
public static void addCurrentIndexNodeToQueue(MetadataIndexNode currentIndexNode, java.util.Queue<MetadataIndexNode> metadataIndexNodeQueue, TsFileOutput out) throws java.io.IOException
- Throws:
java.io.IOException
-
-