Crates.io | tsfile |
lib.rs | tsfile |
version | 0.0.2 |
source | src |
created_at | 2021-12-14 03:02:50.426851 |
updated_at | 2021-12-24 03:33:20.243438 |
description | Apache IoTDB TsFile written in Rust |
homepage | |
repository | https://github.com/iotdb-lab/tsfile-rs |
max_upload_size | |
id | 497539 |
size | 76,694 |
IoTDB TsFile structure implemented in Rust language
base on tsfile version 000003, iotdb 0.12.0
✅ parser metadata
[] parser Chunk and Page
[] filter data
let path = "/Users/liudawei/allfiles/rust/TsFile-rs/1637893124311-1-3-0.tsfile";
//create a tsfile reader
if let Ok(reader) = TsFileSearchReader::try_from(path) {
//get metadata
let x = reader.metadata();
println! ("{:?}", x);
//get root node of file's index tree
let root = reader.metadata().file_meta().metadata_index();
//use the method to query a sensor's TimeseriesMetadata
let option = reader.binary_search_meta(root.clone(), "root.group_0.d_0".to_string(), "s_0".to_string());
//iter for devices
let x = reader.device_meta_iter();
x.for_each( | x | println ! ("{:?}", x))
//iter all sensor for a device
let x = reader.sensor_meta_iter("root.group_0.d_0".to_string());
x.for_each( | x | println ! ("{:?}", x))
}