Skip to main content

Schema Region

About 2 min

Schema Region

Background

When IoTDB service is started, metadata information is organized by loading log file mlog.bin and the results are held
in memory for a long time. As metadata continues to grow, memory continues to grow. In order to support the controllable
fluctuation in the massive metadata scenario, we provide a metadata storage type based on rocksDB.

Usage

Firstly, you should package schema-engine-rocksdb by the following command:

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

After that, you can get a conf directory and a lib directory in
schema-engine-rocksdb/target/schema-engine-rocksdb. Copy the file in the conf directory to the conf directory of server,
and copy the files in the lib directory to the lib directory of server.

Then, open the iotdb-datanode.properties in the conf directory of server, and set the schema_engine_mode to
Rocksdb_based. Restart the IoTDB, the system will use RSchemaRegion to manage the metadata.

####################
### Schema Engine Configuration
####################
# Choose the mode of schema engine. The value could be Memory,PBTree 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

When rocksdb is specified as the metadata storage type, configuration parameters of rocksDB are open to the public as file. You can modify the configuration file schema-rocksdb.properties to adjust parameters according to your own requirements, such as block cache. If there is no special requirement, use the default value.

Function Support

The module is still being improved, and some functions are not supported at the moment. The function modules are supported as follows:

functionsupport
timeseries addition and deletionyes
query the wildcard path(* and **)yes
tag addition and deletionyes
aligned timeseriesyes
wildcard node name(*)no
meta templateno
tag indexno
continuous queryno

Appendix: Interface support

The external interface, that is, the client can sense, related SQL is not supported;

The internal interface, that is, the invocation logic of other modules within the service, has no direct dependence on the external SQL;

interfacetypesupportcomment
createTimeseriesexternalyes
createAlignedTimeSeriesexternalyes
showTimeseriesexternalpart of the supportnot support LATEST
changeAliasexternalyes
upsertTagsAndAttributesexternalyes
addAttributesexternalyes
addTagsexternalyes
dropTagsOrAttributesexternalyes
setTagsOrAttributesValueexternalyes
renameTagOrAttributeKeyexternalyes
*templateexternalno
*triggerexternalno
deleteSchemaRegioninternalyes
autoCreateDeviceMNodeinternalno
isPathExistinternalyes
getAllTimeseriesCountinternalyes
getDevicesNuminternalyes
getNodesCountInGivenLevelinternalconditional supportpath does not support wildcard
getMeasurementCountGroupByLevelinternalyes
getNodesListInGivenLevelinternalconditional supportpath does not support wildcard
getChildNodePathInNextLevelinternalconditional supportpath does not support wildcard
getChildNodeNameInNextLevelinternalconditional supportpath does not support wildcard
getBelongedDevicesinternalyes
getMatchedDevicesinternalyes
getMeasurementPathsinternalyes
getMeasurementPathsWithAliasinternalyes
getAllMeasurementByDevicePathinternalyes
getDeviceNodeinternalyes
getMeasurementMNodesinternalyes
getSeriesSchemasAndReadLockDeviceinternalyes

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.

We use Google Analytics to collect anonymous, aggregated usage information.