Rust TsFile Writer

This is a not yet feature complete Writer for TsFiles Version 3 (as defined from the Apache IoTDB Project). Currently not all features of TsFiles are supported. Most notably:

But generally, the TsFiles written with this client are 100% compatible with TsFiles written in Java.

Quickstart

To write a TsFile just do something like

``` // Create the Schema // Two devices with two sensors each let schema = TsFileSchemaBuilder::new() .add( "d1", DeviceBuilder::new() .add( "s1", TSDataType::INT64, TSEncoding::PLAIN, CompressionType::UNCOMPRESSED, ) .add( "s2", TSDataType::FLOAT, TSEncoding::PLAIN, CompressionType::UNCOMPRESSED, ) .build(), ) .add( "d2", DeviceBuilder::new() .add( "s1", TSDataType::INT64, TSEncoding::PLAIN, CompressionType::UNCOMPRESSED, ) .add( "s2", TSDataType::FLOAT, TSEncoding::PLAIN, CompressionType::UNCOMPRESSED, ) .build(), ) .build();

// Create the writer let mut writer = TsFileWriter::new( "target/benchmark2.tsfile", schema, Default::default(), ) .unwrap();

// Write multiple timeseries at once writer.write_many("d1",1, vec![ DataPoint::new("s1", IoTDBValue::LONG(i)), DataPoint::new("s2", IoTDBValue::FLOAT(i as f32)), ]);

// Write single series writer.write("d2", "s1", 1, IoTDBValue::LONG(i)); writer.write("d2", "s2", 1, IoTDBValue::FLOAT(i as f32)); ```

Currently implemented features

Encodings

Datatypes

Compression

Feature 'sync_sender'

This is a very simple implementation of a "Sync-Client" for the Apache IoTDB Server. This means, this tool behaves like an IoTDB Server with start-sync-client.sh running. I.e. it will send tsfiles to the respective reveiving server using Apache IoTDBs Sync Protocol.

Changelog

0.1.4 (not released)

0.1.3

0.1.2

0.1.1