跳至主要內容

背景

...大约 3 分钟

背景

在IoTDB服务启动时,通过加载日志文件mlog.bin组织元数据信息,并将结果长期持有在内存中;随着元数据的不断增长,内存会持续上涨;为支持海量元数据场景下,内存在可控范围内波动,我们提供了基于rocksDB的元数据存储方式。

使用

首先使用下面的命令将 schema-engine-rocksdb 打包

mvn clean package -pl schema-engine-rocksdb -am -DskipTests

命令运行结束后,在其 target/schema-engine-rocksdb 中会有一个 lib 文件夹和 conf 文件夹。将 conf 文件夹下的文件拷贝到 server 的 conf 文件夹中,将 lib 文件夹下的文件也拷贝到
server 的 lib 的文件夹中。

在系统配置文件iotdb-datanode.properties中,将配置项schema_engine_mode修改为Rocksdb_based, 如:

####################
### Schema Engine Configuration
####################
# Choose the mode of schema engine. The value could be Memory,Schema_File and Rocksdb_based. If the provided value doesn't match any pre-defined value, Memory mode will be used as default.
# Datatype: string
schema_engine_mode=Rocksdb_based

当指定rocksdb作为元数据的存储方式时,我们开放了rocksdb相关的配置参数,您可以通过修改配置文件schema-rocksdb.properties,根据自己的需求,进行合理的参数调整,例如查询的缓存等。如没有特殊需求,使用默认值即可。

功能支持说明

该模块仍在不断完善中,部分功能暂不支持,功能模块支持情况如下:

功能支持情况
时间序列增删支持
路径通配符(* 及 **)查询支持
tag增删支持
对齐时间序列支持
节点名称(*)通配不支持
元数据模板template不支持
tag索引不支持
continuous query不支持

附: 所有接口支持情况

外部接口,即客户端可以感知到,相关sql不支持;

内部接口,即服务内部的其他模块调用逻辑,与外部sql无直接依赖关系;

接口名称接口类型支持情况说明
createTimeseries外部接口支持
createAlignedTimeSeries外部接口支持
showTimeseries外部接口部分支持不支持LATEST
changeAlias外部接口支持
upsertTagsAndAttributes外部接口支持
addAttributes外部接口支持
addTags外部接口支持
dropTagsOrAttributes外部接口支持
setTagsOrAttributesValue外部接口支持
renameTagOrAttributeKey外部接口支持
*template外部接口不支持
*trigger外部接口不支持
deleteSchemaRegion内部接口支持
autoCreateDeviceMNode内部接口不支持
isPathExist内部接口支持
getAllTimeseriesCount内部接口支持
getDevicesNum内部接口支持
getNodesCountInGivenLevel内部接口有条件支持路径不支持通配
getMeasurementCountGroupByLevel内部接口支持
getNodesListInGivenLevel内部接口有条件支持路径不支持通配
getChildNodePathInNextLevel内部接口有条件支持路径不支持通配
getChildNodeNameInNextLevel内部接口有条件支持路径不支持通配
getBelongedDevices内部接口支持
getMatchedDevices内部接口支持
getMeasurementPaths内部接口支持
getMeasurementPathsWithAlias内部接口支持
getAllMeasurementByDevicePath内部接口支持
getDeviceNode内部接口支持
getMeasurementMNodes内部接口支持
getSeriesSchemasAndReadLockDevice内部接口支持

Copyright © 2024 The Apache Software Foundation.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation

Have a question? Connect with us on QQ, WeChat, or Slack. Join the community now.