Skip to content

Latest commit

 

History

History
83 lines (45 loc) · 2.9 KB

File metadata and controls

83 lines (45 loc) · 2.9 KB

TSBS Supplemental Guide: KaiwuDB

This should be read after the main README.

KaiwuDB is a distributed multi-model database tailored for AIoT scenarios. It supports the concurrent creation of time-series and relational databases within the same instance and the integrated processing of multi-model data. KaiwuDB can process time-series data with high efficiency. For more information about KaiwuDB, visit KaiwuDB website.

This supplemental guide explains how the data generated for TSBS is stored, additional flags available when using the data importer (tsbs_load_Kaiwudb), and additional flags available for the query runner (tsbs_run_queries_Kaiwudb).

Data format

Data generated by tsbs_generate_data for KaiwuDB is serialized in a "pseudo-CSV" format. Each reading consists of a row, where the first item represents the operation type, either 3 (insert data with tags) or 1 (insert data).

  • 3 (insert data with tags): The format is: 3,table_name,primary_tag,(insert_values,insert_other_tags)
  • 1 (insert data): The format is: 1,table_name,primary_tag,insert_values_length,(timestamp,insert_values,primary_tag)

The primary_tag is the primary key or unique identifier for each device in the dataset. For example, in the devops test case, if measurementName is cpu, the primary tag could be hostname and one possible tag value would be host_0.

The unit of timestamp is millisecond.

An example for the cpu-only use case:

3,cpu,host_0,(1658707200000,58,2,24,61,22,63,6,44,80,38,'host_0','eu-central-1','eu-central-1a','6','Ubuntu15.10','x86','SF','19','1','test')
1,cpu,host_0,10,(1658707210000,57,2,25,61,23,63,6,46,78,36,'host_0')

tsbs_load_kaiwudb Additional Flags

KaiwuDB related

-host (type: string, default: localhost)

Hostname of the KaiwuDB instance.

-port (type: string, default: 36257)

Port to connect to on the database host.

-user (type: string, default: root)

Username for connecting to KaiwuDB.

-pass (type: string, default: ``)

Password for connecting to KaiwuDB.

-insert-type (type: string, default: prepare)

Defines the insert type:

  • insert: simple insert
  • prepare: insert using prepare statements.

tsbs_run_queries_kaiwudb Additional Flags

KaiwuDB related

-host (type: string, default: localhost)

Hostname of the KaiwuDB instance.

-port (type: string, default: 36257)

Port to connect to on the database host.

-user (type: string, default: root)

Username for connecting to KaiwuDB.

-pass (type: string, default: ``)

Password for connecting to KaiwuDB.

-query-mode (type: int, default: 5)

Sets the query execution mode:

  • 5: simple query
  • 1: query using prepare statements. This mode may accelerate the query performance, particularly for certain query types, such as single-groupby-1-1-1.