diff --git a/src/.vuepress/sidebar/V1.3.0-2/en.ts b/src/.vuepress/sidebar/V1.3.0-2/en.ts index 0bc5f4f6c..6c07449cf 100644 --- a/src/.vuepress/sidebar/V1.3.0-2/en.ts +++ b/src/.vuepress/sidebar/V1.3.0-2/en.ts @@ -182,6 +182,8 @@ export const enSidebar = { { text: 'UDF development', link: 'UDF-development' }, { text: 'Function and Expression', link: 'Function-and-Expression' }, { text: 'Common Config Manual', link: 'Common-Config-Manual' }, + { text: 'ConfigNode Config Manual', link: 'ConfigNode-Config-Manual' }, + { text: 'DataNode Config Manual', link: 'DataNode-Config-Manual_apache' }, { text: 'Status Codes', link: 'Status-Codes' }, { text: 'Keywords', link: 'Keywords' }, ], diff --git a/src/.vuepress/sidebar/V1.3.0-2/zh.ts b/src/.vuepress/sidebar/V1.3.0-2/zh.ts index 33214954e..97759ef8b 100644 --- a/src/.vuepress/sidebar/V1.3.0-2/zh.ts +++ b/src/.vuepress/sidebar/V1.3.0-2/zh.ts @@ -166,7 +166,7 @@ export const zhSidebar = { { text: '内置函数与表达式', link: 'Function-and-Expression' }, { text: '配置参数', link: 'Common-Config-Manual' }, { text: 'ConfigNode配置参数', link: 'ConfigNode-Config-Manual' }, - { text: 'DataNode配置参数', link: 'DataNode-Config-Manual' }, + { text: 'DataNode配置参数', link: 'DataNode-Config-Manual_apache' }, { text: '状态码', link: 'Status-Codes' }, { text: '关键字', link: 'Keywords' }, ], diff --git a/src/.vuepress/sidebar/V1.3.3/en.ts b/src/.vuepress/sidebar/V1.3.3/en.ts index 7e3eb8d65..0184b3f28 100644 --- a/src/.vuepress/sidebar/V1.3.3/en.ts +++ b/src/.vuepress/sidebar/V1.3.3/en.ts @@ -37,7 +37,7 @@ export const enSidebar = { collapsible: true, prefix: 'Background-knowledge/', children: [ - { text: 'Cluster-related Concepts', link: 'Cluster-Concept' }, + { text: 'Common Concepts', link: 'Cluster-Concept_apache' }, { text: 'Data Type', link: 'Data-Type' }, ], }, @@ -231,7 +231,7 @@ export const enSidebar = { text: 'ConfigNode Config Manual', link: 'ConfigNode-Config-Manual', }, - { text: 'DataNode Config Manual', link: 'DataNode-Config-Manual' }, + { text: 'DataNode Config Manual', link: 'DataNode-Config-Manual_apache' }, ], }, { diff --git a/src/.vuepress/sidebar/V1.3.3/zh.ts b/src/.vuepress/sidebar/V1.3.3/zh.ts index 42ae0c252..2cf6cb0af 100644 --- a/src/.vuepress/sidebar/V1.3.3/zh.ts +++ b/src/.vuepress/sidebar/V1.3.3/zh.ts @@ -38,7 +38,7 @@ export const zhSidebar = { collapsible: true, prefix: 'Background-knowledge/', children: [ - { text: '集群相关概念', link: 'Cluster-Concept' }, + { text: '常见概念', link: 'Cluster-Concept_apache' }, { text: '数据类型', link: 'Data-Type' }, ], }, @@ -206,7 +206,7 @@ export const zhSidebar = { children: [ { text: '配置参数', link: 'Common-Config-Manual' }, { text: 'ConfigNode配置参数', link: 'ConfigNode-Config-Manual' }, - { text: 'DataNode配置参数', link: 'DataNode-Config-Manual' }, + { text: 'DataNode配置参数', link: 'DataNode-Config-Manual_apache' }, ], }, { diff --git a/src/.vuepress/sidebar_timecho/V1.3.0-2/en.ts b/src/.vuepress/sidebar_timecho/V1.3.0-2/en.ts index 313ad447c..1a9ee8695 100644 --- a/src/.vuepress/sidebar_timecho/V1.3.0-2/en.ts +++ b/src/.vuepress/sidebar_timecho/V1.3.0-2/en.ts @@ -200,7 +200,7 @@ export const enSidebar = { { text: 'Function and Expression', link: 'Function-and-Expression' }, { text: 'Common Config Manual', link: 'Common-Config-Manual' }, { text: 'ConfigNode Config Manual', link: 'ConfigNode-Config-Manual' }, - { text: 'DataNode Config Manual', link: 'DataNode-Config-Manual' }, + { text: 'DataNode Config Manual', link: 'DataNode-Config-Manual_timecho' }, { text: 'Status Codes', link: 'Status-Codes' }, { text: 'Keywords', link: 'Keywords' }, ], diff --git a/src/.vuepress/sidebar_timecho/V1.3.0-2/zh.ts b/src/.vuepress/sidebar_timecho/V1.3.0-2/zh.ts index f4d880410..834a0bf80 100644 --- a/src/.vuepress/sidebar_timecho/V1.3.0-2/zh.ts +++ b/src/.vuepress/sidebar_timecho/V1.3.0-2/zh.ts @@ -177,7 +177,7 @@ export const zhSidebar = { { text: '内置函数与表达式', link: 'Function-and-Expression' }, { text: '配置参数', link: 'Common-Config-Manual' }, { text: 'ConfigNode配置参数', link: 'ConfigNode-Config-Manual' }, - { text: 'DataNode配置参数', link: 'DataNode-Config-Manual' }, + { text: 'DataNode配置参数', link: 'DataNode-Config-Manual_timecho' }, { text: '状态码', link: 'Status-Codes' }, { text: '关键字', link: 'Keywords' }, ], diff --git a/src/.vuepress/sidebar_timecho/V1.3.3/en.ts b/src/.vuepress/sidebar_timecho/V1.3.3/en.ts index 207df6539..b4f607b81 100644 --- a/src/.vuepress/sidebar_timecho/V1.3.3/en.ts +++ b/src/.vuepress/sidebar_timecho/V1.3.3/en.ts @@ -37,7 +37,7 @@ export const enSidebar = { collapsible: true, prefix: 'Background-knowledge/', children: [ - { text: 'Cluster-related Concepts', link: 'Cluster-Concept' }, + { text: 'Common Concepts', link: 'Cluster-Concept_timecho' }, { text: 'Data Type', link: 'Data-Type' }, ], }, @@ -250,7 +250,7 @@ export const enSidebar = { text: 'ConfigNode Config Manual', link: 'ConfigNode-Config-Manual', }, - { text: 'DataNode Config Manual', link: 'DataNode-Config-Manual' }, + { text: 'DataNode Config Manual', link: 'DataNode-Config-Manual_timecho' }, ], }, { diff --git a/src/.vuepress/sidebar_timecho/V1.3.3/zh.ts b/src/.vuepress/sidebar_timecho/V1.3.3/zh.ts index ff86aaa3f..fb7f950af 100644 --- a/src/.vuepress/sidebar_timecho/V1.3.3/zh.ts +++ b/src/.vuepress/sidebar_timecho/V1.3.3/zh.ts @@ -38,7 +38,7 @@ export const zhSidebar = { collapsible: true, prefix: 'Background-knowledge/', children: [ - { text: '集群相关概念', link: 'Cluster-Concept' }, + { text: '常见概念', link: 'Cluster-Concept_timecho' }, { text: '数据类型', link: 'Data-Type' }, ], }, @@ -221,7 +221,7 @@ export const zhSidebar = { children: [ { text: '配置参数', link: 'Common-Config-Manual' }, { text: 'ConfigNode配置参数', link: 'ConfigNode-Config-Manual' }, - { text: 'DataNode配置参数', link: 'DataNode-Config-Manual' }, + { text: 'DataNode配置参数', link: 'DataNode-Config-Manual_timecho' }, ], }, { diff --git a/src/.vuepress/sidebar_timecho/V2.0.1/en.ts b/src/.vuepress/sidebar_timecho/V2.0.1/en.ts index 207df6539..f089ade8b 100644 --- a/src/.vuepress/sidebar_timecho/V2.0.1/en.ts +++ b/src/.vuepress/sidebar_timecho/V2.0.1/en.ts @@ -250,7 +250,7 @@ export const enSidebar = { text: 'ConfigNode Config Manual', link: 'ConfigNode-Config-Manual', }, - { text: 'DataNode Config Manual', link: 'DataNode-Config-Manual' }, + { text: 'DataNode Config Manual', link: 'DataNode-Config-Manual_timecho' }, ], }, { diff --git a/src/.vuepress/sidebar_timecho/V2.0.1/zh-Table.ts b/src/.vuepress/sidebar_timecho/V2.0.1/zh-Table.ts index 4892142df..f5766bb7b 100644 --- a/src/.vuepress/sidebar_timecho/V2.0.1/zh-Table.ts +++ b/src/.vuepress/sidebar_timecho/V2.0.1/zh-Table.ts @@ -37,7 +37,7 @@ export const zhSidebar = { collapsible: true, prefix: 'Background-knowledge/', children: [ - { text: '集群相关概念', link: 'Cluster-Concept' }, + { text: '常见概念', link: 'Cluster-Concept_timecho' }, { text: '数据类型', link: 'Data-Type' }, ], }, diff --git a/src/.vuepress/sidebar_timecho/V2.0.1/zh-Tree.ts b/src/.vuepress/sidebar_timecho/V2.0.1/zh-Tree.ts index fde8e0193..537158b58 100644 --- a/src/.vuepress/sidebar_timecho/V2.0.1/zh-Tree.ts +++ b/src/.vuepress/sidebar_timecho/V2.0.1/zh-Tree.ts @@ -38,7 +38,7 @@ export const zhSidebar = { collapsible: true, prefix: 'Background-knowledge/', children: [ - { text: '集群相关概念', link: 'Cluster-Concept' }, + { text: '常见概念', link: 'Cluster-Concept_timecho' }, { text: '数据类型', link: 'Data-Type' }, ], }, @@ -221,7 +221,7 @@ export const zhSidebar = { children: [ { text: '配置参数', link: 'Common-Config-Manual' }, { text: 'ConfigNode配置参数', link: 'ConfigNode-Config-Manual' }, - { text: 'DataNode配置参数', link: 'DataNode-Config-Manual' }, + { text: 'DataNode配置参数', link: 'DataNode-Config-Manual_timecho' }, ], }, { diff --git a/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept.md b/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept.md index d6f57bf2a..b4631022f 100644 --- a/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept.md +++ b/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept.md @@ -1,3 +1,6 @@ +--- +redirectTo: Cluster-Concept_apache.html +--- - -# Cluster-related Concepts -The figure below illustrates a typical IoTDB 3C3D1A cluster deployment mode, comprising 3 ConfigNodes, 3 DataNodes, and 1 AINode: - - -This deployment involves several key concepts that users commonly encounter when working with IoTDB clusters, including: -- **Nodes** (ConfigNode, DataNode, AINode); -- **Slots** (SchemaSlot, DataSlot); -- **Regions** (SchemaRegion, DataRegion); -- **Replica Groups**. - -The following sections will provide a detailed introduction to these concepts. - -## Nodes - -An IoTDB cluster consists of three types of nodes (processes): **ConfigNode** (the main node), **DataNode**, and **AINode**, as detailed below: -- **ConfigNode:** ConfigNodes store cluster configurations, database metadata, the routing information of time series' schema and data. They also monitor cluster nodes and conduct load balancing. All ConfigNodes maintain full mutual backups, as shown in the figure with ConfigNode-1, ConfigNode-2, and ConfigNode-3. ConfigNodes do not directly handle client read or write requests. Instead, they guide the distribution of time series' schema and data within the cluster using a series of [load balancing algorithms](../Technical-Insider/Cluster-data-partitioning.md). -- **DataNode:** DataNodes are responsible for reading and writing time series' schema and data. Each DataNode can accept client read and write requests and provide corresponding services, as illustrated with DataNode-1, DataNode-2, and DataNode-3 in the above figure. When a DataNode receives client requests, it can process them directly or forward them if it has the relevant routing information cached locally. Otherwise, it queries the ConfigNode for routing details and caches the information to improve the efficiency of subsequent requests. -- **AINode:** AINodes interact with ConfigNodes and DataNodes to extend IoTDB's capabilities for data intelligence analysis on time series data. They support registering pre-trained machine learning models from external sources and performing time series analysis tasks using simple SQL statements on specified data. This process integrates model creation, management, and inference within the database engine. Currently, the system provides built-in algorithms or self-training models for common time series analysis scenarios, such as forecasting and anomaly detection. - -## Slots - -IoTDB divides time series' schema and data into smaller, more manageable units called **slots**. Slots are logical entities, and in an IoTDB cluster, the **SchemaSlots** and **DataSlots** are defined as follows: -- **SchemaSlot:** A SchemaSlot represents a subset of the time series' schema collection. The total number of SchemaSlots is fixed, with a default value of 1000. IoTDB uses a hashing algorithm to evenly distribute all devices across these SchemaSlots. -- **DataSlot:** A DataSlot represents a subset of the time series' data collection. Based on the SchemaSlots, the data for corresponding devices is further divided into DataSlots by a fixed time interval. The default time interval for a DataSlot is 7 days. - -## Region - -In IoTDB, time series' schema and data are replicated across DataNodes to ensure high availability in the cluster. However, replicating data at the slot level can increase management complexity and reduce write throughput. To address this, IoTDB introduces the concept of **Region**, which groups SchemaSlots and DataSlots into **SchemaRegions** and **DataRegions** respectively. Replication is then performed at the Region level. The definitions of SchemaRegion and DataRegion are as follows: -- **SchemaRegion**: A SchemaRegion is the basic unit for storing and replicating time series' schema. All SchemaSlots in a database are evenly distributed across the database's SchemaRegions. SchemaRegions with the same RegionID are replicas of each other. For example, in the figure above, SchemaRegion-1 has three replicas located on DataNode-1, DataNode-2, and DataNode-3. -- **DataRegion**: A DataRegion is the basic unit for storing and replicating time series' data. All DataSlots in a database are evenly distributed across the database's DataRegions. DataRegions with the same RegionID are replicas of each other. For instance, in the figure above, DataRegion-2 has two replicas located on DataNode-1 and DataNode-2. - -## Replica Groups -Region replicas are critical for the fault tolerance of the cluster. Each Region's replicas are organized into **replica groups**, where the replicas are assigned roles as either **leader** or **follower**, working together to provide read and write services. Recommended replica group configurations under different architectures are as follows: - -| Category | Parameter | Single-node Recommended Configuration | Distributed Recommended Configuration | -|:------------:|:-----------------------:|:------------------------------------:|:-------------------------------------:| -| Schema | `schema_replication_factor` | 1 | 3 | -| Data | `data_replication_factor` | 1 | 2 | \ No newline at end of file +--> \ No newline at end of file diff --git a/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_apache.md b/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_apache.md new file mode 100644 index 000000000..1edc7c292 --- /dev/null +++ b/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_apache.md @@ -0,0 +1,105 @@ + + +# Common Concepts + +## Sql_dialect Related Concepts + +| Concept | Meaning | +| ----------------------- | ------------------------------------------------------------ | +| sql_dialect | IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points. Tree: Manages data in a hierarchical path manner, where one path corresponds to one measurement point of a device. Table: Manages data in a relational table manner, where one table corresponds to a category of devices. | +| Schema | Schema is the data model information of the database, i.e., tree structure or table structure. It includes definitions such as the names and data types of measurement points. | +| Device | Corresponds to a physical device in an actual scenario, usually containing multiple measurement points. | +| Timeseries | Also known as: physical quantity, time series, timeline, point location, semaphore, indicator, measurement value, etc. It is a time series formed by arranging multiple data points in ascending order of timestamps. Usually, a Timeseries represents a collection point that can periodically collect physical quantities of the environment it is in. | +| Encoding | Encoding is a compression technique that represents data in binary form to improve storage efficiency. IoTDB supports various encoding methods for different types of data. For more detailed information, please refer to:[Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | +| Compression | After data encoding, IoTDB uses compression technology to further compress binary data to enhance storage efficiency. IoTDB supports multiple compression methods. For more detailed information, please refer to: [Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | + +## Distributed Related Concepts + +The following figure shows a common IoTDB 3C3D (3 ConfigNodes, 3 DataNodes) cluster deployment pattern: + + + +IoTDB's cluster includes the following common concepts: + +- Nodes(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- Replica Groups + +The above concepts will be introduced in the following text. + +### Nodes + +IoTDB cluster includes three types of nodes (processes): ConfigNode (management node), DataNode (data node), and AINode (analysis node), as shown below: + +- ConfigNode: Manages cluster node information, configuration information, user permissions, metadata, partition information, etc., and is responsible for the scheduling of distributed operations and load balancing. All ConfigNodes are fully backed up with each other, as shown in ConfigNode-1, ConfigNode-2, and ConfigNode-3 in the figure above. +- DataNode: Serves client requests and is responsible for data storage and computation, as shown in DataNode-1, DataNode-2, and DataNode-3 in the figure above. +- AINode: Provides machine learning capabilities, supports the registration of trained machine learning models, and allows model inference through SQL calls. It has already built-in self-developed time-series large models and common machine learning algorithms (such as prediction and anomaly detection). + +### Data Partitioning + +In IoTDB, both metadata and data are divided into small partitions, namely Regions, which are managed by various DataNodes in the cluster. + +- SchemaRegion: Metadata partition, managing the metadata of a part of devices and measurement points. SchemaRegions with the same RegionID on different DataNodes are mutual replicas, as shown in SchemaRegion-1 in the figure above, which has three replicas located on DataNode-1, DataNode-2, and DataNode-3. +- DataRegion: Data partition, managing the data of a part of devices for a certain period of time. DataRegions with the same RegionID on different DataNodes are mutual replicas, as shown in DataRegion-2 in the figure above, which has two replicas located on DataNode-1 and DataNode-2. +- For specific partitioning algorithms, please refer to: [Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) + +### Replica Groups + +The number of replicas for data and metadata can be configured. The recommended configurations for different deployment modes are as follows, where multi-replication can provide high-availability services. + +| Category | Parameter | Stand-Alone Recommended Configuration | Cluster Recommended Configuration | +| :----- | :------------------------ | :----------- | :----------- | +| Schema | schema_replication_factor | 1 | 3 | +| Data | data_replication_factor | 1 | 2 | + +## Deployment Related Concepts + +IoTDB has two operating modes: Stand-Alone mode and Cluster mode. + +### Stand-Alone Mode + +An IoTDB Stand-Alone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D; + + +- **Features**:Easy for developers to install and deploy, with low deployment and maintenance costs and convenient operations. +- **Applicable Scenarios**:Scenarios with limited resources or low requirements for high availability, such as edge-side servers. +- **Deployment Method**:[Stand-Alone-Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) + +### Cluster Mode + +An IoTDB cluster instance consists of 3 ConfigNodes and no less than 3 DataNodes, usually 3 DataNodes, i.e., 3C3D; when some nodes fail, the remaining nodes can still provide services, ensuring the high availability of the database service, and the database performance can be improved with the addition of nodes. + +- **Features**:High availability and scalability, and the system performance can be improved by adding DataNodes. +- **Applicable Scenarios**:Enterprise-level application scenarios requiring high availability and reliability. +- **Deployment Method**:[Cluster-Deployment](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) + +### Summary of Features + +| Dimension | Stand-Alone Mode | Cluster Mode | +| ------------ | ---------------------------- | ------------------------ | +| Applicable Scenarios | Edge-side deployment, scenarios with low requirements for high availability | High-availability business, disaster recovery scenarios, etc. | +| Number of Machines Required | 1 | ≥3 | +| Security and Reliability | Cannot tolerate single-point failures | High, can tolerate single-point failures | +| Scalability | Can expand DataNodes to improve performance | Can expand DataNodes to improve performance | +| Performance | Can be expanded with the number of DataNodes | Can be expanded with the number of DataNodes | + +- The deployment steps for single-machine mode and cluster mode are similar (adding ConfigNodes and DataNodes one by one), with only the number of replicas and the minimum number of nodes that can provide services being different. \ No newline at end of file diff --git a/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_timecho.md b/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_timecho.md new file mode 100644 index 000000000..af669a6d6 --- /dev/null +++ b/src/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_timecho.md @@ -0,0 +1,118 @@ + + +# Common Concepts + +## Sql_dialect Related Concepts + +| Concept | Meaning | +| ----------------------- | ------------------------------------------------------------ | +| sql_dialect | IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points. Tree: Manages data in a hierarchical path manner, where one path corresponds to one measurement point of a device. Table: Manages data in a relational table manner, where one table corresponds to a category of devices. | +| Schema | Schema is the data model information of the database, i.e., tree structure or table structure. It includes definitions such as the names and data types of measurement points. | +| Device | Corresponds to a physical device in an actual scenario, usually containing multiple measurement points. | +| Timeseries | Also known as: physical quantity, time series, timeline, point location, semaphore, indicator, measurement value, etc. It is a time series formed by arranging multiple data points in ascending order of timestamps. Usually, a Timeseries represents a collection point that can periodically collect physical quantities of the environment it is in. | +| Encoding | Encoding is a compression technique that represents data in binary form to improve storage efficiency. IoTDB supports various encoding methods for different types of data. For more detailed information, please refer to:[Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | +| Compression | After data encoding, IoTDB uses compression technology to further compress binary data to enhance storage efficiency. IoTDB supports multiple compression methods. For more detailed information, please refer to: [Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | + +## Distributed Related Concepts + +The following figure shows a common IoTDB 3C3D (3 ConfigNodes, 3 DataNodes) cluster deployment pattern: + + + +IoTDB's cluster includes the following common concepts: + +- Nodes(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- Replica Groups + +The above concepts will be introduced in the following text. + + +### Nodes + +IoTDB cluster includes three types of nodes (processes): ConfigNode (management node), DataNode (data node), and AINode (analysis node), as shown below: + +- ConfigNode: Manages cluster node information, configuration information, user permissions, metadata, partition information, etc., and is responsible for the scheduling of distributed operations and load balancing. All ConfigNodes are fully backed up with each other, as shown in ConfigNode-1, ConfigNode-2, and ConfigNode-3 in the figure above. +- DataNode: Serves client requests and is responsible for data storage and computation, as shown in DataNode-1, DataNode-2, and DataNode-3 in the figure above. +- AINode: Provides machine learning capabilities, supports the registration of trained machine learning models, and allows model inference through SQL calls. It has already built-in self-developed time-series large models and common machine learning algorithms (such as prediction and anomaly detection). + +### Data Partitioning + +In IoTDB, both metadata and data are divided into small partitions, namely Regions, which are managed by various DataNodes in the cluster. + +- SchemaRegion: Metadata partition, managing the metadata of a part of devices and measurement points. SchemaRegions with the same RegionID on different DataNodes are mutual replicas, as shown in SchemaRegion-1 in the figure above, which has three replicas located on DataNode-1, DataNode-2, and DataNode-3. +- DataRegion: Data partition, managing the data of a part of devices for a certain period of time. DataRegions with the same RegionID on different DataNodes are mutual replicas, as shown in DataRegion-2 in the figure above, which has two replicas located on DataNode-1 and DataNode-2. +- For specific partitioning algorithms, please refer to: [Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) + +### Replica Groups + +The number of replicas for data and metadata can be configured. The recommended configurations for different deployment modes are as follows, where multi-replication can provide high-availability services. + +| Category | Parameter | Stand-Alone Recommended Configuration | Cluster Recommended Configuration | +| :----- | :------------------------ | :----------- | :----------- | +| Schema | schema_replication_factor | 1 | 3 | +| Data | data_replication_factor | 1 | 2 | + + +## Deployment Related Concepts + +IoTDB has three operating modes: Stand-Alone mode, Cluster mode, and Dual-Active mode. + +### Stand-Alone Mode + +An IoTDB Stand-Alone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D; + + +- **Features**:Easy for developers to install and deploy, with low deployment and maintenance costs and convenient operations. +- **Applicable Scenarios**:Scenarios with limited resources or low requirements for high availability, such as edge-side servers. +- **Deployment Method**:[Stand-Alone-Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) + +### Dual-Active Mode + +Dual-active deployment is a feature of TimechoDB Enterprise Edition, which refers to two independent instances performing bidirectional synchronization and can provide services simultaneously. When one instance is restarted after a shutdown, the other instance will resume transmission of the missing data. + + +> An IoTDB dual-active instance usually consists of 2 single-machine nodes, i.e., 2 sets of 1C1D. Each instance can also be a cluster. + +- **Features**:The most resource-efficient high-availability solution. +- **Applicable Scenarios**:Scenarios with limited resources (only two servers) but requiring high-availability capabilities. +- **Deployment Method**:[Dual-Active-Deployment](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) + +### Cluster Mode + +An IoTDB cluster instance consists of 3 ConfigNodes and no less than 3 DataNodes, usually 3 DataNodes, i.e., 3C3D; when some nodes fail, the remaining nodes can still provide services, ensuring the high availability of the database service, and the database performance can be improved with the addition of nodes. + +- **Features**:High availability and scalability, and the system performance can be improved by adding DataNodes. +- **Applicable Scenarios**:Enterprise-level application scenarios requiring high availability and reliability. +- **Deployment Method**:[Cluster-Deployment](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md) + +### Summary of Features + +| Dimension | Stand-Alone Mode | Dual-Active Mode | Cluster Mode | +| ------------ | ---------------------------- | ------------------------ | ------------------------ | +| Applicable Scenarios | Edge-side deployment, scenarios with low requirements for high availability | High-availability business, disaster recovery scenarios, etc. | High-availability business, disaster recovery scenarios, etc. | +| Number of Machines Required | 1 | 2 | ≥3 | +| Security and Reliability | Cannot tolerate single-point failures | High, can tolerate single-point failures | High, can tolerate single-point failures | +| Scalability | Can expand DataNodes to improve performance | Each instance can be expanded as needed | Can expand DataNodes to improve performance | +| Performance | Can be expanded with the number of DataNodes | Same as the performance of one of the instances | Can be expanded with the number of DataNodes | + +- The deployment steps for single-machine mode and cluster mode are similar (adding ConfigNodes and DataNodes one by one), with only the number of replicas and the minimum number of nodes that can provide services being different. \ No newline at end of file diff --git a/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual.md b/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual.md index 94ede5013..172882761 100644 --- a/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual.md +++ b/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual.md @@ -1,3 +1,6 @@ +--- +redirectTo: DataNode-Config-Manual_apache.html +--- - -# DataNode Configuration Parameters - -We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. - -* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. - -* `iotdb-system.properties`:IoTDB system configurations. - -## Hot Modification Configuration - -For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-system.properties` during the system operation and applying them to the system immediately. -In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. - -Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. - -## Environment Configuration File(datanode-env.sh/bat) - -The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. - -The details of each parameter are as follows: - -* MEMORY\_SIZE - -|Name|MEMORY\_SIZE| -|:---:|:---| -|Description|The minimum heap memory size that IoTDB DataNode will use when startup | -|Type|String| -|Default| The default is a half of the memory.| -|Effective|After restarting system| - -* ON\_HEAP\_MEMORY - -|Name|ON\_HEAP\_MEMORY| -|:---:|:---| -|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | -|Type|String| -|Default| Calculate based on MEMORY\_SIZE.| -|Effective|After restarting system| - -* OFF\_HEAP\_MEMORY - -|Name|OFF\_HEAP\_MEMORY| -|:---:|:---| -|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| -|Type|String| -|Default| Calculate based on MEMORY\_SIZE.| -|Effective|After restarting system| - -* JMX\_LOCAL - -|Name|JMX\_LOCAL| -|:---:|:---| -|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| -|Type|Enum String: "true", "false"| -|Default|true| -|Effective|After restarting system| - -* JMX\_PORT - -|Name|JMX\_PORT| -|:---:|:---| -|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| -|Type|Short Int: [0,65535]| -|Default|31999| -|Effective|After restarting system| - -* JMX\_IP - -|Name|JMX\_IP| -|:---:|:---| -|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| -|Type|String| -|Default|127.0.0.1| -|Effective|After restarting system| - -## JMX Authorization - -We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. - -The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. - -The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. - -## DataNode/Standalone Configuration File (iotdb-system.properties) - -### Data Node RPC Configuration - -* dn\_rpc\_address - -|Name| dn\_rpc\_address | -|:---:|:-----------------------------------------------| -|Description| The client rpc service listens on the address. | -|Type| String | -|Default| 0.0.0.0 | -|Effective| After restarting system | - -* dn\_rpc\_port - -|Name| dn\_rpc\_port | -|:---:|:---| -|Description| The client rpc service listens on the port.| -|Type|Short Int : [0,65535]| -|Default| 6667 | -|Effective|After restarting system| - -* dn\_internal\_address - -|Name| dn\_internal\_address | -|:---:|:---| -|Description| DataNode internal service host/IP | -|Type| string | -|Default| 127.0.0.1 | -|Effective|Only allowed to be modified in first start up| - -* dn\_internal\_port - -|Name| dn\_internal\_port | -|:---:|:-------------------------------| -|Description| DataNode internal service port | -|Type| int | -|Default| 10730 | -|Effective| Only allowed to be modified in first start up | - -* dn\_mpp\_data\_exchange\_port - -|Name| mpp\_data\_exchange\_port | -|:---:|:---| -|Description| MPP data exchange port | -|Type| int | -|Default| 10740 | -|Effective|Only allowed to be modified in first start up| - -* dn\_schema\_region\_consensus\_port - -|Name| dn\_schema\_region\_consensus\_port | -|:---:|:---| -|Description| DataNode Schema replica communication port for consensus | -|Type| int | -|Default| 10750 | -|Effective|Only allowed to be modified in first start up| - -* dn\_data\_region\_consensus\_port - -|Name| dn\_data\_region\_consensus\_port | -|:---:|:---| -|Description| DataNode Data replica communication port for consensus | -|Type| int | -|Default| 10760 | -|Effective|Only allowed to be modified in first start up| - -* dn\_join\_cluster\_retry\_interval\_ms - -|Name| dn\_join\_cluster\_retry\_interval\_ms | -|:---:|:--------------------------------------------------------------------------| -|Description| The time of data node waiting for the next retry to join into the cluster | -|Type| long | -|Default| 5000 | -|Effective| After restarting system | - -### SSL Configuration - -* enable\_thrift\_ssl - -|Name| enable\_thrift\_ssl | -|:---:|:---------------------------| -|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* enable\_https - -|Name| enable\_https | -|:---:|:-------------------------| -|Description| REST Service Specifies whether to enable SSL configuration | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* key\_store\_path - -|Name| key\_store\_path | -|:---:|:-----------------| -|Description| SSL certificate path | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* key\_store\_pwd - -|Name| key\_store\_pwd | -|:---:|:----------------| -|Description| SSL certificate password | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -### SeedConfigNode - -* dn\_seed\_config\_node - -|Name| dn\_seed\_config\_node | -|:---:|:------------------------------------------------| -|Description| ConfigNode Address for DataNode to join cluster. This parameter is corresponding to dn\_target\_config\_node\_list before V1.2.2 | -|Type| String | -|Default| 127.0.0.1:10710 | -|Effective| Only allowed to be modified in first start up | - -### Connection Configuration - -* dn\_rpc\_thrift\_compression\_enable - -|Name| dn\_rpc\_thrift\_compression\_enable | -|:---:|:---| -|Description| Whether enable thrift's compression (using GZIP).| -|Type|Boolean| -|Default| false | -|Effective|After restarting system| - -* dn\_rpc\_advanced\_compression\_enable - -|Name| dn\_rpc\_advanced\_compression\_enable | -|:---:|:---| -|Description| Whether enable thrift's advanced compression.| -|Type|Boolean| -|Default| false | -|Effective|After restarting system| - -* dn\_rpc\_selector\_thread\_count - -|Name| dn\_rpc\_selector\_thread\_count | -|:---:|:-----------------------------------| -|Description| The number of rpc selector thread. | -|Type| int | -|Default| false | -|Effective| After restarting system | - -* dn\_rpc\_min\_concurrent\_client\_num - -|Name| dn\_rpc\_min\_concurrent\_client\_num | -|:---:|:-----------------------------------| -|Description| Minimum concurrent rpc connections | -|Type| Short Int : [0,65535] | -|Description| 1 | -|Effective| After restarting system | - -* dn\_rpc\_max\_concurrent\_client\_num - -|Name| dn\_rpc\_max\_concurrent\_client\_num | -|:---:|:---| -|Description| Max concurrent rpc connections| -|Type| Short Int : [0,65535] | -|Description| 65535 | -|Effective|After restarting system| - -* dn\_thrift\_max\_frame\_size - -|Name| dn\_thrift\_max\_frame\_size | -|:---:|:---| -|Description| Max size of bytes of each thrift RPC request/response| -|Type| Long | -|Unit|Byte| -|Default| 536870912 | -|Effective|After restarting system| - -* dn\_thrift\_init\_buffer\_size - -|Name| dn\_thrift\_init\_buffer\_size | -|:---:|:---| -|Description| Initial size of bytes of buffer that thrift used | -|Type| long | -|Default| 1024 | -|Effective|After restarting system| - -* dn\_connection\_timeout\_ms - -| Name | dn\_connection\_timeout\_ms | -|:-----------:|:---------------------------------------------------| -| Description | Thrift socket and connection timeout between nodes | -| Type | int | -| Default | 60000 | -| Effective | After restarting system | - -* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager - -| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------------:|:--------------------------------------------------------------| -| Description | Number of core clients routed to each node in a ClientManager | -| Type | int | -| Default | 200 | -| Effective | After restarting system | - -* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager - -| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | -|:--------------:|:-------------------------------------------------------------| -| Description | Number of max clients routed to each node in a ClientManager | -| Type | int | -| Default | 300 | -| Effective | After restarting system | - -### Dictionary Configuration - -* dn\_system\_dir - -| Name | dn\_system\_dir | -|:-----------:|:----------------------------------------------------------------------------| -| Description | The directories of system files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/system (Windows: data\\datanode\\system) | -| Effective | After restarting system | - -* dn\_data\_dirs - -| Name | dn\_data\_dirs | -|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | -| Type | String[] | -| Default | data/datanode/data (Windows: data\\datanode\\data) | -| Effective | After restarting system | - -* dn\_multi\_dir\_strategy - -| Name | dn\_multi\_dir\_strategy | -|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | -| Type | String | -| Default | SequenceStrategy | -| Effective | hot-load | - -* dn\_consensus\_dir - -| Name | dn\_consensus\_dir | -|:-----------:|:-------------------------------------------------------------------------------| -| Description | The directories of consensus files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/consensus | -| Effective | After restarting system | - -* dn\_wal\_dirs - -| Name | dn\_wal\_dirs | -|:-----------:|:-------------------------------------------------------------------------| -| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/wal | -| Effective | After restarting system | - -* dn\_tracing\_dir - -| Name | dn\_tracing\_dir | -|:-----------:|:----------------------------------------------------------------------------| -| Description | The tracing root directory path. It is recommended to use an absolute path. | -| Type | String | -| Default | datanode/tracing | -| Effective | After restarting system | - -* dn\_sync\_dir - -| Name | dn\_sync\_dir | -|:-----------:|:--------------------------------------------------------------------------| -| Description | The directories of sync files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/sync | -| Effective | After restarting system | - -### Metric Configuration - -## Enable GC log - -GC log is off by default. -For performance tuning, you may want to collect the GC info. - -To enable GC log, just add a parameter "printgc" when you start the DataNode. - -```bash -nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & -``` -Or -```cmd -sbin\start-datanode.bat printgc -``` - -GC log is stored at `IOTDB_HOME/logs/gc.log`. -There will be at most 10 gc.log.* files and each one can reach to 10MB. - -### REST Service Configuration - -* enable\_rest\_service - -|Name| enable\_rest\_service | -|:---:|:--------------------------------------| -|Description| Whether to enable the Rest service | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* rest\_service\_port - -|Name| rest\_service\_port | -|:---:|:------------------| -|Description| The Rest service listens to the port number | -|Type| int32 | -|Default| 18080 | -|Effective| After restarting system | - -* enable\_swagger - -|Name| enable\_swagger | -|:---:|:-----------------------| -|Description| Whether to enable swagger to display rest interface information | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* rest\_query\_default\_row\_size\_limit - -|Name| rest\_query\_default\_row\_size\_limit | -|:---:|:------------------------------------------------------------------------------------------| -|Description| The maximum number of rows in a result set that can be returned by a query | -|Type| int32 | -|Default| 10000 | -|Effective| After restarting system | - -* cache\_expire - -|Name| cache\_expire | -|:---:|:--------------------------------------------------------| -|Description| Expiration time for caching customer login information | -|Type| int32 | -|Default| 28800 | -|Effective| After restarting system | - -* cache\_max\_num - -|Name| cache\_max\_num | -|:---:|:--------------| -|Description| The maximum number of users stored in the cache | -|Type| int32 | -|Default| 100 | -|Effective| After restarting system | - -* cache\_init\_num - -|Name| cache\_init\_num | -|:---:|:---------------| -|Description| Initial cache capacity | -|Type| int32 | -|Default| 10 | -|Effective| After restarting system | - - -* trust\_store\_path - -|Name| trust\_store\_path | -|:---:|:---------------| -|Description| keyStore Password (optional) | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* trust\_store\_pwd - -|Name| trust\_store\_pwd | -|:---:|:---------------------------------| -|Description| trustStore Password (Optional) | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* idle\_timeout - -|Name| idle\_timeout | -|:---:|:--------------| -|Description| SSL timeout duration, expressed in seconds | -|Type| int32 | -|Default| 5000 | -|Effective| After restarting system | - - -#### Storage engine configuration - - -* dn\_default\_space\_usage\_thresholds - -|Name| dn\_default\_space\_usage\_thresholds | -|:---:|:--------------| -|Description| Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | -|Type| double | -|Default| 0.85 | -|Effective| hot-load | - -* remote\_tsfile\_cache\_dirs - -|Name| remote\_tsfile\_cache\_dirs | -|:---:|:--------------| -|Description| Cache directory stored locally in the cloud | -|Type| string | -|Default| data/datanode/data/cache | -|Effective| After restarting system | - -* remote\_tsfile\_cache\_page\_size\_in\_kb - -|Name| remote\_tsfile\_cache\_page\_size\_in\_kb | -|:---:|:--------------| -|Description| Block size of locally cached files stored in the cloud | -|Type| int | -|Default| 20480 | -|Effective| After restarting system | - -* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb - -|Name| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | -|:---:|:--------------| -|Description| Maximum Disk Occupancy Size for Cloud Storage Local Cache | -|Type| long | -|Default| 51200 | -|Effective| After restarting system | - -* object\_storage\_type - -|Name| object\_storage\_type | -|:---:|:--------------| -|Description| Cloud Storage Type | -|Type| string | -|Default| AWS_S3 | -|Effective| After restarting system | - -* object\_storage\_bucket - -|Name| object\_storage\_bucket | -|:---:|:--------------| -|Description| Name of cloud storage bucket | -|Type| string | -|Default| iotdb_data | -|Effective| After restarting system | - -* object\_storage\_endpoiont - -|Name| object\_storage\_endpoiont | -|:---:|:--------------| -|Description| endpoint of cloud storage | -|Type| string | -|Default| None | -|Effective| After restarting system | - -* object\_storage\_access\_key - -|Name| object\_storage\_access\_key | -|:---:|:--------------| -|Description| Authentication information stored in the cloud: key | -|Type| string | -|Default| None | -|Effective| After restarting system | - -* object\_storage\_access\_secret - -|Name| object\_storage\_access\_secret | -|:---:|:--------------| -|Description| Authentication information stored in the cloud: secret | -|Type| string | -|Default| None | -|Effective| After restarting system | diff --git a/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_apache.md b/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_apache.md new file mode 100644 index 000000000..b568ab7ad --- /dev/null +++ b/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_apache.md @@ -0,0 +1,500 @@ + + +# DataNode Configuration Parameters + +We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. + +* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. + +* `iotdb-system.properties`:IoTDB system configurations. + +## Hot Modification Configuration + +For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-system.properties` during the system operation and applying them to the system immediately. +In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. + +Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. + +## Environment Configuration File(datanode-env.sh/bat) + +The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. + +The details of each parameter are as follows: + +* MEMORY\_SIZE + +|Name|MEMORY\_SIZE| +|:---:|:---| +|Description|The minimum heap memory size that IoTDB DataNode will use when startup | +|Type|String| +|Default| The default is a half of the memory.| +|Effective|After restarting system| + +* ON\_HEAP\_MEMORY + +|Name|ON\_HEAP\_MEMORY| +|:---:|:---| +|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* OFF\_HEAP\_MEMORY + +|Name|OFF\_HEAP\_MEMORY| +|:---:|:---| +|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* JMX\_LOCAL + +|Name|JMX\_LOCAL| +|:---:|:---| +|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| +|Type|Enum String: "true", "false"| +|Default|true| +|Effective|After restarting system| + +* JMX\_PORT + +|Name|JMX\_PORT| +|:---:|:---| +|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| +|Type|Short Int: [0,65535]| +|Default|31999| +|Effective|After restarting system| + +* JMX\_IP + +|Name|JMX\_IP| +|:---:|:---| +|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| +|Type|String| +|Default|127.0.0.1| +|Effective|After restarting system| + +## JMX Authorization + +We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. + +The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. + +The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. + +## DataNode/Standalone Configuration File (iotdb-system.properties) + +### Data Node RPC Configuration + +* dn\_rpc\_address + +|Name| dn\_rpc\_address | +|:---:|:-----------------------------------------------| +|Description| The client rpc service listens on the address. | +|Type| String | +|Default| 0.0.0.0 | +|Effective| After restarting system | + +* dn\_rpc\_port + +|Name| dn\_rpc\_port | +|:---:|:---| +|Description| The client rpc service listens on the port.| +|Type|Short Int : [0,65535]| +|Default| 6667 | +|Effective|After restarting system| + +* dn\_internal\_address + +|Name| dn\_internal\_address | +|:---:|:---| +|Description| DataNode internal service host/IP | +|Type| string | +|Default| 127.0.0.1 | +|Effective|Only allowed to be modified in first start up| + +* dn\_internal\_port + +|Name| dn\_internal\_port | +|:---:|:-------------------------------| +|Description| DataNode internal service port | +|Type| int | +|Default| 10730 | +|Effective| Only allowed to be modified in first start up | + +* dn\_mpp\_data\_exchange\_port + +|Name| mpp\_data\_exchange\_port | +|:---:|:---| +|Description| MPP data exchange port | +|Type| int | +|Default| 10740 | +|Effective|Only allowed to be modified in first start up| + +* dn\_schema\_region\_consensus\_port + +|Name| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Schema replica communication port for consensus | +|Type| int | +|Default| 10750 | +|Effective|Only allowed to be modified in first start up| + +* dn\_data\_region\_consensus\_port + +|Name| dn\_data\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Data replica communication port for consensus | +|Type| int | +|Default| 10760 | +|Effective|Only allowed to be modified in first start up| + +* dn\_join\_cluster\_retry\_interval\_ms + +|Name| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:--------------------------------------------------------------------------| +|Description| The time of data node waiting for the next retry to join into the cluster | +|Type| long | +|Default| 5000 | +|Effective| After restarting system | + +### SSL Configuration + +* enable\_thrift\_ssl + +|Name| enable\_thrift\_ssl | +|:---:|:---------------------------| +|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* enable\_https + +|Name| enable\_https | +|:---:|:-------------------------| +|Description| REST Service Specifies whether to enable SSL configuration | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* key\_store\_path + +|Name| key\_store\_path | +|:---:|:-----------------| +|Description| SSL certificate path | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* key\_store\_pwd + +|Name| key\_store\_pwd | +|:---:|:----------------| +|Description| SSL certificate password | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +### SeedConfigNode + +* dn\_seed\_config\_node + +|Name| dn\_seed\_config\_node | +|:---:|:------------------------------------------------| +|Description| ConfigNode Address for DataNode to join cluster. This parameter is corresponding to dn\_target\_config\_node\_list before V1.2.2 | +|Type| String | +|Default| 127.0.0.1:10710 | +|Effective| Only allowed to be modified in first start up | + +### Connection Configuration + +* dn\_rpc\_thrift\_compression\_enable + +|Name| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's compression (using GZIP).| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_advanced\_compression\_enable + +|Name| dn\_rpc\_advanced\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's advanced compression.| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_selector\_thread\_count + +|Name| dn\_rpc\_selector\_thread\_count | +|:---:|:-----------------------------------| +|Description| The number of rpc selector thread. | +|Type| int | +|Default| false | +|Effective| After restarting system | + +* dn\_rpc\_min\_concurrent\_client\_num + +|Name| dn\_rpc\_min\_concurrent\_client\_num | +|:---:|:-----------------------------------| +|Description| Minimum concurrent rpc connections | +|Type| Short Int : [0,65535] | +|Description| 1 | +|Effective| After restarting system | + +* dn\_rpc\_max\_concurrent\_client\_num + +|Name| dn\_rpc\_max\_concurrent\_client\_num | +|:---:|:---| +|Description| Max concurrent rpc connections| +|Type| Short Int : [0,65535] | +|Description| 65535 | +|Effective|After restarting system| + +* dn\_thrift\_max\_frame\_size + +|Name| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|Description| Max size of bytes of each thrift RPC request/response| +|Type| Long | +|Unit|Byte| +|Default| 536870912 | +|Effective|After restarting system| + +* dn\_thrift\_init\_buffer\_size + +|Name| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|Description| Initial size of bytes of buffer that thrift used | +|Type| long | +|Default| 1024 | +|Effective|After restarting system| + +* dn\_connection\_timeout\_ms + +| Name | dn\_connection\_timeout\_ms | +|:-----------:|:---------------------------------------------------| +| Description | Thrift socket and connection timeout between nodes | +| Type | int | +| Default | 60000 | +| Effective | After restarting system | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------------:|:--------------------------------------------------------------| +| Description | Number of core clients routed to each node in a ClientManager | +| Type | int | +| Default | 200 | +| Effective | After restarting system | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:--------------:|:-------------------------------------------------------------| +| Description | Number of max clients routed to each node in a ClientManager | +| Type | int | +| Default | 300 | +| Effective | After restarting system | + +### Dictionary Configuration + +* dn\_system\_dir + +| Name | dn\_system\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The directories of system files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/system (Windows: data\\datanode\\system) | +| Effective | After restarting system | + +* dn\_data\_dirs + +| Name | dn\_data\_dirs | +|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | +| Type | String[] | +| Default | data/datanode/data (Windows: data\\datanode\\data) | +| Effective | After restarting system | + +* dn\_multi\_dir\_strategy + +| Name | dn\_multi\_dir\_strategy | +|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | +| Type | String | +| Default | SequenceStrategy | +| Effective | hot-load | + +* dn\_consensus\_dir + +| Name | dn\_consensus\_dir | +|:-----------:|:-------------------------------------------------------------------------------| +| Description | The directories of consensus files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/consensus | +| Effective | After restarting system | + +* dn\_wal\_dirs + +| Name | dn\_wal\_dirs | +|:-----------:|:-------------------------------------------------------------------------| +| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/wal | +| Effective | After restarting system | + +* dn\_tracing\_dir + +| Name | dn\_tracing\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The tracing root directory path. It is recommended to use an absolute path. | +| Type | String | +| Default | datanode/tracing | +| Effective | After restarting system | + +* dn\_sync\_dir + +| Name | dn\_sync\_dir | +|:-----------:|:--------------------------------------------------------------------------| +| Description | The directories of sync files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/sync | +| Effective | After restarting system | + +### Metric Configuration + +## Enable GC log + +GC log is off by default. +For performance tuning, you may want to collect the GC info. + +To enable GC log, just add a parameter "printgc" when you start the DataNode. + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` +Or +```cmd +sbin\start-datanode.bat printgc +``` + +GC log is stored at `IOTDB_HOME/logs/gc.log`. +There will be at most 10 gc.log.* files and each one can reach to 10MB. + +### REST Service Configuration + +* enable\_rest\_service + +|Name| enable\_rest\_service | +|:---:|:--------------------------------------| +|Description| Whether to enable the Rest service | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_service\_port + +|Name| rest\_service\_port | +|:---:|:------------------| +|Description| The Rest service listens to the port number | +|Type| int32 | +|Default| 18080 | +|Effective| After restarting system | + +* enable\_swagger + +|Name| enable\_swagger | +|:---:|:-----------------------| +|Description| Whether to enable swagger to display rest interface information | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_query\_default\_row\_size\_limit + +|Name| rest\_query\_default\_row\_size\_limit | +|:---:|:------------------------------------------------------------------------------------------| +|Description| The maximum number of rows in a result set that can be returned by a query | +|Type| int32 | +|Default| 10000 | +|Effective| After restarting system | + +* cache\_expire + +|Name| cache\_expire | +|:---:|:--------------------------------------------------------| +|Description| Expiration time for caching customer login information | +|Type| int32 | +|Default| 28800 | +|Effective| After restarting system | + +* cache\_max\_num + +|Name| cache\_max\_num | +|:---:|:--------------| +|Description| The maximum number of users stored in the cache | +|Type| int32 | +|Default| 100 | +|Effective| After restarting system | + +* cache\_init\_num + +|Name| cache\_init\_num | +|:---:|:---------------| +|Description| Initial cache capacity | +|Type| int32 | +|Default| 10 | +|Effective| After restarting system | + + +* trust\_store\_path + +|Name| trust\_store\_path | +|:---:|:---------------| +|Description| keyStore Password (optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* trust\_store\_pwd + +|Name| trust\_store\_pwd | +|:---:|:---------------------------------| +|Description| trustStore Password (Optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* idle\_timeout + +|Name| idle\_timeout | +|:---:|:--------------| +|Description| SSL timeout duration, expressed in seconds | +|Type| int32 | +|Default| 5000 | +|Effective| After restarting system | + diff --git a/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_timecho.md b/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_timecho.md new file mode 100644 index 000000000..94ede5013 --- /dev/null +++ b/src/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_timecho.md @@ -0,0 +1,584 @@ + + +# DataNode Configuration Parameters + +We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. + +* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. + +* `iotdb-system.properties`:IoTDB system configurations. + +## Hot Modification Configuration + +For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-system.properties` during the system operation and applying them to the system immediately. +In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. + +Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. + +## Environment Configuration File(datanode-env.sh/bat) + +The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. + +The details of each parameter are as follows: + +* MEMORY\_SIZE + +|Name|MEMORY\_SIZE| +|:---:|:---| +|Description|The minimum heap memory size that IoTDB DataNode will use when startup | +|Type|String| +|Default| The default is a half of the memory.| +|Effective|After restarting system| + +* ON\_HEAP\_MEMORY + +|Name|ON\_HEAP\_MEMORY| +|:---:|:---| +|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* OFF\_HEAP\_MEMORY + +|Name|OFF\_HEAP\_MEMORY| +|:---:|:---| +|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* JMX\_LOCAL + +|Name|JMX\_LOCAL| +|:---:|:---| +|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| +|Type|Enum String: "true", "false"| +|Default|true| +|Effective|After restarting system| + +* JMX\_PORT + +|Name|JMX\_PORT| +|:---:|:---| +|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| +|Type|Short Int: [0,65535]| +|Default|31999| +|Effective|After restarting system| + +* JMX\_IP + +|Name|JMX\_IP| +|:---:|:---| +|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| +|Type|String| +|Default|127.0.0.1| +|Effective|After restarting system| + +## JMX Authorization + +We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. + +The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. + +The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. + +## DataNode/Standalone Configuration File (iotdb-system.properties) + +### Data Node RPC Configuration + +* dn\_rpc\_address + +|Name| dn\_rpc\_address | +|:---:|:-----------------------------------------------| +|Description| The client rpc service listens on the address. | +|Type| String | +|Default| 0.0.0.0 | +|Effective| After restarting system | + +* dn\_rpc\_port + +|Name| dn\_rpc\_port | +|:---:|:---| +|Description| The client rpc service listens on the port.| +|Type|Short Int : [0,65535]| +|Default| 6667 | +|Effective|After restarting system| + +* dn\_internal\_address + +|Name| dn\_internal\_address | +|:---:|:---| +|Description| DataNode internal service host/IP | +|Type| string | +|Default| 127.0.0.1 | +|Effective|Only allowed to be modified in first start up| + +* dn\_internal\_port + +|Name| dn\_internal\_port | +|:---:|:-------------------------------| +|Description| DataNode internal service port | +|Type| int | +|Default| 10730 | +|Effective| Only allowed to be modified in first start up | + +* dn\_mpp\_data\_exchange\_port + +|Name| mpp\_data\_exchange\_port | +|:---:|:---| +|Description| MPP data exchange port | +|Type| int | +|Default| 10740 | +|Effective|Only allowed to be modified in first start up| + +* dn\_schema\_region\_consensus\_port + +|Name| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Schema replica communication port for consensus | +|Type| int | +|Default| 10750 | +|Effective|Only allowed to be modified in first start up| + +* dn\_data\_region\_consensus\_port + +|Name| dn\_data\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Data replica communication port for consensus | +|Type| int | +|Default| 10760 | +|Effective|Only allowed to be modified in first start up| + +* dn\_join\_cluster\_retry\_interval\_ms + +|Name| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:--------------------------------------------------------------------------| +|Description| The time of data node waiting for the next retry to join into the cluster | +|Type| long | +|Default| 5000 | +|Effective| After restarting system | + +### SSL Configuration + +* enable\_thrift\_ssl + +|Name| enable\_thrift\_ssl | +|:---:|:---------------------------| +|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* enable\_https + +|Name| enable\_https | +|:---:|:-------------------------| +|Description| REST Service Specifies whether to enable SSL configuration | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* key\_store\_path + +|Name| key\_store\_path | +|:---:|:-----------------| +|Description| SSL certificate path | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* key\_store\_pwd + +|Name| key\_store\_pwd | +|:---:|:----------------| +|Description| SSL certificate password | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +### SeedConfigNode + +* dn\_seed\_config\_node + +|Name| dn\_seed\_config\_node | +|:---:|:------------------------------------------------| +|Description| ConfigNode Address for DataNode to join cluster. This parameter is corresponding to dn\_target\_config\_node\_list before V1.2.2 | +|Type| String | +|Default| 127.0.0.1:10710 | +|Effective| Only allowed to be modified in first start up | + +### Connection Configuration + +* dn\_rpc\_thrift\_compression\_enable + +|Name| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's compression (using GZIP).| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_advanced\_compression\_enable + +|Name| dn\_rpc\_advanced\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's advanced compression.| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_selector\_thread\_count + +|Name| dn\_rpc\_selector\_thread\_count | +|:---:|:-----------------------------------| +|Description| The number of rpc selector thread. | +|Type| int | +|Default| false | +|Effective| After restarting system | + +* dn\_rpc\_min\_concurrent\_client\_num + +|Name| dn\_rpc\_min\_concurrent\_client\_num | +|:---:|:-----------------------------------| +|Description| Minimum concurrent rpc connections | +|Type| Short Int : [0,65535] | +|Description| 1 | +|Effective| After restarting system | + +* dn\_rpc\_max\_concurrent\_client\_num + +|Name| dn\_rpc\_max\_concurrent\_client\_num | +|:---:|:---| +|Description| Max concurrent rpc connections| +|Type| Short Int : [0,65535] | +|Description| 65535 | +|Effective|After restarting system| + +* dn\_thrift\_max\_frame\_size + +|Name| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|Description| Max size of bytes of each thrift RPC request/response| +|Type| Long | +|Unit|Byte| +|Default| 536870912 | +|Effective|After restarting system| + +* dn\_thrift\_init\_buffer\_size + +|Name| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|Description| Initial size of bytes of buffer that thrift used | +|Type| long | +|Default| 1024 | +|Effective|After restarting system| + +* dn\_connection\_timeout\_ms + +| Name | dn\_connection\_timeout\_ms | +|:-----------:|:---------------------------------------------------| +| Description | Thrift socket and connection timeout between nodes | +| Type | int | +| Default | 60000 | +| Effective | After restarting system | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------------:|:--------------------------------------------------------------| +| Description | Number of core clients routed to each node in a ClientManager | +| Type | int | +| Default | 200 | +| Effective | After restarting system | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:--------------:|:-------------------------------------------------------------| +| Description | Number of max clients routed to each node in a ClientManager | +| Type | int | +| Default | 300 | +| Effective | After restarting system | + +### Dictionary Configuration + +* dn\_system\_dir + +| Name | dn\_system\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The directories of system files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/system (Windows: data\\datanode\\system) | +| Effective | After restarting system | + +* dn\_data\_dirs + +| Name | dn\_data\_dirs | +|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | +| Type | String[] | +| Default | data/datanode/data (Windows: data\\datanode\\data) | +| Effective | After restarting system | + +* dn\_multi\_dir\_strategy + +| Name | dn\_multi\_dir\_strategy | +|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | +| Type | String | +| Default | SequenceStrategy | +| Effective | hot-load | + +* dn\_consensus\_dir + +| Name | dn\_consensus\_dir | +|:-----------:|:-------------------------------------------------------------------------------| +| Description | The directories of consensus files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/consensus | +| Effective | After restarting system | + +* dn\_wal\_dirs + +| Name | dn\_wal\_dirs | +|:-----------:|:-------------------------------------------------------------------------| +| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/wal | +| Effective | After restarting system | + +* dn\_tracing\_dir + +| Name | dn\_tracing\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The tracing root directory path. It is recommended to use an absolute path. | +| Type | String | +| Default | datanode/tracing | +| Effective | After restarting system | + +* dn\_sync\_dir + +| Name | dn\_sync\_dir | +|:-----------:|:--------------------------------------------------------------------------| +| Description | The directories of sync files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/sync | +| Effective | After restarting system | + +### Metric Configuration + +## Enable GC log + +GC log is off by default. +For performance tuning, you may want to collect the GC info. + +To enable GC log, just add a parameter "printgc" when you start the DataNode. + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` +Or +```cmd +sbin\start-datanode.bat printgc +``` + +GC log is stored at `IOTDB_HOME/logs/gc.log`. +There will be at most 10 gc.log.* files and each one can reach to 10MB. + +### REST Service Configuration + +* enable\_rest\_service + +|Name| enable\_rest\_service | +|:---:|:--------------------------------------| +|Description| Whether to enable the Rest service | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_service\_port + +|Name| rest\_service\_port | +|:---:|:------------------| +|Description| The Rest service listens to the port number | +|Type| int32 | +|Default| 18080 | +|Effective| After restarting system | + +* enable\_swagger + +|Name| enable\_swagger | +|:---:|:-----------------------| +|Description| Whether to enable swagger to display rest interface information | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_query\_default\_row\_size\_limit + +|Name| rest\_query\_default\_row\_size\_limit | +|:---:|:------------------------------------------------------------------------------------------| +|Description| The maximum number of rows in a result set that can be returned by a query | +|Type| int32 | +|Default| 10000 | +|Effective| After restarting system | + +* cache\_expire + +|Name| cache\_expire | +|:---:|:--------------------------------------------------------| +|Description| Expiration time for caching customer login information | +|Type| int32 | +|Default| 28800 | +|Effective| After restarting system | + +* cache\_max\_num + +|Name| cache\_max\_num | +|:---:|:--------------| +|Description| The maximum number of users stored in the cache | +|Type| int32 | +|Default| 100 | +|Effective| After restarting system | + +* cache\_init\_num + +|Name| cache\_init\_num | +|:---:|:---------------| +|Description| Initial cache capacity | +|Type| int32 | +|Default| 10 | +|Effective| After restarting system | + + +* trust\_store\_path + +|Name| trust\_store\_path | +|:---:|:---------------| +|Description| keyStore Password (optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* trust\_store\_pwd + +|Name| trust\_store\_pwd | +|:---:|:---------------------------------| +|Description| trustStore Password (Optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* idle\_timeout + +|Name| idle\_timeout | +|:---:|:--------------| +|Description| SSL timeout duration, expressed in seconds | +|Type| int32 | +|Default| 5000 | +|Effective| After restarting system | + + +#### Storage engine configuration + + +* dn\_default\_space\_usage\_thresholds + +|Name| dn\_default\_space\_usage\_thresholds | +|:---:|:--------------| +|Description| Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | +|Type| double | +|Default| 0.85 | +|Effective| hot-load | + +* remote\_tsfile\_cache\_dirs + +|Name| remote\_tsfile\_cache\_dirs | +|:---:|:--------------| +|Description| Cache directory stored locally in the cloud | +|Type| string | +|Default| data/datanode/data/cache | +|Effective| After restarting system | + +* remote\_tsfile\_cache\_page\_size\_in\_kb + +|Name| remote\_tsfile\_cache\_page\_size\_in\_kb | +|:---:|:--------------| +|Description| Block size of locally cached files stored in the cloud | +|Type| int | +|Default| 20480 | +|Effective| After restarting system | + +* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb + +|Name| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | +|:---:|:--------------| +|Description| Maximum Disk Occupancy Size for Cloud Storage Local Cache | +|Type| long | +|Default| 51200 | +|Effective| After restarting system | + +* object\_storage\_type + +|Name| object\_storage\_type | +|:---:|:--------------| +|Description| Cloud Storage Type | +|Type| string | +|Default| AWS_S3 | +|Effective| After restarting system | + +* object\_storage\_bucket + +|Name| object\_storage\_bucket | +|:---:|:--------------| +|Description| Name of cloud storage bucket | +|Type| string | +|Default| iotdb_data | +|Effective| After restarting system | + +* object\_storage\_endpoiont + +|Name| object\_storage\_endpoiont | +|:---:|:--------------| +|Description| endpoint of cloud storage | +|Type| string | +|Default| None | +|Effective| After restarting system | + +* object\_storage\_access\_key + +|Name| object\_storage\_access\_key | +|:---:|:--------------| +|Description| Authentication information stored in the cloud: key | +|Type| string | +|Default| None | +|Effective| After restarting system | + +* object\_storage\_access\_secret + +|Name| object\_storage\_access\_secret | +|:---:|:--------------| +|Description| Authentication information stored in the cloud: secret | +|Type| string | +|Default| None | +|Effective| After restarting system | diff --git a/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual.md b/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual.md index 9b2164402..172882761 100644 --- a/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual.md +++ b/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual.md @@ -1,3 +1,6 @@ +--- +redirectTo: DataNode-Config-Manual_apache.html +--- - -# DataNode Configuration Parameters - -We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. - -* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. - -* `iotdb-datanode.properties`:IoTDB system configurations. - -## Hot Modification Configuration - -For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-datanode.properties` during the system operation and applying them to the system immediately. -In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. - -Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. - -## Environment Configuration File(datanode-env.sh/bat) - -The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. - -The details of each parameter are as follows: - -* MEMORY\_SIZE - -|Name|MEMORY\_SIZE| -|:---:|:---| -|Description|The minimum heap memory size that IoTDB DataNode will use when startup | -|Type|String| -|Default| The default is a half of the memory.| -|Effective|After restarting system| - -* ON\_HEAP\_MEMORY - -|Name|ON\_HEAP\_MEMORY| -|:---:|:---| -|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | -|Type|String| -|Default| Calculate based on MEMORY\_SIZE.| -|Effective|After restarting system| - -* OFF\_HEAP\_MEMORY - -|Name|OFF\_HEAP\_MEMORY| -|:---:|:---| -|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| -|Type|String| -|Default| Calculate based on MEMORY\_SIZE.| -|Effective|After restarting system| - -* JMX\_LOCAL - -|Name|JMX\_LOCAL| -|:---:|:---| -|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| -|Type|Enum String: "true", "false"| -|Default|true| -|Effective|After restarting system| - -* JMX\_PORT - -|Name|JMX\_PORT| -|:---:|:---| -|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| -|Type|Short Int: [0,65535]| -|Default|31999| -|Effective|After restarting system| - -* JMX\_IP - -|Name|JMX\_IP| -|:---:|:---| -|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| -|Type|String| -|Default|127.0.0.1| -|Effective|After restarting system| - -## JMX Authorization - -We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. - -The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. - -The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. - -## DataNode/Standalone Configuration File (iotdb-datanode.properties) - -### Data Node RPC Configuration - -* dn\_rpc\_address - -|Name| dn\_rpc\_address | -|:---:|:-----------------------------------------------| -|Description| The client rpc service listens on the address. | -|Type| String | -|Default| 0.0.0.0 | -|Effective| After restarting system | - -* dn\_rpc\_port - -|Name| dn\_rpc\_port | -|:---:|:---| -|Description| The client rpc service listens on the port.| -|Type|Short Int : [0,65535]| -|Default| 6667 | -|Effective|After restarting system| - -* dn\_internal\_address - -|Name| dn\_internal\_address | -|:---:|:---| -|Description| DataNode internal service host/IP | -|Type| string | -|Default| 127.0.0.1 | -|Effective|Only allowed to be modified in first start up| - -* dn\_internal\_port - -|Name| dn\_internal\_port | -|:---:|:-------------------------------| -|Description| DataNode internal service port | -|Type| int | -|Default| 10730 | -|Effective| Only allowed to be modified in first start up | - -* dn\_mpp\_data\_exchange\_port - -|Name| mpp\_data\_exchange\_port | -|:---:|:---| -|Description| MPP data exchange port | -|Type| int | -|Default| 10740 | -|Effective|Only allowed to be modified in first start up| - -* dn\_schema\_region\_consensus\_port - -|Name| dn\_schema\_region\_consensus\_port | -|:---:|:---| -|Description| DataNode Schema replica communication port for consensus | -|Type| int | -|Default| 10750 | -|Effective|Only allowed to be modified in first start up| - -* dn\_data\_region\_consensus\_port - -|Name| dn\_data\_region\_consensus\_port | -|:---:|:---| -|Description| DataNode Data replica communication port for consensus | -|Type| int | -|Default| 10760 | -|Effective|Only allowed to be modified in first start up| - -* dn\_join\_cluster\_retry\_interval\_ms - -|Name| dn\_join\_cluster\_retry\_interval\_ms | -|:---:|:--------------------------------------------------------------------------| -|Description| The time of data node waiting for the next retry to join into the cluster | -|Type| long | -|Default| 5000 | -|Effective| After restarting system | - -### SSL Configuration - -* enable\_thrift\_ssl - -|Name| enable\_thrift\_ssl | -|:---:|:---------------------------| -|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* enable\_https - -|Name| enable\_https | -|:---:|:-------------------------| -|Description| REST Service Specifies whether to enable SSL configuration | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* key\_store\_path - -|Name| key\_store\_path | -|:---:|:-----------------| -|Description| SSL certificate path | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* key\_store\_pwd - -|Name| key\_store\_pwd | -|:---:|:----------------| -|Description| SSL certificate password | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -### Target Config Nodes - -* dn\_seed\_config\_node - -|Name| dn\_seed\_config\_node | -|:---:|:------------------------------------------------| -|Description| ConfigNode Address for DataNode to join cluster | -|Type| String | -|Default| 127.0.0.1:10710 | -|Effective| Only allowed to be modified in first start up | - -### Connection Configuration - -* dn\_rpc\_thrift\_compression\_enable - -|Name| dn\_rpc\_thrift\_compression\_enable | -|:---:|:---| -|Description| Whether enable thrift's compression (using GZIP).| -|Type|Boolean| -|Default| false | -|Effective|After restarting system| - -* dn\_rpc\_advanced\_compression\_enable - -|Name| dn\_rpc\_advanced\_compression\_enable | -|:---:|:---| -|Description| Whether enable thrift's advanced compression.| -|Type|Boolean| -|Default| false | -|Effective|After restarting system| - -* dn\_rpc\_selector\_thread\_count - -|Name| dn\_rpc\_selector\_thread\_count | -|:---:|:-----------------------------------| -|Description| The number of rpc selector thread. | -|Type| int | -|Default| false | -|Effective| After restarting system | - -* dn\_rpc\_min\_concurrent\_client\_num - -|Name| dn\_rpc\_min\_concurrent\_client\_num | -|:---:|:-----------------------------------| -|Description| Minimum concurrent rpc connections | -|Type| Short Int : [0,65535] | -|Description| 1 | -|Effective| After restarting system | - -* dn\_rpc\_max\_concurrent\_client\_num - -|Name| dn\_rpc\_max\_concurrent\_client\_num | -|:---:|:---| -|Description| Max concurrent rpc connections| -|Type| Short Int : [0,65535] | -|Description| 65535 | -|Effective|After restarting system| - -* dn\_thrift\_max\_frame\_size - -|Name| dn\_thrift\_max\_frame\_size | -|:---:|:---| -|Description| Max size of bytes of each thrift RPC request/response| -|Type| Long | -|Unit|Byte| -|Default| 536870912 | -|Effective|After restarting system| - -* dn\_thrift\_init\_buffer\_size - -|Name| dn\_thrift\_init\_buffer\_size | -|:---:|:---| -|Description| Initial size of bytes of buffer that thrift used | -|Type| long | -|Default| 1024 | -|Effective|After restarting system| - -* dn\_connection\_timeout\_ms - -| Name | dn\_connection\_timeout\_ms | -|:-----------:|:---------------------------------------------------| -| Description | Thrift socket and connection timeout between nodes | -| Type | int | -| Default | 60000 | -| Effective | After restarting system | - -* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager - -| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------------:|:--------------------------------------------------------------| -| Description | Number of core clients routed to each node in a ClientManager | -| Type | int | -| Default | 200 | -| Effective | After restarting system | - -* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager - -| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | -|:--------------:|:-------------------------------------------------------------| -| Description | Number of max clients routed to each node in a ClientManager | -| Type | int | -| Default | 300 | -| Effective | After restarting system | - -### Dictionary Configuration - -* dn\_system\_dir - -| Name | dn\_system\_dir | -|:-----------:|:----------------------------------------------------------------------------| -| Description | The directories of system files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/system (Windows: data\\datanode\\system) | -| Effective | After restarting system | - -* dn\_data\_dirs - -| Name | dn\_data\_dirs | -|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | -| Type | String[] | -| Default | data/datanode/data (Windows: data\\datanode\\data) | -| Effective | After restarting system | - -* dn\_multi\_dir\_strategy - -| Name | dn\_multi\_dir\_strategy | -|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | -| Type | String | -| Default | SequenceStrategy | -| Effective | hot-load | - -* dn\_consensus\_dir - -| Name | dn\_consensus\_dir | -|:-----------:|:-------------------------------------------------------------------------------| -| Description | The directories of consensus files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/consensus | -| Effective | After restarting system | - -* dn\_wal\_dirs - -| Name | dn\_wal\_dirs | -|:-----------:|:-------------------------------------------------------------------------| -| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/wal | -| Effective | After restarting system | - -* dn\_tracing\_dir - -| Name | dn\_tracing\_dir | -|:-----------:|:----------------------------------------------------------------------------| -| Description | The tracing root directory path. It is recommended to use an absolute path. | -| Type | String | -| Default | datanode/tracing | -| Effective | After restarting system | - -* dn\_sync\_dir - -| Name | dn\_sync\_dir | -|:-----------:|:--------------------------------------------------------------------------| -| Description | The directories of sync files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/sync | -| Effective | After restarting system | - -### Metric Configuration - -## Enable GC log - -GC log is off by default. -For performance tuning, you may want to collect the GC info. - -To enable GC log, just add a parameter "printgc" when you start the DataNode. - -```bash -nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & -``` -Or -```cmd -sbin\start-datanode.bat printgc -``` - -GC log is stored at `IOTDB_HOME/logs/gc.log`. -There will be at most 10 gc.log.* files and each one can reach to 10MB. - -### REST Service Configuration - -* enable\_rest\_service - -|Name| enable\_rest\_service | -|:---:|:--------------------------------------| -|Description| Whether to enable the Rest service | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* rest\_service\_port - -|Name| rest\_service\_port | -|:---:|:------------------| -|Description| The Rest service listens to the port number | -|Type| int32 | -|Default| 18080 | -|Effective| After restarting system | - -* enable\_swagger - -|Name| enable\_swagger | -|:---:|:-----------------------| -|Description| Whether to enable swagger to display rest interface information | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* rest\_query\_default\_row\_size\_limit - -|Name| rest\_query\_default\_row\_size\_limit | -|:---:|:------------------------------------------------------------------------------------------| -|Description| The maximum number of rows in a result set that can be returned by a query | -|Type| int32 | -|Default| 10000 | -|Effective| After restarting system | - -* cache\_expire - -|Name| cache\_expire | -|:---:|:--------------------------------------------------------| -|Description| Expiration time for caching customer login information | -|Type| int32 | -|Default| 28800 | -|Effective| After restarting system | - -* cache\_max\_num - -|Name| cache\_max\_num | -|:---:|:--------------| -|Description| The maximum number of users stored in the cache | -|Type| int32 | -|Default| 100 | -|Effective| After restarting system | - -* cache\_init\_num - -|Name| cache\_init\_num | -|:---:|:---------------| -|Description| Initial cache capacity | -|Type| int32 | -|Default| 10 | -|Effective| After restarting system | - - -* trust\_store\_path - -|Name| trust\_store\_path | -|:---:|:---------------| -|Description| keyStore Password (optional) | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* trust\_store\_pwd - -|Name| trust\_store\_pwd | -|:---:|:---------------------------------| -|Description| trustStore Password (Optional) | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* idle\_timeout - -|Name| idle\_timeout | -|:---:|:--------------| -|Description| SSL timeout duration, expressed in seconds | -|Type| int32 | -|Default| 5000 | -|Effective| After restarting system | - -#### Storage engine configuration - -* dn\_default\_space\_move\_thresholds - -|Name| dn\_default\_space\_move\_thresholds | -|:---:|:--------------| -|Description| Version 1.3.0/1: Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | -|Type| double | -|Default| 0.15 | -|Effective| hot-load | - - -* dn\_default\_space\_usage\_thresholds - -|Name| dn\_default\_space\_usage\_thresholds | -|:---:|:--------------| -|Description| Version 1.3.2: Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | -|Type| double | -|Default| 0.85 | -|Effective| hot-load | - -* remote\_tsfile\_cache\_dirs - -|Name| remote\_tsfile\_cache\_dirs | -|:---:|:--------------| -|Description| Cache directory stored locally in the cloud | -|Type| string | -|Default| data/datanode/data/cache | -|Effective| After restarting system | - -* remote\_tsfile\_cache\_page\_size\_in\_kb - -|Name| remote\_tsfile\_cache\_page\_size\_in\_kb | -|:---:|:--------------| -|Description| Block size of locally cached files stored in the cloud | -|Type| int | -|Default| 20480 | -|Effective| After restarting system | - -* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb - -|Name| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | -|:---:|:--------------| -|Description| Maximum Disk Occupancy Size for Cloud Storage Local Cache | -|Type| long | -|Default| 51200 | -|Effective| After restarting system | - -* object\_storage\_type - -|Name| object\_storage\_type | -|:---:|:--------------| -|Description| Cloud Storage Type | -|Type| string | -|Default| AWS_S3 | -|Effective| After restarting system | - -* object\_storage\_bucket - -|Name| object\_storage\_bucket | -|:---:|:--------------| -|Description| Name of cloud storage bucket | -|Type| string | -|Default| iotdb_data | -|Effective| After restarting system | - -* object\_storage\_endpoiont - -|Name| object\_storage\_endpoiont | -|:---:|:--------------| -|Description| endpoint of cloud storage | -|Type| string | -|Default| None | -|Effective| After restarting system | - -* object\_storage\_access\_key - -|Name| object\_storage\_access\_key | -|:---:|:--------------| -|Description| Authentication information stored in the cloud: key | -|Type| string | -|Default| None | -|Effective| After restarting system | - -* object\_storage\_access\_secret - -|Name| object\_storage\_access\_secret | -|:---:|:--------------| -|Description| Authentication information stored in the cloud: secret | -|Type| string | -|Default| None | -|Effective| After restarting system | diff --git a/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_apache.md b/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_apache.md new file mode 100644 index 000000000..ea3f63288 --- /dev/null +++ b/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_apache.md @@ -0,0 +1,500 @@ + + +# DataNode Configuration Parameters + +We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. + +* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. + +* `iotdb-datanode.properties`:IoTDB system configurations. + +## Hot Modification Configuration + +For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-datanode.properties` during the system operation and applying them to the system immediately. +In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. + +Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. + +## Environment Configuration File(datanode-env.sh/bat) + +The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. + +The details of each parameter are as follows: + +* MEMORY\_SIZE + +|Name|MEMORY\_SIZE| +|:---:|:---| +|Description|The minimum heap memory size that IoTDB DataNode will use when startup | +|Type|String| +|Default| The default is a half of the memory.| +|Effective|After restarting system| + +* ON\_HEAP\_MEMORY + +|Name|ON\_HEAP\_MEMORY| +|:---:|:---| +|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* OFF\_HEAP\_MEMORY + +|Name|OFF\_HEAP\_MEMORY| +|:---:|:---| +|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* JMX\_LOCAL + +|Name|JMX\_LOCAL| +|:---:|:---| +|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| +|Type|Enum String: "true", "false"| +|Default|true| +|Effective|After restarting system| + +* JMX\_PORT + +|Name|JMX\_PORT| +|:---:|:---| +|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| +|Type|Short Int: [0,65535]| +|Default|31999| +|Effective|After restarting system| + +* JMX\_IP + +|Name|JMX\_IP| +|:---:|:---| +|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| +|Type|String| +|Default|127.0.0.1| +|Effective|After restarting system| + +## JMX Authorization + +We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. + +The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. + +The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. + +## DataNode/Standalone Configuration File (iotdb-datanode.properties) + +### Data Node RPC Configuration + +* dn\_rpc\_address + +|Name| dn\_rpc\_address | +|:---:|:-----------------------------------------------| +|Description| The client rpc service listens on the address. | +|Type| String | +|Default| 0.0.0.0 | +|Effective| After restarting system | + +* dn\_rpc\_port + +|Name| dn\_rpc\_port | +|:---:|:---| +|Description| The client rpc service listens on the port.| +|Type|Short Int : [0,65535]| +|Default| 6667 | +|Effective|After restarting system| + +* dn\_internal\_address + +|Name| dn\_internal\_address | +|:---:|:---| +|Description| DataNode internal service host/IP | +|Type| string | +|Default| 127.0.0.1 | +|Effective|Only allowed to be modified in first start up| + +* dn\_internal\_port + +|Name| dn\_internal\_port | +|:---:|:-------------------------------| +|Description| DataNode internal service port | +|Type| int | +|Default| 10730 | +|Effective| Only allowed to be modified in first start up | + +* dn\_mpp\_data\_exchange\_port + +|Name| mpp\_data\_exchange\_port | +|:---:|:---| +|Description| MPP data exchange port | +|Type| int | +|Default| 10740 | +|Effective|Only allowed to be modified in first start up| + +* dn\_schema\_region\_consensus\_port + +|Name| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Schema replica communication port for consensus | +|Type| int | +|Default| 10750 | +|Effective|Only allowed to be modified in first start up| + +* dn\_data\_region\_consensus\_port + +|Name| dn\_data\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Data replica communication port for consensus | +|Type| int | +|Default| 10760 | +|Effective|Only allowed to be modified in first start up| + +* dn\_join\_cluster\_retry\_interval\_ms + +|Name| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:--------------------------------------------------------------------------| +|Description| The time of data node waiting for the next retry to join into the cluster | +|Type| long | +|Default| 5000 | +|Effective| After restarting system | + +### SSL Configuration + +* enable\_thrift\_ssl + +|Name| enable\_thrift\_ssl | +|:---:|:---------------------------| +|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* enable\_https + +|Name| enable\_https | +|:---:|:-------------------------| +|Description| REST Service Specifies whether to enable SSL configuration | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* key\_store\_path + +|Name| key\_store\_path | +|:---:|:-----------------| +|Description| SSL certificate path | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* key\_store\_pwd + +|Name| key\_store\_pwd | +|:---:|:----------------| +|Description| SSL certificate password | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +### Target Config Nodes + +* dn\_seed\_config\_node + +|Name| dn\_seed\_config\_node | +|:---:|:------------------------------------------------| +|Description| ConfigNode Address for DataNode to join cluster | +|Type| String | +|Default| 127.0.0.1:10710 | +|Effective| Only allowed to be modified in first start up | + +### Connection Configuration + +* dn\_rpc\_thrift\_compression\_enable + +|Name| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's compression (using GZIP).| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_advanced\_compression\_enable + +|Name| dn\_rpc\_advanced\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's advanced compression.| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_selector\_thread\_count + +|Name| dn\_rpc\_selector\_thread\_count | +|:---:|:-----------------------------------| +|Description| The number of rpc selector thread. | +|Type| int | +|Default| false | +|Effective| After restarting system | + +* dn\_rpc\_min\_concurrent\_client\_num + +|Name| dn\_rpc\_min\_concurrent\_client\_num | +|:---:|:-----------------------------------| +|Description| Minimum concurrent rpc connections | +|Type| Short Int : [0,65535] | +|Description| 1 | +|Effective| After restarting system | + +* dn\_rpc\_max\_concurrent\_client\_num + +|Name| dn\_rpc\_max\_concurrent\_client\_num | +|:---:|:---| +|Description| Max concurrent rpc connections| +|Type| Short Int : [0,65535] | +|Description| 65535 | +|Effective|After restarting system| + +* dn\_thrift\_max\_frame\_size + +|Name| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|Description| Max size of bytes of each thrift RPC request/response| +|Type| Long | +|Unit|Byte| +|Default| 536870912 | +|Effective|After restarting system| + +* dn\_thrift\_init\_buffer\_size + +|Name| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|Description| Initial size of bytes of buffer that thrift used | +|Type| long | +|Default| 1024 | +|Effective|After restarting system| + +* dn\_connection\_timeout\_ms + +| Name | dn\_connection\_timeout\_ms | +|:-----------:|:---------------------------------------------------| +| Description | Thrift socket and connection timeout between nodes | +| Type | int | +| Default | 60000 | +| Effective | After restarting system | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------------:|:--------------------------------------------------------------| +| Description | Number of core clients routed to each node in a ClientManager | +| Type | int | +| Default | 200 | +| Effective | After restarting system | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:--------------:|:-------------------------------------------------------------| +| Description | Number of max clients routed to each node in a ClientManager | +| Type | int | +| Default | 300 | +| Effective | After restarting system | + +### Dictionary Configuration + +* dn\_system\_dir + +| Name | dn\_system\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The directories of system files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/system (Windows: data\\datanode\\system) | +| Effective | After restarting system | + +* dn\_data\_dirs + +| Name | dn\_data\_dirs | +|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | +| Type | String[] | +| Default | data/datanode/data (Windows: data\\datanode\\data) | +| Effective | After restarting system | + +* dn\_multi\_dir\_strategy + +| Name | dn\_multi\_dir\_strategy | +|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | +| Type | String | +| Default | SequenceStrategy | +| Effective | hot-load | + +* dn\_consensus\_dir + +| Name | dn\_consensus\_dir | +|:-----------:|:-------------------------------------------------------------------------------| +| Description | The directories of consensus files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/consensus | +| Effective | After restarting system | + +* dn\_wal\_dirs + +| Name | dn\_wal\_dirs | +|:-----------:|:-------------------------------------------------------------------------| +| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/wal | +| Effective | After restarting system | + +* dn\_tracing\_dir + +| Name | dn\_tracing\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The tracing root directory path. It is recommended to use an absolute path. | +| Type | String | +| Default | datanode/tracing | +| Effective | After restarting system | + +* dn\_sync\_dir + +| Name | dn\_sync\_dir | +|:-----------:|:--------------------------------------------------------------------------| +| Description | The directories of sync files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/sync | +| Effective | After restarting system | + +### Metric Configuration + +## Enable GC log + +GC log is off by default. +For performance tuning, you may want to collect the GC info. + +To enable GC log, just add a parameter "printgc" when you start the DataNode. + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` +Or +```cmd +sbin\start-datanode.bat printgc +``` + +GC log is stored at `IOTDB_HOME/logs/gc.log`. +There will be at most 10 gc.log.* files and each one can reach to 10MB. + +### REST Service Configuration + +* enable\_rest\_service + +|Name| enable\_rest\_service | +|:---:|:--------------------------------------| +|Description| Whether to enable the Rest service | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_service\_port + +|Name| rest\_service\_port | +|:---:|:------------------| +|Description| The Rest service listens to the port number | +|Type| int32 | +|Default| 18080 | +|Effective| After restarting system | + +* enable\_swagger + +|Name| enable\_swagger | +|:---:|:-----------------------| +|Description| Whether to enable swagger to display rest interface information | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_query\_default\_row\_size\_limit + +|Name| rest\_query\_default\_row\_size\_limit | +|:---:|:------------------------------------------------------------------------------------------| +|Description| The maximum number of rows in a result set that can be returned by a query | +|Type| int32 | +|Default| 10000 | +|Effective| After restarting system | + +* cache\_expire + +|Name| cache\_expire | +|:---:|:--------------------------------------------------------| +|Description| Expiration time for caching customer login information | +|Type| int32 | +|Default| 28800 | +|Effective| After restarting system | + +* cache\_max\_num + +|Name| cache\_max\_num | +|:---:|:--------------| +|Description| The maximum number of users stored in the cache | +|Type| int32 | +|Default| 100 | +|Effective| After restarting system | + +* cache\_init\_num + +|Name| cache\_init\_num | +|:---:|:---------------| +|Description| Initial cache capacity | +|Type| int32 | +|Default| 10 | +|Effective| After restarting system | + + +* trust\_store\_path + +|Name| trust\_store\_path | +|:---:|:---------------| +|Description| keyStore Password (optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* trust\_store\_pwd + +|Name| trust\_store\_pwd | +|:---:|:---------------------------------| +|Description| trustStore Password (Optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* idle\_timeout + +|Name| idle\_timeout | +|:---:|:--------------| +|Description| SSL timeout duration, expressed in seconds | +|Type| int32 | +|Default| 5000 | +|Effective| After restarting system | + diff --git a/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_timecho.md b/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_timecho.md new file mode 100644 index 000000000..9b2164402 --- /dev/null +++ b/src/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_timecho.md @@ -0,0 +1,592 @@ + + +# DataNode Configuration Parameters + +We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. + +* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. + +* `iotdb-datanode.properties`:IoTDB system configurations. + +## Hot Modification Configuration + +For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-datanode.properties` during the system operation and applying them to the system immediately. +In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. + +Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. + +## Environment Configuration File(datanode-env.sh/bat) + +The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. + +The details of each parameter are as follows: + +* MEMORY\_SIZE + +|Name|MEMORY\_SIZE| +|:---:|:---| +|Description|The minimum heap memory size that IoTDB DataNode will use when startup | +|Type|String| +|Default| The default is a half of the memory.| +|Effective|After restarting system| + +* ON\_HEAP\_MEMORY + +|Name|ON\_HEAP\_MEMORY| +|:---:|:---| +|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* OFF\_HEAP\_MEMORY + +|Name|OFF\_HEAP\_MEMORY| +|:---:|:---| +|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* JMX\_LOCAL + +|Name|JMX\_LOCAL| +|:---:|:---| +|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| +|Type|Enum String: "true", "false"| +|Default|true| +|Effective|After restarting system| + +* JMX\_PORT + +|Name|JMX\_PORT| +|:---:|:---| +|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| +|Type|Short Int: [0,65535]| +|Default|31999| +|Effective|After restarting system| + +* JMX\_IP + +|Name|JMX\_IP| +|:---:|:---| +|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| +|Type|String| +|Default|127.0.0.1| +|Effective|After restarting system| + +## JMX Authorization + +We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. + +The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. + +The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. + +## DataNode/Standalone Configuration File (iotdb-datanode.properties) + +### Data Node RPC Configuration + +* dn\_rpc\_address + +|Name| dn\_rpc\_address | +|:---:|:-----------------------------------------------| +|Description| The client rpc service listens on the address. | +|Type| String | +|Default| 0.0.0.0 | +|Effective| After restarting system | + +* dn\_rpc\_port + +|Name| dn\_rpc\_port | +|:---:|:---| +|Description| The client rpc service listens on the port.| +|Type|Short Int : [0,65535]| +|Default| 6667 | +|Effective|After restarting system| + +* dn\_internal\_address + +|Name| dn\_internal\_address | +|:---:|:---| +|Description| DataNode internal service host/IP | +|Type| string | +|Default| 127.0.0.1 | +|Effective|Only allowed to be modified in first start up| + +* dn\_internal\_port + +|Name| dn\_internal\_port | +|:---:|:-------------------------------| +|Description| DataNode internal service port | +|Type| int | +|Default| 10730 | +|Effective| Only allowed to be modified in first start up | + +* dn\_mpp\_data\_exchange\_port + +|Name| mpp\_data\_exchange\_port | +|:---:|:---| +|Description| MPP data exchange port | +|Type| int | +|Default| 10740 | +|Effective|Only allowed to be modified in first start up| + +* dn\_schema\_region\_consensus\_port + +|Name| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Schema replica communication port for consensus | +|Type| int | +|Default| 10750 | +|Effective|Only allowed to be modified in first start up| + +* dn\_data\_region\_consensus\_port + +|Name| dn\_data\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Data replica communication port for consensus | +|Type| int | +|Default| 10760 | +|Effective|Only allowed to be modified in first start up| + +* dn\_join\_cluster\_retry\_interval\_ms + +|Name| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:--------------------------------------------------------------------------| +|Description| The time of data node waiting for the next retry to join into the cluster | +|Type| long | +|Default| 5000 | +|Effective| After restarting system | + +### SSL Configuration + +* enable\_thrift\_ssl + +|Name| enable\_thrift\_ssl | +|:---:|:---------------------------| +|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* enable\_https + +|Name| enable\_https | +|:---:|:-------------------------| +|Description| REST Service Specifies whether to enable SSL configuration | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* key\_store\_path + +|Name| key\_store\_path | +|:---:|:-----------------| +|Description| SSL certificate path | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* key\_store\_pwd + +|Name| key\_store\_pwd | +|:---:|:----------------| +|Description| SSL certificate password | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +### Target Config Nodes + +* dn\_seed\_config\_node + +|Name| dn\_seed\_config\_node | +|:---:|:------------------------------------------------| +|Description| ConfigNode Address for DataNode to join cluster | +|Type| String | +|Default| 127.0.0.1:10710 | +|Effective| Only allowed to be modified in first start up | + +### Connection Configuration + +* dn\_rpc\_thrift\_compression\_enable + +|Name| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's compression (using GZIP).| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_advanced\_compression\_enable + +|Name| dn\_rpc\_advanced\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's advanced compression.| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_selector\_thread\_count + +|Name| dn\_rpc\_selector\_thread\_count | +|:---:|:-----------------------------------| +|Description| The number of rpc selector thread. | +|Type| int | +|Default| false | +|Effective| After restarting system | + +* dn\_rpc\_min\_concurrent\_client\_num + +|Name| dn\_rpc\_min\_concurrent\_client\_num | +|:---:|:-----------------------------------| +|Description| Minimum concurrent rpc connections | +|Type| Short Int : [0,65535] | +|Description| 1 | +|Effective| After restarting system | + +* dn\_rpc\_max\_concurrent\_client\_num + +|Name| dn\_rpc\_max\_concurrent\_client\_num | +|:---:|:---| +|Description| Max concurrent rpc connections| +|Type| Short Int : [0,65535] | +|Description| 65535 | +|Effective|After restarting system| + +* dn\_thrift\_max\_frame\_size + +|Name| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|Description| Max size of bytes of each thrift RPC request/response| +|Type| Long | +|Unit|Byte| +|Default| 536870912 | +|Effective|After restarting system| + +* dn\_thrift\_init\_buffer\_size + +|Name| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|Description| Initial size of bytes of buffer that thrift used | +|Type| long | +|Default| 1024 | +|Effective|After restarting system| + +* dn\_connection\_timeout\_ms + +| Name | dn\_connection\_timeout\_ms | +|:-----------:|:---------------------------------------------------| +| Description | Thrift socket and connection timeout between nodes | +| Type | int | +| Default | 60000 | +| Effective | After restarting system | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------------:|:--------------------------------------------------------------| +| Description | Number of core clients routed to each node in a ClientManager | +| Type | int | +| Default | 200 | +| Effective | After restarting system | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:--------------:|:-------------------------------------------------------------| +| Description | Number of max clients routed to each node in a ClientManager | +| Type | int | +| Default | 300 | +| Effective | After restarting system | + +### Dictionary Configuration + +* dn\_system\_dir + +| Name | dn\_system\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The directories of system files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/system (Windows: data\\datanode\\system) | +| Effective | After restarting system | + +* dn\_data\_dirs + +| Name | dn\_data\_dirs | +|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | +| Type | String[] | +| Default | data/datanode/data (Windows: data\\datanode\\data) | +| Effective | After restarting system | + +* dn\_multi\_dir\_strategy + +| Name | dn\_multi\_dir\_strategy | +|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | +| Type | String | +| Default | SequenceStrategy | +| Effective | hot-load | + +* dn\_consensus\_dir + +| Name | dn\_consensus\_dir | +|:-----------:|:-------------------------------------------------------------------------------| +| Description | The directories of consensus files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/consensus | +| Effective | After restarting system | + +* dn\_wal\_dirs + +| Name | dn\_wal\_dirs | +|:-----------:|:-------------------------------------------------------------------------| +| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/wal | +| Effective | After restarting system | + +* dn\_tracing\_dir + +| Name | dn\_tracing\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The tracing root directory path. It is recommended to use an absolute path. | +| Type | String | +| Default | datanode/tracing | +| Effective | After restarting system | + +* dn\_sync\_dir + +| Name | dn\_sync\_dir | +|:-----------:|:--------------------------------------------------------------------------| +| Description | The directories of sync files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/sync | +| Effective | After restarting system | + +### Metric Configuration + +## Enable GC log + +GC log is off by default. +For performance tuning, you may want to collect the GC info. + +To enable GC log, just add a parameter "printgc" when you start the DataNode. + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` +Or +```cmd +sbin\start-datanode.bat printgc +``` + +GC log is stored at `IOTDB_HOME/logs/gc.log`. +There will be at most 10 gc.log.* files and each one can reach to 10MB. + +### REST Service Configuration + +* enable\_rest\_service + +|Name| enable\_rest\_service | +|:---:|:--------------------------------------| +|Description| Whether to enable the Rest service | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_service\_port + +|Name| rest\_service\_port | +|:---:|:------------------| +|Description| The Rest service listens to the port number | +|Type| int32 | +|Default| 18080 | +|Effective| After restarting system | + +* enable\_swagger + +|Name| enable\_swagger | +|:---:|:-----------------------| +|Description| Whether to enable swagger to display rest interface information | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_query\_default\_row\_size\_limit + +|Name| rest\_query\_default\_row\_size\_limit | +|:---:|:------------------------------------------------------------------------------------------| +|Description| The maximum number of rows in a result set that can be returned by a query | +|Type| int32 | +|Default| 10000 | +|Effective| After restarting system | + +* cache\_expire + +|Name| cache\_expire | +|:---:|:--------------------------------------------------------| +|Description| Expiration time for caching customer login information | +|Type| int32 | +|Default| 28800 | +|Effective| After restarting system | + +* cache\_max\_num + +|Name| cache\_max\_num | +|:---:|:--------------| +|Description| The maximum number of users stored in the cache | +|Type| int32 | +|Default| 100 | +|Effective| After restarting system | + +* cache\_init\_num + +|Name| cache\_init\_num | +|:---:|:---------------| +|Description| Initial cache capacity | +|Type| int32 | +|Default| 10 | +|Effective| After restarting system | + + +* trust\_store\_path + +|Name| trust\_store\_path | +|:---:|:---------------| +|Description| keyStore Password (optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* trust\_store\_pwd + +|Name| trust\_store\_pwd | +|:---:|:---------------------------------| +|Description| trustStore Password (Optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* idle\_timeout + +|Name| idle\_timeout | +|:---:|:--------------| +|Description| SSL timeout duration, expressed in seconds | +|Type| int32 | +|Default| 5000 | +|Effective| After restarting system | + +#### Storage engine configuration + +* dn\_default\_space\_move\_thresholds + +|Name| dn\_default\_space\_move\_thresholds | +|:---:|:--------------| +|Description| Version 1.3.0/1: Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | +|Type| double | +|Default| 0.15 | +|Effective| hot-load | + + +* dn\_default\_space\_usage\_thresholds + +|Name| dn\_default\_space\_usage\_thresholds | +|:---:|:--------------| +|Description| Version 1.3.2: Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | +|Type| double | +|Default| 0.85 | +|Effective| hot-load | + +* remote\_tsfile\_cache\_dirs + +|Name| remote\_tsfile\_cache\_dirs | +|:---:|:--------------| +|Description| Cache directory stored locally in the cloud | +|Type| string | +|Default| data/datanode/data/cache | +|Effective| After restarting system | + +* remote\_tsfile\_cache\_page\_size\_in\_kb + +|Name| remote\_tsfile\_cache\_page\_size\_in\_kb | +|:---:|:--------------| +|Description| Block size of locally cached files stored in the cloud | +|Type| int | +|Default| 20480 | +|Effective| After restarting system | + +* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb + +|Name| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | +|:---:|:--------------| +|Description| Maximum Disk Occupancy Size for Cloud Storage Local Cache | +|Type| long | +|Default| 51200 | +|Effective| After restarting system | + +* object\_storage\_type + +|Name| object\_storage\_type | +|:---:|:--------------| +|Description| Cloud Storage Type | +|Type| string | +|Default| AWS_S3 | +|Effective| After restarting system | + +* object\_storage\_bucket + +|Name| object\_storage\_bucket | +|:---:|:--------------| +|Description| Name of cloud storage bucket | +|Type| string | +|Default| iotdb_data | +|Effective| After restarting system | + +* object\_storage\_endpoiont + +|Name| object\_storage\_endpoiont | +|:---:|:--------------| +|Description| endpoint of cloud storage | +|Type| string | +|Default| None | +|Effective| After restarting system | + +* object\_storage\_access\_key + +|Name| object\_storage\_access\_key | +|:---:|:--------------| +|Description| Authentication information stored in the cloud: key | +|Type| string | +|Default| None | +|Effective| After restarting system | + +* object\_storage\_access\_secret + +|Name| object\_storage\_access\_secret | +|:---:|:--------------| +|Description| Authentication information stored in the cloud: secret | +|Type| string | +|Default| None | +|Effective| After restarting system | diff --git a/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept.md b/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept.md index d6f57bf2a..b4631022f 100644 --- a/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept.md +++ b/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept.md @@ -1,3 +1,6 @@ +--- +redirectTo: Cluster-Concept_apache.html +--- - -# Cluster-related Concepts -The figure below illustrates a typical IoTDB 3C3D1A cluster deployment mode, comprising 3 ConfigNodes, 3 DataNodes, and 1 AINode: - - -This deployment involves several key concepts that users commonly encounter when working with IoTDB clusters, including: -- **Nodes** (ConfigNode, DataNode, AINode); -- **Slots** (SchemaSlot, DataSlot); -- **Regions** (SchemaRegion, DataRegion); -- **Replica Groups**. - -The following sections will provide a detailed introduction to these concepts. - -## Nodes - -An IoTDB cluster consists of three types of nodes (processes): **ConfigNode** (the main node), **DataNode**, and **AINode**, as detailed below: -- **ConfigNode:** ConfigNodes store cluster configurations, database metadata, the routing information of time series' schema and data. They also monitor cluster nodes and conduct load balancing. All ConfigNodes maintain full mutual backups, as shown in the figure with ConfigNode-1, ConfigNode-2, and ConfigNode-3. ConfigNodes do not directly handle client read or write requests. Instead, they guide the distribution of time series' schema and data within the cluster using a series of [load balancing algorithms](../Technical-Insider/Cluster-data-partitioning.md). -- **DataNode:** DataNodes are responsible for reading and writing time series' schema and data. Each DataNode can accept client read and write requests and provide corresponding services, as illustrated with DataNode-1, DataNode-2, and DataNode-3 in the above figure. When a DataNode receives client requests, it can process them directly or forward them if it has the relevant routing information cached locally. Otherwise, it queries the ConfigNode for routing details and caches the information to improve the efficiency of subsequent requests. -- **AINode:** AINodes interact with ConfigNodes and DataNodes to extend IoTDB's capabilities for data intelligence analysis on time series data. They support registering pre-trained machine learning models from external sources and performing time series analysis tasks using simple SQL statements on specified data. This process integrates model creation, management, and inference within the database engine. Currently, the system provides built-in algorithms or self-training models for common time series analysis scenarios, such as forecasting and anomaly detection. - -## Slots - -IoTDB divides time series' schema and data into smaller, more manageable units called **slots**. Slots are logical entities, and in an IoTDB cluster, the **SchemaSlots** and **DataSlots** are defined as follows: -- **SchemaSlot:** A SchemaSlot represents a subset of the time series' schema collection. The total number of SchemaSlots is fixed, with a default value of 1000. IoTDB uses a hashing algorithm to evenly distribute all devices across these SchemaSlots. -- **DataSlot:** A DataSlot represents a subset of the time series' data collection. Based on the SchemaSlots, the data for corresponding devices is further divided into DataSlots by a fixed time interval. The default time interval for a DataSlot is 7 days. - -## Region - -In IoTDB, time series' schema and data are replicated across DataNodes to ensure high availability in the cluster. However, replicating data at the slot level can increase management complexity and reduce write throughput. To address this, IoTDB introduces the concept of **Region**, which groups SchemaSlots and DataSlots into **SchemaRegions** and **DataRegions** respectively. Replication is then performed at the Region level. The definitions of SchemaRegion and DataRegion are as follows: -- **SchemaRegion**: A SchemaRegion is the basic unit for storing and replicating time series' schema. All SchemaSlots in a database are evenly distributed across the database's SchemaRegions. SchemaRegions with the same RegionID are replicas of each other. For example, in the figure above, SchemaRegion-1 has three replicas located on DataNode-1, DataNode-2, and DataNode-3. -- **DataRegion**: A DataRegion is the basic unit for storing and replicating time series' data. All DataSlots in a database are evenly distributed across the database's DataRegions. DataRegions with the same RegionID are replicas of each other. For instance, in the figure above, DataRegion-2 has two replicas located on DataNode-1 and DataNode-2. - -## Replica Groups -Region replicas are critical for the fault tolerance of the cluster. Each Region's replicas are organized into **replica groups**, where the replicas are assigned roles as either **leader** or **follower**, working together to provide read and write services. Recommended replica group configurations under different architectures are as follows: - -| Category | Parameter | Single-node Recommended Configuration | Distributed Recommended Configuration | -|:------------:|:-----------------------:|:------------------------------------:|:-------------------------------------:| -| Schema | `schema_replication_factor` | 1 | 3 | -| Data | `data_replication_factor` | 1 | 2 | \ No newline at end of file +--> \ No newline at end of file diff --git a/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_apache.md b/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_apache.md new file mode 100644 index 000000000..1edc7c292 --- /dev/null +++ b/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_apache.md @@ -0,0 +1,105 @@ + + +# Common Concepts + +## Sql_dialect Related Concepts + +| Concept | Meaning | +| ----------------------- | ------------------------------------------------------------ | +| sql_dialect | IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points. Tree: Manages data in a hierarchical path manner, where one path corresponds to one measurement point of a device. Table: Manages data in a relational table manner, where one table corresponds to a category of devices. | +| Schema | Schema is the data model information of the database, i.e., tree structure or table structure. It includes definitions such as the names and data types of measurement points. | +| Device | Corresponds to a physical device in an actual scenario, usually containing multiple measurement points. | +| Timeseries | Also known as: physical quantity, time series, timeline, point location, semaphore, indicator, measurement value, etc. It is a time series formed by arranging multiple data points in ascending order of timestamps. Usually, a Timeseries represents a collection point that can periodically collect physical quantities of the environment it is in. | +| Encoding | Encoding is a compression technique that represents data in binary form to improve storage efficiency. IoTDB supports various encoding methods for different types of data. For more detailed information, please refer to:[Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | +| Compression | After data encoding, IoTDB uses compression technology to further compress binary data to enhance storage efficiency. IoTDB supports multiple compression methods. For more detailed information, please refer to: [Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | + +## Distributed Related Concepts + +The following figure shows a common IoTDB 3C3D (3 ConfigNodes, 3 DataNodes) cluster deployment pattern: + + + +IoTDB's cluster includes the following common concepts: + +- Nodes(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- Replica Groups + +The above concepts will be introduced in the following text. + +### Nodes + +IoTDB cluster includes three types of nodes (processes): ConfigNode (management node), DataNode (data node), and AINode (analysis node), as shown below: + +- ConfigNode: Manages cluster node information, configuration information, user permissions, metadata, partition information, etc., and is responsible for the scheduling of distributed operations and load balancing. All ConfigNodes are fully backed up with each other, as shown in ConfigNode-1, ConfigNode-2, and ConfigNode-3 in the figure above. +- DataNode: Serves client requests and is responsible for data storage and computation, as shown in DataNode-1, DataNode-2, and DataNode-3 in the figure above. +- AINode: Provides machine learning capabilities, supports the registration of trained machine learning models, and allows model inference through SQL calls. It has already built-in self-developed time-series large models and common machine learning algorithms (such as prediction and anomaly detection). + +### Data Partitioning + +In IoTDB, both metadata and data are divided into small partitions, namely Regions, which are managed by various DataNodes in the cluster. + +- SchemaRegion: Metadata partition, managing the metadata of a part of devices and measurement points. SchemaRegions with the same RegionID on different DataNodes are mutual replicas, as shown in SchemaRegion-1 in the figure above, which has three replicas located on DataNode-1, DataNode-2, and DataNode-3. +- DataRegion: Data partition, managing the data of a part of devices for a certain period of time. DataRegions with the same RegionID on different DataNodes are mutual replicas, as shown in DataRegion-2 in the figure above, which has two replicas located on DataNode-1 and DataNode-2. +- For specific partitioning algorithms, please refer to: [Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) + +### Replica Groups + +The number of replicas for data and metadata can be configured. The recommended configurations for different deployment modes are as follows, where multi-replication can provide high-availability services. + +| Category | Parameter | Stand-Alone Recommended Configuration | Cluster Recommended Configuration | +| :----- | :------------------------ | :----------- | :----------- | +| Schema | schema_replication_factor | 1 | 3 | +| Data | data_replication_factor | 1 | 2 | + +## Deployment Related Concepts + +IoTDB has two operating modes: Stand-Alone mode and Cluster mode. + +### Stand-Alone Mode + +An IoTDB Stand-Alone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D; + + +- **Features**:Easy for developers to install and deploy, with low deployment and maintenance costs and convenient operations. +- **Applicable Scenarios**:Scenarios with limited resources or low requirements for high availability, such as edge-side servers. +- **Deployment Method**:[Stand-Alone-Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) + +### Cluster Mode + +An IoTDB cluster instance consists of 3 ConfigNodes and no less than 3 DataNodes, usually 3 DataNodes, i.e., 3C3D; when some nodes fail, the remaining nodes can still provide services, ensuring the high availability of the database service, and the database performance can be improved with the addition of nodes. + +- **Features**:High availability and scalability, and the system performance can be improved by adding DataNodes. +- **Applicable Scenarios**:Enterprise-level application scenarios requiring high availability and reliability. +- **Deployment Method**:[Cluster-Deployment](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) + +### Summary of Features + +| Dimension | Stand-Alone Mode | Cluster Mode | +| ------------ | ---------------------------- | ------------------------ | +| Applicable Scenarios | Edge-side deployment, scenarios with low requirements for high availability | High-availability business, disaster recovery scenarios, etc. | +| Number of Machines Required | 1 | ≥3 | +| Security and Reliability | Cannot tolerate single-point failures | High, can tolerate single-point failures | +| Scalability | Can expand DataNodes to improve performance | Can expand DataNodes to improve performance | +| Performance | Can be expanded with the number of DataNodes | Can be expanded with the number of DataNodes | + +- The deployment steps for single-machine mode and cluster mode are similar (adding ConfigNodes and DataNodes one by one), with only the number of replicas and the minimum number of nodes that can provide services being different. \ No newline at end of file diff --git a/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_timecho.md b/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_timecho.md new file mode 100644 index 000000000..af669a6d6 --- /dev/null +++ b/src/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_timecho.md @@ -0,0 +1,118 @@ + + +# Common Concepts + +## Sql_dialect Related Concepts + +| Concept | Meaning | +| ----------------------- | ------------------------------------------------------------ | +| sql_dialect | IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points. Tree: Manages data in a hierarchical path manner, where one path corresponds to one measurement point of a device. Table: Manages data in a relational table manner, where one table corresponds to a category of devices. | +| Schema | Schema is the data model information of the database, i.e., tree structure or table structure. It includes definitions such as the names and data types of measurement points. | +| Device | Corresponds to a physical device in an actual scenario, usually containing multiple measurement points. | +| Timeseries | Also known as: physical quantity, time series, timeline, point location, semaphore, indicator, measurement value, etc. It is a time series formed by arranging multiple data points in ascending order of timestamps. Usually, a Timeseries represents a collection point that can periodically collect physical quantities of the environment it is in. | +| Encoding | Encoding is a compression technique that represents data in binary form to improve storage efficiency. IoTDB supports various encoding methods for different types of data. For more detailed information, please refer to:[Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | +| Compression | After data encoding, IoTDB uses compression technology to further compress binary data to enhance storage efficiency. IoTDB supports multiple compression methods. For more detailed information, please refer to: [Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | + +## Distributed Related Concepts + +The following figure shows a common IoTDB 3C3D (3 ConfigNodes, 3 DataNodes) cluster deployment pattern: + + + +IoTDB's cluster includes the following common concepts: + +- Nodes(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- Replica Groups + +The above concepts will be introduced in the following text. + + +### Nodes + +IoTDB cluster includes three types of nodes (processes): ConfigNode (management node), DataNode (data node), and AINode (analysis node), as shown below: + +- ConfigNode: Manages cluster node information, configuration information, user permissions, metadata, partition information, etc., and is responsible for the scheduling of distributed operations and load balancing. All ConfigNodes are fully backed up with each other, as shown in ConfigNode-1, ConfigNode-2, and ConfigNode-3 in the figure above. +- DataNode: Serves client requests and is responsible for data storage and computation, as shown in DataNode-1, DataNode-2, and DataNode-3 in the figure above. +- AINode: Provides machine learning capabilities, supports the registration of trained machine learning models, and allows model inference through SQL calls. It has already built-in self-developed time-series large models and common machine learning algorithms (such as prediction and anomaly detection). + +### Data Partitioning + +In IoTDB, both metadata and data are divided into small partitions, namely Regions, which are managed by various DataNodes in the cluster. + +- SchemaRegion: Metadata partition, managing the metadata of a part of devices and measurement points. SchemaRegions with the same RegionID on different DataNodes are mutual replicas, as shown in SchemaRegion-1 in the figure above, which has three replicas located on DataNode-1, DataNode-2, and DataNode-3. +- DataRegion: Data partition, managing the data of a part of devices for a certain period of time. DataRegions with the same RegionID on different DataNodes are mutual replicas, as shown in DataRegion-2 in the figure above, which has two replicas located on DataNode-1 and DataNode-2. +- For specific partitioning algorithms, please refer to: [Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) + +### Replica Groups + +The number of replicas for data and metadata can be configured. The recommended configurations for different deployment modes are as follows, where multi-replication can provide high-availability services. + +| Category | Parameter | Stand-Alone Recommended Configuration | Cluster Recommended Configuration | +| :----- | :------------------------ | :----------- | :----------- | +| Schema | schema_replication_factor | 1 | 3 | +| Data | data_replication_factor | 1 | 2 | + + +## Deployment Related Concepts + +IoTDB has three operating modes: Stand-Alone mode, Cluster mode, and Dual-Active mode. + +### Stand-Alone Mode + +An IoTDB Stand-Alone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D; + + +- **Features**:Easy for developers to install and deploy, with low deployment and maintenance costs and convenient operations. +- **Applicable Scenarios**:Scenarios with limited resources or low requirements for high availability, such as edge-side servers. +- **Deployment Method**:[Stand-Alone-Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) + +### Dual-Active Mode + +Dual-active deployment is a feature of TimechoDB Enterprise Edition, which refers to two independent instances performing bidirectional synchronization and can provide services simultaneously. When one instance is restarted after a shutdown, the other instance will resume transmission of the missing data. + + +> An IoTDB dual-active instance usually consists of 2 single-machine nodes, i.e., 2 sets of 1C1D. Each instance can also be a cluster. + +- **Features**:The most resource-efficient high-availability solution. +- **Applicable Scenarios**:Scenarios with limited resources (only two servers) but requiring high-availability capabilities. +- **Deployment Method**:[Dual-Active-Deployment](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) + +### Cluster Mode + +An IoTDB cluster instance consists of 3 ConfigNodes and no less than 3 DataNodes, usually 3 DataNodes, i.e., 3C3D; when some nodes fail, the remaining nodes can still provide services, ensuring the high availability of the database service, and the database performance can be improved with the addition of nodes. + +- **Features**:High availability and scalability, and the system performance can be improved by adding DataNodes. +- **Applicable Scenarios**:Enterprise-level application scenarios requiring high availability and reliability. +- **Deployment Method**:[Cluster-Deployment](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md) + +### Summary of Features + +| Dimension | Stand-Alone Mode | Dual-Active Mode | Cluster Mode | +| ------------ | ---------------------------- | ------------------------ | ------------------------ | +| Applicable Scenarios | Edge-side deployment, scenarios with low requirements for high availability | High-availability business, disaster recovery scenarios, etc. | High-availability business, disaster recovery scenarios, etc. | +| Number of Machines Required | 1 | 2 | ≥3 | +| Security and Reliability | Cannot tolerate single-point failures | High, can tolerate single-point failures | High, can tolerate single-point failures | +| Scalability | Can expand DataNodes to improve performance | Each instance can be expanded as needed | Can expand DataNodes to improve performance | +| Performance | Can be expanded with the number of DataNodes | Same as the performance of one of the instances | Can be expanded with the number of DataNodes | + +- The deployment steps for single-machine mode and cluster mode are similar (adding ConfigNodes and DataNodes one by one), with only the number of replicas and the minimum number of nodes that can provide services being different. \ No newline at end of file diff --git a/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual.md b/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual.md index 94ede5013..172882761 100644 --- a/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual.md +++ b/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual.md @@ -1,3 +1,6 @@ +--- +redirectTo: DataNode-Config-Manual_apache.html +--- - -# DataNode Configuration Parameters - -We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. - -* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. - -* `iotdb-system.properties`:IoTDB system configurations. - -## Hot Modification Configuration - -For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-system.properties` during the system operation and applying them to the system immediately. -In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. - -Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. - -## Environment Configuration File(datanode-env.sh/bat) - -The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. - -The details of each parameter are as follows: - -* MEMORY\_SIZE - -|Name|MEMORY\_SIZE| -|:---:|:---| -|Description|The minimum heap memory size that IoTDB DataNode will use when startup | -|Type|String| -|Default| The default is a half of the memory.| -|Effective|After restarting system| - -* ON\_HEAP\_MEMORY - -|Name|ON\_HEAP\_MEMORY| -|:---:|:---| -|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | -|Type|String| -|Default| Calculate based on MEMORY\_SIZE.| -|Effective|After restarting system| - -* OFF\_HEAP\_MEMORY - -|Name|OFF\_HEAP\_MEMORY| -|:---:|:---| -|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| -|Type|String| -|Default| Calculate based on MEMORY\_SIZE.| -|Effective|After restarting system| - -* JMX\_LOCAL - -|Name|JMX\_LOCAL| -|:---:|:---| -|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| -|Type|Enum String: "true", "false"| -|Default|true| -|Effective|After restarting system| - -* JMX\_PORT - -|Name|JMX\_PORT| -|:---:|:---| -|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| -|Type|Short Int: [0,65535]| -|Default|31999| -|Effective|After restarting system| - -* JMX\_IP - -|Name|JMX\_IP| -|:---:|:---| -|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| -|Type|String| -|Default|127.0.0.1| -|Effective|After restarting system| - -## JMX Authorization - -We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. - -The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. - -The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. - -## DataNode/Standalone Configuration File (iotdb-system.properties) - -### Data Node RPC Configuration - -* dn\_rpc\_address - -|Name| dn\_rpc\_address | -|:---:|:-----------------------------------------------| -|Description| The client rpc service listens on the address. | -|Type| String | -|Default| 0.0.0.0 | -|Effective| After restarting system | - -* dn\_rpc\_port - -|Name| dn\_rpc\_port | -|:---:|:---| -|Description| The client rpc service listens on the port.| -|Type|Short Int : [0,65535]| -|Default| 6667 | -|Effective|After restarting system| - -* dn\_internal\_address - -|Name| dn\_internal\_address | -|:---:|:---| -|Description| DataNode internal service host/IP | -|Type| string | -|Default| 127.0.0.1 | -|Effective|Only allowed to be modified in first start up| - -* dn\_internal\_port - -|Name| dn\_internal\_port | -|:---:|:-------------------------------| -|Description| DataNode internal service port | -|Type| int | -|Default| 10730 | -|Effective| Only allowed to be modified in first start up | - -* dn\_mpp\_data\_exchange\_port - -|Name| mpp\_data\_exchange\_port | -|:---:|:---| -|Description| MPP data exchange port | -|Type| int | -|Default| 10740 | -|Effective|Only allowed to be modified in first start up| - -* dn\_schema\_region\_consensus\_port - -|Name| dn\_schema\_region\_consensus\_port | -|:---:|:---| -|Description| DataNode Schema replica communication port for consensus | -|Type| int | -|Default| 10750 | -|Effective|Only allowed to be modified in first start up| - -* dn\_data\_region\_consensus\_port - -|Name| dn\_data\_region\_consensus\_port | -|:---:|:---| -|Description| DataNode Data replica communication port for consensus | -|Type| int | -|Default| 10760 | -|Effective|Only allowed to be modified in first start up| - -* dn\_join\_cluster\_retry\_interval\_ms - -|Name| dn\_join\_cluster\_retry\_interval\_ms | -|:---:|:--------------------------------------------------------------------------| -|Description| The time of data node waiting for the next retry to join into the cluster | -|Type| long | -|Default| 5000 | -|Effective| After restarting system | - -### SSL Configuration - -* enable\_thrift\_ssl - -|Name| enable\_thrift\_ssl | -|:---:|:---------------------------| -|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* enable\_https - -|Name| enable\_https | -|:---:|:-------------------------| -|Description| REST Service Specifies whether to enable SSL configuration | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* key\_store\_path - -|Name| key\_store\_path | -|:---:|:-----------------| -|Description| SSL certificate path | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* key\_store\_pwd - -|Name| key\_store\_pwd | -|:---:|:----------------| -|Description| SSL certificate password | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -### SeedConfigNode - -* dn\_seed\_config\_node - -|Name| dn\_seed\_config\_node | -|:---:|:------------------------------------------------| -|Description| ConfigNode Address for DataNode to join cluster. This parameter is corresponding to dn\_target\_config\_node\_list before V1.2.2 | -|Type| String | -|Default| 127.0.0.1:10710 | -|Effective| Only allowed to be modified in first start up | - -### Connection Configuration - -* dn\_rpc\_thrift\_compression\_enable - -|Name| dn\_rpc\_thrift\_compression\_enable | -|:---:|:---| -|Description| Whether enable thrift's compression (using GZIP).| -|Type|Boolean| -|Default| false | -|Effective|After restarting system| - -* dn\_rpc\_advanced\_compression\_enable - -|Name| dn\_rpc\_advanced\_compression\_enable | -|:---:|:---| -|Description| Whether enable thrift's advanced compression.| -|Type|Boolean| -|Default| false | -|Effective|After restarting system| - -* dn\_rpc\_selector\_thread\_count - -|Name| dn\_rpc\_selector\_thread\_count | -|:---:|:-----------------------------------| -|Description| The number of rpc selector thread. | -|Type| int | -|Default| false | -|Effective| After restarting system | - -* dn\_rpc\_min\_concurrent\_client\_num - -|Name| dn\_rpc\_min\_concurrent\_client\_num | -|:---:|:-----------------------------------| -|Description| Minimum concurrent rpc connections | -|Type| Short Int : [0,65535] | -|Description| 1 | -|Effective| After restarting system | - -* dn\_rpc\_max\_concurrent\_client\_num - -|Name| dn\_rpc\_max\_concurrent\_client\_num | -|:---:|:---| -|Description| Max concurrent rpc connections| -|Type| Short Int : [0,65535] | -|Description| 65535 | -|Effective|After restarting system| - -* dn\_thrift\_max\_frame\_size - -|Name| dn\_thrift\_max\_frame\_size | -|:---:|:---| -|Description| Max size of bytes of each thrift RPC request/response| -|Type| Long | -|Unit|Byte| -|Default| 536870912 | -|Effective|After restarting system| - -* dn\_thrift\_init\_buffer\_size - -|Name| dn\_thrift\_init\_buffer\_size | -|:---:|:---| -|Description| Initial size of bytes of buffer that thrift used | -|Type| long | -|Default| 1024 | -|Effective|After restarting system| - -* dn\_connection\_timeout\_ms - -| Name | dn\_connection\_timeout\_ms | -|:-----------:|:---------------------------------------------------| -| Description | Thrift socket and connection timeout between nodes | -| Type | int | -| Default | 60000 | -| Effective | After restarting system | - -* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager - -| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------------:|:--------------------------------------------------------------| -| Description | Number of core clients routed to each node in a ClientManager | -| Type | int | -| Default | 200 | -| Effective | After restarting system | - -* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager - -| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | -|:--------------:|:-------------------------------------------------------------| -| Description | Number of max clients routed to each node in a ClientManager | -| Type | int | -| Default | 300 | -| Effective | After restarting system | - -### Dictionary Configuration - -* dn\_system\_dir - -| Name | dn\_system\_dir | -|:-----------:|:----------------------------------------------------------------------------| -| Description | The directories of system files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/system (Windows: data\\datanode\\system) | -| Effective | After restarting system | - -* dn\_data\_dirs - -| Name | dn\_data\_dirs | -|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | -| Type | String[] | -| Default | data/datanode/data (Windows: data\\datanode\\data) | -| Effective | After restarting system | - -* dn\_multi\_dir\_strategy - -| Name | dn\_multi\_dir\_strategy | -|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | -| Type | String | -| Default | SequenceStrategy | -| Effective | hot-load | - -* dn\_consensus\_dir - -| Name | dn\_consensus\_dir | -|:-----------:|:-------------------------------------------------------------------------------| -| Description | The directories of consensus files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/consensus | -| Effective | After restarting system | - -* dn\_wal\_dirs - -| Name | dn\_wal\_dirs | -|:-----------:|:-------------------------------------------------------------------------| -| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/wal | -| Effective | After restarting system | - -* dn\_tracing\_dir - -| Name | dn\_tracing\_dir | -|:-----------:|:----------------------------------------------------------------------------| -| Description | The tracing root directory path. It is recommended to use an absolute path. | -| Type | String | -| Default | datanode/tracing | -| Effective | After restarting system | - -* dn\_sync\_dir - -| Name | dn\_sync\_dir | -|:-----------:|:--------------------------------------------------------------------------| -| Description | The directories of sync files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/sync | -| Effective | After restarting system | - -### Metric Configuration - -## Enable GC log - -GC log is off by default. -For performance tuning, you may want to collect the GC info. - -To enable GC log, just add a parameter "printgc" when you start the DataNode. - -```bash -nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & -``` -Or -```cmd -sbin\start-datanode.bat printgc -``` - -GC log is stored at `IOTDB_HOME/logs/gc.log`. -There will be at most 10 gc.log.* files and each one can reach to 10MB. - -### REST Service Configuration - -* enable\_rest\_service - -|Name| enable\_rest\_service | -|:---:|:--------------------------------------| -|Description| Whether to enable the Rest service | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* rest\_service\_port - -|Name| rest\_service\_port | -|:---:|:------------------| -|Description| The Rest service listens to the port number | -|Type| int32 | -|Default| 18080 | -|Effective| After restarting system | - -* enable\_swagger - -|Name| enable\_swagger | -|:---:|:-----------------------| -|Description| Whether to enable swagger to display rest interface information | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* rest\_query\_default\_row\_size\_limit - -|Name| rest\_query\_default\_row\_size\_limit | -|:---:|:------------------------------------------------------------------------------------------| -|Description| The maximum number of rows in a result set that can be returned by a query | -|Type| int32 | -|Default| 10000 | -|Effective| After restarting system | - -* cache\_expire - -|Name| cache\_expire | -|:---:|:--------------------------------------------------------| -|Description| Expiration time for caching customer login information | -|Type| int32 | -|Default| 28800 | -|Effective| After restarting system | - -* cache\_max\_num - -|Name| cache\_max\_num | -|:---:|:--------------| -|Description| The maximum number of users stored in the cache | -|Type| int32 | -|Default| 100 | -|Effective| After restarting system | - -* cache\_init\_num - -|Name| cache\_init\_num | -|:---:|:---------------| -|Description| Initial cache capacity | -|Type| int32 | -|Default| 10 | -|Effective| After restarting system | - - -* trust\_store\_path - -|Name| trust\_store\_path | -|:---:|:---------------| -|Description| keyStore Password (optional) | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* trust\_store\_pwd - -|Name| trust\_store\_pwd | -|:---:|:---------------------------------| -|Description| trustStore Password (Optional) | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* idle\_timeout - -|Name| idle\_timeout | -|:---:|:--------------| -|Description| SSL timeout duration, expressed in seconds | -|Type| int32 | -|Default| 5000 | -|Effective| After restarting system | - - -#### Storage engine configuration - - -* dn\_default\_space\_usage\_thresholds - -|Name| dn\_default\_space\_usage\_thresholds | -|:---:|:--------------| -|Description| Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | -|Type| double | -|Default| 0.85 | -|Effective| hot-load | - -* remote\_tsfile\_cache\_dirs - -|Name| remote\_tsfile\_cache\_dirs | -|:---:|:--------------| -|Description| Cache directory stored locally in the cloud | -|Type| string | -|Default| data/datanode/data/cache | -|Effective| After restarting system | - -* remote\_tsfile\_cache\_page\_size\_in\_kb - -|Name| remote\_tsfile\_cache\_page\_size\_in\_kb | -|:---:|:--------------| -|Description| Block size of locally cached files stored in the cloud | -|Type| int | -|Default| 20480 | -|Effective| After restarting system | - -* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb - -|Name| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | -|:---:|:--------------| -|Description| Maximum Disk Occupancy Size for Cloud Storage Local Cache | -|Type| long | -|Default| 51200 | -|Effective| After restarting system | - -* object\_storage\_type - -|Name| object\_storage\_type | -|:---:|:--------------| -|Description| Cloud Storage Type | -|Type| string | -|Default| AWS_S3 | -|Effective| After restarting system | - -* object\_storage\_bucket - -|Name| object\_storage\_bucket | -|:---:|:--------------| -|Description| Name of cloud storage bucket | -|Type| string | -|Default| iotdb_data | -|Effective| After restarting system | - -* object\_storage\_endpoiont - -|Name| object\_storage\_endpoiont | -|:---:|:--------------| -|Description| endpoint of cloud storage | -|Type| string | -|Default| None | -|Effective| After restarting system | - -* object\_storage\_access\_key - -|Name| object\_storage\_access\_key | -|:---:|:--------------| -|Description| Authentication information stored in the cloud: key | -|Type| string | -|Default| None | -|Effective| After restarting system | - -* object\_storage\_access\_secret - -|Name| object\_storage\_access\_secret | -|:---:|:--------------| -|Description| Authentication information stored in the cloud: secret | -|Type| string | -|Default| None | -|Effective| After restarting system | diff --git a/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_apache.md b/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_apache.md new file mode 100644 index 000000000..b568ab7ad --- /dev/null +++ b/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_apache.md @@ -0,0 +1,500 @@ + + +# DataNode Configuration Parameters + +We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. + +* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. + +* `iotdb-system.properties`:IoTDB system configurations. + +## Hot Modification Configuration + +For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-system.properties` during the system operation and applying them to the system immediately. +In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. + +Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. + +## Environment Configuration File(datanode-env.sh/bat) + +The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. + +The details of each parameter are as follows: + +* MEMORY\_SIZE + +|Name|MEMORY\_SIZE| +|:---:|:---| +|Description|The minimum heap memory size that IoTDB DataNode will use when startup | +|Type|String| +|Default| The default is a half of the memory.| +|Effective|After restarting system| + +* ON\_HEAP\_MEMORY + +|Name|ON\_HEAP\_MEMORY| +|:---:|:---| +|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* OFF\_HEAP\_MEMORY + +|Name|OFF\_HEAP\_MEMORY| +|:---:|:---| +|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* JMX\_LOCAL + +|Name|JMX\_LOCAL| +|:---:|:---| +|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| +|Type|Enum String: "true", "false"| +|Default|true| +|Effective|After restarting system| + +* JMX\_PORT + +|Name|JMX\_PORT| +|:---:|:---| +|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| +|Type|Short Int: [0,65535]| +|Default|31999| +|Effective|After restarting system| + +* JMX\_IP + +|Name|JMX\_IP| +|:---:|:---| +|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| +|Type|String| +|Default|127.0.0.1| +|Effective|After restarting system| + +## JMX Authorization + +We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. + +The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. + +The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. + +## DataNode/Standalone Configuration File (iotdb-system.properties) + +### Data Node RPC Configuration + +* dn\_rpc\_address + +|Name| dn\_rpc\_address | +|:---:|:-----------------------------------------------| +|Description| The client rpc service listens on the address. | +|Type| String | +|Default| 0.0.0.0 | +|Effective| After restarting system | + +* dn\_rpc\_port + +|Name| dn\_rpc\_port | +|:---:|:---| +|Description| The client rpc service listens on the port.| +|Type|Short Int : [0,65535]| +|Default| 6667 | +|Effective|After restarting system| + +* dn\_internal\_address + +|Name| dn\_internal\_address | +|:---:|:---| +|Description| DataNode internal service host/IP | +|Type| string | +|Default| 127.0.0.1 | +|Effective|Only allowed to be modified in first start up| + +* dn\_internal\_port + +|Name| dn\_internal\_port | +|:---:|:-------------------------------| +|Description| DataNode internal service port | +|Type| int | +|Default| 10730 | +|Effective| Only allowed to be modified in first start up | + +* dn\_mpp\_data\_exchange\_port + +|Name| mpp\_data\_exchange\_port | +|:---:|:---| +|Description| MPP data exchange port | +|Type| int | +|Default| 10740 | +|Effective|Only allowed to be modified in first start up| + +* dn\_schema\_region\_consensus\_port + +|Name| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Schema replica communication port for consensus | +|Type| int | +|Default| 10750 | +|Effective|Only allowed to be modified in first start up| + +* dn\_data\_region\_consensus\_port + +|Name| dn\_data\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Data replica communication port for consensus | +|Type| int | +|Default| 10760 | +|Effective|Only allowed to be modified in first start up| + +* dn\_join\_cluster\_retry\_interval\_ms + +|Name| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:--------------------------------------------------------------------------| +|Description| The time of data node waiting for the next retry to join into the cluster | +|Type| long | +|Default| 5000 | +|Effective| After restarting system | + +### SSL Configuration + +* enable\_thrift\_ssl + +|Name| enable\_thrift\_ssl | +|:---:|:---------------------------| +|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* enable\_https + +|Name| enable\_https | +|:---:|:-------------------------| +|Description| REST Service Specifies whether to enable SSL configuration | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* key\_store\_path + +|Name| key\_store\_path | +|:---:|:-----------------| +|Description| SSL certificate path | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* key\_store\_pwd + +|Name| key\_store\_pwd | +|:---:|:----------------| +|Description| SSL certificate password | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +### SeedConfigNode + +* dn\_seed\_config\_node + +|Name| dn\_seed\_config\_node | +|:---:|:------------------------------------------------| +|Description| ConfigNode Address for DataNode to join cluster. This parameter is corresponding to dn\_target\_config\_node\_list before V1.2.2 | +|Type| String | +|Default| 127.0.0.1:10710 | +|Effective| Only allowed to be modified in first start up | + +### Connection Configuration + +* dn\_rpc\_thrift\_compression\_enable + +|Name| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's compression (using GZIP).| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_advanced\_compression\_enable + +|Name| dn\_rpc\_advanced\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's advanced compression.| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_selector\_thread\_count + +|Name| dn\_rpc\_selector\_thread\_count | +|:---:|:-----------------------------------| +|Description| The number of rpc selector thread. | +|Type| int | +|Default| false | +|Effective| After restarting system | + +* dn\_rpc\_min\_concurrent\_client\_num + +|Name| dn\_rpc\_min\_concurrent\_client\_num | +|:---:|:-----------------------------------| +|Description| Minimum concurrent rpc connections | +|Type| Short Int : [0,65535] | +|Description| 1 | +|Effective| After restarting system | + +* dn\_rpc\_max\_concurrent\_client\_num + +|Name| dn\_rpc\_max\_concurrent\_client\_num | +|:---:|:---| +|Description| Max concurrent rpc connections| +|Type| Short Int : [0,65535] | +|Description| 65535 | +|Effective|After restarting system| + +* dn\_thrift\_max\_frame\_size + +|Name| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|Description| Max size of bytes of each thrift RPC request/response| +|Type| Long | +|Unit|Byte| +|Default| 536870912 | +|Effective|After restarting system| + +* dn\_thrift\_init\_buffer\_size + +|Name| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|Description| Initial size of bytes of buffer that thrift used | +|Type| long | +|Default| 1024 | +|Effective|After restarting system| + +* dn\_connection\_timeout\_ms + +| Name | dn\_connection\_timeout\_ms | +|:-----------:|:---------------------------------------------------| +| Description | Thrift socket and connection timeout between nodes | +| Type | int | +| Default | 60000 | +| Effective | After restarting system | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------------:|:--------------------------------------------------------------| +| Description | Number of core clients routed to each node in a ClientManager | +| Type | int | +| Default | 200 | +| Effective | After restarting system | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:--------------:|:-------------------------------------------------------------| +| Description | Number of max clients routed to each node in a ClientManager | +| Type | int | +| Default | 300 | +| Effective | After restarting system | + +### Dictionary Configuration + +* dn\_system\_dir + +| Name | dn\_system\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The directories of system files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/system (Windows: data\\datanode\\system) | +| Effective | After restarting system | + +* dn\_data\_dirs + +| Name | dn\_data\_dirs | +|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | +| Type | String[] | +| Default | data/datanode/data (Windows: data\\datanode\\data) | +| Effective | After restarting system | + +* dn\_multi\_dir\_strategy + +| Name | dn\_multi\_dir\_strategy | +|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | +| Type | String | +| Default | SequenceStrategy | +| Effective | hot-load | + +* dn\_consensus\_dir + +| Name | dn\_consensus\_dir | +|:-----------:|:-------------------------------------------------------------------------------| +| Description | The directories of consensus files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/consensus | +| Effective | After restarting system | + +* dn\_wal\_dirs + +| Name | dn\_wal\_dirs | +|:-----------:|:-------------------------------------------------------------------------| +| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/wal | +| Effective | After restarting system | + +* dn\_tracing\_dir + +| Name | dn\_tracing\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The tracing root directory path. It is recommended to use an absolute path. | +| Type | String | +| Default | datanode/tracing | +| Effective | After restarting system | + +* dn\_sync\_dir + +| Name | dn\_sync\_dir | +|:-----------:|:--------------------------------------------------------------------------| +| Description | The directories of sync files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/sync | +| Effective | After restarting system | + +### Metric Configuration + +## Enable GC log + +GC log is off by default. +For performance tuning, you may want to collect the GC info. + +To enable GC log, just add a parameter "printgc" when you start the DataNode. + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` +Or +```cmd +sbin\start-datanode.bat printgc +``` + +GC log is stored at `IOTDB_HOME/logs/gc.log`. +There will be at most 10 gc.log.* files and each one can reach to 10MB. + +### REST Service Configuration + +* enable\_rest\_service + +|Name| enable\_rest\_service | +|:---:|:--------------------------------------| +|Description| Whether to enable the Rest service | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_service\_port + +|Name| rest\_service\_port | +|:---:|:------------------| +|Description| The Rest service listens to the port number | +|Type| int32 | +|Default| 18080 | +|Effective| After restarting system | + +* enable\_swagger + +|Name| enable\_swagger | +|:---:|:-----------------------| +|Description| Whether to enable swagger to display rest interface information | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_query\_default\_row\_size\_limit + +|Name| rest\_query\_default\_row\_size\_limit | +|:---:|:------------------------------------------------------------------------------------------| +|Description| The maximum number of rows in a result set that can be returned by a query | +|Type| int32 | +|Default| 10000 | +|Effective| After restarting system | + +* cache\_expire + +|Name| cache\_expire | +|:---:|:--------------------------------------------------------| +|Description| Expiration time for caching customer login information | +|Type| int32 | +|Default| 28800 | +|Effective| After restarting system | + +* cache\_max\_num + +|Name| cache\_max\_num | +|:---:|:--------------| +|Description| The maximum number of users stored in the cache | +|Type| int32 | +|Default| 100 | +|Effective| After restarting system | + +* cache\_init\_num + +|Name| cache\_init\_num | +|:---:|:---------------| +|Description| Initial cache capacity | +|Type| int32 | +|Default| 10 | +|Effective| After restarting system | + + +* trust\_store\_path + +|Name| trust\_store\_path | +|:---:|:---------------| +|Description| keyStore Password (optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* trust\_store\_pwd + +|Name| trust\_store\_pwd | +|:---:|:---------------------------------| +|Description| trustStore Password (Optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* idle\_timeout + +|Name| idle\_timeout | +|:---:|:--------------| +|Description| SSL timeout duration, expressed in seconds | +|Type| int32 | +|Default| 5000 | +|Effective| After restarting system | + diff --git a/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_timecho.md b/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_timecho.md new file mode 100644 index 000000000..94ede5013 --- /dev/null +++ b/src/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_timecho.md @@ -0,0 +1,584 @@ + + +# DataNode Configuration Parameters + +We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. + +* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. + +* `iotdb-system.properties`:IoTDB system configurations. + +## Hot Modification Configuration + +For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-system.properties` during the system operation and applying them to the system immediately. +In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. + +Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. + +## Environment Configuration File(datanode-env.sh/bat) + +The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. + +The details of each parameter are as follows: + +* MEMORY\_SIZE + +|Name|MEMORY\_SIZE| +|:---:|:---| +|Description|The minimum heap memory size that IoTDB DataNode will use when startup | +|Type|String| +|Default| The default is a half of the memory.| +|Effective|After restarting system| + +* ON\_HEAP\_MEMORY + +|Name|ON\_HEAP\_MEMORY| +|:---:|:---| +|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* OFF\_HEAP\_MEMORY + +|Name|OFF\_HEAP\_MEMORY| +|:---:|:---| +|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* JMX\_LOCAL + +|Name|JMX\_LOCAL| +|:---:|:---| +|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| +|Type|Enum String: "true", "false"| +|Default|true| +|Effective|After restarting system| + +* JMX\_PORT + +|Name|JMX\_PORT| +|:---:|:---| +|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| +|Type|Short Int: [0,65535]| +|Default|31999| +|Effective|After restarting system| + +* JMX\_IP + +|Name|JMX\_IP| +|:---:|:---| +|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| +|Type|String| +|Default|127.0.0.1| +|Effective|After restarting system| + +## JMX Authorization + +We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. + +The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. + +The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. + +## DataNode/Standalone Configuration File (iotdb-system.properties) + +### Data Node RPC Configuration + +* dn\_rpc\_address + +|Name| dn\_rpc\_address | +|:---:|:-----------------------------------------------| +|Description| The client rpc service listens on the address. | +|Type| String | +|Default| 0.0.0.0 | +|Effective| After restarting system | + +* dn\_rpc\_port + +|Name| dn\_rpc\_port | +|:---:|:---| +|Description| The client rpc service listens on the port.| +|Type|Short Int : [0,65535]| +|Default| 6667 | +|Effective|After restarting system| + +* dn\_internal\_address + +|Name| dn\_internal\_address | +|:---:|:---| +|Description| DataNode internal service host/IP | +|Type| string | +|Default| 127.0.0.1 | +|Effective|Only allowed to be modified in first start up| + +* dn\_internal\_port + +|Name| dn\_internal\_port | +|:---:|:-------------------------------| +|Description| DataNode internal service port | +|Type| int | +|Default| 10730 | +|Effective| Only allowed to be modified in first start up | + +* dn\_mpp\_data\_exchange\_port + +|Name| mpp\_data\_exchange\_port | +|:---:|:---| +|Description| MPP data exchange port | +|Type| int | +|Default| 10740 | +|Effective|Only allowed to be modified in first start up| + +* dn\_schema\_region\_consensus\_port + +|Name| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Schema replica communication port for consensus | +|Type| int | +|Default| 10750 | +|Effective|Only allowed to be modified in first start up| + +* dn\_data\_region\_consensus\_port + +|Name| dn\_data\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Data replica communication port for consensus | +|Type| int | +|Default| 10760 | +|Effective|Only allowed to be modified in first start up| + +* dn\_join\_cluster\_retry\_interval\_ms + +|Name| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:--------------------------------------------------------------------------| +|Description| The time of data node waiting for the next retry to join into the cluster | +|Type| long | +|Default| 5000 | +|Effective| After restarting system | + +### SSL Configuration + +* enable\_thrift\_ssl + +|Name| enable\_thrift\_ssl | +|:---:|:---------------------------| +|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* enable\_https + +|Name| enable\_https | +|:---:|:-------------------------| +|Description| REST Service Specifies whether to enable SSL configuration | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* key\_store\_path + +|Name| key\_store\_path | +|:---:|:-----------------| +|Description| SSL certificate path | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* key\_store\_pwd + +|Name| key\_store\_pwd | +|:---:|:----------------| +|Description| SSL certificate password | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +### SeedConfigNode + +* dn\_seed\_config\_node + +|Name| dn\_seed\_config\_node | +|:---:|:------------------------------------------------| +|Description| ConfigNode Address for DataNode to join cluster. This parameter is corresponding to dn\_target\_config\_node\_list before V1.2.2 | +|Type| String | +|Default| 127.0.0.1:10710 | +|Effective| Only allowed to be modified in first start up | + +### Connection Configuration + +* dn\_rpc\_thrift\_compression\_enable + +|Name| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's compression (using GZIP).| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_advanced\_compression\_enable + +|Name| dn\_rpc\_advanced\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's advanced compression.| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_selector\_thread\_count + +|Name| dn\_rpc\_selector\_thread\_count | +|:---:|:-----------------------------------| +|Description| The number of rpc selector thread. | +|Type| int | +|Default| false | +|Effective| After restarting system | + +* dn\_rpc\_min\_concurrent\_client\_num + +|Name| dn\_rpc\_min\_concurrent\_client\_num | +|:---:|:-----------------------------------| +|Description| Minimum concurrent rpc connections | +|Type| Short Int : [0,65535] | +|Description| 1 | +|Effective| After restarting system | + +* dn\_rpc\_max\_concurrent\_client\_num + +|Name| dn\_rpc\_max\_concurrent\_client\_num | +|:---:|:---| +|Description| Max concurrent rpc connections| +|Type| Short Int : [0,65535] | +|Description| 65535 | +|Effective|After restarting system| + +* dn\_thrift\_max\_frame\_size + +|Name| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|Description| Max size of bytes of each thrift RPC request/response| +|Type| Long | +|Unit|Byte| +|Default| 536870912 | +|Effective|After restarting system| + +* dn\_thrift\_init\_buffer\_size + +|Name| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|Description| Initial size of bytes of buffer that thrift used | +|Type| long | +|Default| 1024 | +|Effective|After restarting system| + +* dn\_connection\_timeout\_ms + +| Name | dn\_connection\_timeout\_ms | +|:-----------:|:---------------------------------------------------| +| Description | Thrift socket and connection timeout between nodes | +| Type | int | +| Default | 60000 | +| Effective | After restarting system | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------------:|:--------------------------------------------------------------| +| Description | Number of core clients routed to each node in a ClientManager | +| Type | int | +| Default | 200 | +| Effective | After restarting system | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:--------------:|:-------------------------------------------------------------| +| Description | Number of max clients routed to each node in a ClientManager | +| Type | int | +| Default | 300 | +| Effective | After restarting system | + +### Dictionary Configuration + +* dn\_system\_dir + +| Name | dn\_system\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The directories of system files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/system (Windows: data\\datanode\\system) | +| Effective | After restarting system | + +* dn\_data\_dirs + +| Name | dn\_data\_dirs | +|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | +| Type | String[] | +| Default | data/datanode/data (Windows: data\\datanode\\data) | +| Effective | After restarting system | + +* dn\_multi\_dir\_strategy + +| Name | dn\_multi\_dir\_strategy | +|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | +| Type | String | +| Default | SequenceStrategy | +| Effective | hot-load | + +* dn\_consensus\_dir + +| Name | dn\_consensus\_dir | +|:-----------:|:-------------------------------------------------------------------------------| +| Description | The directories of consensus files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/consensus | +| Effective | After restarting system | + +* dn\_wal\_dirs + +| Name | dn\_wal\_dirs | +|:-----------:|:-------------------------------------------------------------------------| +| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/wal | +| Effective | After restarting system | + +* dn\_tracing\_dir + +| Name | dn\_tracing\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The tracing root directory path. It is recommended to use an absolute path. | +| Type | String | +| Default | datanode/tracing | +| Effective | After restarting system | + +* dn\_sync\_dir + +| Name | dn\_sync\_dir | +|:-----------:|:--------------------------------------------------------------------------| +| Description | The directories of sync files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/sync | +| Effective | After restarting system | + +### Metric Configuration + +## Enable GC log + +GC log is off by default. +For performance tuning, you may want to collect the GC info. + +To enable GC log, just add a parameter "printgc" when you start the DataNode. + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` +Or +```cmd +sbin\start-datanode.bat printgc +``` + +GC log is stored at `IOTDB_HOME/logs/gc.log`. +There will be at most 10 gc.log.* files and each one can reach to 10MB. + +### REST Service Configuration + +* enable\_rest\_service + +|Name| enable\_rest\_service | +|:---:|:--------------------------------------| +|Description| Whether to enable the Rest service | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_service\_port + +|Name| rest\_service\_port | +|:---:|:------------------| +|Description| The Rest service listens to the port number | +|Type| int32 | +|Default| 18080 | +|Effective| After restarting system | + +* enable\_swagger + +|Name| enable\_swagger | +|:---:|:-----------------------| +|Description| Whether to enable swagger to display rest interface information | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_query\_default\_row\_size\_limit + +|Name| rest\_query\_default\_row\_size\_limit | +|:---:|:------------------------------------------------------------------------------------------| +|Description| The maximum number of rows in a result set that can be returned by a query | +|Type| int32 | +|Default| 10000 | +|Effective| After restarting system | + +* cache\_expire + +|Name| cache\_expire | +|:---:|:--------------------------------------------------------| +|Description| Expiration time for caching customer login information | +|Type| int32 | +|Default| 28800 | +|Effective| After restarting system | + +* cache\_max\_num + +|Name| cache\_max\_num | +|:---:|:--------------| +|Description| The maximum number of users stored in the cache | +|Type| int32 | +|Default| 100 | +|Effective| After restarting system | + +* cache\_init\_num + +|Name| cache\_init\_num | +|:---:|:---------------| +|Description| Initial cache capacity | +|Type| int32 | +|Default| 10 | +|Effective| After restarting system | + + +* trust\_store\_path + +|Name| trust\_store\_path | +|:---:|:---------------| +|Description| keyStore Password (optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* trust\_store\_pwd + +|Name| trust\_store\_pwd | +|:---:|:---------------------------------| +|Description| trustStore Password (Optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* idle\_timeout + +|Name| idle\_timeout | +|:---:|:--------------| +|Description| SSL timeout duration, expressed in seconds | +|Type| int32 | +|Default| 5000 | +|Effective| After restarting system | + + +#### Storage engine configuration + + +* dn\_default\_space\_usage\_thresholds + +|Name| dn\_default\_space\_usage\_thresholds | +|:---:|:--------------| +|Description| Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | +|Type| double | +|Default| 0.85 | +|Effective| hot-load | + +* remote\_tsfile\_cache\_dirs + +|Name| remote\_tsfile\_cache\_dirs | +|:---:|:--------------| +|Description| Cache directory stored locally in the cloud | +|Type| string | +|Default| data/datanode/data/cache | +|Effective| After restarting system | + +* remote\_tsfile\_cache\_page\_size\_in\_kb + +|Name| remote\_tsfile\_cache\_page\_size\_in\_kb | +|:---:|:--------------| +|Description| Block size of locally cached files stored in the cloud | +|Type| int | +|Default| 20480 | +|Effective| After restarting system | + +* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb + +|Name| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | +|:---:|:--------------| +|Description| Maximum Disk Occupancy Size for Cloud Storage Local Cache | +|Type| long | +|Default| 51200 | +|Effective| After restarting system | + +* object\_storage\_type + +|Name| object\_storage\_type | +|:---:|:--------------| +|Description| Cloud Storage Type | +|Type| string | +|Default| AWS_S3 | +|Effective| After restarting system | + +* object\_storage\_bucket + +|Name| object\_storage\_bucket | +|:---:|:--------------| +|Description| Name of cloud storage bucket | +|Type| string | +|Default| iotdb_data | +|Effective| After restarting system | + +* object\_storage\_endpoiont + +|Name| object\_storage\_endpoiont | +|:---:|:--------------| +|Description| endpoint of cloud storage | +|Type| string | +|Default| None | +|Effective| After restarting system | + +* object\_storage\_access\_key + +|Name| object\_storage\_access\_key | +|:---:|:--------------| +|Description| Authentication information stored in the cloud: key | +|Type| string | +|Default| None | +|Effective| After restarting system | + +* object\_storage\_access\_secret + +|Name| object\_storage\_access\_secret | +|:---:|:--------------| +|Description| Authentication information stored in the cloud: secret | +|Type| string | +|Default| None | +|Effective| After restarting system | diff --git a/src/UserGuide/latest/Background-knowledge/Cluster-Concept.md b/src/UserGuide/latest/Background-knowledge/Cluster-Concept.md index 6b6bb7c8a..b4631022f 100644 --- a/src/UserGuide/latest/Background-knowledge/Cluster-Concept.md +++ b/src/UserGuide/latest/Background-knowledge/Cluster-Concept.md @@ -1,63 +1,23 @@ +--- +redirectTo: Cluster-Concept_apache.html +--- -# Cluster-related Concepts - -The figure below illustrates a typical IoTDB 3C3D1A cluster deployment mode, comprising 3 ConfigNodes, 3 DataNodes, and 1 AINode: - -![](https://alioss.timecho.com/docs/img/Common-Concepts_02.png) - -This deployment involves several key concepts that users commonly encounter when working with IoTDB clusters, including: - -- **Nodes** (ConfigNode, DataNode, AINode); -- **Slots** (SchemaSlot, DataSlot); -- **Regions** (SchemaRegion, DataRegion); -- **Replica Groups**. - -The following sections will provide a detailed introduction to these concepts. - -## Nodes - -An IoTDB cluster consists of three types of nodes (processes): **ConfigNode** (the main node), **DataNode**, and **AINode**, as detailed below: - -- **ConfigNode:** ConfigNodes store cluster configurations, database metadata, the routing information of time series' schema and data. They also monitor cluster nodes and conduct load balancing. All ConfigNodes maintain full mutual backups, as shown in the figure with ConfigNode-1, ConfigNode-2, and ConfigNode-3. ConfigNodes do not directly handle client read or write requests. Instead, they guide the distribution of time series' schema and data within the cluster using a series of [load balancing algorithms](../Technical-Insider/Cluster-data-partitioning.md). -- **DataNode:** DataNodes are responsible for reading and writing time series' schema and data. Each DataNode can accept client read and write requests and provide corresponding services, as illustrated with DataNode-1, DataNode-2, and DataNode-3 in the above figure. When a DataNode receives client requests, it can process them directly or forward them if it has the relevant routing information cached locally. Otherwise, it queries the ConfigNode for routing details and caches the information to improve the efficiency of subsequent requests. -- **AINode:** AINodes interact with ConfigNodes and DataNodes to extend IoTDB's capabilities for data intelligence analysis on time series data. They support registering pre-trained machine learning models from external sources and performing time series analysis tasks using simple SQL statements on specified data. This process integrates model creation, management, and inference within the database engine. Currently, the system provides built-in algorithms or self-training models for common time series analysis scenarios, such as forecasting and anomaly detection. - -## Slots - -IoTDB divides time series' schema and data into smaller, more manageable units called **slots**. Slots are logical entities, and in an IoTDB cluster, the **SchemaSlots** and **DataSlots** are defined as follows: - -- **SchemaSlot:** A SchemaSlot represents a subset of the time series' schema collection. The total number of SchemaSlots is fixed, with a default value of 1000. IoTDB uses a hashing algorithm to evenly distribute all devices across these SchemaSlots. -- **DataSlot:** A DataSlot represents a subset of the time series' data collection. Based on the SchemaSlots, the data for corresponding devices is further divided into DataSlots by a fixed time interval. The default time interval for a DataSlot is 7 days. - -## Region - -In IoTDB, time series' schema and data are replicated across DataNodes to ensure high availability in the cluster. However, replicating data at the slot level can increase management complexity and reduce write throughput. To address this, IoTDB introduces the concept of **Region**, which groups SchemaSlots and DataSlots into **SchemaRegions** and **DataRegions** respectively. Replication is then performed at the Region level. The definitions of SchemaRegion and DataRegion are as follows: - -- **SchemaRegion**: A SchemaRegion is the basic unit for storing and replicating time series' schema. All SchemaSlots in a database are evenly distributed across the database's SchemaRegions. SchemaRegions with the same RegionID are replicas of each other. For example, in the figure above, SchemaRegion-1 has three replicas located on DataNode-1, DataNode-2, and DataNode-3. -- **DataRegion**: A DataRegion is the basic unit for storing and replicating time series' data. All DataSlots in a database are evenly distributed across the database's DataRegions. DataRegions with the same RegionID are replicas of each other. For instance, in the figure above, DataRegion-2 has two replicas located on DataNode-1 and DataNode-2. - -## Replica Groups - -Region replicas are critical for the fault tolerance of the cluster. Each Region's replicas are organized into **replica groups**, where the replicas are assigned roles as either **leader** or **follower**, working together to provide read and write services. Recommended replica group configurations under different architectures are as follows: - -| Category | Parameter | Single-node Recommended Configuration | Distributed Recommended Configuration | -| :------: | :-------------------------: | :-----------------------------------: | :-----------------------------------: | -| Schema | `schema_replication_factor` | 1 | 3 | -| Data | `data_replication_factor` | 1 | 2 | + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> \ No newline at end of file diff --git a/src/UserGuide/latest/Background-knowledge/Cluster-Concept_apache.md b/src/UserGuide/latest/Background-knowledge/Cluster-Concept_apache.md new file mode 100644 index 000000000..1edc7c292 --- /dev/null +++ b/src/UserGuide/latest/Background-knowledge/Cluster-Concept_apache.md @@ -0,0 +1,105 @@ + + +# Common Concepts + +## Sql_dialect Related Concepts + +| Concept | Meaning | +| ----------------------- | ------------------------------------------------------------ | +| sql_dialect | IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points. Tree: Manages data in a hierarchical path manner, where one path corresponds to one measurement point of a device. Table: Manages data in a relational table manner, where one table corresponds to a category of devices. | +| Schema | Schema is the data model information of the database, i.e., tree structure or table structure. It includes definitions such as the names and data types of measurement points. | +| Device | Corresponds to a physical device in an actual scenario, usually containing multiple measurement points. | +| Timeseries | Also known as: physical quantity, time series, timeline, point location, semaphore, indicator, measurement value, etc. It is a time series formed by arranging multiple data points in ascending order of timestamps. Usually, a Timeseries represents a collection point that can periodically collect physical quantities of the environment it is in. | +| Encoding | Encoding is a compression technique that represents data in binary form to improve storage efficiency. IoTDB supports various encoding methods for different types of data. For more detailed information, please refer to:[Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | +| Compression | After data encoding, IoTDB uses compression technology to further compress binary data to enhance storage efficiency. IoTDB supports multiple compression methods. For more detailed information, please refer to: [Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | + +## Distributed Related Concepts + +The following figure shows a common IoTDB 3C3D (3 ConfigNodes, 3 DataNodes) cluster deployment pattern: + + + +IoTDB's cluster includes the following common concepts: + +- Nodes(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- Replica Groups + +The above concepts will be introduced in the following text. + +### Nodes + +IoTDB cluster includes three types of nodes (processes): ConfigNode (management node), DataNode (data node), and AINode (analysis node), as shown below: + +- ConfigNode: Manages cluster node information, configuration information, user permissions, metadata, partition information, etc., and is responsible for the scheduling of distributed operations and load balancing. All ConfigNodes are fully backed up with each other, as shown in ConfigNode-1, ConfigNode-2, and ConfigNode-3 in the figure above. +- DataNode: Serves client requests and is responsible for data storage and computation, as shown in DataNode-1, DataNode-2, and DataNode-3 in the figure above. +- AINode: Provides machine learning capabilities, supports the registration of trained machine learning models, and allows model inference through SQL calls. It has already built-in self-developed time-series large models and common machine learning algorithms (such as prediction and anomaly detection). + +### Data Partitioning + +In IoTDB, both metadata and data are divided into small partitions, namely Regions, which are managed by various DataNodes in the cluster. + +- SchemaRegion: Metadata partition, managing the metadata of a part of devices and measurement points. SchemaRegions with the same RegionID on different DataNodes are mutual replicas, as shown in SchemaRegion-1 in the figure above, which has three replicas located on DataNode-1, DataNode-2, and DataNode-3. +- DataRegion: Data partition, managing the data of a part of devices for a certain period of time. DataRegions with the same RegionID on different DataNodes are mutual replicas, as shown in DataRegion-2 in the figure above, which has two replicas located on DataNode-1 and DataNode-2. +- For specific partitioning algorithms, please refer to: [Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) + +### Replica Groups + +The number of replicas for data and metadata can be configured. The recommended configurations for different deployment modes are as follows, where multi-replication can provide high-availability services. + +| Category | Parameter | Stand-Alone Recommended Configuration | Cluster Recommended Configuration | +| :----- | :------------------------ | :----------- | :----------- | +| Schema | schema_replication_factor | 1 | 3 | +| Data | data_replication_factor | 1 | 2 | + +## Deployment Related Concepts + +IoTDB has two operating modes: Stand-Alone mode and Cluster mode. + +### Stand-Alone Mode + +An IoTDB Stand-Alone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D; + + +- **Features**:Easy for developers to install and deploy, with low deployment and maintenance costs and convenient operations. +- **Applicable Scenarios**:Scenarios with limited resources or low requirements for high availability, such as edge-side servers. +- **Deployment Method**:[Stand-Alone-Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) + +### Cluster Mode + +An IoTDB cluster instance consists of 3 ConfigNodes and no less than 3 DataNodes, usually 3 DataNodes, i.e., 3C3D; when some nodes fail, the remaining nodes can still provide services, ensuring the high availability of the database service, and the database performance can be improved with the addition of nodes. + +- **Features**:High availability and scalability, and the system performance can be improved by adding DataNodes. +- **Applicable Scenarios**:Enterprise-level application scenarios requiring high availability and reliability. +- **Deployment Method**:[Cluster-Deployment](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) + +### Summary of Features + +| Dimension | Stand-Alone Mode | Cluster Mode | +| ------------ | ---------------------------- | ------------------------ | +| Applicable Scenarios | Edge-side deployment, scenarios with low requirements for high availability | High-availability business, disaster recovery scenarios, etc. | +| Number of Machines Required | 1 | ≥3 | +| Security and Reliability | Cannot tolerate single-point failures | High, can tolerate single-point failures | +| Scalability | Can expand DataNodes to improve performance | Can expand DataNodes to improve performance | +| Performance | Can be expanded with the number of DataNodes | Can be expanded with the number of DataNodes | + +- The deployment steps for single-machine mode and cluster mode are similar (adding ConfigNodes and DataNodes one by one), with only the number of replicas and the minimum number of nodes that can provide services being different. \ No newline at end of file diff --git a/src/UserGuide/latest/Background-knowledge/Cluster-Concept_timecho.md b/src/UserGuide/latest/Background-knowledge/Cluster-Concept_timecho.md new file mode 100644 index 000000000..af669a6d6 --- /dev/null +++ b/src/UserGuide/latest/Background-knowledge/Cluster-Concept_timecho.md @@ -0,0 +1,118 @@ + + +# Common Concepts + +## Sql_dialect Related Concepts + +| Concept | Meaning | +| ----------------------- | ------------------------------------------------------------ | +| sql_dialect | IoTDB supports two time-series data models (SQL dialects), both managing devices and measurement points. Tree: Manages data in a hierarchical path manner, where one path corresponds to one measurement point of a device. Table: Manages data in a relational table manner, where one table corresponds to a category of devices. | +| Schema | Schema is the data model information of the database, i.e., tree structure or table structure. It includes definitions such as the names and data types of measurement points. | +| Device | Corresponds to a physical device in an actual scenario, usually containing multiple measurement points. | +| Timeseries | Also known as: physical quantity, time series, timeline, point location, semaphore, indicator, measurement value, etc. It is a time series formed by arranging multiple data points in ascending order of timestamps. Usually, a Timeseries represents a collection point that can periodically collect physical quantities of the environment it is in. | +| Encoding | Encoding is a compression technique that represents data in binary form to improve storage efficiency. IoTDB supports various encoding methods for different types of data. For more detailed information, please refer to:[Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | +| Compression | After data encoding, IoTDB uses compression technology to further compress binary data to enhance storage efficiency. IoTDB supports multiple compression methods. For more detailed information, please refer to: [Encoding-and-Compression](../Technical-Insider/Encoding-and-Compression.md) | + +## Distributed Related Concepts + +The following figure shows a common IoTDB 3C3D (3 ConfigNodes, 3 DataNodes) cluster deployment pattern: + + + +IoTDB's cluster includes the following common concepts: + +- Nodes(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- Replica Groups + +The above concepts will be introduced in the following text. + + +### Nodes + +IoTDB cluster includes three types of nodes (processes): ConfigNode (management node), DataNode (data node), and AINode (analysis node), as shown below: + +- ConfigNode: Manages cluster node information, configuration information, user permissions, metadata, partition information, etc., and is responsible for the scheduling of distributed operations and load balancing. All ConfigNodes are fully backed up with each other, as shown in ConfigNode-1, ConfigNode-2, and ConfigNode-3 in the figure above. +- DataNode: Serves client requests and is responsible for data storage and computation, as shown in DataNode-1, DataNode-2, and DataNode-3 in the figure above. +- AINode: Provides machine learning capabilities, supports the registration of trained machine learning models, and allows model inference through SQL calls. It has already built-in self-developed time-series large models and common machine learning algorithms (such as prediction and anomaly detection). + +### Data Partitioning + +In IoTDB, both metadata and data are divided into small partitions, namely Regions, which are managed by various DataNodes in the cluster. + +- SchemaRegion: Metadata partition, managing the metadata of a part of devices and measurement points. SchemaRegions with the same RegionID on different DataNodes are mutual replicas, as shown in SchemaRegion-1 in the figure above, which has three replicas located on DataNode-1, DataNode-2, and DataNode-3. +- DataRegion: Data partition, managing the data of a part of devices for a certain period of time. DataRegions with the same RegionID on different DataNodes are mutual replicas, as shown in DataRegion-2 in the figure above, which has two replicas located on DataNode-1 and DataNode-2. +- For specific partitioning algorithms, please refer to: [Data Partitioning](../Technical-Insider/Cluster-data-partitioning.md) + +### Replica Groups + +The number of replicas for data and metadata can be configured. The recommended configurations for different deployment modes are as follows, where multi-replication can provide high-availability services. + +| Category | Parameter | Stand-Alone Recommended Configuration | Cluster Recommended Configuration | +| :----- | :------------------------ | :----------- | :----------- | +| Schema | schema_replication_factor | 1 | 3 | +| Data | data_replication_factor | 1 | 2 | + + +## Deployment Related Concepts + +IoTDB has three operating modes: Stand-Alone mode, Cluster mode, and Dual-Active mode. + +### Stand-Alone Mode + +An IoTDB Stand-Alone instance includes 1 ConfigNode and 1 DataNode, i.e., 1C1D; + + +- **Features**:Easy for developers to install and deploy, with low deployment and maintenance costs and convenient operations. +- **Applicable Scenarios**:Scenarios with limited resources or low requirements for high availability, such as edge-side servers. +- **Deployment Method**:[Stand-Alone-Deployment](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) + +### Dual-Active Mode + +Dual-active deployment is a feature of TimechoDB Enterprise Edition, which refers to two independent instances performing bidirectional synchronization and can provide services simultaneously. When one instance is restarted after a shutdown, the other instance will resume transmission of the missing data. + + +> An IoTDB dual-active instance usually consists of 2 single-machine nodes, i.e., 2 sets of 1C1D. Each instance can also be a cluster. + +- **Features**:The most resource-efficient high-availability solution. +- **Applicable Scenarios**:Scenarios with limited resources (only two servers) but requiring high-availability capabilities. +- **Deployment Method**:[Dual-Active-Deployment](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) + +### Cluster Mode + +An IoTDB cluster instance consists of 3 ConfigNodes and no less than 3 DataNodes, usually 3 DataNodes, i.e., 3C3D; when some nodes fail, the remaining nodes can still provide services, ensuring the high availability of the database service, and the database performance can be improved with the addition of nodes. + +- **Features**:High availability and scalability, and the system performance can be improved by adding DataNodes. +- **Applicable Scenarios**:Enterprise-level application scenarios requiring high availability and reliability. +- **Deployment Method**:[Cluster-Deployment](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md) + +### Summary of Features + +| Dimension | Stand-Alone Mode | Dual-Active Mode | Cluster Mode | +| ------------ | ---------------------------- | ------------------------ | ------------------------ | +| Applicable Scenarios | Edge-side deployment, scenarios with low requirements for high availability | High-availability business, disaster recovery scenarios, etc. | High-availability business, disaster recovery scenarios, etc. | +| Number of Machines Required | 1 | 2 | ≥3 | +| Security and Reliability | Cannot tolerate single-point failures | High, can tolerate single-point failures | High, can tolerate single-point failures | +| Scalability | Can expand DataNodes to improve performance | Each instance can be expanded as needed | Can expand DataNodes to improve performance | +| Performance | Can be expanded with the number of DataNodes | Same as the performance of one of the instances | Can be expanded with the number of DataNodes | + +- The deployment steps for single-machine mode and cluster mode are similar (adding ConfigNodes and DataNodes one by one), with only the number of replicas and the minimum number of nodes that can provide services being different. \ No newline at end of file diff --git a/src/UserGuide/latest/Reference/DataNode-Config-Manual.md b/src/UserGuide/latest/Reference/DataNode-Config-Manual.md index 94ede5013..172882761 100644 --- a/src/UserGuide/latest/Reference/DataNode-Config-Manual.md +++ b/src/UserGuide/latest/Reference/DataNode-Config-Manual.md @@ -1,3 +1,6 @@ +--- +redirectTo: DataNode-Config-Manual_apache.html +--- - -# DataNode Configuration Parameters - -We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. - -* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. - -* `iotdb-system.properties`:IoTDB system configurations. - -## Hot Modification Configuration - -For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-system.properties` during the system operation and applying them to the system immediately. -In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. - -Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. - -## Environment Configuration File(datanode-env.sh/bat) - -The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. - -The details of each parameter are as follows: - -* MEMORY\_SIZE - -|Name|MEMORY\_SIZE| -|:---:|:---| -|Description|The minimum heap memory size that IoTDB DataNode will use when startup | -|Type|String| -|Default| The default is a half of the memory.| -|Effective|After restarting system| - -* ON\_HEAP\_MEMORY - -|Name|ON\_HEAP\_MEMORY| -|:---:|:---| -|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | -|Type|String| -|Default| Calculate based on MEMORY\_SIZE.| -|Effective|After restarting system| - -* OFF\_HEAP\_MEMORY - -|Name|OFF\_HEAP\_MEMORY| -|:---:|:---| -|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| -|Type|String| -|Default| Calculate based on MEMORY\_SIZE.| -|Effective|After restarting system| - -* JMX\_LOCAL - -|Name|JMX\_LOCAL| -|:---:|:---| -|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| -|Type|Enum String: "true", "false"| -|Default|true| -|Effective|After restarting system| - -* JMX\_PORT - -|Name|JMX\_PORT| -|:---:|:---| -|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| -|Type|Short Int: [0,65535]| -|Default|31999| -|Effective|After restarting system| - -* JMX\_IP - -|Name|JMX\_IP| -|:---:|:---| -|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| -|Type|String| -|Default|127.0.0.1| -|Effective|After restarting system| - -## JMX Authorization - -We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. - -The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. - -The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. - -## DataNode/Standalone Configuration File (iotdb-system.properties) - -### Data Node RPC Configuration - -* dn\_rpc\_address - -|Name| dn\_rpc\_address | -|:---:|:-----------------------------------------------| -|Description| The client rpc service listens on the address. | -|Type| String | -|Default| 0.0.0.0 | -|Effective| After restarting system | - -* dn\_rpc\_port - -|Name| dn\_rpc\_port | -|:---:|:---| -|Description| The client rpc service listens on the port.| -|Type|Short Int : [0,65535]| -|Default| 6667 | -|Effective|After restarting system| - -* dn\_internal\_address - -|Name| dn\_internal\_address | -|:---:|:---| -|Description| DataNode internal service host/IP | -|Type| string | -|Default| 127.0.0.1 | -|Effective|Only allowed to be modified in first start up| - -* dn\_internal\_port - -|Name| dn\_internal\_port | -|:---:|:-------------------------------| -|Description| DataNode internal service port | -|Type| int | -|Default| 10730 | -|Effective| Only allowed to be modified in first start up | - -* dn\_mpp\_data\_exchange\_port - -|Name| mpp\_data\_exchange\_port | -|:---:|:---| -|Description| MPP data exchange port | -|Type| int | -|Default| 10740 | -|Effective|Only allowed to be modified in first start up| - -* dn\_schema\_region\_consensus\_port - -|Name| dn\_schema\_region\_consensus\_port | -|:---:|:---| -|Description| DataNode Schema replica communication port for consensus | -|Type| int | -|Default| 10750 | -|Effective|Only allowed to be modified in first start up| - -* dn\_data\_region\_consensus\_port - -|Name| dn\_data\_region\_consensus\_port | -|:---:|:---| -|Description| DataNode Data replica communication port for consensus | -|Type| int | -|Default| 10760 | -|Effective|Only allowed to be modified in first start up| - -* dn\_join\_cluster\_retry\_interval\_ms - -|Name| dn\_join\_cluster\_retry\_interval\_ms | -|:---:|:--------------------------------------------------------------------------| -|Description| The time of data node waiting for the next retry to join into the cluster | -|Type| long | -|Default| 5000 | -|Effective| After restarting system | - -### SSL Configuration - -* enable\_thrift\_ssl - -|Name| enable\_thrift\_ssl | -|:---:|:---------------------------| -|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* enable\_https - -|Name| enable\_https | -|:---:|:-------------------------| -|Description| REST Service Specifies whether to enable SSL configuration | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* key\_store\_path - -|Name| key\_store\_path | -|:---:|:-----------------| -|Description| SSL certificate path | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* key\_store\_pwd - -|Name| key\_store\_pwd | -|:---:|:----------------| -|Description| SSL certificate password | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -### SeedConfigNode - -* dn\_seed\_config\_node - -|Name| dn\_seed\_config\_node | -|:---:|:------------------------------------------------| -|Description| ConfigNode Address for DataNode to join cluster. This parameter is corresponding to dn\_target\_config\_node\_list before V1.2.2 | -|Type| String | -|Default| 127.0.0.1:10710 | -|Effective| Only allowed to be modified in first start up | - -### Connection Configuration - -* dn\_rpc\_thrift\_compression\_enable - -|Name| dn\_rpc\_thrift\_compression\_enable | -|:---:|:---| -|Description| Whether enable thrift's compression (using GZIP).| -|Type|Boolean| -|Default| false | -|Effective|After restarting system| - -* dn\_rpc\_advanced\_compression\_enable - -|Name| dn\_rpc\_advanced\_compression\_enable | -|:---:|:---| -|Description| Whether enable thrift's advanced compression.| -|Type|Boolean| -|Default| false | -|Effective|After restarting system| - -* dn\_rpc\_selector\_thread\_count - -|Name| dn\_rpc\_selector\_thread\_count | -|:---:|:-----------------------------------| -|Description| The number of rpc selector thread. | -|Type| int | -|Default| false | -|Effective| After restarting system | - -* dn\_rpc\_min\_concurrent\_client\_num - -|Name| dn\_rpc\_min\_concurrent\_client\_num | -|:---:|:-----------------------------------| -|Description| Minimum concurrent rpc connections | -|Type| Short Int : [0,65535] | -|Description| 1 | -|Effective| After restarting system | - -* dn\_rpc\_max\_concurrent\_client\_num - -|Name| dn\_rpc\_max\_concurrent\_client\_num | -|:---:|:---| -|Description| Max concurrent rpc connections| -|Type| Short Int : [0,65535] | -|Description| 65535 | -|Effective|After restarting system| - -* dn\_thrift\_max\_frame\_size - -|Name| dn\_thrift\_max\_frame\_size | -|:---:|:---| -|Description| Max size of bytes of each thrift RPC request/response| -|Type| Long | -|Unit|Byte| -|Default| 536870912 | -|Effective|After restarting system| - -* dn\_thrift\_init\_buffer\_size - -|Name| dn\_thrift\_init\_buffer\_size | -|:---:|:---| -|Description| Initial size of bytes of buffer that thrift used | -|Type| long | -|Default| 1024 | -|Effective|After restarting system| - -* dn\_connection\_timeout\_ms - -| Name | dn\_connection\_timeout\_ms | -|:-----------:|:---------------------------------------------------| -| Description | Thrift socket and connection timeout between nodes | -| Type | int | -| Default | 60000 | -| Effective | After restarting system | - -* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager - -| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------------:|:--------------------------------------------------------------| -| Description | Number of core clients routed to each node in a ClientManager | -| Type | int | -| Default | 200 | -| Effective | After restarting system | - -* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager - -| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | -|:--------------:|:-------------------------------------------------------------| -| Description | Number of max clients routed to each node in a ClientManager | -| Type | int | -| Default | 300 | -| Effective | After restarting system | - -### Dictionary Configuration - -* dn\_system\_dir - -| Name | dn\_system\_dir | -|:-----------:|:----------------------------------------------------------------------------| -| Description | The directories of system files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/system (Windows: data\\datanode\\system) | -| Effective | After restarting system | - -* dn\_data\_dirs - -| Name | dn\_data\_dirs | -|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | -| Type | String[] | -| Default | data/datanode/data (Windows: data\\datanode\\data) | -| Effective | After restarting system | - -* dn\_multi\_dir\_strategy - -| Name | dn\_multi\_dir\_strategy | -|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | -| Type | String | -| Default | SequenceStrategy | -| Effective | hot-load | - -* dn\_consensus\_dir - -| Name | dn\_consensus\_dir | -|:-----------:|:-------------------------------------------------------------------------------| -| Description | The directories of consensus files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/consensus | -| Effective | After restarting system | - -* dn\_wal\_dirs - -| Name | dn\_wal\_dirs | -|:-----------:|:-------------------------------------------------------------------------| -| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/wal | -| Effective | After restarting system | - -* dn\_tracing\_dir - -| Name | dn\_tracing\_dir | -|:-----------:|:----------------------------------------------------------------------------| -| Description | The tracing root directory path. It is recommended to use an absolute path. | -| Type | String | -| Default | datanode/tracing | -| Effective | After restarting system | - -* dn\_sync\_dir - -| Name | dn\_sync\_dir | -|:-----------:|:--------------------------------------------------------------------------| -| Description | The directories of sync files. It is recommended to use an absolute path. | -| Type | String | -| Default | data/datanode/sync | -| Effective | After restarting system | - -### Metric Configuration - -## Enable GC log - -GC log is off by default. -For performance tuning, you may want to collect the GC info. - -To enable GC log, just add a parameter "printgc" when you start the DataNode. - -```bash -nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & -``` -Or -```cmd -sbin\start-datanode.bat printgc -``` - -GC log is stored at `IOTDB_HOME/logs/gc.log`. -There will be at most 10 gc.log.* files and each one can reach to 10MB. - -### REST Service Configuration - -* enable\_rest\_service - -|Name| enable\_rest\_service | -|:---:|:--------------------------------------| -|Description| Whether to enable the Rest service | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* rest\_service\_port - -|Name| rest\_service\_port | -|:---:|:------------------| -|Description| The Rest service listens to the port number | -|Type| int32 | -|Default| 18080 | -|Effective| After restarting system | - -* enable\_swagger - -|Name| enable\_swagger | -|:---:|:-----------------------| -|Description| Whether to enable swagger to display rest interface information | -|Type| Boolean | -|Default| false | -|Effective| After restarting system | - -* rest\_query\_default\_row\_size\_limit - -|Name| rest\_query\_default\_row\_size\_limit | -|:---:|:------------------------------------------------------------------------------------------| -|Description| The maximum number of rows in a result set that can be returned by a query | -|Type| int32 | -|Default| 10000 | -|Effective| After restarting system | - -* cache\_expire - -|Name| cache\_expire | -|:---:|:--------------------------------------------------------| -|Description| Expiration time for caching customer login information | -|Type| int32 | -|Default| 28800 | -|Effective| After restarting system | - -* cache\_max\_num - -|Name| cache\_max\_num | -|:---:|:--------------| -|Description| The maximum number of users stored in the cache | -|Type| int32 | -|Default| 100 | -|Effective| After restarting system | - -* cache\_init\_num - -|Name| cache\_init\_num | -|:---:|:---------------| -|Description| Initial cache capacity | -|Type| int32 | -|Default| 10 | -|Effective| After restarting system | - - -* trust\_store\_path - -|Name| trust\_store\_path | -|:---:|:---------------| -|Description| keyStore Password (optional) | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* trust\_store\_pwd - -|Name| trust\_store\_pwd | -|:---:|:---------------------------------| -|Description| trustStore Password (Optional) | -|Type| String | -|Default| "" | -|Effective| After restarting system | - -* idle\_timeout - -|Name| idle\_timeout | -|:---:|:--------------| -|Description| SSL timeout duration, expressed in seconds | -|Type| int32 | -|Default| 5000 | -|Effective| After restarting system | - - -#### Storage engine configuration - - -* dn\_default\_space\_usage\_thresholds - -|Name| dn\_default\_space\_usage\_thresholds | -|:---:|:--------------| -|Description| Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | -|Type| double | -|Default| 0.85 | -|Effective| hot-load | - -* remote\_tsfile\_cache\_dirs - -|Name| remote\_tsfile\_cache\_dirs | -|:---:|:--------------| -|Description| Cache directory stored locally in the cloud | -|Type| string | -|Default| data/datanode/data/cache | -|Effective| After restarting system | - -* remote\_tsfile\_cache\_page\_size\_in\_kb - -|Name| remote\_tsfile\_cache\_page\_size\_in\_kb | -|:---:|:--------------| -|Description| Block size of locally cached files stored in the cloud | -|Type| int | -|Default| 20480 | -|Effective| After restarting system | - -* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb - -|Name| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | -|:---:|:--------------| -|Description| Maximum Disk Occupancy Size for Cloud Storage Local Cache | -|Type| long | -|Default| 51200 | -|Effective| After restarting system | - -* object\_storage\_type - -|Name| object\_storage\_type | -|:---:|:--------------| -|Description| Cloud Storage Type | -|Type| string | -|Default| AWS_S3 | -|Effective| After restarting system | - -* object\_storage\_bucket - -|Name| object\_storage\_bucket | -|:---:|:--------------| -|Description| Name of cloud storage bucket | -|Type| string | -|Default| iotdb_data | -|Effective| After restarting system | - -* object\_storage\_endpoiont - -|Name| object\_storage\_endpoiont | -|:---:|:--------------| -|Description| endpoint of cloud storage | -|Type| string | -|Default| None | -|Effective| After restarting system | - -* object\_storage\_access\_key - -|Name| object\_storage\_access\_key | -|:---:|:--------------| -|Description| Authentication information stored in the cloud: key | -|Type| string | -|Default| None | -|Effective| After restarting system | - -* object\_storage\_access\_secret - -|Name| object\_storage\_access\_secret | -|:---:|:--------------| -|Description| Authentication information stored in the cloud: secret | -|Type| string | -|Default| None | -|Effective| After restarting system | diff --git a/src/UserGuide/latest/Reference/DataNode-Config-Manual_apache.md b/src/UserGuide/latest/Reference/DataNode-Config-Manual_apache.md new file mode 100644 index 000000000..b568ab7ad --- /dev/null +++ b/src/UserGuide/latest/Reference/DataNode-Config-Manual_apache.md @@ -0,0 +1,500 @@ + + +# DataNode Configuration Parameters + +We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. + +* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. + +* `iotdb-system.properties`:IoTDB system configurations. + +## Hot Modification Configuration + +For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-system.properties` during the system operation and applying them to the system immediately. +In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. + +Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. + +## Environment Configuration File(datanode-env.sh/bat) + +The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. + +The details of each parameter are as follows: + +* MEMORY\_SIZE + +|Name|MEMORY\_SIZE| +|:---:|:---| +|Description|The minimum heap memory size that IoTDB DataNode will use when startup | +|Type|String| +|Default| The default is a half of the memory.| +|Effective|After restarting system| + +* ON\_HEAP\_MEMORY + +|Name|ON\_HEAP\_MEMORY| +|:---:|:---| +|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* OFF\_HEAP\_MEMORY + +|Name|OFF\_HEAP\_MEMORY| +|:---:|:---| +|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* JMX\_LOCAL + +|Name|JMX\_LOCAL| +|:---:|:---| +|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| +|Type|Enum String: "true", "false"| +|Default|true| +|Effective|After restarting system| + +* JMX\_PORT + +|Name|JMX\_PORT| +|:---:|:---| +|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| +|Type|Short Int: [0,65535]| +|Default|31999| +|Effective|After restarting system| + +* JMX\_IP + +|Name|JMX\_IP| +|:---:|:---| +|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| +|Type|String| +|Default|127.0.0.1| +|Effective|After restarting system| + +## JMX Authorization + +We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. + +The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. + +The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. + +## DataNode/Standalone Configuration File (iotdb-system.properties) + +### Data Node RPC Configuration + +* dn\_rpc\_address + +|Name| dn\_rpc\_address | +|:---:|:-----------------------------------------------| +|Description| The client rpc service listens on the address. | +|Type| String | +|Default| 0.0.0.0 | +|Effective| After restarting system | + +* dn\_rpc\_port + +|Name| dn\_rpc\_port | +|:---:|:---| +|Description| The client rpc service listens on the port.| +|Type|Short Int : [0,65535]| +|Default| 6667 | +|Effective|After restarting system| + +* dn\_internal\_address + +|Name| dn\_internal\_address | +|:---:|:---| +|Description| DataNode internal service host/IP | +|Type| string | +|Default| 127.0.0.1 | +|Effective|Only allowed to be modified in first start up| + +* dn\_internal\_port + +|Name| dn\_internal\_port | +|:---:|:-------------------------------| +|Description| DataNode internal service port | +|Type| int | +|Default| 10730 | +|Effective| Only allowed to be modified in first start up | + +* dn\_mpp\_data\_exchange\_port + +|Name| mpp\_data\_exchange\_port | +|:---:|:---| +|Description| MPP data exchange port | +|Type| int | +|Default| 10740 | +|Effective|Only allowed to be modified in first start up| + +* dn\_schema\_region\_consensus\_port + +|Name| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Schema replica communication port for consensus | +|Type| int | +|Default| 10750 | +|Effective|Only allowed to be modified in first start up| + +* dn\_data\_region\_consensus\_port + +|Name| dn\_data\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Data replica communication port for consensus | +|Type| int | +|Default| 10760 | +|Effective|Only allowed to be modified in first start up| + +* dn\_join\_cluster\_retry\_interval\_ms + +|Name| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:--------------------------------------------------------------------------| +|Description| The time of data node waiting for the next retry to join into the cluster | +|Type| long | +|Default| 5000 | +|Effective| After restarting system | + +### SSL Configuration + +* enable\_thrift\_ssl + +|Name| enable\_thrift\_ssl | +|:---:|:---------------------------| +|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* enable\_https + +|Name| enable\_https | +|:---:|:-------------------------| +|Description| REST Service Specifies whether to enable SSL configuration | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* key\_store\_path + +|Name| key\_store\_path | +|:---:|:-----------------| +|Description| SSL certificate path | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* key\_store\_pwd + +|Name| key\_store\_pwd | +|:---:|:----------------| +|Description| SSL certificate password | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +### SeedConfigNode + +* dn\_seed\_config\_node + +|Name| dn\_seed\_config\_node | +|:---:|:------------------------------------------------| +|Description| ConfigNode Address for DataNode to join cluster. This parameter is corresponding to dn\_target\_config\_node\_list before V1.2.2 | +|Type| String | +|Default| 127.0.0.1:10710 | +|Effective| Only allowed to be modified in first start up | + +### Connection Configuration + +* dn\_rpc\_thrift\_compression\_enable + +|Name| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's compression (using GZIP).| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_advanced\_compression\_enable + +|Name| dn\_rpc\_advanced\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's advanced compression.| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_selector\_thread\_count + +|Name| dn\_rpc\_selector\_thread\_count | +|:---:|:-----------------------------------| +|Description| The number of rpc selector thread. | +|Type| int | +|Default| false | +|Effective| After restarting system | + +* dn\_rpc\_min\_concurrent\_client\_num + +|Name| dn\_rpc\_min\_concurrent\_client\_num | +|:---:|:-----------------------------------| +|Description| Minimum concurrent rpc connections | +|Type| Short Int : [0,65535] | +|Description| 1 | +|Effective| After restarting system | + +* dn\_rpc\_max\_concurrent\_client\_num + +|Name| dn\_rpc\_max\_concurrent\_client\_num | +|:---:|:---| +|Description| Max concurrent rpc connections| +|Type| Short Int : [0,65535] | +|Description| 65535 | +|Effective|After restarting system| + +* dn\_thrift\_max\_frame\_size + +|Name| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|Description| Max size of bytes of each thrift RPC request/response| +|Type| Long | +|Unit|Byte| +|Default| 536870912 | +|Effective|After restarting system| + +* dn\_thrift\_init\_buffer\_size + +|Name| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|Description| Initial size of bytes of buffer that thrift used | +|Type| long | +|Default| 1024 | +|Effective|After restarting system| + +* dn\_connection\_timeout\_ms + +| Name | dn\_connection\_timeout\_ms | +|:-----------:|:---------------------------------------------------| +| Description | Thrift socket and connection timeout between nodes | +| Type | int | +| Default | 60000 | +| Effective | After restarting system | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------------:|:--------------------------------------------------------------| +| Description | Number of core clients routed to each node in a ClientManager | +| Type | int | +| Default | 200 | +| Effective | After restarting system | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:--------------:|:-------------------------------------------------------------| +| Description | Number of max clients routed to each node in a ClientManager | +| Type | int | +| Default | 300 | +| Effective | After restarting system | + +### Dictionary Configuration + +* dn\_system\_dir + +| Name | dn\_system\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The directories of system files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/system (Windows: data\\datanode\\system) | +| Effective | After restarting system | + +* dn\_data\_dirs + +| Name | dn\_data\_dirs | +|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | +| Type | String[] | +| Default | data/datanode/data (Windows: data\\datanode\\data) | +| Effective | After restarting system | + +* dn\_multi\_dir\_strategy + +| Name | dn\_multi\_dir\_strategy | +|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | +| Type | String | +| Default | SequenceStrategy | +| Effective | hot-load | + +* dn\_consensus\_dir + +| Name | dn\_consensus\_dir | +|:-----------:|:-------------------------------------------------------------------------------| +| Description | The directories of consensus files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/consensus | +| Effective | After restarting system | + +* dn\_wal\_dirs + +| Name | dn\_wal\_dirs | +|:-----------:|:-------------------------------------------------------------------------| +| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/wal | +| Effective | After restarting system | + +* dn\_tracing\_dir + +| Name | dn\_tracing\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The tracing root directory path. It is recommended to use an absolute path. | +| Type | String | +| Default | datanode/tracing | +| Effective | After restarting system | + +* dn\_sync\_dir + +| Name | dn\_sync\_dir | +|:-----------:|:--------------------------------------------------------------------------| +| Description | The directories of sync files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/sync | +| Effective | After restarting system | + +### Metric Configuration + +## Enable GC log + +GC log is off by default. +For performance tuning, you may want to collect the GC info. + +To enable GC log, just add a parameter "printgc" when you start the DataNode. + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` +Or +```cmd +sbin\start-datanode.bat printgc +``` + +GC log is stored at `IOTDB_HOME/logs/gc.log`. +There will be at most 10 gc.log.* files and each one can reach to 10MB. + +### REST Service Configuration + +* enable\_rest\_service + +|Name| enable\_rest\_service | +|:---:|:--------------------------------------| +|Description| Whether to enable the Rest service | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_service\_port + +|Name| rest\_service\_port | +|:---:|:------------------| +|Description| The Rest service listens to the port number | +|Type| int32 | +|Default| 18080 | +|Effective| After restarting system | + +* enable\_swagger + +|Name| enable\_swagger | +|:---:|:-----------------------| +|Description| Whether to enable swagger to display rest interface information | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_query\_default\_row\_size\_limit + +|Name| rest\_query\_default\_row\_size\_limit | +|:---:|:------------------------------------------------------------------------------------------| +|Description| The maximum number of rows in a result set that can be returned by a query | +|Type| int32 | +|Default| 10000 | +|Effective| After restarting system | + +* cache\_expire + +|Name| cache\_expire | +|:---:|:--------------------------------------------------------| +|Description| Expiration time for caching customer login information | +|Type| int32 | +|Default| 28800 | +|Effective| After restarting system | + +* cache\_max\_num + +|Name| cache\_max\_num | +|:---:|:--------------| +|Description| The maximum number of users stored in the cache | +|Type| int32 | +|Default| 100 | +|Effective| After restarting system | + +* cache\_init\_num + +|Name| cache\_init\_num | +|:---:|:---------------| +|Description| Initial cache capacity | +|Type| int32 | +|Default| 10 | +|Effective| After restarting system | + + +* trust\_store\_path + +|Name| trust\_store\_path | +|:---:|:---------------| +|Description| keyStore Password (optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* trust\_store\_pwd + +|Name| trust\_store\_pwd | +|:---:|:---------------------------------| +|Description| trustStore Password (Optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* idle\_timeout + +|Name| idle\_timeout | +|:---:|:--------------| +|Description| SSL timeout duration, expressed in seconds | +|Type| int32 | +|Default| 5000 | +|Effective| After restarting system | + diff --git a/src/UserGuide/latest/Reference/DataNode-Config-Manual_timecho.md b/src/UserGuide/latest/Reference/DataNode-Config-Manual_timecho.md new file mode 100644 index 000000000..94ede5013 --- /dev/null +++ b/src/UserGuide/latest/Reference/DataNode-Config-Manual_timecho.md @@ -0,0 +1,584 @@ + + +# DataNode Configuration Parameters + +We use the same configuration files for IoTDB DataNode and Standalone version, all under the `conf`. + +* `datanode-env.sh/bat`:Environment configurations, in which we could set the memory allocation of DataNode and Standalone. + +* `iotdb-system.properties`:IoTDB system configurations. + +## Hot Modification Configuration + +For the convenience of users, IoTDB provides users with hot modification function, that is, modifying some configuration parameters in `iotdb-system.properties` during the system operation and applying them to the system immediately. +In the parameters described below, these parameters whose way of `Effective` is `hot-load` support hot modification. + +Trigger way: The client sends the command(sql) `load configuration` or `set configuration` to the IoTDB server. + +## Environment Configuration File(datanode-env.sh/bat) + +The environment configuration file is mainly used to configure the Java environment related parameters when DataNode is running, such as JVM related configuration. This part of the configuration is passed to the JVM when the DataNode starts. + +The details of each parameter are as follows: + +* MEMORY\_SIZE + +|Name|MEMORY\_SIZE| +|:---:|:---| +|Description|The minimum heap memory size that IoTDB DataNode will use when startup | +|Type|String| +|Default| The default is a half of the memory.| +|Effective|After restarting system| + +* ON\_HEAP\_MEMORY + +|Name|ON\_HEAP\_MEMORY| +|:---:|:---| +|Description|The heap memory size that IoTDB DataNode can use, Former Name: MAX\_HEAP\_SIZE | +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* OFF\_HEAP\_MEMORY + +|Name|OFF\_HEAP\_MEMORY| +|:---:|:---| +|Description|The direct memory that IoTDB DataNode can use, Former Name: MAX\_DIRECT\_MEMORY\_SIZE| +|Type|String| +|Default| Calculate based on MEMORY\_SIZE.| +|Effective|After restarting system| + +* JMX\_LOCAL + +|Name|JMX\_LOCAL| +|:---:|:---| +|Description|JMX monitoring mode, configured as yes to allow only local monitoring, no to allow remote monitoring| +|Type|Enum String: "true", "false"| +|Default|true| +|Effective|After restarting system| + +* JMX\_PORT + +|Name|JMX\_PORT| +|:---:|:---| +|Description|JMX listening port. Please confirm that the port is not a system reserved port and is not occupied| +|Type|Short Int: [0,65535]| +|Default|31999| +|Effective|After restarting system| + +* JMX\_IP + +|Name|JMX\_IP| +|:---:|:---| +|Description|JMX listening address. Only take effect if JMX\_LOCAL=false. 0.0.0.0 is never allowed| +|Type|String| +|Default|127.0.0.1| +|Effective|After restarting system| + +## JMX Authorization + +We **STRONGLY RECOMMENDED** you CHANGE the PASSWORD for the JMX remote connection. + +The user and passwords are in ${IOTDB\_CONF}/conf/jmx.password. + +The permission definitions are in ${IOTDB\_CONF}/conf/jmx.access. + +## DataNode/Standalone Configuration File (iotdb-system.properties) + +### Data Node RPC Configuration + +* dn\_rpc\_address + +|Name| dn\_rpc\_address | +|:---:|:-----------------------------------------------| +|Description| The client rpc service listens on the address. | +|Type| String | +|Default| 0.0.0.0 | +|Effective| After restarting system | + +* dn\_rpc\_port + +|Name| dn\_rpc\_port | +|:---:|:---| +|Description| The client rpc service listens on the port.| +|Type|Short Int : [0,65535]| +|Default| 6667 | +|Effective|After restarting system| + +* dn\_internal\_address + +|Name| dn\_internal\_address | +|:---:|:---| +|Description| DataNode internal service host/IP | +|Type| string | +|Default| 127.0.0.1 | +|Effective|Only allowed to be modified in first start up| + +* dn\_internal\_port + +|Name| dn\_internal\_port | +|:---:|:-------------------------------| +|Description| DataNode internal service port | +|Type| int | +|Default| 10730 | +|Effective| Only allowed to be modified in first start up | + +* dn\_mpp\_data\_exchange\_port + +|Name| mpp\_data\_exchange\_port | +|:---:|:---| +|Description| MPP data exchange port | +|Type| int | +|Default| 10740 | +|Effective|Only allowed to be modified in first start up| + +* dn\_schema\_region\_consensus\_port + +|Name| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Schema replica communication port for consensus | +|Type| int | +|Default| 10750 | +|Effective|Only allowed to be modified in first start up| + +* dn\_data\_region\_consensus\_port + +|Name| dn\_data\_region\_consensus\_port | +|:---:|:---| +|Description| DataNode Data replica communication port for consensus | +|Type| int | +|Default| 10760 | +|Effective|Only allowed to be modified in first start up| + +* dn\_join\_cluster\_retry\_interval\_ms + +|Name| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:--------------------------------------------------------------------------| +|Description| The time of data node waiting for the next retry to join into the cluster | +|Type| long | +|Default| 5000 | +|Effective| After restarting system | + +### SSL Configuration + +* enable\_thrift\_ssl + +|Name| enable\_thrift\_ssl | +|:---:|:---------------------------| +|Description|When enable\_thrift\_ssl is configured as true, SSL encryption will be used for communication through dn\_rpc\_port | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* enable\_https + +|Name| enable\_https | +|:---:|:-------------------------| +|Description| REST Service Specifies whether to enable SSL configuration | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* key\_store\_path + +|Name| key\_store\_path | +|:---:|:-----------------| +|Description| SSL certificate path | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* key\_store\_pwd + +|Name| key\_store\_pwd | +|:---:|:----------------| +|Description| SSL certificate password | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +### SeedConfigNode + +* dn\_seed\_config\_node + +|Name| dn\_seed\_config\_node | +|:---:|:------------------------------------------------| +|Description| ConfigNode Address for DataNode to join cluster. This parameter is corresponding to dn\_target\_config\_node\_list before V1.2.2 | +|Type| String | +|Default| 127.0.0.1:10710 | +|Effective| Only allowed to be modified in first start up | + +### Connection Configuration + +* dn\_rpc\_thrift\_compression\_enable + +|Name| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's compression (using GZIP).| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_advanced\_compression\_enable + +|Name| dn\_rpc\_advanced\_compression\_enable | +|:---:|:---| +|Description| Whether enable thrift's advanced compression.| +|Type|Boolean| +|Default| false | +|Effective|After restarting system| + +* dn\_rpc\_selector\_thread\_count + +|Name| dn\_rpc\_selector\_thread\_count | +|:---:|:-----------------------------------| +|Description| The number of rpc selector thread. | +|Type| int | +|Default| false | +|Effective| After restarting system | + +* dn\_rpc\_min\_concurrent\_client\_num + +|Name| dn\_rpc\_min\_concurrent\_client\_num | +|:---:|:-----------------------------------| +|Description| Minimum concurrent rpc connections | +|Type| Short Int : [0,65535] | +|Description| 1 | +|Effective| After restarting system | + +* dn\_rpc\_max\_concurrent\_client\_num + +|Name| dn\_rpc\_max\_concurrent\_client\_num | +|:---:|:---| +|Description| Max concurrent rpc connections| +|Type| Short Int : [0,65535] | +|Description| 65535 | +|Effective|After restarting system| + +* dn\_thrift\_max\_frame\_size + +|Name| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|Description| Max size of bytes of each thrift RPC request/response| +|Type| Long | +|Unit|Byte| +|Default| 536870912 | +|Effective|After restarting system| + +* dn\_thrift\_init\_buffer\_size + +|Name| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|Description| Initial size of bytes of buffer that thrift used | +|Type| long | +|Default| 1024 | +|Effective|After restarting system| + +* dn\_connection\_timeout\_ms + +| Name | dn\_connection\_timeout\_ms | +|:-----------:|:---------------------------------------------------| +| Description | Thrift socket and connection timeout between nodes | +| Type | int | +| Default | 60000 | +| Effective | After restarting system | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------------:|:--------------------------------------------------------------| +| Description | Number of core clients routed to each node in a ClientManager | +| Type | int | +| Default | 200 | +| Effective | After restarting system | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| Name | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:--------------:|:-------------------------------------------------------------| +| Description | Number of max clients routed to each node in a ClientManager | +| Type | int | +| Default | 300 | +| Effective | After restarting system | + +### Dictionary Configuration + +* dn\_system\_dir + +| Name | dn\_system\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The directories of system files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/system (Windows: data\\datanode\\system) | +| Effective | After restarting system | + +* dn\_data\_dirs + +| Name | dn\_data\_dirs | +|:-----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | The directories of data files. Multiple directories are separated by comma. The starting directory of the relative path is related to the operating system. It is recommended to use an absolute path. If the path does not exist, the system will automatically create it. | +| Type | String[] | +| Default | data/datanode/data (Windows: data\\datanode\\data) | +| Effective | After restarting system | + +* dn\_multi\_dir\_strategy + +| Name | dn\_multi\_dir\_strategy | +|:-----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Description | IoTDB's strategy for selecting directories for TsFile in tsfile_dir. You can use a simple class name or a full name of the class. The system provides the following three strategies:
1. SequenceStrategy: IoTDB selects the directory from tsfile\_dir in order, traverses all the directories in tsfile\_dir in turn, and keeps counting;
2. MaxDiskUsableSpaceFirstStrategy: IoTDB first selects the directory with the largest free disk space in tsfile\_dir;
You can complete a user-defined policy in the following ways:
1. Inherit the org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy class and implement its own Strategy method;
2. Fill in the configuration class with the full class name of the implemented class (package name plus class name, UserDfineStrategyPackage);
3. Add the jar file to the project. | +| Type | String | +| Default | SequenceStrategy | +| Effective | hot-load | + +* dn\_consensus\_dir + +| Name | dn\_consensus\_dir | +|:-----------:|:-------------------------------------------------------------------------------| +| Description | The directories of consensus files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/consensus | +| Effective | After restarting system | + +* dn\_wal\_dirs + +| Name | dn\_wal\_dirs | +|:-----------:|:-------------------------------------------------------------------------| +| Description | Write Ahead Log storage path. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/wal | +| Effective | After restarting system | + +* dn\_tracing\_dir + +| Name | dn\_tracing\_dir | +|:-----------:|:----------------------------------------------------------------------------| +| Description | The tracing root directory path. It is recommended to use an absolute path. | +| Type | String | +| Default | datanode/tracing | +| Effective | After restarting system | + +* dn\_sync\_dir + +| Name | dn\_sync\_dir | +|:-----------:|:--------------------------------------------------------------------------| +| Description | The directories of sync files. It is recommended to use an absolute path. | +| Type | String | +| Default | data/datanode/sync | +| Effective | After restarting system | + +### Metric Configuration + +## Enable GC log + +GC log is off by default. +For performance tuning, you may want to collect the GC info. + +To enable GC log, just add a parameter "printgc" when you start the DataNode. + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` +Or +```cmd +sbin\start-datanode.bat printgc +``` + +GC log is stored at `IOTDB_HOME/logs/gc.log`. +There will be at most 10 gc.log.* files and each one can reach to 10MB. + +### REST Service Configuration + +* enable\_rest\_service + +|Name| enable\_rest\_service | +|:---:|:--------------------------------------| +|Description| Whether to enable the Rest service | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_service\_port + +|Name| rest\_service\_port | +|:---:|:------------------| +|Description| The Rest service listens to the port number | +|Type| int32 | +|Default| 18080 | +|Effective| After restarting system | + +* enable\_swagger + +|Name| enable\_swagger | +|:---:|:-----------------------| +|Description| Whether to enable swagger to display rest interface information | +|Type| Boolean | +|Default| false | +|Effective| After restarting system | + +* rest\_query\_default\_row\_size\_limit + +|Name| rest\_query\_default\_row\_size\_limit | +|:---:|:------------------------------------------------------------------------------------------| +|Description| The maximum number of rows in a result set that can be returned by a query | +|Type| int32 | +|Default| 10000 | +|Effective| After restarting system | + +* cache\_expire + +|Name| cache\_expire | +|:---:|:--------------------------------------------------------| +|Description| Expiration time for caching customer login information | +|Type| int32 | +|Default| 28800 | +|Effective| After restarting system | + +* cache\_max\_num + +|Name| cache\_max\_num | +|:---:|:--------------| +|Description| The maximum number of users stored in the cache | +|Type| int32 | +|Default| 100 | +|Effective| After restarting system | + +* cache\_init\_num + +|Name| cache\_init\_num | +|:---:|:---------------| +|Description| Initial cache capacity | +|Type| int32 | +|Default| 10 | +|Effective| After restarting system | + + +* trust\_store\_path + +|Name| trust\_store\_path | +|:---:|:---------------| +|Description| keyStore Password (optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* trust\_store\_pwd + +|Name| trust\_store\_pwd | +|:---:|:---------------------------------| +|Description| trustStore Password (Optional) | +|Type| String | +|Default| "" | +|Effective| After restarting system | + +* idle\_timeout + +|Name| idle\_timeout | +|:---:|:--------------| +|Description| SSL timeout duration, expressed in seconds | +|Type| int32 | +|Default| 5000 | +|Effective| After restarting system | + + +#### Storage engine configuration + + +* dn\_default\_space\_usage\_thresholds + +|Name| dn\_default\_space\_usage\_thresholds | +|:---:|:--------------| +|Description| Define the minimum remaining space ratio for each tier data catalogue; when the remaining space is less than this ratio, the data will be automatically migrated to the next tier; when the remaining storage space of the last tier falls below this threshold, the system will be set to READ_ONLY | +|Type| double | +|Default| 0.85 | +|Effective| hot-load | + +* remote\_tsfile\_cache\_dirs + +|Name| remote\_tsfile\_cache\_dirs | +|:---:|:--------------| +|Description| Cache directory stored locally in the cloud | +|Type| string | +|Default| data/datanode/data/cache | +|Effective| After restarting system | + +* remote\_tsfile\_cache\_page\_size\_in\_kb + +|Name| remote\_tsfile\_cache\_page\_size\_in\_kb | +|:---:|:--------------| +|Description| Block size of locally cached files stored in the cloud | +|Type| int | +|Default| 20480 | +|Effective| After restarting system | + +* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb + +|Name| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | +|:---:|:--------------| +|Description| Maximum Disk Occupancy Size for Cloud Storage Local Cache | +|Type| long | +|Default| 51200 | +|Effective| After restarting system | + +* object\_storage\_type + +|Name| object\_storage\_type | +|:---:|:--------------| +|Description| Cloud Storage Type | +|Type| string | +|Default| AWS_S3 | +|Effective| After restarting system | + +* object\_storage\_bucket + +|Name| object\_storage\_bucket | +|:---:|:--------------| +|Description| Name of cloud storage bucket | +|Type| string | +|Default| iotdb_data | +|Effective| After restarting system | + +* object\_storage\_endpoiont + +|Name| object\_storage\_endpoiont | +|:---:|:--------------| +|Description| endpoint of cloud storage | +|Type| string | +|Default| None | +|Effective| After restarting system | + +* object\_storage\_access\_key + +|Name| object\_storage\_access\_key | +|:---:|:--------------| +|Description| Authentication information stored in the cloud: key | +|Type| string | +|Default| None | +|Effective| After restarting system | + +* object\_storage\_access\_secret + +|Name| object\_storage\_access\_secret | +|:---:|:--------------| +|Description| Authentication information stored in the cloud: secret | +|Type| string | +|Default| None | +|Effective| After restarting system | diff --git a/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept.md b/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept.md index ebd6a800e..b4631022f 100644 --- a/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept.md +++ b/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept.md @@ -1,3 +1,6 @@ +--- +redirectTo: Cluster-Concept_apache.html +--- - -# 集群相关概念 -下图展示了一个常见的 IoTDB 3C3D1A(3 个 ConfigNode、3 个 DataNode 和 1 个 AINode)的集群部署模式: - - -其中包括了 IoTDB 集群使用中用户常接触到的几个概念,包括: -- **节点**(ConfigNode、DataNode、AINode); -- **槽**(SchemaSlot、DataSlot); -- **Region**(SchemaRegion、DataRegion); -- ***副本组***。 - -下文将重点对以上概念进行介绍。 - -## 节点 -IoTDB 集群包括三种节点(进程),**ConfigNode**(管理节点),**DataNode**(数据节点)和 **AINode**(分析节点),如下所示: -- **ConfigNode**:存储集群的配置信息、数据库的元数据、时间序列元数据和数据的路由信息,监控集群节点并实施负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。ConfigNode 不直接接收客户端读写请求,它会通过一系列[负载均衡算法](../Technical-Insider/Cluster-data-partitioning.md)对集群中元数据和数据的分布提供指导。 -- **DataNode**:负责时间序列元数据和数据的读写,每个 DataNode 都能接收客户端读写请求并提供相应服务,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。接收客户端读写请求时,若 DataNode 缓存有对应的路由信息,它能直接在本地执行或是转发这些请求;否则它会向 ConfigNode 询问并缓存路由信息,以加速后续请求的服务效率。 -- **AINode**:负责与 ConfigNode 和 DataNode 交互来扩展 IoTDB 集群对时间序列进行智能分析的能力,支持从外部引入已有机器学习模型进行注册,并使用注册的模型在指定时序数据上通过简单 SQL 语句完成时序分析任务的过程,将模型的创建、管理及推理融合在数据库引擎中。目前已提供常见时序分析场景(例如预测与异常检测)的机器学习算法或自研模型。 - -## 槽 -IoTDB 内部将元数据和数据划分成多个更小的、更易于管理的单元,每个单元称为一个**槽**。槽是一个逻辑概念,在 IoTDB 集群中,**元数据槽**和**数据槽**定义如下: -- **元数据槽**(SchemaSlot):一部分元数据集合,元数据槽总数固定,默认数量为 1000,IoTDB 使用哈希算法将所有设备均匀地分配到这些元数据槽中。 -- **数据槽**(DataSlot):一部分数据集合,在元数据槽的基础上,将对应设备的数据按时间范围划分为数据槽,默认的时间范围为 7 天。 - -## Region -在 IoTDB 中,元数据和数据被复制到各个 DataNode 以获得集群高可用性。然而以槽为粒度进行复制会增加集群管理成本、降低写入吞吐。因此 IoTDB 引入 **Region** 这一概念,将元数据槽和数据槽分别分配给 SchemaRegion 和 DataRegion 后,以 Region 为单位进行复制。**SchemRegion** 和 **DataRegion** 的详细定义如下: -- **SchemaRegion**:元数据存储和复制的基本单元,集群每个数据库的所有元数据槽会被均匀分配给该数据库的所有 SchemaRegion。拥有相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 -- **DataRegion**:数据存储和复制的基本单元,集群每个数据库的所有数据槽会被均匀分配给该数据库的所有 DataRegion。拥有相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 - -## 副本组 -Region 的副本对集群的容灾能力至关重要。对于每个 Region 的所有副本,它们的角色分为 **leader** 和 **follower**,共同提供读写服务。不同架构下的副本组配置推荐如下: -| 类别 | 配置项 | 单机推荐配置 | 分布式推荐配置 | -| :-: | :-: | :-: | :-: | -| 元数据 | schema_replication_factor | 1 | 3 | -| 数据 | data_replication_factor | 1 | 2 | \ No newline at end of file +--> \ No newline at end of file diff --git a/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_apache.md b/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_apache.md new file mode 100644 index 000000000..98c6050cc --- /dev/null +++ b/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_apache.md @@ -0,0 +1,106 @@ + + +# 常见概念 + +## 数据模型相关概念 + +| 概念 | 含义 | +| ----------------------- | ------------------------------------------------------------ | +| 数据模型(sql_dialect) | IoTDB 支持两种时序数据模型(SQL语法),管理的对象均为设备和测点树:以层级路径的方式管理数据,一条路径对应一个设备的一个测点表:以关系表的方式管理数据,一张表对应一类设备 | +| 元数据(Schema) | 元数据是数据库的数据模型信息,即树形结构或表结构。包括测点的名称、数据类型等定义。 | +| 设备(Device) | 对应一个实际场景中的物理设备,通常包含多个测点。 | +| 测点(Timeseries) | 又名:物理量、时间序列、时间线、点位、信号量、指标、测量值等。是多个数据点按时间戳递增排列形成的一个时间序列。通常一个测点代表一个采集点位,能够定期采集所在环境的物理量。 | +| 编码(Encoding) | 编码是一种压缩技术,将数据以二进制的形式进行表示,可以提高存储效率。IoTDB 支持多种针对不同类型的数据的编码方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | +| 压缩(Compression) | IoTDB 在数据编码后,使用压缩技术进一步压缩二进制数据,提升存储效率。IoTDB 支持多种压缩方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | + +## 分布式相关概念 + +下图展示了一个常见的 IoTDB 3C3D(3 个 ConfigNode、3 个 DataNode)的集群部署模式: + + + +IoTDB 的集群包括如下常见概念: + +- 节点(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- 多副本 + +下文将对以上概念进行介绍。 + + +### 节点 + +IoTDB 集群包括三种节点(进程):ConfigNode(管理节点),DataNode(数据节点)和 AINode(分析节点),如下所示: + +- ConfigNode:管理集群的节点信息、配置信息、用户权限、元数据、分区信息等,负责分布式操作的调度和负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。 +- DataNode:服务客户端请求,负责数据的存储和计算,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。 +- AINode:负责提供机器学习能力,支持注册已训练好的机器学习模型,并通过 SQL 调用模型进行推理,目前已内置自研时序大模型和常见的机器学习算法(如预测与异常检测)。 + +### 数据分区 + +在 IoTDB 中,元数据和数据都被分为小的分区,即 Region,由集群的各个 DataNode 进行管理。 + +- SchemaRegion:元数据分区,管理一部分设备和测点的元数据。不同 DataNode 相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 +- DataRegion:数据分区,管理一部分设备的一段时间的数据。不同 DataNode 相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 +- 具体分区算法可参考:[数据分区](../Technical-Insider/Cluster-data-partitioning.md) + +### 多副本 + +数据和元数据的副本数可配置,不同部署模式下的副本数推荐如下配置,其中多副本时可提供高可用服务。 + +| 类别 | 配置项 | 单机推荐配置 | 集群推荐配置 | +| :----- | :------------------------ | :----------- | :----------- | +| 元数据 | schema_replication_factor | 1 | 3 | +| 数据 | data_replication_factor | 1 | 2 | + + +## 部署相关概念 + +IoTDB 有两种运行模式:单机模式、集群模式。 + +### 单机模式 + +IoTDB单机实例包括 1 个ConfigNode、1个DataNode,即1C1D; + +- **特点**:便于开发者安装部署,部署和维护成本较低,操作方便。 +- **适用场景**:资源有限或对高可用要求不高的场景,例如边缘端服务器。 +- **部署方法**:[单机版部署](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) + +### 集群模式 + +IoTDB 集群实例为 3 个ConfigNode 和不少于 3 个 DataNode,通常为 3 个 DataNode,即3C3D;当部分节点出现故障时,剩余节点仍然能对外提供服务,保证数据库服务的高可用性,且可随节点增加提升数据库性能。 + +- **特点**:具有高可用性、高扩展性,可通过增加 DataNode 提高系统性能。 +- **适用场景**:需要提供高可用和可靠性的企业级应用场景。 +- **部署方法**:[集群版部署](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) + +### 特点总结 + +| 维度 | 单机模式 | 集群模式 | +| ------------ | ---------------------------- | ------------------------ | +| 适用场景 | 边缘侧部署、对高可用要求不高 | 高可用性业务、容灾场景等 | +| 所需机器数量 | 1 | ≥3 | +| 安全可靠性 | 无法容忍单点故障 | 高,可容忍单点故障 | +| 扩展性 | 可扩展 DataNode 提升性能 | 可扩展 DataNode 提升性能 | +| 性能 | 可随 DataNode 数量扩展 | 可随 DataNode 数量扩展 | + +- 单机模式和集群模式,部署步骤类似(逐个增加 ConfigNode 和 DataNode),仅副本数和可提供服务的最少节点数不同。 \ No newline at end of file diff --git a/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_timecho.md b/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_timecho.md new file mode 100644 index 000000000..77edf9ebb --- /dev/null +++ b/src/zh/UserGuide/Master/Tree/Background-knowledge/Cluster-Concept_timecho.md @@ -0,0 +1,116 @@ + + +# 常见概念 + +## 数据模型相关概念 + +| 概念 | 含义 | +| ----------------------- | ------------------------------------------------------------ | +| 数据模型(sql_dialect) | IoTDB 支持两种时序数据模型(SQL语法),管理的对象均为设备和测点树:以层级路径的方式管理数据,一条路径对应一个设备的一个测点表:以关系表的方式管理数据,一张表对应一类设备 | +| 元数据(Schema) | 元数据是数据库的数据模型信息,即树形结构或表结构。包括测点的名称、数据类型等定义。 | +| 设备(Device) | 对应一个实际场景中的物理设备,通常包含多个测点。 | +| 测点(Timeseries) | 又名:物理量、时间序列、时间线、点位、信号量、指标、测量值等。是多个数据点按时间戳递增排列形成的一个时间序列。通常一个测点代表一个采集点位,能够定期采集所在环境的物理量。 | +| 编码(Encoding) | 编码是一种压缩技术,将数据以二进制的形式进行表示,可以提高存储效率。IoTDB 支持多种针对不同类型的数据的编码方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | +| 压缩(Compression) | IoTDB 在数据编码后,使用压缩技术进一步压缩二进制数据,提升存储效率。IoTDB 支持多种压缩方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | + +## 分布式相关概念 + +下图展示了一个常见的 IoTDB 3C3D(3 个 ConfigNode、3 个 DataNode)的集群部署模式: + + + +IoTDB 的集群包括如下常见概念: + +- 节点(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- 多副本 + +下文将对以上概念进行介绍。 + + +### 节点 + +IoTDB 集群包括三种节点(进程):ConfigNode(管理节点),DataNode(数据节点)和 AINode(分析节点),如下所示: + +- ConfigNode:管理集群的节点信息、配置信息、用户权限、元数据、分区信息等,负责分布式操作的调度和负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。 +- DataNode:服务客户端请求,负责数据的存储和计算,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。 +- AINode:负责提供机器学习能力,支持注册已训练好的机器学习模型,并通过 SQL 调用模型进行推理,目前已内置自研时序大模型和常见的机器学习算法(如预测与异常检测)。 + +### 数据分区 + +在 IoTDB 中,元数据和数据都被分为小的分区,即 Region,由集群的各个 DataNode 进行管理。 + +- SchemaRegion:元数据分区,管理一部分设备和测点的元数据。不同 DataNode 相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 +- DataRegion:数据分区,管理一部分设备的一段时间的数据。不同 DataNode 相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 +- 具体分区算法可参考:[数据分区](../Technical-Insider/Cluster-data-partitioning.md) + +### 多副本 + +数据和元数据的副本数可配置,不同部署模式下的副本数推荐如下配置,其中多副本时可提供高可用服务。 + +| 类别 | 配置项 | 单机推荐配置 | 集群推荐配置 | +| :----- | :------------------------ | :----------- | :----------- | +| 元数据 | schema_replication_factor | 1 | 3 | +| 数据 | data_replication_factor | 1 | 2 | + + +## 部署相关概念 + +IoTDB 有三种运行模式:单机模式、集群模式和双活模式。 + +### 单机模式 + +IoTDB单机实例包括 1 个ConfigNode、1个DataNode,即1C1D; + +- **特点**:便于开发者安装部署,部署和维护成本较低,操作方便。 +- **适用场景**:资源有限或对高可用要求不高的场景,例如边缘端服务器。 +- **部署方法**:[单机版部署](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) + +### 双活模式 + +双活版部署为 TimechoDB 企业版功能,是指两个独立的实例进行双向同步,能同时对外提供服务。当一台停机重启后,另一个实例会将缺失数据断点续传。 + +> IoTDB 双活实例通常为2个单机节点,即2套1C1D。每个实例也可以为集群。 + +- **特点**:资源占用最低的高可用解决方案。 +- **适用场景**:资源有限(仅有两台服务器),但希望获得高可用能力。 +- **部署方法**:[双活版部署](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) + +### 集群模式 + +IoTDB 集群实例为 3 个ConfigNode 和不少于 3 个 DataNode,通常为 3 个 DataNode,即3C3D;当部分节点出现故障时,剩余节点仍然能对外提供服务,保证数据库服务的高可用性,且可随节点增加提升数据库性能。 + +- **特点**:具有高可用性、高扩展性,可通过增加 DataNode 提高系统性能。 +- **适用场景**:需要提供高可用和可靠性的企业级应用场景。 +- **部署方法**:[集群版部署](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md) + +### 特点总结 + +| 维度 | 单机模式 | 双活模式 | 集群模式 | +| ------------ | ---------------------------- | ------------------------ | ------------------------ | +| 适用场景 | 边缘侧部署、对高可用要求不高 | 高可用性业务、容灾场景等 | 高可用性业务、容灾场景等 | +| 所需机器数量 | 1 | 2 | ≥3 | +| 安全可靠性 | 无法容忍单点故障 | 高,可容忍单点故障 | 高,可容忍单点故障 | +| 扩展性 | 可扩展 DataNode 提升性能 | 每个实例可按需扩展 | 可扩展 DataNode 提升性能 | +| 性能 | 可随 DataNode 数量扩展 | 与其中一个实例性能相同 | 可随 DataNode 数量扩展 | + +- 单机模式和集群模式,部署步骤类似(逐个增加 ConfigNode 和 DataNode),仅副本数和可提供服务的最少节点数不同。 \ No newline at end of file diff --git a/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual.md b/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual.md index c88848432..172882761 100644 --- a/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual.md +++ b/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual.md @@ -1,3 +1,6 @@ +--- +redirectTo: DataNode-Config-Manual_apache.html +--- - -# DataNode 配置参数 - -IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 - -* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 - -* `iotdb-system.properties`:IoTDB 的配置文件。 - -## 热修改配置项 - -为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-system.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载` -的均为支持热修改的配置参数。 - -通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 - -## 环境配置项(datanode-env.sh/bat) - -环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: - -* MEMORY\_SIZE - -|名字|MEMORY\_SIZE| -|:---:|:---| -|描述|IoTDB DataNode 启动时分配的内存大小 | -|类型|String| -|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| -|改后生效方式|重启服务生效| - -* ON\_HEAP\_MEMORY - -|名字|ON\_HEAP\_MEMORY| -|:---:|:---| -|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | -|类型|String| -|默认值|取决于MEMORY\_SIZE的配置。| -|改后生效方式|重启服务生效| - -* OFF\_HEAP\_MEMORY - -|名字|OFF\_HEAP\_MEMORY| -|:---:|:---| -|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | -|类型|String| -|默认值|取决于MEMORY\_SIZE的配置| -|改后生效方式|重启服务生效| - -* JMX\_LOCAL - -|名字|JMX\_LOCAL| -|:---:|:---| -|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| -|类型|枚举 String : “true”, “false”| -|默认值|true| -|改后生效方式|重启服务生效| - -* JMX\_PORT - -|名字|JMX\_PORT| -|:---:|:---| -|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| -|类型|Short Int: [0,65535]| -|默认值|31999| -|改后生效方式|重启服务生效| - -## 系统配置项(iotdb-system.properties) - -系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 - -### Data Node RPC 服务配置 - -* dn\_rpc\_address - -|名字| dn\_rpc\_address | -|:---:|:-----------------| -|描述| 客户端 RPC 服务监听地址 | -|类型| String | -|默认值| 0.0.0.0 | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_port - -|名字| dn\_rpc\_port | -|:---:|:---| -|描述| Client RPC 服务监听端口| -|类型| Short Int : [0,65535] | -|默认值| 6667 | -|改后生效方式|重启服务生效| - -* dn\_internal\_address - -|名字| dn\_internal\_address | -|:---:|:---| -|描述| DataNode 内网通信地址 | -|类型| string | -|默认值| 127.0.0.1 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_internal\_port - -|名字| dn\_internal\_port | -|:---:|:-------------------| -|描述| DataNode 内网通信端口 | -|类型| int | -|默认值| 10730 | -|改后生效方式| 仅允许在第一次启动服务前修改 | - -* dn\_mpp\_data\_exchange\_port - -|名字| dn\_mpp\_data\_exchange\_port | -|:---:|:---| -|描述| MPP 数据交换端口 | -|类型| int | -|默认值| 10740 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_schema\_region\_consensus\_port - -|名字| dn\_schema\_region\_consensus\_port | -|:---:|:---| -|描述| DataNode 元数据副本的共识协议通信端口 | -|类型| int | -|默认值| 10750 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_data\_region\_consensus\_port - -|名字| dn\_data\_region\_consensus\_port | -|:---:|:---| -|描述| DataNode 数据副本的共识协议通信端口 | -|类型| int | -|默认值| 10760 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_join\_cluster\_retry\_interval\_ms - -|名字| dn\_join\_cluster\_retry\_interval\_ms | -|:---:|:---------------------------------------| -|描述| DataNode 再次重试加入集群等待时间 | -|类型| long | -|默认值| 5000 | -|改后生效方式| 重启服务生效 | - - -### SSL 配置 - -* enable\_thrift\_ssl - -|名字| enable\_thrift\_ssl | -|:---:|:----------------------------------------------| -|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* enable\_https - -|名字| enable\_https | -|:---:|:-------------------------| -|描述| REST Service 是否开启 SSL 配置 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* key\_store\_path - -|名字| key\_store\_path | -|:---:|:-----------------| -|描述| ssl证书路径 | -|类型| String | -|默认值| "" | -|改后生效方式| 重启服务生效 | - -* key\_store\_pwd - -|名字| key\_store\_pwd | -|:---:|:----------------| -|描述| ssl证书密码 | -|类型| String | -|默认值| "" | -|改后生效方式| 重启服务生效 | - - -### SeedConfigNode 配置 - -* dn\_seed\_config\_node - -|名字| dn\_seed\_config\_node | -|:---:|:------------------------------------| -|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群,推荐使用 SeedConfigNode。V1.2.2 及以前曾用名是 dn\_target\_config\_node\_list | -|类型| String | -|默认值| 127.0.0.1:10710 | -|改后生效方式| 仅允许在第一次启动服务前修改 | - -### 连接配置 - -* dn\_session\_timeout\_threshold - -|名字| dn\_session_timeout_threshold | -|:---:|:------------------------------| -|描述| 最大的会话空闲时间 | -|类型| int | -|默认值| 0 | -|改后生效方式| 重启服务生效 | - - -* dn\_rpc\_thrift\_compression\_enable - -|名字| dn\_rpc\_thrift\_compression\_enable | -|:---:|:---------------------------------| -|描述| 是否启用 thrift 的压缩机制 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_advanced\_compression\_enable - -|名字| dn\_rpc\_advanced\_compression\_enable | -|:---:|:-----------------------------------| -|描述| 是否启用 thrift 的自定制压缩机制 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_selector\_thread\_count - -| 名字 | rpc\_selector\_thread\_count | -|:------:|:-----------------------------| -| 描述 | rpc 选择器线程数量 | -| 类型 | int | -| 默认值 | 1 | -| 改后生效方式 | 重启服务生效 | - -* dn\_rpc\_min\_concurrent\_client\_num - -| 名字 | rpc\_min\_concurrent\_client\_num | -|:------:|:----------------------------------| -| 描述 | 最小连接数 | -| 类型 | Short Int : [0,65535] | -| 默认值 | 1 | -| 改后生效方式 | 重启服务生效 | - -* dn\_rpc\_max\_concurrent\_client\_num - -| 名字 | dn\_rpc\_max\_concurrent\_client\_num | -|:------:|:----------------------------------| -| 描述 | 最大连接数 | -| 类型 | Short Int : [0,65535] | -| 默认值 | 65535 | -| 改后生效方式 | 重启服务生效 | - -* dn\_thrift\_max\_frame\_size - -|名字| dn\_thrift\_max\_frame\_size | -|:---:|:---| -|描述| RPC 请求/响应的最大字节数| -|类型| long | -|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | -|改后生效方式|重启服务生效| - -* dn\_thrift\_init\_buffer\_size - -|名字| dn\_thrift\_init\_buffer\_size | -|:---:|:---| -|描述| 字节数 | -|类型| long | -|默认值| 1024 | -|改后生效方式|重启服务生效| - -* dn\_connection\_timeout\_ms - -| 名字 | dn\_connection\_timeout\_ms | -|:------:|:----------------------------| -| 描述 | 节点连接超时时间 | -| 类型 | int | -| 默认值 | 60000 | -| 改后生效方式 | 重启服务生效 | - -* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager - -| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------:|:--------------------------------------------------------------| -| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | -| 类型 | int | -| 默认值 | 200 | -| 改后生效方式 | 重启服务生效 | - -* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager - -| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------:|:-------------------------------------------------------------| -| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | -| 类型 | int | -| 默认值 | 300 | -| 改后生效方式 | 重启服务生效 | - -### 目录配置 - -* dn\_system\_dir - -| 名字 | dn\_system\_dir | -|:------:|:--------------------------------------------------------------------| -| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | -| 改后生效方式 | 重启服务生效 | - -* dn\_data\_dirs - -| 名字 | dn\_data\_dirs | -|:------:|:-------------------------------------------------------------------| -| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | -| 改后生效方式 | 重启服务生效 | - -* dn\_multi\_dir\_strategy - -| 名字 | dn\_multi\_dir\_strategy | -|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | -| 类型 | String | -| 默认值 | SequenceStrategy | -| 改后生效方式 | 热加载 | - -* dn\_consensus\_dir - -| 名字 | dn\_consensus\_dir | -|:------:|:-------------------------------------------------------------------------| -| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | -| 改后生效方式 | 重启服务生效 | - -* dn\_wal\_dirs - -| 名字 | dn\_wal\_dirs | -|:------:|:---------------------------------------------------------------------| -| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | -| 改后生效方式 | 重启服务生效 | - -* dn\_tracing\_dir - -| 名字 | dn\_tracing\_dir | -|:------:|:--------------------------------------------------------------------| -| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | datanode/tracing | -| 改后生效方式 | 重启服务生效 | - -* dn\_sync\_dir - -| 名字 | dn\_sync\_dir | -|:------:|:----------------------------------------------------------------------| -| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/sync | -| 改后生效方式 | 重启服务生效 | - -### Metric 配置 - -## 开启 GC 日志 - -GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 -若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: - -```bash -nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & -``` - -或者 - -```bash -sbin\start-datanode.bat printgc -``` - -GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 - -#### REST 服务配置 - -* enable\_rest\_service - -|名字| enable\_rest\_service | -|:---:|:--------------------| -|描述| 是否开启Rest服务。 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* rest\_service\_port - -|名字| rest\_service\_port | -|:---:|:------------------| -|描述| Rest服务监听端口号 | -|类型| int32 | -|默认值| 18080 | -|改后生效方式| 重启生效 | - -* enable\_swagger - -|名字| enable\_swagger | -|:---:|:-----------------------| -|描述| 是否启用swagger来展示rest接口信息 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* rest\_query\_default\_row\_size\_limit - -|名字| rest\_query\_default\_row\_size\_limit | -|:---:|:----------------------------------| -|描述| 一次查询能返回的结果集最大行数 | -|类型| int32 | -|默认值| 10000 | -|改后生效方式| 重启生效 | - -* cache\_expire - -|名字| cache\_expire | -|:---:|:--------------| -|描述| 缓存客户登录信息的过期时间 | -|类型| int32 | -|默认值| 28800 | -|改后生效方式| 重启生效 | - -* cache\_max\_num - -|名字| cache\_max\_num | -|:---:|:--------------| -|描述| 缓存中存储的最大用户数量 | -|类型| int32 | -|默认值| 100 | -|改后生效方式| 重启生效 | - -* cache\_init\_num - -|名字| cache\_init\_num | -|:---:|:---------------| -|描述| 缓存初始容量 | -|类型| int32 | -|默认值| 10 | -|改后生效方式| 重启生效 | - -* trust\_store\_path - -|名字| trust\_store\_path | -|:---:|:---------------| -|描述| keyStore 密码(非必填) | -|类型| String | -|默认值| "" | -|改后生效方式| 重启生效 | - -* trust\_store\_pwd - -|名字| trust\_store\_pwd | -|:---:|:---------------| -|描述| trustStore 密码(非必填) | -|类型| String | -|默认值| "" | -|改后生效方式| 重启生效 | - -* idle\_timeout - -|名字| idle\_timeout | -|:---:|:--------------| -|描述| SSL 超时时间,单位为秒 | -|类型| int32 | -|默认值| 5000 | -|改后生效方式| 重启生效 | - - - -#### 多级存储配置 - -* dn\_default\_space\_usage\_thresholds - -|名字| dn\_default\_space\_usage\_thresholds | -|:---:|:--------------| -|描述| 定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | -|类型| double | -|默认值| 0.85 | -|改后生效方式| 热加载 | - -* remote\_tsfile\_cache\_dirs - -|名字| remote\_tsfile\_cache\_dirs | -|:---:|:--------------| -|描述| 云端存储在本地的缓存目录 | -|类型| string | -|默认值| data/datanode/data/cache | -|改后生效方式| 重启生效 | - -* remote\_tsfile\_cache\_page\_size\_in\_kb - -|名字| remote\_tsfile\_cache\_page\_size\_in\_kb | -|:---:|:--------------| -|描述| 云端存储在本地缓存文件的块大小 | -|类型| int | -|默认值| 20480 | -|改后生效方式| 重启生效 | - -* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb - -|名字| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | -|:---:|:--------------| -|描述| 云端存储本地缓存的最大磁盘占用大小 | -|类型| long | -|默认值| 51200 | -|改后生效方式| 重启生效 | - -* object\_storage\_type - -|名字| object\_storage\_type | -|:---:|:--------------| -|描述| 云端存储类型 | -|类型| string | -|默认值| AWS_S3 | -|改后生效方式| 重启生效 | - -* object\_storage\_bucket - -|名字| object\_storage\_bucket | -|:---:|:--------------| -|描述| 云端存储 bucket 的名称 | -|类型| string | -|默认值| iotdb_data | -|改后生效方式| 重启生效 | - -* object\_storage\_endpoiont - -|名字| object\_storage\_endpoiont | -|:---:|:--------------| -|描述| 云端存储的 endpoint | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | - -* object\_storage\_access\_key - -|名字| object\_storage\_access\_key | -|:---:|:--------------| -|描述| 云端存储的验证信息 key | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | - -* object\_storage\_access\_secret - -|名字| object\_storage\_access\_secret | -|:---:|:--------------| -|描述| 云端存储的验证信息 secret | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | \ No newline at end of file diff --git a/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_apache.md b/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_apache.md new file mode 100644 index 000000000..d19056bec --- /dev/null +++ b/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_apache.md @@ -0,0 +1,494 @@ + + +# DataNode 配置参数 + +IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 + +* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 + +* `iotdb-system.properties`:IoTDB 的配置文件。 + +## 热修改配置项 + +为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-system.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载` +的均为支持热修改的配置参数。 + +通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 + +## 环境配置项(datanode-env.sh/bat) + +环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: + +* MEMORY\_SIZE + +|名字|MEMORY\_SIZE| +|:---:|:---| +|描述|IoTDB DataNode 启动时分配的内存大小 | +|类型|String| +|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| +|改后生效方式|重启服务生效| + +* ON\_HEAP\_MEMORY + +|名字|ON\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置。| +|改后生效方式|重启服务生效| + +* OFF\_HEAP\_MEMORY + +|名字|OFF\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置| +|改后生效方式|重启服务生效| + +* JMX\_LOCAL + +|名字|JMX\_LOCAL| +|:---:|:---| +|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| +|类型|枚举 String : “true”, “false”| +|默认值|true| +|改后生效方式|重启服务生效| + +* JMX\_PORT + +|名字|JMX\_PORT| +|:---:|:---| +|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| +|类型|Short Int: [0,65535]| +|默认值|31999| +|改后生效方式|重启服务生效| + +## 系统配置项(iotdb-system.properties) + +系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 + +### Data Node RPC 服务配置 + +* dn\_rpc\_address + +|名字| dn\_rpc\_address | +|:---:|:-----------------| +|描述| 客户端 RPC 服务监听地址 | +|类型| String | +|默认值| 0.0.0.0 | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_port + +|名字| dn\_rpc\_port | +|:---:|:---| +|描述| Client RPC 服务监听端口| +|类型| Short Int : [0,65535] | +|默认值| 6667 | +|改后生效方式|重启服务生效| + +* dn\_internal\_address + +|名字| dn\_internal\_address | +|:---:|:---| +|描述| DataNode 内网通信地址 | +|类型| string | +|默认值| 127.0.0.1 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_internal\_port + +|名字| dn\_internal\_port | +|:---:|:-------------------| +|描述| DataNode 内网通信端口 | +|类型| int | +|默认值| 10730 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +* dn\_mpp\_data\_exchange\_port + +|名字| dn\_mpp\_data\_exchange\_port | +|:---:|:---| +|描述| MPP 数据交换端口 | +|类型| int | +|默认值| 10740 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_schema\_region\_consensus\_port + +|名字| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 元数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10750 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_data\_region\_consensus\_port + +|名字| dn\_data\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10760 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_join\_cluster\_retry\_interval\_ms + +|名字| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:---------------------------------------| +|描述| DataNode 再次重试加入集群等待时间 | +|类型| long | +|默认值| 5000 | +|改后生效方式| 重启服务生效 | + + +### SSL 配置 + +* enable\_thrift\_ssl + +|名字| enable\_thrift\_ssl | +|:---:|:----------------------------------------------| +|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* enable\_https + +|名字| enable\_https | +|:---:|:-------------------------| +|描述| REST Service 是否开启 SSL 配置 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* key\_store\_path + +|名字| key\_store\_path | +|:---:|:-----------------| +|描述| ssl证书路径 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + +* key\_store\_pwd + +|名字| key\_store\_pwd | +|:---:|:----------------| +|描述| ssl证书密码 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + + +### SeedConfigNode 配置 + +* dn\_seed\_config\_node + +|名字| dn\_seed\_config\_node | +|:---:|:------------------------------------| +|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群,推荐使用 SeedConfigNode。V1.2.2 及以前曾用名是 dn\_target\_config\_node\_list | +|类型| String | +|默认值| 127.0.0.1:10710 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +### 连接配置 + +* dn\_session\_timeout\_threshold + +|名字| dn\_session_timeout_threshold | +|:---:|:------------------------------| +|描述| 最大的会话空闲时间 | +|类型| int | +|默认值| 0 | +|改后生效方式| 重启服务生效 | + + +* dn\_rpc\_thrift\_compression\_enable + +|名字| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---------------------------------| +|描述| 是否启用 thrift 的压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_advanced\_compression\_enable + +|名字| dn\_rpc\_advanced\_compression\_enable | +|:---:|:-----------------------------------| +|描述| 是否启用 thrift 的自定制压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_selector\_thread\_count + +| 名字 | rpc\_selector\_thread\_count | +|:------:|:-----------------------------| +| 描述 | rpc 选择器线程数量 | +| 类型 | int | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_min\_concurrent\_client\_num + +| 名字 | rpc\_min\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最小连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_max\_concurrent\_client\_num + +| 名字 | dn\_rpc\_max\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最大连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 65535 | +| 改后生效方式 | 重启服务生效 | + +* dn\_thrift\_max\_frame\_size + +|名字| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|描述| RPC 请求/响应的最大字节数| +|类型| long | +|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | +|改后生效方式|重启服务生效| + +* dn\_thrift\_init\_buffer\_size + +|名字| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|描述| 字节数 | +|类型| long | +|默认值| 1024 | +|改后生效方式|重启服务生效| + +* dn\_connection\_timeout\_ms + +| 名字 | dn\_connection\_timeout\_ms | +|:------:|:----------------------------| +| 描述 | 节点连接超时时间 | +| 类型 | int | +| 默认值 | 60000 | +| 改后生效方式 | 重启服务生效 | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:--------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | +| 类型 | int | +| 默认值 | 200 | +| 改后生效方式 | 重启服务生效 | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:-------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | +| 类型 | int | +| 默认值 | 300 | +| 改后生效方式 | 重启服务生效 | + +### 目录配置 + +* dn\_system\_dir + +| 名字 | dn\_system\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | +| 改后生效方式 | 重启服务生效 | + +* dn\_data\_dirs + +| 名字 | dn\_data\_dirs | +|:------:|:-------------------------------------------------------------------| +| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | +| 改后生效方式 | 重启服务生效 | + +* dn\_multi\_dir\_strategy + +| 名字 | dn\_multi\_dir\_strategy | +|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | +| 类型 | String | +| 默认值 | SequenceStrategy | +| 改后生效方式 | 热加载 | + +* dn\_consensus\_dir + +| 名字 | dn\_consensus\_dir | +|:------:|:-------------------------------------------------------------------------| +| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | +| 改后生效方式 | 重启服务生效 | + +* dn\_wal\_dirs + +| 名字 | dn\_wal\_dirs | +|:------:|:---------------------------------------------------------------------| +| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | +| 改后生效方式 | 重启服务生效 | + +* dn\_tracing\_dir + +| 名字 | dn\_tracing\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | datanode/tracing | +| 改后生效方式 | 重启服务生效 | + +* dn\_sync\_dir + +| 名字 | dn\_sync\_dir | +|:------:|:----------------------------------------------------------------------| +| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/sync | +| 改后生效方式 | 重启服务生效 | + +### Metric 配置 + +## 开启 GC 日志 + +GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 +若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` + +或者 + +```bash +sbin\start-datanode.bat printgc +``` + +GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 + +#### REST 服务配置 + +* enable\_rest\_service + +|名字| enable\_rest\_service | +|:---:|:--------------------| +|描述| 是否开启Rest服务。 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_service\_port + +|名字| rest\_service\_port | +|:---:|:------------------| +|描述| Rest服务监听端口号 | +|类型| int32 | +|默认值| 18080 | +|改后生效方式| 重启生效 | + +* enable\_swagger + +|名字| enable\_swagger | +|:---:|:-----------------------| +|描述| 是否启用swagger来展示rest接口信息 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_query\_default\_row\_size\_limit + +|名字| rest\_query\_default\_row\_size\_limit | +|:---:|:----------------------------------| +|描述| 一次查询能返回的结果集最大行数 | +|类型| int32 | +|默认值| 10000 | +|改后生效方式| 重启生效 | + +* cache\_expire + +|名字| cache\_expire | +|:---:|:--------------| +|描述| 缓存客户登录信息的过期时间 | +|类型| int32 | +|默认值| 28800 | +|改后生效方式| 重启生效 | + +* cache\_max\_num + +|名字| cache\_max\_num | +|:---:|:--------------| +|描述| 缓存中存储的最大用户数量 | +|类型| int32 | +|默认值| 100 | +|改后生效方式| 重启生效 | + +* cache\_init\_num + +|名字| cache\_init\_num | +|:---:|:---------------| +|描述| 缓存初始容量 | +|类型| int32 | +|默认值| 10 | +|改后生效方式| 重启生效 | + +* trust\_store\_path + +|名字| trust\_store\_path | +|:---:|:---------------| +|描述| keyStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* trust\_store\_pwd + +|名字| trust\_store\_pwd | +|:---:|:---------------| +|描述| trustStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* idle\_timeout + +|名字| idle\_timeout | +|:---:|:--------------| +|描述| SSL 超时时间,单位为秒 | +|类型| int32 | +|默认值| 5000 | +|改后生效方式| 重启生效 | + + + diff --git a/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_timecho.md b/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_timecho.md new file mode 100644 index 000000000..c88848432 --- /dev/null +++ b/src/zh/UserGuide/Master/Tree/Reference/DataNode-Config-Manual_timecho.md @@ -0,0 +1,576 @@ + + +# DataNode 配置参数 + +IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 + +* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 + +* `iotdb-system.properties`:IoTDB 的配置文件。 + +## 热修改配置项 + +为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-system.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载` +的均为支持热修改的配置参数。 + +通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 + +## 环境配置项(datanode-env.sh/bat) + +环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: + +* MEMORY\_SIZE + +|名字|MEMORY\_SIZE| +|:---:|:---| +|描述|IoTDB DataNode 启动时分配的内存大小 | +|类型|String| +|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| +|改后生效方式|重启服务生效| + +* ON\_HEAP\_MEMORY + +|名字|ON\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置。| +|改后生效方式|重启服务生效| + +* OFF\_HEAP\_MEMORY + +|名字|OFF\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置| +|改后生效方式|重启服务生效| + +* JMX\_LOCAL + +|名字|JMX\_LOCAL| +|:---:|:---| +|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| +|类型|枚举 String : “true”, “false”| +|默认值|true| +|改后生效方式|重启服务生效| + +* JMX\_PORT + +|名字|JMX\_PORT| +|:---:|:---| +|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| +|类型|Short Int: [0,65535]| +|默认值|31999| +|改后生效方式|重启服务生效| + +## 系统配置项(iotdb-system.properties) + +系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 + +### Data Node RPC 服务配置 + +* dn\_rpc\_address + +|名字| dn\_rpc\_address | +|:---:|:-----------------| +|描述| 客户端 RPC 服务监听地址 | +|类型| String | +|默认值| 0.0.0.0 | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_port + +|名字| dn\_rpc\_port | +|:---:|:---| +|描述| Client RPC 服务监听端口| +|类型| Short Int : [0,65535] | +|默认值| 6667 | +|改后生效方式|重启服务生效| + +* dn\_internal\_address + +|名字| dn\_internal\_address | +|:---:|:---| +|描述| DataNode 内网通信地址 | +|类型| string | +|默认值| 127.0.0.1 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_internal\_port + +|名字| dn\_internal\_port | +|:---:|:-------------------| +|描述| DataNode 内网通信端口 | +|类型| int | +|默认值| 10730 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +* dn\_mpp\_data\_exchange\_port + +|名字| dn\_mpp\_data\_exchange\_port | +|:---:|:---| +|描述| MPP 数据交换端口 | +|类型| int | +|默认值| 10740 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_schema\_region\_consensus\_port + +|名字| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 元数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10750 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_data\_region\_consensus\_port + +|名字| dn\_data\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10760 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_join\_cluster\_retry\_interval\_ms + +|名字| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:---------------------------------------| +|描述| DataNode 再次重试加入集群等待时间 | +|类型| long | +|默认值| 5000 | +|改后生效方式| 重启服务生效 | + + +### SSL 配置 + +* enable\_thrift\_ssl + +|名字| enable\_thrift\_ssl | +|:---:|:----------------------------------------------| +|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* enable\_https + +|名字| enable\_https | +|:---:|:-------------------------| +|描述| REST Service 是否开启 SSL 配置 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* key\_store\_path + +|名字| key\_store\_path | +|:---:|:-----------------| +|描述| ssl证书路径 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + +* key\_store\_pwd + +|名字| key\_store\_pwd | +|:---:|:----------------| +|描述| ssl证书密码 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + + +### SeedConfigNode 配置 + +* dn\_seed\_config\_node + +|名字| dn\_seed\_config\_node | +|:---:|:------------------------------------| +|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群,推荐使用 SeedConfigNode。V1.2.2 及以前曾用名是 dn\_target\_config\_node\_list | +|类型| String | +|默认值| 127.0.0.1:10710 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +### 连接配置 + +* dn\_session\_timeout\_threshold + +|名字| dn\_session_timeout_threshold | +|:---:|:------------------------------| +|描述| 最大的会话空闲时间 | +|类型| int | +|默认值| 0 | +|改后生效方式| 重启服务生效 | + + +* dn\_rpc\_thrift\_compression\_enable + +|名字| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---------------------------------| +|描述| 是否启用 thrift 的压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_advanced\_compression\_enable + +|名字| dn\_rpc\_advanced\_compression\_enable | +|:---:|:-----------------------------------| +|描述| 是否启用 thrift 的自定制压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_selector\_thread\_count + +| 名字 | rpc\_selector\_thread\_count | +|:------:|:-----------------------------| +| 描述 | rpc 选择器线程数量 | +| 类型 | int | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_min\_concurrent\_client\_num + +| 名字 | rpc\_min\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最小连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_max\_concurrent\_client\_num + +| 名字 | dn\_rpc\_max\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最大连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 65535 | +| 改后生效方式 | 重启服务生效 | + +* dn\_thrift\_max\_frame\_size + +|名字| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|描述| RPC 请求/响应的最大字节数| +|类型| long | +|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | +|改后生效方式|重启服务生效| + +* dn\_thrift\_init\_buffer\_size + +|名字| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|描述| 字节数 | +|类型| long | +|默认值| 1024 | +|改后生效方式|重启服务生效| + +* dn\_connection\_timeout\_ms + +| 名字 | dn\_connection\_timeout\_ms | +|:------:|:----------------------------| +| 描述 | 节点连接超时时间 | +| 类型 | int | +| 默认值 | 60000 | +| 改后生效方式 | 重启服务生效 | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:--------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | +| 类型 | int | +| 默认值 | 200 | +| 改后生效方式 | 重启服务生效 | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:-------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | +| 类型 | int | +| 默认值 | 300 | +| 改后生效方式 | 重启服务生效 | + +### 目录配置 + +* dn\_system\_dir + +| 名字 | dn\_system\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | +| 改后生效方式 | 重启服务生效 | + +* dn\_data\_dirs + +| 名字 | dn\_data\_dirs | +|:------:|:-------------------------------------------------------------------| +| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | +| 改后生效方式 | 重启服务生效 | + +* dn\_multi\_dir\_strategy + +| 名字 | dn\_multi\_dir\_strategy | +|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | +| 类型 | String | +| 默认值 | SequenceStrategy | +| 改后生效方式 | 热加载 | + +* dn\_consensus\_dir + +| 名字 | dn\_consensus\_dir | +|:------:|:-------------------------------------------------------------------------| +| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | +| 改后生效方式 | 重启服务生效 | + +* dn\_wal\_dirs + +| 名字 | dn\_wal\_dirs | +|:------:|:---------------------------------------------------------------------| +| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | +| 改后生效方式 | 重启服务生效 | + +* dn\_tracing\_dir + +| 名字 | dn\_tracing\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | datanode/tracing | +| 改后生效方式 | 重启服务生效 | + +* dn\_sync\_dir + +| 名字 | dn\_sync\_dir | +|:------:|:----------------------------------------------------------------------| +| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/sync | +| 改后生效方式 | 重启服务生效 | + +### Metric 配置 + +## 开启 GC 日志 + +GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 +若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` + +或者 + +```bash +sbin\start-datanode.bat printgc +``` + +GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 + +#### REST 服务配置 + +* enable\_rest\_service + +|名字| enable\_rest\_service | +|:---:|:--------------------| +|描述| 是否开启Rest服务。 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_service\_port + +|名字| rest\_service\_port | +|:---:|:------------------| +|描述| Rest服务监听端口号 | +|类型| int32 | +|默认值| 18080 | +|改后生效方式| 重启生效 | + +* enable\_swagger + +|名字| enable\_swagger | +|:---:|:-----------------------| +|描述| 是否启用swagger来展示rest接口信息 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_query\_default\_row\_size\_limit + +|名字| rest\_query\_default\_row\_size\_limit | +|:---:|:----------------------------------| +|描述| 一次查询能返回的结果集最大行数 | +|类型| int32 | +|默认值| 10000 | +|改后生效方式| 重启生效 | + +* cache\_expire + +|名字| cache\_expire | +|:---:|:--------------| +|描述| 缓存客户登录信息的过期时间 | +|类型| int32 | +|默认值| 28800 | +|改后生效方式| 重启生效 | + +* cache\_max\_num + +|名字| cache\_max\_num | +|:---:|:--------------| +|描述| 缓存中存储的最大用户数量 | +|类型| int32 | +|默认值| 100 | +|改后生效方式| 重启生效 | + +* cache\_init\_num + +|名字| cache\_init\_num | +|:---:|:---------------| +|描述| 缓存初始容量 | +|类型| int32 | +|默认值| 10 | +|改后生效方式| 重启生效 | + +* trust\_store\_path + +|名字| trust\_store\_path | +|:---:|:---------------| +|描述| keyStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* trust\_store\_pwd + +|名字| trust\_store\_pwd | +|:---:|:---------------| +|描述| trustStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* idle\_timeout + +|名字| idle\_timeout | +|:---:|:--------------| +|描述| SSL 超时时间,单位为秒 | +|类型| int32 | +|默认值| 5000 | +|改后生效方式| 重启生效 | + + + +#### 多级存储配置 + +* dn\_default\_space\_usage\_thresholds + +|名字| dn\_default\_space\_usage\_thresholds | +|:---:|:--------------| +|描述| 定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | +|类型| double | +|默认值| 0.85 | +|改后生效方式| 热加载 | + +* remote\_tsfile\_cache\_dirs + +|名字| remote\_tsfile\_cache\_dirs | +|:---:|:--------------| +|描述| 云端存储在本地的缓存目录 | +|类型| string | +|默认值| data/datanode/data/cache | +|改后生效方式| 重启生效 | + +* remote\_tsfile\_cache\_page\_size\_in\_kb + +|名字| remote\_tsfile\_cache\_page\_size\_in\_kb | +|:---:|:--------------| +|描述| 云端存储在本地缓存文件的块大小 | +|类型| int | +|默认值| 20480 | +|改后生效方式| 重启生效 | + +* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb + +|名字| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | +|:---:|:--------------| +|描述| 云端存储本地缓存的最大磁盘占用大小 | +|类型| long | +|默认值| 51200 | +|改后生效方式| 重启生效 | + +* object\_storage\_type + +|名字| object\_storage\_type | +|:---:|:--------------| +|描述| 云端存储类型 | +|类型| string | +|默认值| AWS_S3 | +|改后生效方式| 重启生效 | + +* object\_storage\_bucket + +|名字| object\_storage\_bucket | +|:---:|:--------------| +|描述| 云端存储 bucket 的名称 | +|类型| string | +|默认值| iotdb_data | +|改后生效方式| 重启生效 | + +* object\_storage\_endpoiont + +|名字| object\_storage\_endpoiont | +|:---:|:--------------| +|描述| 云端存储的 endpoint | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | + +* object\_storage\_access\_key + +|名字| object\_storage\_access\_key | +|:---:|:--------------| +|描述| 云端存储的验证信息 key | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | + +* object\_storage\_access\_secret + +|名字| object\_storage\_access\_secret | +|:---:|:--------------| +|描述| 云端存储的验证信息 secret | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | \ No newline at end of file diff --git a/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual.md b/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual.md index 5e582d189..172882761 100644 --- a/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual.md +++ b/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual.md @@ -1,3 +1,6 @@ +--- +redirectTo: DataNode-Config-Manual_apache.html +--- - -# DataNode 配置参数 - -IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 - -* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 - -* `iotdb-datanode.properties`:IoTDB 配置文件。 - -## 热修改配置项 - -为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-datanode.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载`的均为支持热修改的配置参数。 - -通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 - -## 环境配置项(datanode-env.sh/bat) - -环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: - -* MEMORY\_SIZE - -|名字|MEMORY\_SIZE| -|:---:|:---| -|描述|IoTDB DataNode 启动时分配的内存大小 | -|类型|String| -|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| -|改后生效方式|重启服务生效| - -* ON\_HEAP\_MEMORY - -|名字|ON\_HEAP\_MEMORY| -|:---:|:---| -|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | -|类型|String| -|默认值|取决于MEMORY\_SIZE的配置。| -|改后生效方式|重启服务生效| - -* OFF\_HEAP\_MEMORY - -|名字|OFF\_HEAP\_MEMORY| -|:---:|:---| -|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | -|类型|String| -|默认值|取决于MEMORY\_SIZE的配置| -|改后生效方式|重启服务生效| - -* JMX\_LOCAL - -|名字|JMX\_LOCAL| -|:---:|:---| -|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| -|类型|枚举 String : “true”, “false”| -|默认值|true| -|改后生效方式|重启服务生效| - -* JMX\_PORT - -|名字|JMX\_PORT| -|:---:|:---| -|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| -|类型|Short Int: [0,65535]| -|默认值|31999| -|改后生效方式|重启服务生效| - -## 系统配置项(iotdb-datanode.properties) - -系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 - -### Data Node RPC 服务配置 - -* dn\_rpc\_address - -|名字| dn\_rpc\_address | -|:---:|:-----------------| -|描述| 客户端 RPC 服务监听地址 | -|类型| String | -|默认值| 0.0.0.0 | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_port - -|名字| dn\_rpc\_port | -|:---:|:---| -|描述| Client RPC 服务监听端口| -|类型| Short Int : [0,65535] | -|默认值| 6667 | -|改后生效方式|重启服务生效| - -* dn\_internal\_address - -|名字| dn\_internal\_address | -|:---:|:---| -|描述| DataNode 内网通信地址 | -|类型| string | -|默认值| 127.0.0.1 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_internal\_port - -|名字| dn\_internal\_port | -|:---:|:-------------------| -|描述| DataNode 内网通信端口 | -|类型| int | -|默认值| 10730 | -|改后生效方式| 仅允许在第一次启动服务前修改 | - -* dn\_mpp\_data\_exchange\_port - -|名字| dn\_mpp\_data\_exchange\_port | -|:---:|:---| -|描述| MPP 数据交换端口 | -|类型| int | -|默认值| 10740 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_schema\_region\_consensus\_port - -|名字| dn\_schema\_region\_consensus\_port | -|:---:|:---| -|描述| DataNode 元数据副本的共识协议通信端口 | -|类型| int | -|默认值| 10750 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_data\_region\_consensus\_port - -|名字| dn\_data\_region\_consensus\_port | -|:---:|:---| -|描述| DataNode 数据副本的共识协议通信端口 | -|类型| int | -|默认值| 10760 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_join\_cluster\_retry\_interval\_ms - -|名字| dn\_join\_cluster\_retry\_interval\_ms | -|:---:|:---------------------------------------| -|描述| DataNode 再次重试加入集群等待时间 | -|类型| long | -|默认值| 5000 | -|改后生效方式| 重启服务生效 | - - -### SSL 配置 - -* enable\_thrift\_ssl - -|名字| enable\_thrift\_ssl | -|:---:|:----------------------------------------------| -|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* enable\_https - -|名字| enable\_https | -|:---:|:-------------------------| -|描述| REST Service 是否开启 SSL 配置 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* key\_store\_path - -|名字| key\_store\_path | -|:---:|:-----------------| -|描述| ssl证书路径 | -|类型| String | -|默认值| "" | -|改后生效方式| 重启服务生效 | - -* key\_store\_pwd - -|名字| key\_store\_pwd | -|:---:|:----------------| -|描述| ssl证书密码 | -|类型| String | -|默认值| "" | -|改后生效方式| 重启服务生效 | - - -### 目标 Config Nodes 配置 - -* dn\_seed\_config\_node - -|名字| dn\_seed\_config\_node | -|:---:|:------------------------------------| -|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群 | -|类型| String | -|默认值| 127.0.0.1:10710 | -|改后生效方式| 仅允许在第一次启动服务前修改 | - -### 连接配置 - -* dn\_session\_timeout\_threshold - -|名字| dn\_session_timeout_threshold | -|:---:|:------------------------------| -|描述| 最大的会话空闲时间 | -|类型| int | -|默认值| 0 | -|改后生效方式| 重启服务生效 | - - -* dn\_rpc\_thrift\_compression\_enable - -|名字| dn\_rpc\_thrift\_compression\_enable | -|:---:|:---------------------------------| -|描述| 是否启用 thrift 的压缩机制 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_advanced\_compression\_enable - -|名字| dn\_rpc\_advanced\_compression\_enable | -|:---:|:-----------------------------------| -|描述| 是否启用 thrift 的自定制压缩机制 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_selector\_thread\_count - -| 名字 | rpc\_selector\_thread\_count | -|:------:|:-----------------------------| -| 描述 | rpc 选择器线程数量 | -| 类型 | int | -| 默认值 | 1 | -| 改后生效方式 | 重启服务生效 | - -* dn\_rpc\_min\_concurrent\_client\_num - -| 名字 | rpc\_min\_concurrent\_client\_num | -|:------:|:----------------------------------| -| 描述 | 最小连接数 | -| 类型 | Short Int : [0,65535] | -| 默认值 | 1 | -| 改后生效方式 | 重启服务生效 | - -* dn\_rpc\_max\_concurrent\_client\_num - -| 名字 | dn\_rpc\_max\_concurrent\_client\_num | -|:------:|:----------------------------------| -| 描述 | 最大连接数 | -| 类型 | Short Int : [0,65535] | -| 默认值 | 65535 | -| 改后生效方式 | 重启服务生效 | - -* dn\_thrift\_max\_frame\_size - -|名字| dn\_thrift\_max\_frame\_size | -|:---:|:---| -|描述| RPC 请求/响应的最大字节数| -|类型| long | -|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | -|改后生效方式|重启服务生效| - -* dn\_thrift\_init\_buffer\_size - -|名字| dn\_thrift\_init\_buffer\_size | -|:---:|:---| -|描述| 字节数 | -|类型| long | -|默认值| 1024 | -|改后生效方式|重启服务生效| - -* dn\_connection\_timeout\_ms - -| 名字 | dn\_connection\_timeout\_ms | -|:------:|:----------------------------| -| 描述 | 节点连接超时时间 | -| 类型 | int | -| 默认值 | 60000 | -| 改后生效方式 | 重启服务生效 | - -* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager - -| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------:|:--------------------------------------------------------------| -| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | -| 类型 | int | -| 默认值 | 200 | -| 改后生效方式 | 重启服务生效 | - -* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager - -| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------:|:-------------------------------------------------------------| -| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | -| 类型 | int | -| 默认值 | 300 | -| 改后生效方式 | 重启服务生效 | - -### 目录配置 - -* dn\_system\_dir - -| 名字 | dn\_system\_dir | -|:------:|:--------------------------------------------------------------------| -| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | -| 改后生效方式 | 重启服务生效 | - -* dn\_data\_dirs - -| 名字 | dn\_data\_dirs | -|:------:|:-------------------------------------------------------------------| -| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | -| 改后生效方式 | 重启服务生效 | - -* dn\_multi\_dir\_strategy - -| 名字 | dn\_multi\_dir\_strategy | -|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | -| 类型 | String | -| 默认值 | SequenceStrategy | -| 改后生效方式 | 热加载 | - -* dn\_consensus\_dir - -| 名字 | dn\_consensus\_dir | -|:------:|:-------------------------------------------------------------------------| -| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | -| 改后生效方式 | 重启服务生效 | - -* dn\_wal\_dirs - -| 名字 | dn\_wal\_dirs | -|:------:|:---------------------------------------------------------------------| -| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | -| 改后生效方式 | 重启服务生效 | - -* dn\_tracing\_dir - -| 名字 | dn\_tracing\_dir | -|:------:|:--------------------------------------------------------------------| -| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | datanode/tracing | -| 改后生效方式 | 重启服务生效 | - -* dn\_sync\_dir - -| 名字 | dn\_sync\_dir | -|:------:|:----------------------------------------------------------------------| -| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/sync | -| 改后生效方式 | 重启服务生效 | - -### Metric 配置 - -## 开启 GC 日志 - -GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 -若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: - -```bash -nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & -``` - -或者 - -```bash -sbin\start-datanode.bat printgc -``` - -GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 - -#### REST 服务配置 - -* enable\_rest\_service - -|名字| enable\_rest\_service | -|:---:|:--------------------| -|描述| 是否开启Rest服务。 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* rest\_service\_port - -|名字| rest\_service\_port | -|:---:|:------------------| -|描述| Rest服务监听端口号 | -|类型| int32 | -|默认值| 18080 | -|改后生效方式| 重启生效 | - -* enable\_swagger - -|名字| enable\_swagger | -|:---:|:-----------------------| -|描述| 是否启用swagger来展示rest接口信息 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* rest\_query\_default\_row\_size\_limit - -|名字| rest\_query\_default\_row\_size\_limit | -|:---:|:----------------------------------| -|描述| 一次查询能返回的结果集最大行数 | -|类型| int32 | -|默认值| 10000 | -|改后生效方式| 重启生效 | - -* cache\_expire - -|名字| cache\_expire | -|:---:|:--------------| -|描述| 缓存客户登录信息的过期时间 | -|类型| int32 | -|默认值| 28800 | -|改后生效方式| 重启生效 | - -* cache\_max\_num - -|名字| cache\_max\_num | -|:---:|:--------------| -|描述| 缓存中存储的最大用户数量 | -|类型| int32 | -|默认值| 100 | -|改后生效方式| 重启生效 | - -* cache\_init\_num - -|名字| cache\_init\_num | -|:---:|:---------------| -|描述| 缓存初始容量 | -|类型| int32 | -|默认值| 10 | -|改后生效方式| 重启生效 | - -* trust\_store\_path - -|名字| trust\_store\_path | -|:---:|:---------------| -|描述| keyStore 密码(非必填) | -|类型| String | -|默认值| "" | -|改后生效方式| 重启生效 | - -* trust\_store\_pwd - -|名字| trust\_store\_pwd | -|:---:|:---------------| -|描述| trustStore 密码(非必填) | -|类型| String | -|默认值| "" | -|改后生效方式| 重启生效 | - -* idle\_timeout - -|名字| idle\_timeout | -|:---:|:--------------| -|描述| SSL 超时时间,单位为秒 | -|类型| int32 | -|默认值| 5000 | -|改后生效方式| 重启生效 | - -#### 存储引擎配置 - -* dn\_default\_space\_move\_thresholds - -|名字| dn\_default\_space\_move\_thresholds | -|:---:|:--------------| -|描述| 1.3.0/1版本:定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | -|类型| double | -|默认值| 0.15 | -|改后生效方式| 热加载 | - -* dn\_default\_space\_usage\_thresholds - -|名字| dn\_default\_space\_usage\_thresholds | -|:---:|:--------------| -|描述| 1.3.2版本:定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | -|类型| double | -|默认值| 0.85 | -|改后生效方式| 热加载 | - -* remote\_tsfile\_cache\_dirs - -|名字| remote\_tsfile\_cache\_dirs | -|:---:|:--------------| -|描述| 云端存储在本地的缓存目录 | -|类型| string | -|默认值| data/datanode/data/cache | -|改后生效方式| 重启生效 | - -* remote\_tsfile\_cache\_page\_size\_in\_kb - -|名字| remote\_tsfile\_cache\_page\_size\_in\_kb | -|:---:|:--------------| -|描述| 云端存储在本地缓存文件的块大小 | -|类型| int | -|默认值| 20480 | -|改后生效方式| 重启生效 | - -* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb - -|名字| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | -|:---:|:--------------| -|描述| 云端存储本地缓存的最大磁盘占用大小 | -|类型| long | -|默认值| 51200 | -|改后生效方式| 重启生效 | - -* object\_storage\_type - -|名字| object\_storage\_type | -|:---:|:--------------| -|描述| 云端存储类型 | -|类型| string | -|默认值| AWS_S3 | -|改后生效方式| 重启生效 | - -* object\_storage\_bucket - -|名字| object\_storage\_bucket | -|:---:|:--------------| -|描述| 云端存储 bucket 的名称 | -|类型| string | -|默认值| iotdb_data | -|改后生效方式| 重启生效 | - -* object\_storage\_endpoiont - -|名字| object\_storage\_endpoiont | -|:---:|:--------------| -|描述| 云端存储的 endpoint | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | - -* object\_storage\_access\_key - -|名字| object\_storage\_access\_key | -|:---:|:--------------| -|描述| 云端存储的验证信息 key | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | - -* object\_storage\_access\_secret - -|名字| object\_storage\_access\_secret | -|:---:|:--------------| -|描述| 云端存储的验证信息 secret | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | \ No newline at end of file diff --git a/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_apache.md b/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_apache.md new file mode 100644 index 000000000..532a17f37 --- /dev/null +++ b/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_apache.md @@ -0,0 +1,491 @@ + + +# DataNode 配置参数 + +IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 + +* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 + +* `iotdb-datanode.properties`:IoTDB 配置文件。 + +## 热修改配置项 + +为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-datanode.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载`的均为支持热修改的配置参数。 + +通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 + +## 环境配置项(datanode-env.sh/bat) + +环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: + +* MEMORY\_SIZE + +|名字|MEMORY\_SIZE| +|:---:|:---| +|描述|IoTDB DataNode 启动时分配的内存大小 | +|类型|String| +|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| +|改后生效方式|重启服务生效| + +* ON\_HEAP\_MEMORY + +|名字|ON\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置。| +|改后生效方式|重启服务生效| + +* OFF\_HEAP\_MEMORY + +|名字|OFF\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置| +|改后生效方式|重启服务生效| + +* JMX\_LOCAL + +|名字|JMX\_LOCAL| +|:---:|:---| +|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| +|类型|枚举 String : “true”, “false”| +|默认值|true| +|改后生效方式|重启服务生效| + +* JMX\_PORT + +|名字|JMX\_PORT| +|:---:|:---| +|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| +|类型|Short Int: [0,65535]| +|默认值|31999| +|改后生效方式|重启服务生效| + +## 系统配置项(iotdb-datanode.properties) + +系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 + +### Data Node RPC 服务配置 + +* dn\_rpc\_address + +|名字| dn\_rpc\_address | +|:---:|:-----------------| +|描述| 客户端 RPC 服务监听地址 | +|类型| String | +|默认值| 0.0.0.0 | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_port + +|名字| dn\_rpc\_port | +|:---:|:---| +|描述| Client RPC 服务监听端口| +|类型| Short Int : [0,65535] | +|默认值| 6667 | +|改后生效方式|重启服务生效| + +* dn\_internal\_address + +|名字| dn\_internal\_address | +|:---:|:---| +|描述| DataNode 内网通信地址 | +|类型| string | +|默认值| 127.0.0.1 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_internal\_port + +|名字| dn\_internal\_port | +|:---:|:-------------------| +|描述| DataNode 内网通信端口 | +|类型| int | +|默认值| 10730 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +* dn\_mpp\_data\_exchange\_port + +|名字| dn\_mpp\_data\_exchange\_port | +|:---:|:---| +|描述| MPP 数据交换端口 | +|类型| int | +|默认值| 10740 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_schema\_region\_consensus\_port + +|名字| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 元数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10750 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_data\_region\_consensus\_port + +|名字| dn\_data\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10760 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_join\_cluster\_retry\_interval\_ms + +|名字| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:---------------------------------------| +|描述| DataNode 再次重试加入集群等待时间 | +|类型| long | +|默认值| 5000 | +|改后生效方式| 重启服务生效 | + + +### SSL 配置 + +* enable\_thrift\_ssl + +|名字| enable\_thrift\_ssl | +|:---:|:----------------------------------------------| +|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* enable\_https + +|名字| enable\_https | +|:---:|:-------------------------| +|描述| REST Service 是否开启 SSL 配置 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* key\_store\_path + +|名字| key\_store\_path | +|:---:|:-----------------| +|描述| ssl证书路径 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + +* key\_store\_pwd + +|名字| key\_store\_pwd | +|:---:|:----------------| +|描述| ssl证书密码 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + + +### 目标 Config Nodes 配置 + +* dn\_seed\_config\_node + +|名字| dn\_seed\_config\_node | +|:---:|:------------------------------------| +|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群 | +|类型| String | +|默认值| 127.0.0.1:10710 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +### 连接配置 + +* dn\_session\_timeout\_threshold + +|名字| dn\_session_timeout_threshold | +|:---:|:------------------------------| +|描述| 最大的会话空闲时间 | +|类型| int | +|默认值| 0 | +|改后生效方式| 重启服务生效 | + + +* dn\_rpc\_thrift\_compression\_enable + +|名字| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---------------------------------| +|描述| 是否启用 thrift 的压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_advanced\_compression\_enable + +|名字| dn\_rpc\_advanced\_compression\_enable | +|:---:|:-----------------------------------| +|描述| 是否启用 thrift 的自定制压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_selector\_thread\_count + +| 名字 | rpc\_selector\_thread\_count | +|:------:|:-----------------------------| +| 描述 | rpc 选择器线程数量 | +| 类型 | int | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_min\_concurrent\_client\_num + +| 名字 | rpc\_min\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最小连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_max\_concurrent\_client\_num + +| 名字 | dn\_rpc\_max\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最大连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 65535 | +| 改后生效方式 | 重启服务生效 | + +* dn\_thrift\_max\_frame\_size + +|名字| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|描述| RPC 请求/响应的最大字节数| +|类型| long | +|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | +|改后生效方式|重启服务生效| + +* dn\_thrift\_init\_buffer\_size + +|名字| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|描述| 字节数 | +|类型| long | +|默认值| 1024 | +|改后生效方式|重启服务生效| + +* dn\_connection\_timeout\_ms + +| 名字 | dn\_connection\_timeout\_ms | +|:------:|:----------------------------| +| 描述 | 节点连接超时时间 | +| 类型 | int | +| 默认值 | 60000 | +| 改后生效方式 | 重启服务生效 | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:--------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | +| 类型 | int | +| 默认值 | 200 | +| 改后生效方式 | 重启服务生效 | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:-------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | +| 类型 | int | +| 默认值 | 300 | +| 改后生效方式 | 重启服务生效 | + +### 目录配置 + +* dn\_system\_dir + +| 名字 | dn\_system\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | +| 改后生效方式 | 重启服务生效 | + +* dn\_data\_dirs + +| 名字 | dn\_data\_dirs | +|:------:|:-------------------------------------------------------------------| +| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | +| 改后生效方式 | 重启服务生效 | + +* dn\_multi\_dir\_strategy + +| 名字 | dn\_multi\_dir\_strategy | +|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | +| 类型 | String | +| 默认值 | SequenceStrategy | +| 改后生效方式 | 热加载 | + +* dn\_consensus\_dir + +| 名字 | dn\_consensus\_dir | +|:------:|:-------------------------------------------------------------------------| +| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | +| 改后生效方式 | 重启服务生效 | + +* dn\_wal\_dirs + +| 名字 | dn\_wal\_dirs | +|:------:|:---------------------------------------------------------------------| +| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | +| 改后生效方式 | 重启服务生效 | + +* dn\_tracing\_dir + +| 名字 | dn\_tracing\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | datanode/tracing | +| 改后生效方式 | 重启服务生效 | + +* dn\_sync\_dir + +| 名字 | dn\_sync\_dir | +|:------:|:----------------------------------------------------------------------| +| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/sync | +| 改后生效方式 | 重启服务生效 | + +### Metric 配置 + +## 开启 GC 日志 + +GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 +若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` + +或者 + +```bash +sbin\start-datanode.bat printgc +``` + +GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 + +#### REST 服务配置 + +* enable\_rest\_service + +|名字| enable\_rest\_service | +|:---:|:--------------------| +|描述| 是否开启Rest服务。 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_service\_port + +|名字| rest\_service\_port | +|:---:|:------------------| +|描述| Rest服务监听端口号 | +|类型| int32 | +|默认值| 18080 | +|改后生效方式| 重启生效 | + +* enable\_swagger + +|名字| enable\_swagger | +|:---:|:-----------------------| +|描述| 是否启用swagger来展示rest接口信息 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_query\_default\_row\_size\_limit + +|名字| rest\_query\_default\_row\_size\_limit | +|:---:|:----------------------------------| +|描述| 一次查询能返回的结果集最大行数 | +|类型| int32 | +|默认值| 10000 | +|改后生效方式| 重启生效 | + +* cache\_expire + +|名字| cache\_expire | +|:---:|:--------------| +|描述| 缓存客户登录信息的过期时间 | +|类型| int32 | +|默认值| 28800 | +|改后生效方式| 重启生效 | + +* cache\_max\_num + +|名字| cache\_max\_num | +|:---:|:--------------| +|描述| 缓存中存储的最大用户数量 | +|类型| int32 | +|默认值| 100 | +|改后生效方式| 重启生效 | + +* cache\_init\_num + +|名字| cache\_init\_num | +|:---:|:---------------| +|描述| 缓存初始容量 | +|类型| int32 | +|默认值| 10 | +|改后生效方式| 重启生效 | + +* trust\_store\_path + +|名字| trust\_store\_path | +|:---:|:---------------| +|描述| keyStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* trust\_store\_pwd + +|名字| trust\_store\_pwd | +|:---:|:---------------| +|描述| trustStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* idle\_timeout + +|名字| idle\_timeout | +|:---:|:--------------| +|描述| SSL 超时时间,单位为秒 | +|类型| int32 | +|默认值| 5000 | +|改后生效方式| 重启生效 | + diff --git a/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_timecho.md b/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_timecho.md new file mode 100644 index 000000000..5e582d189 --- /dev/null +++ b/src/zh/UserGuide/V1.3.0-2/Reference/DataNode-Config-Manual_timecho.md @@ -0,0 +1,582 @@ + + +# DataNode 配置参数 + +IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 + +* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 + +* `iotdb-datanode.properties`:IoTDB 配置文件。 + +## 热修改配置项 + +为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-datanode.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载`的均为支持热修改的配置参数。 + +通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 + +## 环境配置项(datanode-env.sh/bat) + +环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: + +* MEMORY\_SIZE + +|名字|MEMORY\_SIZE| +|:---:|:---| +|描述|IoTDB DataNode 启动时分配的内存大小 | +|类型|String| +|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| +|改后生效方式|重启服务生效| + +* ON\_HEAP\_MEMORY + +|名字|ON\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置。| +|改后生效方式|重启服务生效| + +* OFF\_HEAP\_MEMORY + +|名字|OFF\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置| +|改后生效方式|重启服务生效| + +* JMX\_LOCAL + +|名字|JMX\_LOCAL| +|:---:|:---| +|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| +|类型|枚举 String : “true”, “false”| +|默认值|true| +|改后生效方式|重启服务生效| + +* JMX\_PORT + +|名字|JMX\_PORT| +|:---:|:---| +|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| +|类型|Short Int: [0,65535]| +|默认值|31999| +|改后生效方式|重启服务生效| + +## 系统配置项(iotdb-datanode.properties) + +系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 + +### Data Node RPC 服务配置 + +* dn\_rpc\_address + +|名字| dn\_rpc\_address | +|:---:|:-----------------| +|描述| 客户端 RPC 服务监听地址 | +|类型| String | +|默认值| 0.0.0.0 | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_port + +|名字| dn\_rpc\_port | +|:---:|:---| +|描述| Client RPC 服务监听端口| +|类型| Short Int : [0,65535] | +|默认值| 6667 | +|改后生效方式|重启服务生效| + +* dn\_internal\_address + +|名字| dn\_internal\_address | +|:---:|:---| +|描述| DataNode 内网通信地址 | +|类型| string | +|默认值| 127.0.0.1 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_internal\_port + +|名字| dn\_internal\_port | +|:---:|:-------------------| +|描述| DataNode 内网通信端口 | +|类型| int | +|默认值| 10730 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +* dn\_mpp\_data\_exchange\_port + +|名字| dn\_mpp\_data\_exchange\_port | +|:---:|:---| +|描述| MPP 数据交换端口 | +|类型| int | +|默认值| 10740 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_schema\_region\_consensus\_port + +|名字| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 元数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10750 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_data\_region\_consensus\_port + +|名字| dn\_data\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10760 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_join\_cluster\_retry\_interval\_ms + +|名字| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:---------------------------------------| +|描述| DataNode 再次重试加入集群等待时间 | +|类型| long | +|默认值| 5000 | +|改后生效方式| 重启服务生效 | + + +### SSL 配置 + +* enable\_thrift\_ssl + +|名字| enable\_thrift\_ssl | +|:---:|:----------------------------------------------| +|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* enable\_https + +|名字| enable\_https | +|:---:|:-------------------------| +|描述| REST Service 是否开启 SSL 配置 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* key\_store\_path + +|名字| key\_store\_path | +|:---:|:-----------------| +|描述| ssl证书路径 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + +* key\_store\_pwd + +|名字| key\_store\_pwd | +|:---:|:----------------| +|描述| ssl证书密码 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + + +### 目标 Config Nodes 配置 + +* dn\_seed\_config\_node + +|名字| dn\_seed\_config\_node | +|:---:|:------------------------------------| +|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群 | +|类型| String | +|默认值| 127.0.0.1:10710 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +### 连接配置 + +* dn\_session\_timeout\_threshold + +|名字| dn\_session_timeout_threshold | +|:---:|:------------------------------| +|描述| 最大的会话空闲时间 | +|类型| int | +|默认值| 0 | +|改后生效方式| 重启服务生效 | + + +* dn\_rpc\_thrift\_compression\_enable + +|名字| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---------------------------------| +|描述| 是否启用 thrift 的压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_advanced\_compression\_enable + +|名字| dn\_rpc\_advanced\_compression\_enable | +|:---:|:-----------------------------------| +|描述| 是否启用 thrift 的自定制压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_selector\_thread\_count + +| 名字 | rpc\_selector\_thread\_count | +|:------:|:-----------------------------| +| 描述 | rpc 选择器线程数量 | +| 类型 | int | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_min\_concurrent\_client\_num + +| 名字 | rpc\_min\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最小连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_max\_concurrent\_client\_num + +| 名字 | dn\_rpc\_max\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最大连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 65535 | +| 改后生效方式 | 重启服务生效 | + +* dn\_thrift\_max\_frame\_size + +|名字| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|描述| RPC 请求/响应的最大字节数| +|类型| long | +|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | +|改后生效方式|重启服务生效| + +* dn\_thrift\_init\_buffer\_size + +|名字| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|描述| 字节数 | +|类型| long | +|默认值| 1024 | +|改后生效方式|重启服务生效| + +* dn\_connection\_timeout\_ms + +| 名字 | dn\_connection\_timeout\_ms | +|:------:|:----------------------------| +| 描述 | 节点连接超时时间 | +| 类型 | int | +| 默认值 | 60000 | +| 改后生效方式 | 重启服务生效 | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:--------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | +| 类型 | int | +| 默认值 | 200 | +| 改后生效方式 | 重启服务生效 | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:-------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | +| 类型 | int | +| 默认值 | 300 | +| 改后生效方式 | 重启服务生效 | + +### 目录配置 + +* dn\_system\_dir + +| 名字 | dn\_system\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | +| 改后生效方式 | 重启服务生效 | + +* dn\_data\_dirs + +| 名字 | dn\_data\_dirs | +|:------:|:-------------------------------------------------------------------| +| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | +| 改后生效方式 | 重启服务生效 | + +* dn\_multi\_dir\_strategy + +| 名字 | dn\_multi\_dir\_strategy | +|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | +| 类型 | String | +| 默认值 | SequenceStrategy | +| 改后生效方式 | 热加载 | + +* dn\_consensus\_dir + +| 名字 | dn\_consensus\_dir | +|:------:|:-------------------------------------------------------------------------| +| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | +| 改后生效方式 | 重启服务生效 | + +* dn\_wal\_dirs + +| 名字 | dn\_wal\_dirs | +|:------:|:---------------------------------------------------------------------| +| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | +| 改后生效方式 | 重启服务生效 | + +* dn\_tracing\_dir + +| 名字 | dn\_tracing\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | datanode/tracing | +| 改后生效方式 | 重启服务生效 | + +* dn\_sync\_dir + +| 名字 | dn\_sync\_dir | +|:------:|:----------------------------------------------------------------------| +| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/sync | +| 改后生效方式 | 重启服务生效 | + +### Metric 配置 + +## 开启 GC 日志 + +GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 +若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` + +或者 + +```bash +sbin\start-datanode.bat printgc +``` + +GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 + +#### REST 服务配置 + +* enable\_rest\_service + +|名字| enable\_rest\_service | +|:---:|:--------------------| +|描述| 是否开启Rest服务。 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_service\_port + +|名字| rest\_service\_port | +|:---:|:------------------| +|描述| Rest服务监听端口号 | +|类型| int32 | +|默认值| 18080 | +|改后生效方式| 重启生效 | + +* enable\_swagger + +|名字| enable\_swagger | +|:---:|:-----------------------| +|描述| 是否启用swagger来展示rest接口信息 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_query\_default\_row\_size\_limit + +|名字| rest\_query\_default\_row\_size\_limit | +|:---:|:----------------------------------| +|描述| 一次查询能返回的结果集最大行数 | +|类型| int32 | +|默认值| 10000 | +|改后生效方式| 重启生效 | + +* cache\_expire + +|名字| cache\_expire | +|:---:|:--------------| +|描述| 缓存客户登录信息的过期时间 | +|类型| int32 | +|默认值| 28800 | +|改后生效方式| 重启生效 | + +* cache\_max\_num + +|名字| cache\_max\_num | +|:---:|:--------------| +|描述| 缓存中存储的最大用户数量 | +|类型| int32 | +|默认值| 100 | +|改后生效方式| 重启生效 | + +* cache\_init\_num + +|名字| cache\_init\_num | +|:---:|:---------------| +|描述| 缓存初始容量 | +|类型| int32 | +|默认值| 10 | +|改后生效方式| 重启生效 | + +* trust\_store\_path + +|名字| trust\_store\_path | +|:---:|:---------------| +|描述| keyStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* trust\_store\_pwd + +|名字| trust\_store\_pwd | +|:---:|:---------------| +|描述| trustStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* idle\_timeout + +|名字| idle\_timeout | +|:---:|:--------------| +|描述| SSL 超时时间,单位为秒 | +|类型| int32 | +|默认值| 5000 | +|改后生效方式| 重启生效 | + +#### 存储引擎配置 + +* dn\_default\_space\_move\_thresholds + +|名字| dn\_default\_space\_move\_thresholds | +|:---:|:--------------| +|描述| 1.3.0/1版本:定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | +|类型| double | +|默认值| 0.15 | +|改后生效方式| 热加载 | + +* dn\_default\_space\_usage\_thresholds + +|名字| dn\_default\_space\_usage\_thresholds | +|:---:|:--------------| +|描述| 1.3.2版本:定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | +|类型| double | +|默认值| 0.85 | +|改后生效方式| 热加载 | + +* remote\_tsfile\_cache\_dirs + +|名字| remote\_tsfile\_cache\_dirs | +|:---:|:--------------| +|描述| 云端存储在本地的缓存目录 | +|类型| string | +|默认值| data/datanode/data/cache | +|改后生效方式| 重启生效 | + +* remote\_tsfile\_cache\_page\_size\_in\_kb + +|名字| remote\_tsfile\_cache\_page\_size\_in\_kb | +|:---:|:--------------| +|描述| 云端存储在本地缓存文件的块大小 | +|类型| int | +|默认值| 20480 | +|改后生效方式| 重启生效 | + +* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb + +|名字| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | +|:---:|:--------------| +|描述| 云端存储本地缓存的最大磁盘占用大小 | +|类型| long | +|默认值| 51200 | +|改后生效方式| 重启生效 | + +* object\_storage\_type + +|名字| object\_storage\_type | +|:---:|:--------------| +|描述| 云端存储类型 | +|类型| string | +|默认值| AWS_S3 | +|改后生效方式| 重启生效 | + +* object\_storage\_bucket + +|名字| object\_storage\_bucket | +|:---:|:--------------| +|描述| 云端存储 bucket 的名称 | +|类型| string | +|默认值| iotdb_data | +|改后生效方式| 重启生效 | + +* object\_storage\_endpoiont + +|名字| object\_storage\_endpoiont | +|:---:|:--------------| +|描述| 云端存储的 endpoint | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | + +* object\_storage\_access\_key + +|名字| object\_storage\_access\_key | +|:---:|:--------------| +|描述| 云端存储的验证信息 key | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | + +* object\_storage\_access\_secret + +|名字| object\_storage\_access\_secret | +|:---:|:--------------| +|描述| 云端存储的验证信息 secret | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | \ No newline at end of file diff --git a/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept.md b/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept.md index ebd6a800e..b4631022f 100644 --- a/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept.md +++ b/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept.md @@ -1,3 +1,6 @@ +--- +redirectTo: Cluster-Concept_apache.html +--- - -# 集群相关概念 -下图展示了一个常见的 IoTDB 3C3D1A(3 个 ConfigNode、3 个 DataNode 和 1 个 AINode)的集群部署模式: - - -其中包括了 IoTDB 集群使用中用户常接触到的几个概念,包括: -- **节点**(ConfigNode、DataNode、AINode); -- **槽**(SchemaSlot、DataSlot); -- **Region**(SchemaRegion、DataRegion); -- ***副本组***。 - -下文将重点对以上概念进行介绍。 - -## 节点 -IoTDB 集群包括三种节点(进程),**ConfigNode**(管理节点),**DataNode**(数据节点)和 **AINode**(分析节点),如下所示: -- **ConfigNode**:存储集群的配置信息、数据库的元数据、时间序列元数据和数据的路由信息,监控集群节点并实施负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。ConfigNode 不直接接收客户端读写请求,它会通过一系列[负载均衡算法](../Technical-Insider/Cluster-data-partitioning.md)对集群中元数据和数据的分布提供指导。 -- **DataNode**:负责时间序列元数据和数据的读写,每个 DataNode 都能接收客户端读写请求并提供相应服务,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。接收客户端读写请求时,若 DataNode 缓存有对应的路由信息,它能直接在本地执行或是转发这些请求;否则它会向 ConfigNode 询问并缓存路由信息,以加速后续请求的服务效率。 -- **AINode**:负责与 ConfigNode 和 DataNode 交互来扩展 IoTDB 集群对时间序列进行智能分析的能力,支持从外部引入已有机器学习模型进行注册,并使用注册的模型在指定时序数据上通过简单 SQL 语句完成时序分析任务的过程,将模型的创建、管理及推理融合在数据库引擎中。目前已提供常见时序分析场景(例如预测与异常检测)的机器学习算法或自研模型。 - -## 槽 -IoTDB 内部将元数据和数据划分成多个更小的、更易于管理的单元,每个单元称为一个**槽**。槽是一个逻辑概念,在 IoTDB 集群中,**元数据槽**和**数据槽**定义如下: -- **元数据槽**(SchemaSlot):一部分元数据集合,元数据槽总数固定,默认数量为 1000,IoTDB 使用哈希算法将所有设备均匀地分配到这些元数据槽中。 -- **数据槽**(DataSlot):一部分数据集合,在元数据槽的基础上,将对应设备的数据按时间范围划分为数据槽,默认的时间范围为 7 天。 - -## Region -在 IoTDB 中,元数据和数据被复制到各个 DataNode 以获得集群高可用性。然而以槽为粒度进行复制会增加集群管理成本、降低写入吞吐。因此 IoTDB 引入 **Region** 这一概念,将元数据槽和数据槽分别分配给 SchemaRegion 和 DataRegion 后,以 Region 为单位进行复制。**SchemRegion** 和 **DataRegion** 的详细定义如下: -- **SchemaRegion**:元数据存储和复制的基本单元,集群每个数据库的所有元数据槽会被均匀分配给该数据库的所有 SchemaRegion。拥有相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 -- **DataRegion**:数据存储和复制的基本单元,集群每个数据库的所有数据槽会被均匀分配给该数据库的所有 DataRegion。拥有相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 - -## 副本组 -Region 的副本对集群的容灾能力至关重要。对于每个 Region 的所有副本,它们的角色分为 **leader** 和 **follower**,共同提供读写服务。不同架构下的副本组配置推荐如下: -| 类别 | 配置项 | 单机推荐配置 | 分布式推荐配置 | -| :-: | :-: | :-: | :-: | -| 元数据 | schema_replication_factor | 1 | 3 | -| 数据 | data_replication_factor | 1 | 2 | \ No newline at end of file +--> \ No newline at end of file diff --git a/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept_apache.md b/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept_apache.md new file mode 100644 index 000000000..98c6050cc --- /dev/null +++ b/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept_apache.md @@ -0,0 +1,106 @@ + + +# 常见概念 + +## 数据模型相关概念 + +| 概念 | 含义 | +| ----------------------- | ------------------------------------------------------------ | +| 数据模型(sql_dialect) | IoTDB 支持两种时序数据模型(SQL语法),管理的对象均为设备和测点树:以层级路径的方式管理数据,一条路径对应一个设备的一个测点表:以关系表的方式管理数据,一张表对应一类设备 | +| 元数据(Schema) | 元数据是数据库的数据模型信息,即树形结构或表结构。包括测点的名称、数据类型等定义。 | +| 设备(Device) | 对应一个实际场景中的物理设备,通常包含多个测点。 | +| 测点(Timeseries) | 又名:物理量、时间序列、时间线、点位、信号量、指标、测量值等。是多个数据点按时间戳递增排列形成的一个时间序列。通常一个测点代表一个采集点位,能够定期采集所在环境的物理量。 | +| 编码(Encoding) | 编码是一种压缩技术,将数据以二进制的形式进行表示,可以提高存储效率。IoTDB 支持多种针对不同类型的数据的编码方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | +| 压缩(Compression) | IoTDB 在数据编码后,使用压缩技术进一步压缩二进制数据,提升存储效率。IoTDB 支持多种压缩方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | + +## 分布式相关概念 + +下图展示了一个常见的 IoTDB 3C3D(3 个 ConfigNode、3 个 DataNode)的集群部署模式: + + + +IoTDB 的集群包括如下常见概念: + +- 节点(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- 多副本 + +下文将对以上概念进行介绍。 + + +### 节点 + +IoTDB 集群包括三种节点(进程):ConfigNode(管理节点),DataNode(数据节点)和 AINode(分析节点),如下所示: + +- ConfigNode:管理集群的节点信息、配置信息、用户权限、元数据、分区信息等,负责分布式操作的调度和负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。 +- DataNode:服务客户端请求,负责数据的存储和计算,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。 +- AINode:负责提供机器学习能力,支持注册已训练好的机器学习模型,并通过 SQL 调用模型进行推理,目前已内置自研时序大模型和常见的机器学习算法(如预测与异常检测)。 + +### 数据分区 + +在 IoTDB 中,元数据和数据都被分为小的分区,即 Region,由集群的各个 DataNode 进行管理。 + +- SchemaRegion:元数据分区,管理一部分设备和测点的元数据。不同 DataNode 相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 +- DataRegion:数据分区,管理一部分设备的一段时间的数据。不同 DataNode 相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 +- 具体分区算法可参考:[数据分区](../Technical-Insider/Cluster-data-partitioning.md) + +### 多副本 + +数据和元数据的副本数可配置,不同部署模式下的副本数推荐如下配置,其中多副本时可提供高可用服务。 + +| 类别 | 配置项 | 单机推荐配置 | 集群推荐配置 | +| :----- | :------------------------ | :----------- | :----------- | +| 元数据 | schema_replication_factor | 1 | 3 | +| 数据 | data_replication_factor | 1 | 2 | + + +## 部署相关概念 + +IoTDB 有两种运行模式:单机模式、集群模式。 + +### 单机模式 + +IoTDB单机实例包括 1 个ConfigNode、1个DataNode,即1C1D; + +- **特点**:便于开发者安装部署,部署和维护成本较低,操作方便。 +- **适用场景**:资源有限或对高可用要求不高的场景,例如边缘端服务器。 +- **部署方法**:[单机版部署](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) + +### 集群模式 + +IoTDB 集群实例为 3 个ConfigNode 和不少于 3 个 DataNode,通常为 3 个 DataNode,即3C3D;当部分节点出现故障时,剩余节点仍然能对外提供服务,保证数据库服务的高可用性,且可随节点增加提升数据库性能。 + +- **特点**:具有高可用性、高扩展性,可通过增加 DataNode 提高系统性能。 +- **适用场景**:需要提供高可用和可靠性的企业级应用场景。 +- **部署方法**:[集群版部署](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) + +### 特点总结 + +| 维度 | 单机模式 | 集群模式 | +| ------------ | ---------------------------- | ------------------------ | +| 适用场景 | 边缘侧部署、对高可用要求不高 | 高可用性业务、容灾场景等 | +| 所需机器数量 | 1 | ≥3 | +| 安全可靠性 | 无法容忍单点故障 | 高,可容忍单点故障 | +| 扩展性 | 可扩展 DataNode 提升性能 | 可扩展 DataNode 提升性能 | +| 性能 | 可随 DataNode 数量扩展 | 可随 DataNode 数量扩展 | + +- 单机模式和集群模式,部署步骤类似(逐个增加 ConfigNode 和 DataNode),仅副本数和可提供服务的最少节点数不同。 \ No newline at end of file diff --git a/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept_timecho.md b/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept_timecho.md new file mode 100644 index 000000000..77edf9ebb --- /dev/null +++ b/src/zh/UserGuide/V2.0.1/Table/Background-knowledge/Cluster-Concept_timecho.md @@ -0,0 +1,116 @@ + + +# 常见概念 + +## 数据模型相关概念 + +| 概念 | 含义 | +| ----------------------- | ------------------------------------------------------------ | +| 数据模型(sql_dialect) | IoTDB 支持两种时序数据模型(SQL语法),管理的对象均为设备和测点树:以层级路径的方式管理数据,一条路径对应一个设备的一个测点表:以关系表的方式管理数据,一张表对应一类设备 | +| 元数据(Schema) | 元数据是数据库的数据模型信息,即树形结构或表结构。包括测点的名称、数据类型等定义。 | +| 设备(Device) | 对应一个实际场景中的物理设备,通常包含多个测点。 | +| 测点(Timeseries) | 又名:物理量、时间序列、时间线、点位、信号量、指标、测量值等。是多个数据点按时间戳递增排列形成的一个时间序列。通常一个测点代表一个采集点位,能够定期采集所在环境的物理量。 | +| 编码(Encoding) | 编码是一种压缩技术,将数据以二进制的形式进行表示,可以提高存储效率。IoTDB 支持多种针对不同类型的数据的编码方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | +| 压缩(Compression) | IoTDB 在数据编码后,使用压缩技术进一步压缩二进制数据,提升存储效率。IoTDB 支持多种压缩方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | + +## 分布式相关概念 + +下图展示了一个常见的 IoTDB 3C3D(3 个 ConfigNode、3 个 DataNode)的集群部署模式: + + + +IoTDB 的集群包括如下常见概念: + +- 节点(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- 多副本 + +下文将对以上概念进行介绍。 + + +### 节点 + +IoTDB 集群包括三种节点(进程):ConfigNode(管理节点),DataNode(数据节点)和 AINode(分析节点),如下所示: + +- ConfigNode:管理集群的节点信息、配置信息、用户权限、元数据、分区信息等,负责分布式操作的调度和负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。 +- DataNode:服务客户端请求,负责数据的存储和计算,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。 +- AINode:负责提供机器学习能力,支持注册已训练好的机器学习模型,并通过 SQL 调用模型进行推理,目前已内置自研时序大模型和常见的机器学习算法(如预测与异常检测)。 + +### 数据分区 + +在 IoTDB 中,元数据和数据都被分为小的分区,即 Region,由集群的各个 DataNode 进行管理。 + +- SchemaRegion:元数据分区,管理一部分设备和测点的元数据。不同 DataNode 相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 +- DataRegion:数据分区,管理一部分设备的一段时间的数据。不同 DataNode 相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 +- 具体分区算法可参考:[数据分区](../Technical-Insider/Cluster-data-partitioning.md) + +### 多副本 + +数据和元数据的副本数可配置,不同部署模式下的副本数推荐如下配置,其中多副本时可提供高可用服务。 + +| 类别 | 配置项 | 单机推荐配置 | 集群推荐配置 | +| :----- | :------------------------ | :----------- | :----------- | +| 元数据 | schema_replication_factor | 1 | 3 | +| 数据 | data_replication_factor | 1 | 2 | + + +## 部署相关概念 + +IoTDB 有三种运行模式:单机模式、集群模式和双活模式。 + +### 单机模式 + +IoTDB单机实例包括 1 个ConfigNode、1个DataNode,即1C1D; + +- **特点**:便于开发者安装部署,部署和维护成本较低,操作方便。 +- **适用场景**:资源有限或对高可用要求不高的场景,例如边缘端服务器。 +- **部署方法**:[单机版部署](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) + +### 双活模式 + +双活版部署为 TimechoDB 企业版功能,是指两个独立的实例进行双向同步,能同时对外提供服务。当一台停机重启后,另一个实例会将缺失数据断点续传。 + +> IoTDB 双活实例通常为2个单机节点,即2套1C1D。每个实例也可以为集群。 + +- **特点**:资源占用最低的高可用解决方案。 +- **适用场景**:资源有限(仅有两台服务器),但希望获得高可用能力。 +- **部署方法**:[双活版部署](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) + +### 集群模式 + +IoTDB 集群实例为 3 个ConfigNode 和不少于 3 个 DataNode,通常为 3 个 DataNode,即3C3D;当部分节点出现故障时,剩余节点仍然能对外提供服务,保证数据库服务的高可用性,且可随节点增加提升数据库性能。 + +- **特点**:具有高可用性、高扩展性,可通过增加 DataNode 提高系统性能。 +- **适用场景**:需要提供高可用和可靠性的企业级应用场景。 +- **部署方法**:[集群版部署](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md) + +### 特点总结 + +| 维度 | 单机模式 | 双活模式 | 集群模式 | +| ------------ | ---------------------------- | ------------------------ | ------------------------ | +| 适用场景 | 边缘侧部署、对高可用要求不高 | 高可用性业务、容灾场景等 | 高可用性业务、容灾场景等 | +| 所需机器数量 | 1 | 2 | ≥3 | +| 安全可靠性 | 无法容忍单点故障 | 高,可容忍单点故障 | 高,可容忍单点故障 | +| 扩展性 | 可扩展 DataNode 提升性能 | 每个实例可按需扩展 | 可扩展 DataNode 提升性能 | +| 性能 | 可随 DataNode 数量扩展 | 与其中一个实例性能相同 | 可随 DataNode 数量扩展 | + +- 单机模式和集群模式,部署步骤类似(逐个增加 ConfigNode 和 DataNode),仅副本数和可提供服务的最少节点数不同。 \ No newline at end of file diff --git a/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept.md b/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept.md index ebd6a800e..b4631022f 100644 --- a/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept.md +++ b/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept.md @@ -1,3 +1,6 @@ +--- +redirectTo: Cluster-Concept_apache.html +--- - -# 集群相关概念 -下图展示了一个常见的 IoTDB 3C3D1A(3 个 ConfigNode、3 个 DataNode 和 1 个 AINode)的集群部署模式: - - -其中包括了 IoTDB 集群使用中用户常接触到的几个概念,包括: -- **节点**(ConfigNode、DataNode、AINode); -- **槽**(SchemaSlot、DataSlot); -- **Region**(SchemaRegion、DataRegion); -- ***副本组***。 - -下文将重点对以上概念进行介绍。 - -## 节点 -IoTDB 集群包括三种节点(进程),**ConfigNode**(管理节点),**DataNode**(数据节点)和 **AINode**(分析节点),如下所示: -- **ConfigNode**:存储集群的配置信息、数据库的元数据、时间序列元数据和数据的路由信息,监控集群节点并实施负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。ConfigNode 不直接接收客户端读写请求,它会通过一系列[负载均衡算法](../Technical-Insider/Cluster-data-partitioning.md)对集群中元数据和数据的分布提供指导。 -- **DataNode**:负责时间序列元数据和数据的读写,每个 DataNode 都能接收客户端读写请求并提供相应服务,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。接收客户端读写请求时,若 DataNode 缓存有对应的路由信息,它能直接在本地执行或是转发这些请求;否则它会向 ConfigNode 询问并缓存路由信息,以加速后续请求的服务效率。 -- **AINode**:负责与 ConfigNode 和 DataNode 交互来扩展 IoTDB 集群对时间序列进行智能分析的能力,支持从外部引入已有机器学习模型进行注册,并使用注册的模型在指定时序数据上通过简单 SQL 语句完成时序分析任务的过程,将模型的创建、管理及推理融合在数据库引擎中。目前已提供常见时序分析场景(例如预测与异常检测)的机器学习算法或自研模型。 - -## 槽 -IoTDB 内部将元数据和数据划分成多个更小的、更易于管理的单元,每个单元称为一个**槽**。槽是一个逻辑概念,在 IoTDB 集群中,**元数据槽**和**数据槽**定义如下: -- **元数据槽**(SchemaSlot):一部分元数据集合,元数据槽总数固定,默认数量为 1000,IoTDB 使用哈希算法将所有设备均匀地分配到这些元数据槽中。 -- **数据槽**(DataSlot):一部分数据集合,在元数据槽的基础上,将对应设备的数据按时间范围划分为数据槽,默认的时间范围为 7 天。 - -## Region -在 IoTDB 中,元数据和数据被复制到各个 DataNode 以获得集群高可用性。然而以槽为粒度进行复制会增加集群管理成本、降低写入吞吐。因此 IoTDB 引入 **Region** 这一概念,将元数据槽和数据槽分别分配给 SchemaRegion 和 DataRegion 后,以 Region 为单位进行复制。**SchemRegion** 和 **DataRegion** 的详细定义如下: -- **SchemaRegion**:元数据存储和复制的基本单元,集群每个数据库的所有元数据槽会被均匀分配给该数据库的所有 SchemaRegion。拥有相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 -- **DataRegion**:数据存储和复制的基本单元,集群每个数据库的所有数据槽会被均匀分配给该数据库的所有 DataRegion。拥有相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 - -## 副本组 -Region 的副本对集群的容灾能力至关重要。对于每个 Region 的所有副本,它们的角色分为 **leader** 和 **follower**,共同提供读写服务。不同架构下的副本组配置推荐如下: -| 类别 | 配置项 | 单机推荐配置 | 分布式推荐配置 | -| :-: | :-: | :-: | :-: | -| 元数据 | schema_replication_factor | 1 | 3 | -| 数据 | data_replication_factor | 1 | 2 | \ No newline at end of file +--> \ No newline at end of file diff --git a/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_apache.md b/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_apache.md new file mode 100644 index 000000000..98c6050cc --- /dev/null +++ b/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_apache.md @@ -0,0 +1,106 @@ + + +# 常见概念 + +## 数据模型相关概念 + +| 概念 | 含义 | +| ----------------------- | ------------------------------------------------------------ | +| 数据模型(sql_dialect) | IoTDB 支持两种时序数据模型(SQL语法),管理的对象均为设备和测点树:以层级路径的方式管理数据,一条路径对应一个设备的一个测点表:以关系表的方式管理数据,一张表对应一类设备 | +| 元数据(Schema) | 元数据是数据库的数据模型信息,即树形结构或表结构。包括测点的名称、数据类型等定义。 | +| 设备(Device) | 对应一个实际场景中的物理设备,通常包含多个测点。 | +| 测点(Timeseries) | 又名:物理量、时间序列、时间线、点位、信号量、指标、测量值等。是多个数据点按时间戳递增排列形成的一个时间序列。通常一个测点代表一个采集点位,能够定期采集所在环境的物理量。 | +| 编码(Encoding) | 编码是一种压缩技术,将数据以二进制的形式进行表示,可以提高存储效率。IoTDB 支持多种针对不同类型的数据的编码方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | +| 压缩(Compression) | IoTDB 在数据编码后,使用压缩技术进一步压缩二进制数据,提升存储效率。IoTDB 支持多种压缩方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | + +## 分布式相关概念 + +下图展示了一个常见的 IoTDB 3C3D(3 个 ConfigNode、3 个 DataNode)的集群部署模式: + + + +IoTDB 的集群包括如下常见概念: + +- 节点(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- 多副本 + +下文将对以上概念进行介绍。 + + +### 节点 + +IoTDB 集群包括三种节点(进程):ConfigNode(管理节点),DataNode(数据节点)和 AINode(分析节点),如下所示: + +- ConfigNode:管理集群的节点信息、配置信息、用户权限、元数据、分区信息等,负责分布式操作的调度和负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。 +- DataNode:服务客户端请求,负责数据的存储和计算,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。 +- AINode:负责提供机器学习能力,支持注册已训练好的机器学习模型,并通过 SQL 调用模型进行推理,目前已内置自研时序大模型和常见的机器学习算法(如预测与异常检测)。 + +### 数据分区 + +在 IoTDB 中,元数据和数据都被分为小的分区,即 Region,由集群的各个 DataNode 进行管理。 + +- SchemaRegion:元数据分区,管理一部分设备和测点的元数据。不同 DataNode 相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 +- DataRegion:数据分区,管理一部分设备的一段时间的数据。不同 DataNode 相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 +- 具体分区算法可参考:[数据分区](../Technical-Insider/Cluster-data-partitioning.md) + +### 多副本 + +数据和元数据的副本数可配置,不同部署模式下的副本数推荐如下配置,其中多副本时可提供高可用服务。 + +| 类别 | 配置项 | 单机推荐配置 | 集群推荐配置 | +| :----- | :------------------------ | :----------- | :----------- | +| 元数据 | schema_replication_factor | 1 | 3 | +| 数据 | data_replication_factor | 1 | 2 | + + +## 部署相关概念 + +IoTDB 有两种运行模式:单机模式、集群模式。 + +### 单机模式 + +IoTDB单机实例包括 1 个ConfigNode、1个DataNode,即1C1D; + +- **特点**:便于开发者安装部署,部署和维护成本较低,操作方便。 +- **适用场景**:资源有限或对高可用要求不高的场景,例如边缘端服务器。 +- **部署方法**:[单机版部署](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) + +### 集群模式 + +IoTDB 集群实例为 3 个ConfigNode 和不少于 3 个 DataNode,通常为 3 个 DataNode,即3C3D;当部分节点出现故障时,剩余节点仍然能对外提供服务,保证数据库服务的高可用性,且可随节点增加提升数据库性能。 + +- **特点**:具有高可用性、高扩展性,可通过增加 DataNode 提高系统性能。 +- **适用场景**:需要提供高可用和可靠性的企业级应用场景。 +- **部署方法**:[集群版部署](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) + +### 特点总结 + +| 维度 | 单机模式 | 集群模式 | +| ------------ | ---------------------------- | ------------------------ | +| 适用场景 | 边缘侧部署、对高可用要求不高 | 高可用性业务、容灾场景等 | +| 所需机器数量 | 1 | ≥3 | +| 安全可靠性 | 无法容忍单点故障 | 高,可容忍单点故障 | +| 扩展性 | 可扩展 DataNode 提升性能 | 可扩展 DataNode 提升性能 | +| 性能 | 可随 DataNode 数量扩展 | 可随 DataNode 数量扩展 | + +- 单机模式和集群模式,部署步骤类似(逐个增加 ConfigNode 和 DataNode),仅副本数和可提供服务的最少节点数不同。 \ No newline at end of file diff --git a/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_timecho.md b/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_timecho.md new file mode 100644 index 000000000..77edf9ebb --- /dev/null +++ b/src/zh/UserGuide/V2.0.1/Tree/Background-knowledge/Cluster-Concept_timecho.md @@ -0,0 +1,116 @@ + + +# 常见概念 + +## 数据模型相关概念 + +| 概念 | 含义 | +| ----------------------- | ------------------------------------------------------------ | +| 数据模型(sql_dialect) | IoTDB 支持两种时序数据模型(SQL语法),管理的对象均为设备和测点树:以层级路径的方式管理数据,一条路径对应一个设备的一个测点表:以关系表的方式管理数据,一张表对应一类设备 | +| 元数据(Schema) | 元数据是数据库的数据模型信息,即树形结构或表结构。包括测点的名称、数据类型等定义。 | +| 设备(Device) | 对应一个实际场景中的物理设备,通常包含多个测点。 | +| 测点(Timeseries) | 又名:物理量、时间序列、时间线、点位、信号量、指标、测量值等。是多个数据点按时间戳递增排列形成的一个时间序列。通常一个测点代表一个采集点位,能够定期采集所在环境的物理量。 | +| 编码(Encoding) | 编码是一种压缩技术,将数据以二进制的形式进行表示,可以提高存储效率。IoTDB 支持多种针对不同类型的数据的编码方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | +| 压缩(Compression) | IoTDB 在数据编码后,使用压缩技术进一步压缩二进制数据,提升存储效率。IoTDB 支持多种压缩方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | + +## 分布式相关概念 + +下图展示了一个常见的 IoTDB 3C3D(3 个 ConfigNode、3 个 DataNode)的集群部署模式: + + + +IoTDB 的集群包括如下常见概念: + +- 节点(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- 多副本 + +下文将对以上概念进行介绍。 + + +### 节点 + +IoTDB 集群包括三种节点(进程):ConfigNode(管理节点),DataNode(数据节点)和 AINode(分析节点),如下所示: + +- ConfigNode:管理集群的节点信息、配置信息、用户权限、元数据、分区信息等,负责分布式操作的调度和负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。 +- DataNode:服务客户端请求,负责数据的存储和计算,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。 +- AINode:负责提供机器学习能力,支持注册已训练好的机器学习模型,并通过 SQL 调用模型进行推理,目前已内置自研时序大模型和常见的机器学习算法(如预测与异常检测)。 + +### 数据分区 + +在 IoTDB 中,元数据和数据都被分为小的分区,即 Region,由集群的各个 DataNode 进行管理。 + +- SchemaRegion:元数据分区,管理一部分设备和测点的元数据。不同 DataNode 相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 +- DataRegion:数据分区,管理一部分设备的一段时间的数据。不同 DataNode 相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 +- 具体分区算法可参考:[数据分区](../Technical-Insider/Cluster-data-partitioning.md) + +### 多副本 + +数据和元数据的副本数可配置,不同部署模式下的副本数推荐如下配置,其中多副本时可提供高可用服务。 + +| 类别 | 配置项 | 单机推荐配置 | 集群推荐配置 | +| :----- | :------------------------ | :----------- | :----------- | +| 元数据 | schema_replication_factor | 1 | 3 | +| 数据 | data_replication_factor | 1 | 2 | + + +## 部署相关概念 + +IoTDB 有三种运行模式:单机模式、集群模式和双活模式。 + +### 单机模式 + +IoTDB单机实例包括 1 个ConfigNode、1个DataNode,即1C1D; + +- **特点**:便于开发者安装部署,部署和维护成本较低,操作方便。 +- **适用场景**:资源有限或对高可用要求不高的场景,例如边缘端服务器。 +- **部署方法**:[单机版部署](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) + +### 双活模式 + +双活版部署为 TimechoDB 企业版功能,是指两个独立的实例进行双向同步,能同时对外提供服务。当一台停机重启后,另一个实例会将缺失数据断点续传。 + +> IoTDB 双活实例通常为2个单机节点,即2套1C1D。每个实例也可以为集群。 + +- **特点**:资源占用最低的高可用解决方案。 +- **适用场景**:资源有限(仅有两台服务器),但希望获得高可用能力。 +- **部署方法**:[双活版部署](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) + +### 集群模式 + +IoTDB 集群实例为 3 个ConfigNode 和不少于 3 个 DataNode,通常为 3 个 DataNode,即3C3D;当部分节点出现故障时,剩余节点仍然能对外提供服务,保证数据库服务的高可用性,且可随节点增加提升数据库性能。 + +- **特点**:具有高可用性、高扩展性,可通过增加 DataNode 提高系统性能。 +- **适用场景**:需要提供高可用和可靠性的企业级应用场景。 +- **部署方法**:[集群版部署](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md) + +### 特点总结 + +| 维度 | 单机模式 | 双活模式 | 集群模式 | +| ------------ | ---------------------------- | ------------------------ | ------------------------ | +| 适用场景 | 边缘侧部署、对高可用要求不高 | 高可用性业务、容灾场景等 | 高可用性业务、容灾场景等 | +| 所需机器数量 | 1 | 2 | ≥3 | +| 安全可靠性 | 无法容忍单点故障 | 高,可容忍单点故障 | 高,可容忍单点故障 | +| 扩展性 | 可扩展 DataNode 提升性能 | 每个实例可按需扩展 | 可扩展 DataNode 提升性能 | +| 性能 | 可随 DataNode 数量扩展 | 与其中一个实例性能相同 | 可随 DataNode 数量扩展 | + +- 单机模式和集群模式,部署步骤类似(逐个增加 ConfigNode 和 DataNode),仅副本数和可提供服务的最少节点数不同。 \ No newline at end of file diff --git a/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual.md b/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual.md index c88848432..172882761 100644 --- a/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual.md +++ b/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual.md @@ -1,3 +1,6 @@ +--- +redirectTo: DataNode-Config-Manual_apache.html +--- - -# DataNode 配置参数 - -IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 - -* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 - -* `iotdb-system.properties`:IoTDB 的配置文件。 - -## 热修改配置项 - -为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-system.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载` -的均为支持热修改的配置参数。 - -通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 - -## 环境配置项(datanode-env.sh/bat) - -环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: - -* MEMORY\_SIZE - -|名字|MEMORY\_SIZE| -|:---:|:---| -|描述|IoTDB DataNode 启动时分配的内存大小 | -|类型|String| -|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| -|改后生效方式|重启服务生效| - -* ON\_HEAP\_MEMORY - -|名字|ON\_HEAP\_MEMORY| -|:---:|:---| -|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | -|类型|String| -|默认值|取决于MEMORY\_SIZE的配置。| -|改后生效方式|重启服务生效| - -* OFF\_HEAP\_MEMORY - -|名字|OFF\_HEAP\_MEMORY| -|:---:|:---| -|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | -|类型|String| -|默认值|取决于MEMORY\_SIZE的配置| -|改后生效方式|重启服务生效| - -* JMX\_LOCAL - -|名字|JMX\_LOCAL| -|:---:|:---| -|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| -|类型|枚举 String : “true”, “false”| -|默认值|true| -|改后生效方式|重启服务生效| - -* JMX\_PORT - -|名字|JMX\_PORT| -|:---:|:---| -|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| -|类型|Short Int: [0,65535]| -|默认值|31999| -|改后生效方式|重启服务生效| - -## 系统配置项(iotdb-system.properties) - -系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 - -### Data Node RPC 服务配置 - -* dn\_rpc\_address - -|名字| dn\_rpc\_address | -|:---:|:-----------------| -|描述| 客户端 RPC 服务监听地址 | -|类型| String | -|默认值| 0.0.0.0 | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_port - -|名字| dn\_rpc\_port | -|:---:|:---| -|描述| Client RPC 服务监听端口| -|类型| Short Int : [0,65535] | -|默认值| 6667 | -|改后生效方式|重启服务生效| - -* dn\_internal\_address - -|名字| dn\_internal\_address | -|:---:|:---| -|描述| DataNode 内网通信地址 | -|类型| string | -|默认值| 127.0.0.1 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_internal\_port - -|名字| dn\_internal\_port | -|:---:|:-------------------| -|描述| DataNode 内网通信端口 | -|类型| int | -|默认值| 10730 | -|改后生效方式| 仅允许在第一次启动服务前修改 | - -* dn\_mpp\_data\_exchange\_port - -|名字| dn\_mpp\_data\_exchange\_port | -|:---:|:---| -|描述| MPP 数据交换端口 | -|类型| int | -|默认值| 10740 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_schema\_region\_consensus\_port - -|名字| dn\_schema\_region\_consensus\_port | -|:---:|:---| -|描述| DataNode 元数据副本的共识协议通信端口 | -|类型| int | -|默认值| 10750 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_data\_region\_consensus\_port - -|名字| dn\_data\_region\_consensus\_port | -|:---:|:---| -|描述| DataNode 数据副本的共识协议通信端口 | -|类型| int | -|默认值| 10760 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_join\_cluster\_retry\_interval\_ms - -|名字| dn\_join\_cluster\_retry\_interval\_ms | -|:---:|:---------------------------------------| -|描述| DataNode 再次重试加入集群等待时间 | -|类型| long | -|默认值| 5000 | -|改后生效方式| 重启服务生效 | - - -### SSL 配置 - -* enable\_thrift\_ssl - -|名字| enable\_thrift\_ssl | -|:---:|:----------------------------------------------| -|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* enable\_https - -|名字| enable\_https | -|:---:|:-------------------------| -|描述| REST Service 是否开启 SSL 配置 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* key\_store\_path - -|名字| key\_store\_path | -|:---:|:-----------------| -|描述| ssl证书路径 | -|类型| String | -|默认值| "" | -|改后生效方式| 重启服务生效 | - -* key\_store\_pwd - -|名字| key\_store\_pwd | -|:---:|:----------------| -|描述| ssl证书密码 | -|类型| String | -|默认值| "" | -|改后生效方式| 重启服务生效 | - - -### SeedConfigNode 配置 - -* dn\_seed\_config\_node - -|名字| dn\_seed\_config\_node | -|:---:|:------------------------------------| -|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群,推荐使用 SeedConfigNode。V1.2.2 及以前曾用名是 dn\_target\_config\_node\_list | -|类型| String | -|默认值| 127.0.0.1:10710 | -|改后生效方式| 仅允许在第一次启动服务前修改 | - -### 连接配置 - -* dn\_session\_timeout\_threshold - -|名字| dn\_session_timeout_threshold | -|:---:|:------------------------------| -|描述| 最大的会话空闲时间 | -|类型| int | -|默认值| 0 | -|改后生效方式| 重启服务生效 | - - -* dn\_rpc\_thrift\_compression\_enable - -|名字| dn\_rpc\_thrift\_compression\_enable | -|:---:|:---------------------------------| -|描述| 是否启用 thrift 的压缩机制 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_advanced\_compression\_enable - -|名字| dn\_rpc\_advanced\_compression\_enable | -|:---:|:-----------------------------------| -|描述| 是否启用 thrift 的自定制压缩机制 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_selector\_thread\_count - -| 名字 | rpc\_selector\_thread\_count | -|:------:|:-----------------------------| -| 描述 | rpc 选择器线程数量 | -| 类型 | int | -| 默认值 | 1 | -| 改后生效方式 | 重启服务生效 | - -* dn\_rpc\_min\_concurrent\_client\_num - -| 名字 | rpc\_min\_concurrent\_client\_num | -|:------:|:----------------------------------| -| 描述 | 最小连接数 | -| 类型 | Short Int : [0,65535] | -| 默认值 | 1 | -| 改后生效方式 | 重启服务生效 | - -* dn\_rpc\_max\_concurrent\_client\_num - -| 名字 | dn\_rpc\_max\_concurrent\_client\_num | -|:------:|:----------------------------------| -| 描述 | 最大连接数 | -| 类型 | Short Int : [0,65535] | -| 默认值 | 65535 | -| 改后生效方式 | 重启服务生效 | - -* dn\_thrift\_max\_frame\_size - -|名字| dn\_thrift\_max\_frame\_size | -|:---:|:---| -|描述| RPC 请求/响应的最大字节数| -|类型| long | -|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | -|改后生效方式|重启服务生效| - -* dn\_thrift\_init\_buffer\_size - -|名字| dn\_thrift\_init\_buffer\_size | -|:---:|:---| -|描述| 字节数 | -|类型| long | -|默认值| 1024 | -|改后生效方式|重启服务生效| - -* dn\_connection\_timeout\_ms - -| 名字 | dn\_connection\_timeout\_ms | -|:------:|:----------------------------| -| 描述 | 节点连接超时时间 | -| 类型 | int | -| 默认值 | 60000 | -| 改后生效方式 | 重启服务生效 | - -* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager - -| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------:|:--------------------------------------------------------------| -| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | -| 类型 | int | -| 默认值 | 200 | -| 改后生效方式 | 重启服务生效 | - -* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager - -| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------:|:-------------------------------------------------------------| -| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | -| 类型 | int | -| 默认值 | 300 | -| 改后生效方式 | 重启服务生效 | - -### 目录配置 - -* dn\_system\_dir - -| 名字 | dn\_system\_dir | -|:------:|:--------------------------------------------------------------------| -| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | -| 改后生效方式 | 重启服务生效 | - -* dn\_data\_dirs - -| 名字 | dn\_data\_dirs | -|:------:|:-------------------------------------------------------------------| -| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | -| 改后生效方式 | 重启服务生效 | - -* dn\_multi\_dir\_strategy - -| 名字 | dn\_multi\_dir\_strategy | -|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | -| 类型 | String | -| 默认值 | SequenceStrategy | -| 改后生效方式 | 热加载 | - -* dn\_consensus\_dir - -| 名字 | dn\_consensus\_dir | -|:------:|:-------------------------------------------------------------------------| -| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | -| 改后生效方式 | 重启服务生效 | - -* dn\_wal\_dirs - -| 名字 | dn\_wal\_dirs | -|:------:|:---------------------------------------------------------------------| -| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | -| 改后生效方式 | 重启服务生效 | - -* dn\_tracing\_dir - -| 名字 | dn\_tracing\_dir | -|:------:|:--------------------------------------------------------------------| -| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | datanode/tracing | -| 改后生效方式 | 重启服务生效 | - -* dn\_sync\_dir - -| 名字 | dn\_sync\_dir | -|:------:|:----------------------------------------------------------------------| -| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/sync | -| 改后生效方式 | 重启服务生效 | - -### Metric 配置 - -## 开启 GC 日志 - -GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 -若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: - -```bash -nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & -``` - -或者 - -```bash -sbin\start-datanode.bat printgc -``` - -GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 - -#### REST 服务配置 - -* enable\_rest\_service - -|名字| enable\_rest\_service | -|:---:|:--------------------| -|描述| 是否开启Rest服务。 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* rest\_service\_port - -|名字| rest\_service\_port | -|:---:|:------------------| -|描述| Rest服务监听端口号 | -|类型| int32 | -|默认值| 18080 | -|改后生效方式| 重启生效 | - -* enable\_swagger - -|名字| enable\_swagger | -|:---:|:-----------------------| -|描述| 是否启用swagger来展示rest接口信息 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* rest\_query\_default\_row\_size\_limit - -|名字| rest\_query\_default\_row\_size\_limit | -|:---:|:----------------------------------| -|描述| 一次查询能返回的结果集最大行数 | -|类型| int32 | -|默认值| 10000 | -|改后生效方式| 重启生效 | - -* cache\_expire - -|名字| cache\_expire | -|:---:|:--------------| -|描述| 缓存客户登录信息的过期时间 | -|类型| int32 | -|默认值| 28800 | -|改后生效方式| 重启生效 | - -* cache\_max\_num - -|名字| cache\_max\_num | -|:---:|:--------------| -|描述| 缓存中存储的最大用户数量 | -|类型| int32 | -|默认值| 100 | -|改后生效方式| 重启生效 | - -* cache\_init\_num - -|名字| cache\_init\_num | -|:---:|:---------------| -|描述| 缓存初始容量 | -|类型| int32 | -|默认值| 10 | -|改后生效方式| 重启生效 | - -* trust\_store\_path - -|名字| trust\_store\_path | -|:---:|:---------------| -|描述| keyStore 密码(非必填) | -|类型| String | -|默认值| "" | -|改后生效方式| 重启生效 | - -* trust\_store\_pwd - -|名字| trust\_store\_pwd | -|:---:|:---------------| -|描述| trustStore 密码(非必填) | -|类型| String | -|默认值| "" | -|改后生效方式| 重启生效 | - -* idle\_timeout - -|名字| idle\_timeout | -|:---:|:--------------| -|描述| SSL 超时时间,单位为秒 | -|类型| int32 | -|默认值| 5000 | -|改后生效方式| 重启生效 | - - - -#### 多级存储配置 - -* dn\_default\_space\_usage\_thresholds - -|名字| dn\_default\_space\_usage\_thresholds | -|:---:|:--------------| -|描述| 定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | -|类型| double | -|默认值| 0.85 | -|改后生效方式| 热加载 | - -* remote\_tsfile\_cache\_dirs - -|名字| remote\_tsfile\_cache\_dirs | -|:---:|:--------------| -|描述| 云端存储在本地的缓存目录 | -|类型| string | -|默认值| data/datanode/data/cache | -|改后生效方式| 重启生效 | - -* remote\_tsfile\_cache\_page\_size\_in\_kb - -|名字| remote\_tsfile\_cache\_page\_size\_in\_kb | -|:---:|:--------------| -|描述| 云端存储在本地缓存文件的块大小 | -|类型| int | -|默认值| 20480 | -|改后生效方式| 重启生效 | - -* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb - -|名字| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | -|:---:|:--------------| -|描述| 云端存储本地缓存的最大磁盘占用大小 | -|类型| long | -|默认值| 51200 | -|改后生效方式| 重启生效 | - -* object\_storage\_type - -|名字| object\_storage\_type | -|:---:|:--------------| -|描述| 云端存储类型 | -|类型| string | -|默认值| AWS_S3 | -|改后生效方式| 重启生效 | - -* object\_storage\_bucket - -|名字| object\_storage\_bucket | -|:---:|:--------------| -|描述| 云端存储 bucket 的名称 | -|类型| string | -|默认值| iotdb_data | -|改后生效方式| 重启生效 | - -* object\_storage\_endpoiont - -|名字| object\_storage\_endpoiont | -|:---:|:--------------| -|描述| 云端存储的 endpoint | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | - -* object\_storage\_access\_key - -|名字| object\_storage\_access\_key | -|:---:|:--------------| -|描述| 云端存储的验证信息 key | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | - -* object\_storage\_access\_secret - -|名字| object\_storage\_access\_secret | -|:---:|:--------------| -|描述| 云端存储的验证信息 secret | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | \ No newline at end of file diff --git a/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_apache.md b/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_apache.md new file mode 100644 index 000000000..d19056bec --- /dev/null +++ b/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_apache.md @@ -0,0 +1,494 @@ + + +# DataNode 配置参数 + +IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 + +* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 + +* `iotdb-system.properties`:IoTDB 的配置文件。 + +## 热修改配置项 + +为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-system.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载` +的均为支持热修改的配置参数。 + +通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 + +## 环境配置项(datanode-env.sh/bat) + +环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: + +* MEMORY\_SIZE + +|名字|MEMORY\_SIZE| +|:---:|:---| +|描述|IoTDB DataNode 启动时分配的内存大小 | +|类型|String| +|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| +|改后生效方式|重启服务生效| + +* ON\_HEAP\_MEMORY + +|名字|ON\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置。| +|改后生效方式|重启服务生效| + +* OFF\_HEAP\_MEMORY + +|名字|OFF\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置| +|改后生效方式|重启服务生效| + +* JMX\_LOCAL + +|名字|JMX\_LOCAL| +|:---:|:---| +|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| +|类型|枚举 String : “true”, “false”| +|默认值|true| +|改后生效方式|重启服务生效| + +* JMX\_PORT + +|名字|JMX\_PORT| +|:---:|:---| +|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| +|类型|Short Int: [0,65535]| +|默认值|31999| +|改后生效方式|重启服务生效| + +## 系统配置项(iotdb-system.properties) + +系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 + +### Data Node RPC 服务配置 + +* dn\_rpc\_address + +|名字| dn\_rpc\_address | +|:---:|:-----------------| +|描述| 客户端 RPC 服务监听地址 | +|类型| String | +|默认值| 0.0.0.0 | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_port + +|名字| dn\_rpc\_port | +|:---:|:---| +|描述| Client RPC 服务监听端口| +|类型| Short Int : [0,65535] | +|默认值| 6667 | +|改后生效方式|重启服务生效| + +* dn\_internal\_address + +|名字| dn\_internal\_address | +|:---:|:---| +|描述| DataNode 内网通信地址 | +|类型| string | +|默认值| 127.0.0.1 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_internal\_port + +|名字| dn\_internal\_port | +|:---:|:-------------------| +|描述| DataNode 内网通信端口 | +|类型| int | +|默认值| 10730 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +* dn\_mpp\_data\_exchange\_port + +|名字| dn\_mpp\_data\_exchange\_port | +|:---:|:---| +|描述| MPP 数据交换端口 | +|类型| int | +|默认值| 10740 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_schema\_region\_consensus\_port + +|名字| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 元数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10750 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_data\_region\_consensus\_port + +|名字| dn\_data\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10760 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_join\_cluster\_retry\_interval\_ms + +|名字| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:---------------------------------------| +|描述| DataNode 再次重试加入集群等待时间 | +|类型| long | +|默认值| 5000 | +|改后生效方式| 重启服务生效 | + + +### SSL 配置 + +* enable\_thrift\_ssl + +|名字| enable\_thrift\_ssl | +|:---:|:----------------------------------------------| +|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* enable\_https + +|名字| enable\_https | +|:---:|:-------------------------| +|描述| REST Service 是否开启 SSL 配置 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* key\_store\_path + +|名字| key\_store\_path | +|:---:|:-----------------| +|描述| ssl证书路径 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + +* key\_store\_pwd + +|名字| key\_store\_pwd | +|:---:|:----------------| +|描述| ssl证书密码 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + + +### SeedConfigNode 配置 + +* dn\_seed\_config\_node + +|名字| dn\_seed\_config\_node | +|:---:|:------------------------------------| +|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群,推荐使用 SeedConfigNode。V1.2.2 及以前曾用名是 dn\_target\_config\_node\_list | +|类型| String | +|默认值| 127.0.0.1:10710 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +### 连接配置 + +* dn\_session\_timeout\_threshold + +|名字| dn\_session_timeout_threshold | +|:---:|:------------------------------| +|描述| 最大的会话空闲时间 | +|类型| int | +|默认值| 0 | +|改后生效方式| 重启服务生效 | + + +* dn\_rpc\_thrift\_compression\_enable + +|名字| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---------------------------------| +|描述| 是否启用 thrift 的压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_advanced\_compression\_enable + +|名字| dn\_rpc\_advanced\_compression\_enable | +|:---:|:-----------------------------------| +|描述| 是否启用 thrift 的自定制压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_selector\_thread\_count + +| 名字 | rpc\_selector\_thread\_count | +|:------:|:-----------------------------| +| 描述 | rpc 选择器线程数量 | +| 类型 | int | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_min\_concurrent\_client\_num + +| 名字 | rpc\_min\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最小连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_max\_concurrent\_client\_num + +| 名字 | dn\_rpc\_max\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最大连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 65535 | +| 改后生效方式 | 重启服务生效 | + +* dn\_thrift\_max\_frame\_size + +|名字| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|描述| RPC 请求/响应的最大字节数| +|类型| long | +|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | +|改后生效方式|重启服务生效| + +* dn\_thrift\_init\_buffer\_size + +|名字| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|描述| 字节数 | +|类型| long | +|默认值| 1024 | +|改后生效方式|重启服务生效| + +* dn\_connection\_timeout\_ms + +| 名字 | dn\_connection\_timeout\_ms | +|:------:|:----------------------------| +| 描述 | 节点连接超时时间 | +| 类型 | int | +| 默认值 | 60000 | +| 改后生效方式 | 重启服务生效 | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:--------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | +| 类型 | int | +| 默认值 | 200 | +| 改后生效方式 | 重启服务生效 | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:-------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | +| 类型 | int | +| 默认值 | 300 | +| 改后生效方式 | 重启服务生效 | + +### 目录配置 + +* dn\_system\_dir + +| 名字 | dn\_system\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | +| 改后生效方式 | 重启服务生效 | + +* dn\_data\_dirs + +| 名字 | dn\_data\_dirs | +|:------:|:-------------------------------------------------------------------| +| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | +| 改后生效方式 | 重启服务生效 | + +* dn\_multi\_dir\_strategy + +| 名字 | dn\_multi\_dir\_strategy | +|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | +| 类型 | String | +| 默认值 | SequenceStrategy | +| 改后生效方式 | 热加载 | + +* dn\_consensus\_dir + +| 名字 | dn\_consensus\_dir | +|:------:|:-------------------------------------------------------------------------| +| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | +| 改后生效方式 | 重启服务生效 | + +* dn\_wal\_dirs + +| 名字 | dn\_wal\_dirs | +|:------:|:---------------------------------------------------------------------| +| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | +| 改后生效方式 | 重启服务生效 | + +* dn\_tracing\_dir + +| 名字 | dn\_tracing\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | datanode/tracing | +| 改后生效方式 | 重启服务生效 | + +* dn\_sync\_dir + +| 名字 | dn\_sync\_dir | +|:------:|:----------------------------------------------------------------------| +| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/sync | +| 改后生效方式 | 重启服务生效 | + +### Metric 配置 + +## 开启 GC 日志 + +GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 +若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` + +或者 + +```bash +sbin\start-datanode.bat printgc +``` + +GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 + +#### REST 服务配置 + +* enable\_rest\_service + +|名字| enable\_rest\_service | +|:---:|:--------------------| +|描述| 是否开启Rest服务。 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_service\_port + +|名字| rest\_service\_port | +|:---:|:------------------| +|描述| Rest服务监听端口号 | +|类型| int32 | +|默认值| 18080 | +|改后生效方式| 重启生效 | + +* enable\_swagger + +|名字| enable\_swagger | +|:---:|:-----------------------| +|描述| 是否启用swagger来展示rest接口信息 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_query\_default\_row\_size\_limit + +|名字| rest\_query\_default\_row\_size\_limit | +|:---:|:----------------------------------| +|描述| 一次查询能返回的结果集最大行数 | +|类型| int32 | +|默认值| 10000 | +|改后生效方式| 重启生效 | + +* cache\_expire + +|名字| cache\_expire | +|:---:|:--------------| +|描述| 缓存客户登录信息的过期时间 | +|类型| int32 | +|默认值| 28800 | +|改后生效方式| 重启生效 | + +* cache\_max\_num + +|名字| cache\_max\_num | +|:---:|:--------------| +|描述| 缓存中存储的最大用户数量 | +|类型| int32 | +|默认值| 100 | +|改后生效方式| 重启生效 | + +* cache\_init\_num + +|名字| cache\_init\_num | +|:---:|:---------------| +|描述| 缓存初始容量 | +|类型| int32 | +|默认值| 10 | +|改后生效方式| 重启生效 | + +* trust\_store\_path + +|名字| trust\_store\_path | +|:---:|:---------------| +|描述| keyStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* trust\_store\_pwd + +|名字| trust\_store\_pwd | +|:---:|:---------------| +|描述| trustStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* idle\_timeout + +|名字| idle\_timeout | +|:---:|:--------------| +|描述| SSL 超时时间,单位为秒 | +|类型| int32 | +|默认值| 5000 | +|改后生效方式| 重启生效 | + + + diff --git a/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_timecho.md b/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_timecho.md new file mode 100644 index 000000000..c88848432 --- /dev/null +++ b/src/zh/UserGuide/V2.0.1/Tree/Reference/DataNode-Config-Manual_timecho.md @@ -0,0 +1,576 @@ + + +# DataNode 配置参数 + +IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 + +* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 + +* `iotdb-system.properties`:IoTDB 的配置文件。 + +## 热修改配置项 + +为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-system.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载` +的均为支持热修改的配置参数。 + +通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 + +## 环境配置项(datanode-env.sh/bat) + +环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: + +* MEMORY\_SIZE + +|名字|MEMORY\_SIZE| +|:---:|:---| +|描述|IoTDB DataNode 启动时分配的内存大小 | +|类型|String| +|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| +|改后生效方式|重启服务生效| + +* ON\_HEAP\_MEMORY + +|名字|ON\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置。| +|改后生效方式|重启服务生效| + +* OFF\_HEAP\_MEMORY + +|名字|OFF\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置| +|改后生效方式|重启服务生效| + +* JMX\_LOCAL + +|名字|JMX\_LOCAL| +|:---:|:---| +|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| +|类型|枚举 String : “true”, “false”| +|默认值|true| +|改后生效方式|重启服务生效| + +* JMX\_PORT + +|名字|JMX\_PORT| +|:---:|:---| +|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| +|类型|Short Int: [0,65535]| +|默认值|31999| +|改后生效方式|重启服务生效| + +## 系统配置项(iotdb-system.properties) + +系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 + +### Data Node RPC 服务配置 + +* dn\_rpc\_address + +|名字| dn\_rpc\_address | +|:---:|:-----------------| +|描述| 客户端 RPC 服务监听地址 | +|类型| String | +|默认值| 0.0.0.0 | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_port + +|名字| dn\_rpc\_port | +|:---:|:---| +|描述| Client RPC 服务监听端口| +|类型| Short Int : [0,65535] | +|默认值| 6667 | +|改后生效方式|重启服务生效| + +* dn\_internal\_address + +|名字| dn\_internal\_address | +|:---:|:---| +|描述| DataNode 内网通信地址 | +|类型| string | +|默认值| 127.0.0.1 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_internal\_port + +|名字| dn\_internal\_port | +|:---:|:-------------------| +|描述| DataNode 内网通信端口 | +|类型| int | +|默认值| 10730 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +* dn\_mpp\_data\_exchange\_port + +|名字| dn\_mpp\_data\_exchange\_port | +|:---:|:---| +|描述| MPP 数据交换端口 | +|类型| int | +|默认值| 10740 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_schema\_region\_consensus\_port + +|名字| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 元数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10750 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_data\_region\_consensus\_port + +|名字| dn\_data\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10760 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_join\_cluster\_retry\_interval\_ms + +|名字| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:---------------------------------------| +|描述| DataNode 再次重试加入集群等待时间 | +|类型| long | +|默认值| 5000 | +|改后生效方式| 重启服务生效 | + + +### SSL 配置 + +* enable\_thrift\_ssl + +|名字| enable\_thrift\_ssl | +|:---:|:----------------------------------------------| +|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* enable\_https + +|名字| enable\_https | +|:---:|:-------------------------| +|描述| REST Service 是否开启 SSL 配置 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* key\_store\_path + +|名字| key\_store\_path | +|:---:|:-----------------| +|描述| ssl证书路径 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + +* key\_store\_pwd + +|名字| key\_store\_pwd | +|:---:|:----------------| +|描述| ssl证书密码 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + + +### SeedConfigNode 配置 + +* dn\_seed\_config\_node + +|名字| dn\_seed\_config\_node | +|:---:|:------------------------------------| +|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群,推荐使用 SeedConfigNode。V1.2.2 及以前曾用名是 dn\_target\_config\_node\_list | +|类型| String | +|默认值| 127.0.0.1:10710 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +### 连接配置 + +* dn\_session\_timeout\_threshold + +|名字| dn\_session_timeout_threshold | +|:---:|:------------------------------| +|描述| 最大的会话空闲时间 | +|类型| int | +|默认值| 0 | +|改后生效方式| 重启服务生效 | + + +* dn\_rpc\_thrift\_compression\_enable + +|名字| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---------------------------------| +|描述| 是否启用 thrift 的压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_advanced\_compression\_enable + +|名字| dn\_rpc\_advanced\_compression\_enable | +|:---:|:-----------------------------------| +|描述| 是否启用 thrift 的自定制压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_selector\_thread\_count + +| 名字 | rpc\_selector\_thread\_count | +|:------:|:-----------------------------| +| 描述 | rpc 选择器线程数量 | +| 类型 | int | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_min\_concurrent\_client\_num + +| 名字 | rpc\_min\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最小连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_max\_concurrent\_client\_num + +| 名字 | dn\_rpc\_max\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最大连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 65535 | +| 改后生效方式 | 重启服务生效 | + +* dn\_thrift\_max\_frame\_size + +|名字| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|描述| RPC 请求/响应的最大字节数| +|类型| long | +|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | +|改后生效方式|重启服务生效| + +* dn\_thrift\_init\_buffer\_size + +|名字| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|描述| 字节数 | +|类型| long | +|默认值| 1024 | +|改后生效方式|重启服务生效| + +* dn\_connection\_timeout\_ms + +| 名字 | dn\_connection\_timeout\_ms | +|:------:|:----------------------------| +| 描述 | 节点连接超时时间 | +| 类型 | int | +| 默认值 | 60000 | +| 改后生效方式 | 重启服务生效 | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:--------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | +| 类型 | int | +| 默认值 | 200 | +| 改后生效方式 | 重启服务生效 | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:-------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | +| 类型 | int | +| 默认值 | 300 | +| 改后生效方式 | 重启服务生效 | + +### 目录配置 + +* dn\_system\_dir + +| 名字 | dn\_system\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | +| 改后生效方式 | 重启服务生效 | + +* dn\_data\_dirs + +| 名字 | dn\_data\_dirs | +|:------:|:-------------------------------------------------------------------| +| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | +| 改后生效方式 | 重启服务生效 | + +* dn\_multi\_dir\_strategy + +| 名字 | dn\_multi\_dir\_strategy | +|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | +| 类型 | String | +| 默认值 | SequenceStrategy | +| 改后生效方式 | 热加载 | + +* dn\_consensus\_dir + +| 名字 | dn\_consensus\_dir | +|:------:|:-------------------------------------------------------------------------| +| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | +| 改后生效方式 | 重启服务生效 | + +* dn\_wal\_dirs + +| 名字 | dn\_wal\_dirs | +|:------:|:---------------------------------------------------------------------| +| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | +| 改后生效方式 | 重启服务生效 | + +* dn\_tracing\_dir + +| 名字 | dn\_tracing\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | datanode/tracing | +| 改后生效方式 | 重启服务生效 | + +* dn\_sync\_dir + +| 名字 | dn\_sync\_dir | +|:------:|:----------------------------------------------------------------------| +| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/sync | +| 改后生效方式 | 重启服务生效 | + +### Metric 配置 + +## 开启 GC 日志 + +GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 +若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` + +或者 + +```bash +sbin\start-datanode.bat printgc +``` + +GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 + +#### REST 服务配置 + +* enable\_rest\_service + +|名字| enable\_rest\_service | +|:---:|:--------------------| +|描述| 是否开启Rest服务。 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_service\_port + +|名字| rest\_service\_port | +|:---:|:------------------| +|描述| Rest服务监听端口号 | +|类型| int32 | +|默认值| 18080 | +|改后生效方式| 重启生效 | + +* enable\_swagger + +|名字| enable\_swagger | +|:---:|:-----------------------| +|描述| 是否启用swagger来展示rest接口信息 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_query\_default\_row\_size\_limit + +|名字| rest\_query\_default\_row\_size\_limit | +|:---:|:----------------------------------| +|描述| 一次查询能返回的结果集最大行数 | +|类型| int32 | +|默认值| 10000 | +|改后生效方式| 重启生效 | + +* cache\_expire + +|名字| cache\_expire | +|:---:|:--------------| +|描述| 缓存客户登录信息的过期时间 | +|类型| int32 | +|默认值| 28800 | +|改后生效方式| 重启生效 | + +* cache\_max\_num + +|名字| cache\_max\_num | +|:---:|:--------------| +|描述| 缓存中存储的最大用户数量 | +|类型| int32 | +|默认值| 100 | +|改后生效方式| 重启生效 | + +* cache\_init\_num + +|名字| cache\_init\_num | +|:---:|:---------------| +|描述| 缓存初始容量 | +|类型| int32 | +|默认值| 10 | +|改后生效方式| 重启生效 | + +* trust\_store\_path + +|名字| trust\_store\_path | +|:---:|:---------------| +|描述| keyStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* trust\_store\_pwd + +|名字| trust\_store\_pwd | +|:---:|:---------------| +|描述| trustStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* idle\_timeout + +|名字| idle\_timeout | +|:---:|:--------------| +|描述| SSL 超时时间,单位为秒 | +|类型| int32 | +|默认值| 5000 | +|改后生效方式| 重启生效 | + + + +#### 多级存储配置 + +* dn\_default\_space\_usage\_thresholds + +|名字| dn\_default\_space\_usage\_thresholds | +|:---:|:--------------| +|描述| 定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | +|类型| double | +|默认值| 0.85 | +|改后生效方式| 热加载 | + +* remote\_tsfile\_cache\_dirs + +|名字| remote\_tsfile\_cache\_dirs | +|:---:|:--------------| +|描述| 云端存储在本地的缓存目录 | +|类型| string | +|默认值| data/datanode/data/cache | +|改后生效方式| 重启生效 | + +* remote\_tsfile\_cache\_page\_size\_in\_kb + +|名字| remote\_tsfile\_cache\_page\_size\_in\_kb | +|:---:|:--------------| +|描述| 云端存储在本地缓存文件的块大小 | +|类型| int | +|默认值| 20480 | +|改后生效方式| 重启生效 | + +* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb + +|名字| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | +|:---:|:--------------| +|描述| 云端存储本地缓存的最大磁盘占用大小 | +|类型| long | +|默认值| 51200 | +|改后生效方式| 重启生效 | + +* object\_storage\_type + +|名字| object\_storage\_type | +|:---:|:--------------| +|描述| 云端存储类型 | +|类型| string | +|默认值| AWS_S3 | +|改后生效方式| 重启生效 | + +* object\_storage\_bucket + +|名字| object\_storage\_bucket | +|:---:|:--------------| +|描述| 云端存储 bucket 的名称 | +|类型| string | +|默认值| iotdb_data | +|改后生效方式| 重启生效 | + +* object\_storage\_endpoiont + +|名字| object\_storage\_endpoiont | +|:---:|:--------------| +|描述| 云端存储的 endpoint | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | + +* object\_storage\_access\_key + +|名字| object\_storage\_access\_key | +|:---:|:--------------| +|描述| 云端存储的验证信息 key | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | + +* object\_storage\_access\_secret + +|名字| object\_storage\_access\_secret | +|:---:|:--------------| +|描述| 云端存储的验证信息 secret | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | \ No newline at end of file diff --git a/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept.md b/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept.md index ebd6a800e..b4631022f 100644 --- a/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept.md +++ b/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept.md @@ -1,3 +1,6 @@ +--- +redirectTo: Cluster-Concept_apache.html +--- - -# 集群相关概念 -下图展示了一个常见的 IoTDB 3C3D1A(3 个 ConfigNode、3 个 DataNode 和 1 个 AINode)的集群部署模式: - - -其中包括了 IoTDB 集群使用中用户常接触到的几个概念,包括: -- **节点**(ConfigNode、DataNode、AINode); -- **槽**(SchemaSlot、DataSlot); -- **Region**(SchemaRegion、DataRegion); -- ***副本组***。 - -下文将重点对以上概念进行介绍。 - -## 节点 -IoTDB 集群包括三种节点(进程),**ConfigNode**(管理节点),**DataNode**(数据节点)和 **AINode**(分析节点),如下所示: -- **ConfigNode**:存储集群的配置信息、数据库的元数据、时间序列元数据和数据的路由信息,监控集群节点并实施负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。ConfigNode 不直接接收客户端读写请求,它会通过一系列[负载均衡算法](../Technical-Insider/Cluster-data-partitioning.md)对集群中元数据和数据的分布提供指导。 -- **DataNode**:负责时间序列元数据和数据的读写,每个 DataNode 都能接收客户端读写请求并提供相应服务,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。接收客户端读写请求时,若 DataNode 缓存有对应的路由信息,它能直接在本地执行或是转发这些请求;否则它会向 ConfigNode 询问并缓存路由信息,以加速后续请求的服务效率。 -- **AINode**:负责与 ConfigNode 和 DataNode 交互来扩展 IoTDB 集群对时间序列进行智能分析的能力,支持从外部引入已有机器学习模型进行注册,并使用注册的模型在指定时序数据上通过简单 SQL 语句完成时序分析任务的过程,将模型的创建、管理及推理融合在数据库引擎中。目前已提供常见时序分析场景(例如预测与异常检测)的机器学习算法或自研模型。 - -## 槽 -IoTDB 内部将元数据和数据划分成多个更小的、更易于管理的单元,每个单元称为一个**槽**。槽是一个逻辑概念,在 IoTDB 集群中,**元数据槽**和**数据槽**定义如下: -- **元数据槽**(SchemaSlot):一部分元数据集合,元数据槽总数固定,默认数量为 1000,IoTDB 使用哈希算法将所有设备均匀地分配到这些元数据槽中。 -- **数据槽**(DataSlot):一部分数据集合,在元数据槽的基础上,将对应设备的数据按时间范围划分为数据槽,默认的时间范围为 7 天。 - -## Region -在 IoTDB 中,元数据和数据被复制到各个 DataNode 以获得集群高可用性。然而以槽为粒度进行复制会增加集群管理成本、降低写入吞吐。因此 IoTDB 引入 **Region** 这一概念,将元数据槽和数据槽分别分配给 SchemaRegion 和 DataRegion 后,以 Region 为单位进行复制。**SchemRegion** 和 **DataRegion** 的详细定义如下: -- **SchemaRegion**:元数据存储和复制的基本单元,集群每个数据库的所有元数据槽会被均匀分配给该数据库的所有 SchemaRegion。拥有相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 -- **DataRegion**:数据存储和复制的基本单元,集群每个数据库的所有数据槽会被均匀分配给该数据库的所有 DataRegion。拥有相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 - -## 副本组 -Region 的副本对集群的容灾能力至关重要。对于每个 Region 的所有副本,它们的角色分为 **leader** 和 **follower**,共同提供读写服务。不同架构下的副本组配置推荐如下: -| 类别 | 配置项 | 单机推荐配置 | 分布式推荐配置 | -| :-: | :-: | :-: | :-: | -| 元数据 | schema_replication_factor | 1 | 3 | -| 数据 | data_replication_factor | 1 | 2 | \ No newline at end of file +--> \ No newline at end of file diff --git a/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept_apache.md b/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept_apache.md new file mode 100644 index 000000000..98c6050cc --- /dev/null +++ b/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept_apache.md @@ -0,0 +1,106 @@ + + +# 常见概念 + +## 数据模型相关概念 + +| 概念 | 含义 | +| ----------------------- | ------------------------------------------------------------ | +| 数据模型(sql_dialect) | IoTDB 支持两种时序数据模型(SQL语法),管理的对象均为设备和测点树:以层级路径的方式管理数据,一条路径对应一个设备的一个测点表:以关系表的方式管理数据,一张表对应一类设备 | +| 元数据(Schema) | 元数据是数据库的数据模型信息,即树形结构或表结构。包括测点的名称、数据类型等定义。 | +| 设备(Device) | 对应一个实际场景中的物理设备,通常包含多个测点。 | +| 测点(Timeseries) | 又名:物理量、时间序列、时间线、点位、信号量、指标、测量值等。是多个数据点按时间戳递增排列形成的一个时间序列。通常一个测点代表一个采集点位,能够定期采集所在环境的物理量。 | +| 编码(Encoding) | 编码是一种压缩技术,将数据以二进制的形式进行表示,可以提高存储效率。IoTDB 支持多种针对不同类型的数据的编码方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | +| 压缩(Compression) | IoTDB 在数据编码后,使用压缩技术进一步压缩二进制数据,提升存储效率。IoTDB 支持多种压缩方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | + +## 分布式相关概念 + +下图展示了一个常见的 IoTDB 3C3D(3 个 ConfigNode、3 个 DataNode)的集群部署模式: + + + +IoTDB 的集群包括如下常见概念: + +- 节点(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- 多副本 + +下文将对以上概念进行介绍。 + + +### 节点 + +IoTDB 集群包括三种节点(进程):ConfigNode(管理节点),DataNode(数据节点)和 AINode(分析节点),如下所示: + +- ConfigNode:管理集群的节点信息、配置信息、用户权限、元数据、分区信息等,负责分布式操作的调度和负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。 +- DataNode:服务客户端请求,负责数据的存储和计算,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。 +- AINode:负责提供机器学习能力,支持注册已训练好的机器学习模型,并通过 SQL 调用模型进行推理,目前已内置自研时序大模型和常见的机器学习算法(如预测与异常检测)。 + +### 数据分区 + +在 IoTDB 中,元数据和数据都被分为小的分区,即 Region,由集群的各个 DataNode 进行管理。 + +- SchemaRegion:元数据分区,管理一部分设备和测点的元数据。不同 DataNode 相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 +- DataRegion:数据分区,管理一部分设备的一段时间的数据。不同 DataNode 相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 +- 具体分区算法可参考:[数据分区](../Technical-Insider/Cluster-data-partitioning.md) + +### 多副本 + +数据和元数据的副本数可配置,不同部署模式下的副本数推荐如下配置,其中多副本时可提供高可用服务。 + +| 类别 | 配置项 | 单机推荐配置 | 集群推荐配置 | +| :----- | :------------------------ | :----------- | :----------- | +| 元数据 | schema_replication_factor | 1 | 3 | +| 数据 | data_replication_factor | 1 | 2 | + + +## 部署相关概念 + +IoTDB 有两种运行模式:单机模式、集群模式。 + +### 单机模式 + +IoTDB单机实例包括 1 个ConfigNode、1个DataNode,即1C1D; + +- **特点**:便于开发者安装部署,部署和维护成本较低,操作方便。 +- **适用场景**:资源有限或对高可用要求不高的场景,例如边缘端服务器。 +- **部署方法**:[单机版部署](../Deployment-and-Maintenance/Stand-Alone-Deployment_apache.md) + +### 集群模式 + +IoTDB 集群实例为 3 个ConfigNode 和不少于 3 个 DataNode,通常为 3 个 DataNode,即3C3D;当部分节点出现故障时,剩余节点仍然能对外提供服务,保证数据库服务的高可用性,且可随节点增加提升数据库性能。 + +- **特点**:具有高可用性、高扩展性,可通过增加 DataNode 提高系统性能。 +- **适用场景**:需要提供高可用和可靠性的企业级应用场景。 +- **部署方法**:[集群版部署](../Deployment-and-Maintenance/Cluster-Deployment_apache.md) + +### 特点总结 + +| 维度 | 单机模式 | 集群模式 | +| ------------ | ---------------------------- | ------------------------ | +| 适用场景 | 边缘侧部署、对高可用要求不高 | 高可用性业务、容灾场景等 | +| 所需机器数量 | 1 | ≥3 | +| 安全可靠性 | 无法容忍单点故障 | 高,可容忍单点故障 | +| 扩展性 | 可扩展 DataNode 提升性能 | 可扩展 DataNode 提升性能 | +| 性能 | 可随 DataNode 数量扩展 | 可随 DataNode 数量扩展 | + +- 单机模式和集群模式,部署步骤类似(逐个增加 ConfigNode 和 DataNode),仅副本数和可提供服务的最少节点数不同。 \ No newline at end of file diff --git a/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept_timecho.md b/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept_timecho.md new file mode 100644 index 000000000..77edf9ebb --- /dev/null +++ b/src/zh/UserGuide/latest/Background-knowledge/Cluster-Concept_timecho.md @@ -0,0 +1,116 @@ + + +# 常见概念 + +## 数据模型相关概念 + +| 概念 | 含义 | +| ----------------------- | ------------------------------------------------------------ | +| 数据模型(sql_dialect) | IoTDB 支持两种时序数据模型(SQL语法),管理的对象均为设备和测点树:以层级路径的方式管理数据,一条路径对应一个设备的一个测点表:以关系表的方式管理数据,一张表对应一类设备 | +| 元数据(Schema) | 元数据是数据库的数据模型信息,即树形结构或表结构。包括测点的名称、数据类型等定义。 | +| 设备(Device) | 对应一个实际场景中的物理设备,通常包含多个测点。 | +| 测点(Timeseries) | 又名:物理量、时间序列、时间线、点位、信号量、指标、测量值等。是多个数据点按时间戳递增排列形成的一个时间序列。通常一个测点代表一个采集点位,能够定期采集所在环境的物理量。 | +| 编码(Encoding) | 编码是一种压缩技术,将数据以二进制的形式进行表示,可以提高存储效率。IoTDB 支持多种针对不同类型的数据的编码方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | +| 压缩(Compression) | IoTDB 在数据编码后,使用压缩技术进一步压缩二进制数据,提升存储效率。IoTDB 支持多种压缩方法,详细信息请查看:[压缩和编码](../Technical-Insider/Encoding-and-Compression.md) | + +## 分布式相关概念 + +下图展示了一个常见的 IoTDB 3C3D(3 个 ConfigNode、3 个 DataNode)的集群部署模式: + + + +IoTDB 的集群包括如下常见概念: + +- 节点(ConfigNode、DataNode、AINode) +- Region(SchemaRegion、DataRegion) +- 多副本 + +下文将对以上概念进行介绍。 + + +### 节点 + +IoTDB 集群包括三种节点(进程):ConfigNode(管理节点),DataNode(数据节点)和 AINode(分析节点),如下所示: + +- ConfigNode:管理集群的节点信息、配置信息、用户权限、元数据、分区信息等,负责分布式操作的调度和负载均衡,所有 ConfigNode 之间互为全量备份,如上图中的 ConfigNode-1,ConfigNode-2 和 ConfigNode-3 所示。 +- DataNode:服务客户端请求,负责数据的存储和计算,如上图中的 DataNode-1,DataNode-2 和 DataNode-3 所示。 +- AINode:负责提供机器学习能力,支持注册已训练好的机器学习模型,并通过 SQL 调用模型进行推理,目前已内置自研时序大模型和常见的机器学习算法(如预测与异常检测)。 + +### 数据分区 + +在 IoTDB 中,元数据和数据都被分为小的分区,即 Region,由集群的各个 DataNode 进行管理。 + +- SchemaRegion:元数据分区,管理一部分设备和测点的元数据。不同 DataNode 相同 RegionID 的 SchemaRegion 互为副本,如上图中 SchemaRegion-1 拥有三个副本,分别放置于 DataNode-1,DataNode-2 和 DataNode-3。 +- DataRegion:数据分区,管理一部分设备的一段时间的数据。不同 DataNode 相同 RegionID 的 DataRegion 互为副本,如上图中 DataRegion-2 拥有两个副本,分别放置于 DataNode-1 和 DataNode-2。 +- 具体分区算法可参考:[数据分区](../Technical-Insider/Cluster-data-partitioning.md) + +### 多副本 + +数据和元数据的副本数可配置,不同部署模式下的副本数推荐如下配置,其中多副本时可提供高可用服务。 + +| 类别 | 配置项 | 单机推荐配置 | 集群推荐配置 | +| :----- | :------------------------ | :----------- | :----------- | +| 元数据 | schema_replication_factor | 1 | 3 | +| 数据 | data_replication_factor | 1 | 2 | + + +## 部署相关概念 + +IoTDB 有三种运行模式:单机模式、集群模式和双活模式。 + +### 单机模式 + +IoTDB单机实例包括 1 个ConfigNode、1个DataNode,即1C1D; + +- **特点**:便于开发者安装部署,部署和维护成本较低,操作方便。 +- **适用场景**:资源有限或对高可用要求不高的场景,例如边缘端服务器。 +- **部署方法**:[单机版部署](../Deployment-and-Maintenance/Stand-Alone-Deployment_timecho.md) + +### 双活模式 + +双活版部署为 TimechoDB 企业版功能,是指两个独立的实例进行双向同步,能同时对外提供服务。当一台停机重启后,另一个实例会将缺失数据断点续传。 + +> IoTDB 双活实例通常为2个单机节点,即2套1C1D。每个实例也可以为集群。 + +- **特点**:资源占用最低的高可用解决方案。 +- **适用场景**:资源有限(仅有两台服务器),但希望获得高可用能力。 +- **部署方法**:[双活版部署](../Deployment-and-Maintenance/Dual-Active-Deployment_timecho.md) + +### 集群模式 + +IoTDB 集群实例为 3 个ConfigNode 和不少于 3 个 DataNode,通常为 3 个 DataNode,即3C3D;当部分节点出现故障时,剩余节点仍然能对外提供服务,保证数据库服务的高可用性,且可随节点增加提升数据库性能。 + +- **特点**:具有高可用性、高扩展性,可通过增加 DataNode 提高系统性能。 +- **适用场景**:需要提供高可用和可靠性的企业级应用场景。 +- **部署方法**:[集群版部署](../Deployment-and-Maintenance/Cluster-Deployment_timecho.md) + +### 特点总结 + +| 维度 | 单机模式 | 双活模式 | 集群模式 | +| ------------ | ---------------------------- | ------------------------ | ------------------------ | +| 适用场景 | 边缘侧部署、对高可用要求不高 | 高可用性业务、容灾场景等 | 高可用性业务、容灾场景等 | +| 所需机器数量 | 1 | 2 | ≥3 | +| 安全可靠性 | 无法容忍单点故障 | 高,可容忍单点故障 | 高,可容忍单点故障 | +| 扩展性 | 可扩展 DataNode 提升性能 | 每个实例可按需扩展 | 可扩展 DataNode 提升性能 | +| 性能 | 可随 DataNode 数量扩展 | 与其中一个实例性能相同 | 可随 DataNode 数量扩展 | + +- 单机模式和集群模式,部署步骤类似(逐个增加 ConfigNode 和 DataNode),仅副本数和可提供服务的最少节点数不同。 \ No newline at end of file diff --git a/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual.md b/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual.md index c88848432..172882761 100644 --- a/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual.md +++ b/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual.md @@ -1,3 +1,6 @@ +--- +redirectTo: DataNode-Config-Manual_apache.html +--- - -# DataNode 配置参数 - -IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 - -* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 - -* `iotdb-system.properties`:IoTDB 的配置文件。 - -## 热修改配置项 - -为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-system.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载` -的均为支持热修改的配置参数。 - -通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 - -## 环境配置项(datanode-env.sh/bat) - -环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: - -* MEMORY\_SIZE - -|名字|MEMORY\_SIZE| -|:---:|:---| -|描述|IoTDB DataNode 启动时分配的内存大小 | -|类型|String| -|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| -|改后生效方式|重启服务生效| - -* ON\_HEAP\_MEMORY - -|名字|ON\_HEAP\_MEMORY| -|:---:|:---| -|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | -|类型|String| -|默认值|取决于MEMORY\_SIZE的配置。| -|改后生效方式|重启服务生效| - -* OFF\_HEAP\_MEMORY - -|名字|OFF\_HEAP\_MEMORY| -|:---:|:---| -|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | -|类型|String| -|默认值|取决于MEMORY\_SIZE的配置| -|改后生效方式|重启服务生效| - -* JMX\_LOCAL - -|名字|JMX\_LOCAL| -|:---:|:---| -|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| -|类型|枚举 String : “true”, “false”| -|默认值|true| -|改后生效方式|重启服务生效| - -* JMX\_PORT - -|名字|JMX\_PORT| -|:---:|:---| -|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| -|类型|Short Int: [0,65535]| -|默认值|31999| -|改后生效方式|重启服务生效| - -## 系统配置项(iotdb-system.properties) - -系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 - -### Data Node RPC 服务配置 - -* dn\_rpc\_address - -|名字| dn\_rpc\_address | -|:---:|:-----------------| -|描述| 客户端 RPC 服务监听地址 | -|类型| String | -|默认值| 0.0.0.0 | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_port - -|名字| dn\_rpc\_port | -|:---:|:---| -|描述| Client RPC 服务监听端口| -|类型| Short Int : [0,65535] | -|默认值| 6667 | -|改后生效方式|重启服务生效| - -* dn\_internal\_address - -|名字| dn\_internal\_address | -|:---:|:---| -|描述| DataNode 内网通信地址 | -|类型| string | -|默认值| 127.0.0.1 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_internal\_port - -|名字| dn\_internal\_port | -|:---:|:-------------------| -|描述| DataNode 内网通信端口 | -|类型| int | -|默认值| 10730 | -|改后生效方式| 仅允许在第一次启动服务前修改 | - -* dn\_mpp\_data\_exchange\_port - -|名字| dn\_mpp\_data\_exchange\_port | -|:---:|:---| -|描述| MPP 数据交换端口 | -|类型| int | -|默认值| 10740 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_schema\_region\_consensus\_port - -|名字| dn\_schema\_region\_consensus\_port | -|:---:|:---| -|描述| DataNode 元数据副本的共识协议通信端口 | -|类型| int | -|默认值| 10750 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_data\_region\_consensus\_port - -|名字| dn\_data\_region\_consensus\_port | -|:---:|:---| -|描述| DataNode 数据副本的共识协议通信端口 | -|类型| int | -|默认值| 10760 | -|改后生效方式|仅允许在第一次启动服务前修改| - -* dn\_join\_cluster\_retry\_interval\_ms - -|名字| dn\_join\_cluster\_retry\_interval\_ms | -|:---:|:---------------------------------------| -|描述| DataNode 再次重试加入集群等待时间 | -|类型| long | -|默认值| 5000 | -|改后生效方式| 重启服务生效 | - - -### SSL 配置 - -* enable\_thrift\_ssl - -|名字| enable\_thrift\_ssl | -|:---:|:----------------------------------------------| -|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* enable\_https - -|名字| enable\_https | -|:---:|:-------------------------| -|描述| REST Service 是否开启 SSL 配置 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* key\_store\_path - -|名字| key\_store\_path | -|:---:|:-----------------| -|描述| ssl证书路径 | -|类型| String | -|默认值| "" | -|改后生效方式| 重启服务生效 | - -* key\_store\_pwd - -|名字| key\_store\_pwd | -|:---:|:----------------| -|描述| ssl证书密码 | -|类型| String | -|默认值| "" | -|改后生效方式| 重启服务生效 | - - -### SeedConfigNode 配置 - -* dn\_seed\_config\_node - -|名字| dn\_seed\_config\_node | -|:---:|:------------------------------------| -|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群,推荐使用 SeedConfigNode。V1.2.2 及以前曾用名是 dn\_target\_config\_node\_list | -|类型| String | -|默认值| 127.0.0.1:10710 | -|改后生效方式| 仅允许在第一次启动服务前修改 | - -### 连接配置 - -* dn\_session\_timeout\_threshold - -|名字| dn\_session_timeout_threshold | -|:---:|:------------------------------| -|描述| 最大的会话空闲时间 | -|类型| int | -|默认值| 0 | -|改后生效方式| 重启服务生效 | - - -* dn\_rpc\_thrift\_compression\_enable - -|名字| dn\_rpc\_thrift\_compression\_enable | -|:---:|:---------------------------------| -|描述| 是否启用 thrift 的压缩机制 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_advanced\_compression\_enable - -|名字| dn\_rpc\_advanced\_compression\_enable | -|:---:|:-----------------------------------| -|描述| 是否启用 thrift 的自定制压缩机制 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启服务生效 | - -* dn\_rpc\_selector\_thread\_count - -| 名字 | rpc\_selector\_thread\_count | -|:------:|:-----------------------------| -| 描述 | rpc 选择器线程数量 | -| 类型 | int | -| 默认值 | 1 | -| 改后生效方式 | 重启服务生效 | - -* dn\_rpc\_min\_concurrent\_client\_num - -| 名字 | rpc\_min\_concurrent\_client\_num | -|:------:|:----------------------------------| -| 描述 | 最小连接数 | -| 类型 | Short Int : [0,65535] | -| 默认值 | 1 | -| 改后生效方式 | 重启服务生效 | - -* dn\_rpc\_max\_concurrent\_client\_num - -| 名字 | dn\_rpc\_max\_concurrent\_client\_num | -|:------:|:----------------------------------| -| 描述 | 最大连接数 | -| 类型 | Short Int : [0,65535] | -| 默认值 | 65535 | -| 改后生效方式 | 重启服务生效 | - -* dn\_thrift\_max\_frame\_size - -|名字| dn\_thrift\_max\_frame\_size | -|:---:|:---| -|描述| RPC 请求/响应的最大字节数| -|类型| long | -|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | -|改后生效方式|重启服务生效| - -* dn\_thrift\_init\_buffer\_size - -|名字| dn\_thrift\_init\_buffer\_size | -|:---:|:---| -|描述| 字节数 | -|类型| long | -|默认值| 1024 | -|改后生效方式|重启服务生效| - -* dn\_connection\_timeout\_ms - -| 名字 | dn\_connection\_timeout\_ms | -|:------:|:----------------------------| -| 描述 | 节点连接超时时间 | -| 类型 | int | -| 默认值 | 60000 | -| 改后生效方式 | 重启服务生效 | - -* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager - -| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------:|:--------------------------------------------------------------| -| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | -| 类型 | int | -| 默认值 | 200 | -| 改后生效方式 | 重启服务生效 | - -* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager - -| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | -|:------:|:-------------------------------------------------------------| -| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | -| 类型 | int | -| 默认值 | 300 | -| 改后生效方式 | 重启服务生效 | - -### 目录配置 - -* dn\_system\_dir - -| 名字 | dn\_system\_dir | -|:------:|:--------------------------------------------------------------------| -| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | -| 改后生效方式 | 重启服务生效 | - -* dn\_data\_dirs - -| 名字 | dn\_data\_dirs | -|:------:|:-------------------------------------------------------------------| -| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | -| 改后生效方式 | 重启服务生效 | - -* dn\_multi\_dir\_strategy - -| 名字 | dn\_multi\_dir\_strategy | -|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | -| 类型 | String | -| 默认值 | SequenceStrategy | -| 改后生效方式 | 热加载 | - -* dn\_consensus\_dir - -| 名字 | dn\_consensus\_dir | -|:------:|:-------------------------------------------------------------------------| -| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | -| 改后生效方式 | 重启服务生效 | - -* dn\_wal\_dirs - -| 名字 | dn\_wal\_dirs | -|:------:|:---------------------------------------------------------------------| -| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | -| 改后生效方式 | 重启服务生效 | - -* dn\_tracing\_dir - -| 名字 | dn\_tracing\_dir | -|:------:|:--------------------------------------------------------------------| -| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | datanode/tracing | -| 改后生效方式 | 重启服务生效 | - -* dn\_sync\_dir - -| 名字 | dn\_sync\_dir | -|:------:|:----------------------------------------------------------------------| -| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | -| 类型 | String | -| 默认值 | data/datanode/sync | -| 改后生效方式 | 重启服务生效 | - -### Metric 配置 - -## 开启 GC 日志 - -GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 -若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: - -```bash -nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & -``` - -或者 - -```bash -sbin\start-datanode.bat printgc -``` - -GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 - -#### REST 服务配置 - -* enable\_rest\_service - -|名字| enable\_rest\_service | -|:---:|:--------------------| -|描述| 是否开启Rest服务。 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* rest\_service\_port - -|名字| rest\_service\_port | -|:---:|:------------------| -|描述| Rest服务监听端口号 | -|类型| int32 | -|默认值| 18080 | -|改后生效方式| 重启生效 | - -* enable\_swagger - -|名字| enable\_swagger | -|:---:|:-----------------------| -|描述| 是否启用swagger来展示rest接口信息 | -|类型| Boolean | -|默认值| false | -|改后生效方式| 重启生效 | - -* rest\_query\_default\_row\_size\_limit - -|名字| rest\_query\_default\_row\_size\_limit | -|:---:|:----------------------------------| -|描述| 一次查询能返回的结果集最大行数 | -|类型| int32 | -|默认值| 10000 | -|改后生效方式| 重启生效 | - -* cache\_expire - -|名字| cache\_expire | -|:---:|:--------------| -|描述| 缓存客户登录信息的过期时间 | -|类型| int32 | -|默认值| 28800 | -|改后生效方式| 重启生效 | - -* cache\_max\_num - -|名字| cache\_max\_num | -|:---:|:--------------| -|描述| 缓存中存储的最大用户数量 | -|类型| int32 | -|默认值| 100 | -|改后生效方式| 重启生效 | - -* cache\_init\_num - -|名字| cache\_init\_num | -|:---:|:---------------| -|描述| 缓存初始容量 | -|类型| int32 | -|默认值| 10 | -|改后生效方式| 重启生效 | - -* trust\_store\_path - -|名字| trust\_store\_path | -|:---:|:---------------| -|描述| keyStore 密码(非必填) | -|类型| String | -|默认值| "" | -|改后生效方式| 重启生效 | - -* trust\_store\_pwd - -|名字| trust\_store\_pwd | -|:---:|:---------------| -|描述| trustStore 密码(非必填) | -|类型| String | -|默认值| "" | -|改后生效方式| 重启生效 | - -* idle\_timeout - -|名字| idle\_timeout | -|:---:|:--------------| -|描述| SSL 超时时间,单位为秒 | -|类型| int32 | -|默认值| 5000 | -|改后生效方式| 重启生效 | - - - -#### 多级存储配置 - -* dn\_default\_space\_usage\_thresholds - -|名字| dn\_default\_space\_usage\_thresholds | -|:---:|:--------------| -|描述| 定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | -|类型| double | -|默认值| 0.85 | -|改后生效方式| 热加载 | - -* remote\_tsfile\_cache\_dirs - -|名字| remote\_tsfile\_cache\_dirs | -|:---:|:--------------| -|描述| 云端存储在本地的缓存目录 | -|类型| string | -|默认值| data/datanode/data/cache | -|改后生效方式| 重启生效 | - -* remote\_tsfile\_cache\_page\_size\_in\_kb - -|名字| remote\_tsfile\_cache\_page\_size\_in\_kb | -|:---:|:--------------| -|描述| 云端存储在本地缓存文件的块大小 | -|类型| int | -|默认值| 20480 | -|改后生效方式| 重启生效 | - -* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb - -|名字| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | -|:---:|:--------------| -|描述| 云端存储本地缓存的最大磁盘占用大小 | -|类型| long | -|默认值| 51200 | -|改后生效方式| 重启生效 | - -* object\_storage\_type - -|名字| object\_storage\_type | -|:---:|:--------------| -|描述| 云端存储类型 | -|类型| string | -|默认值| AWS_S3 | -|改后生效方式| 重启生效 | - -* object\_storage\_bucket - -|名字| object\_storage\_bucket | -|:---:|:--------------| -|描述| 云端存储 bucket 的名称 | -|类型| string | -|默认值| iotdb_data | -|改后生效方式| 重启生效 | - -* object\_storage\_endpoiont - -|名字| object\_storage\_endpoiont | -|:---:|:--------------| -|描述| 云端存储的 endpoint | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | - -* object\_storage\_access\_key - -|名字| object\_storage\_access\_key | -|:---:|:--------------| -|描述| 云端存储的验证信息 key | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | - -* object\_storage\_access\_secret - -|名字| object\_storage\_access\_secret | -|:---:|:--------------| -|描述| 云端存储的验证信息 secret | -|类型| string | -|默认值| 无 | -|改后生效方式| 重启生效 | \ No newline at end of file diff --git a/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual_apache.md b/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual_apache.md new file mode 100644 index 000000000..d19056bec --- /dev/null +++ b/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual_apache.md @@ -0,0 +1,494 @@ + + +# DataNode 配置参数 + +IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 + +* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 + +* `iotdb-system.properties`:IoTDB 的配置文件。 + +## 热修改配置项 + +为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-system.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载` +的均为支持热修改的配置参数。 + +通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 + +## 环境配置项(datanode-env.sh/bat) + +环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: + +* MEMORY\_SIZE + +|名字|MEMORY\_SIZE| +|:---:|:---| +|描述|IoTDB DataNode 启动时分配的内存大小 | +|类型|String| +|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| +|改后生效方式|重启服务生效| + +* ON\_HEAP\_MEMORY + +|名字|ON\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置。| +|改后生效方式|重启服务生效| + +* OFF\_HEAP\_MEMORY + +|名字|OFF\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置| +|改后生效方式|重启服务生效| + +* JMX\_LOCAL + +|名字|JMX\_LOCAL| +|:---:|:---| +|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| +|类型|枚举 String : “true”, “false”| +|默认值|true| +|改后生效方式|重启服务生效| + +* JMX\_PORT + +|名字|JMX\_PORT| +|:---:|:---| +|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| +|类型|Short Int: [0,65535]| +|默认值|31999| +|改后生效方式|重启服务生效| + +## 系统配置项(iotdb-system.properties) + +系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 + +### Data Node RPC 服务配置 + +* dn\_rpc\_address + +|名字| dn\_rpc\_address | +|:---:|:-----------------| +|描述| 客户端 RPC 服务监听地址 | +|类型| String | +|默认值| 0.0.0.0 | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_port + +|名字| dn\_rpc\_port | +|:---:|:---| +|描述| Client RPC 服务监听端口| +|类型| Short Int : [0,65535] | +|默认值| 6667 | +|改后生效方式|重启服务生效| + +* dn\_internal\_address + +|名字| dn\_internal\_address | +|:---:|:---| +|描述| DataNode 内网通信地址 | +|类型| string | +|默认值| 127.0.0.1 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_internal\_port + +|名字| dn\_internal\_port | +|:---:|:-------------------| +|描述| DataNode 内网通信端口 | +|类型| int | +|默认值| 10730 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +* dn\_mpp\_data\_exchange\_port + +|名字| dn\_mpp\_data\_exchange\_port | +|:---:|:---| +|描述| MPP 数据交换端口 | +|类型| int | +|默认值| 10740 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_schema\_region\_consensus\_port + +|名字| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 元数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10750 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_data\_region\_consensus\_port + +|名字| dn\_data\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10760 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_join\_cluster\_retry\_interval\_ms + +|名字| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:---------------------------------------| +|描述| DataNode 再次重试加入集群等待时间 | +|类型| long | +|默认值| 5000 | +|改后生效方式| 重启服务生效 | + + +### SSL 配置 + +* enable\_thrift\_ssl + +|名字| enable\_thrift\_ssl | +|:---:|:----------------------------------------------| +|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* enable\_https + +|名字| enable\_https | +|:---:|:-------------------------| +|描述| REST Service 是否开启 SSL 配置 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* key\_store\_path + +|名字| key\_store\_path | +|:---:|:-----------------| +|描述| ssl证书路径 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + +* key\_store\_pwd + +|名字| key\_store\_pwd | +|:---:|:----------------| +|描述| ssl证书密码 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + + +### SeedConfigNode 配置 + +* dn\_seed\_config\_node + +|名字| dn\_seed\_config\_node | +|:---:|:------------------------------------| +|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群,推荐使用 SeedConfigNode。V1.2.2 及以前曾用名是 dn\_target\_config\_node\_list | +|类型| String | +|默认值| 127.0.0.1:10710 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +### 连接配置 + +* dn\_session\_timeout\_threshold + +|名字| dn\_session_timeout_threshold | +|:---:|:------------------------------| +|描述| 最大的会话空闲时间 | +|类型| int | +|默认值| 0 | +|改后生效方式| 重启服务生效 | + + +* dn\_rpc\_thrift\_compression\_enable + +|名字| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---------------------------------| +|描述| 是否启用 thrift 的压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_advanced\_compression\_enable + +|名字| dn\_rpc\_advanced\_compression\_enable | +|:---:|:-----------------------------------| +|描述| 是否启用 thrift 的自定制压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_selector\_thread\_count + +| 名字 | rpc\_selector\_thread\_count | +|:------:|:-----------------------------| +| 描述 | rpc 选择器线程数量 | +| 类型 | int | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_min\_concurrent\_client\_num + +| 名字 | rpc\_min\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最小连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_max\_concurrent\_client\_num + +| 名字 | dn\_rpc\_max\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最大连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 65535 | +| 改后生效方式 | 重启服务生效 | + +* dn\_thrift\_max\_frame\_size + +|名字| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|描述| RPC 请求/响应的最大字节数| +|类型| long | +|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | +|改后生效方式|重启服务生效| + +* dn\_thrift\_init\_buffer\_size + +|名字| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|描述| 字节数 | +|类型| long | +|默认值| 1024 | +|改后生效方式|重启服务生效| + +* dn\_connection\_timeout\_ms + +| 名字 | dn\_connection\_timeout\_ms | +|:------:|:----------------------------| +| 描述 | 节点连接超时时间 | +| 类型 | int | +| 默认值 | 60000 | +| 改后生效方式 | 重启服务生效 | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:--------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | +| 类型 | int | +| 默认值 | 200 | +| 改后生效方式 | 重启服务生效 | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:-------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | +| 类型 | int | +| 默认值 | 300 | +| 改后生效方式 | 重启服务生效 | + +### 目录配置 + +* dn\_system\_dir + +| 名字 | dn\_system\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | +| 改后生效方式 | 重启服务生效 | + +* dn\_data\_dirs + +| 名字 | dn\_data\_dirs | +|:------:|:-------------------------------------------------------------------| +| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | +| 改后生效方式 | 重启服务生效 | + +* dn\_multi\_dir\_strategy + +| 名字 | dn\_multi\_dir\_strategy | +|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | +| 类型 | String | +| 默认值 | SequenceStrategy | +| 改后生效方式 | 热加载 | + +* dn\_consensus\_dir + +| 名字 | dn\_consensus\_dir | +|:------:|:-------------------------------------------------------------------------| +| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | +| 改后生效方式 | 重启服务生效 | + +* dn\_wal\_dirs + +| 名字 | dn\_wal\_dirs | +|:------:|:---------------------------------------------------------------------| +| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | +| 改后生效方式 | 重启服务生效 | + +* dn\_tracing\_dir + +| 名字 | dn\_tracing\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | datanode/tracing | +| 改后生效方式 | 重启服务生效 | + +* dn\_sync\_dir + +| 名字 | dn\_sync\_dir | +|:------:|:----------------------------------------------------------------------| +| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/sync | +| 改后生效方式 | 重启服务生效 | + +### Metric 配置 + +## 开启 GC 日志 + +GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 +若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` + +或者 + +```bash +sbin\start-datanode.bat printgc +``` + +GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 + +#### REST 服务配置 + +* enable\_rest\_service + +|名字| enable\_rest\_service | +|:---:|:--------------------| +|描述| 是否开启Rest服务。 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_service\_port + +|名字| rest\_service\_port | +|:---:|:------------------| +|描述| Rest服务监听端口号 | +|类型| int32 | +|默认值| 18080 | +|改后生效方式| 重启生效 | + +* enable\_swagger + +|名字| enable\_swagger | +|:---:|:-----------------------| +|描述| 是否启用swagger来展示rest接口信息 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_query\_default\_row\_size\_limit + +|名字| rest\_query\_default\_row\_size\_limit | +|:---:|:----------------------------------| +|描述| 一次查询能返回的结果集最大行数 | +|类型| int32 | +|默认值| 10000 | +|改后生效方式| 重启生效 | + +* cache\_expire + +|名字| cache\_expire | +|:---:|:--------------| +|描述| 缓存客户登录信息的过期时间 | +|类型| int32 | +|默认值| 28800 | +|改后生效方式| 重启生效 | + +* cache\_max\_num + +|名字| cache\_max\_num | +|:---:|:--------------| +|描述| 缓存中存储的最大用户数量 | +|类型| int32 | +|默认值| 100 | +|改后生效方式| 重启生效 | + +* cache\_init\_num + +|名字| cache\_init\_num | +|:---:|:---------------| +|描述| 缓存初始容量 | +|类型| int32 | +|默认值| 10 | +|改后生效方式| 重启生效 | + +* trust\_store\_path + +|名字| trust\_store\_path | +|:---:|:---------------| +|描述| keyStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* trust\_store\_pwd + +|名字| trust\_store\_pwd | +|:---:|:---------------| +|描述| trustStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* idle\_timeout + +|名字| idle\_timeout | +|:---:|:--------------| +|描述| SSL 超时时间,单位为秒 | +|类型| int32 | +|默认值| 5000 | +|改后生效方式| 重启生效 | + + + diff --git a/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual_timecho.md b/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual_timecho.md new file mode 100644 index 000000000..c88848432 --- /dev/null +++ b/src/zh/UserGuide/latest/Reference/DataNode-Config-Manual_timecho.md @@ -0,0 +1,576 @@ + + +# DataNode 配置参数 + +IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 安装目录:`conf`文件夹下。 + +* `datanode-env.sh/bat`:环境配置项的配置文件,可以配置 DataNode 的内存大小。 + +* `iotdb-system.properties`:IoTDB 的配置文件。 + +## 热修改配置项 + +为方便用户使用,IoTDB 为用户提供了热修改功能,即在系统运行过程中修改 `iotdb-system.properties` 中部分配置参数并即时应用到系统中。下面介绍的参数中,改后 生效方式为`热加载` +的均为支持热修改的配置参数。 + +通过 Session 或 Cli 发送 ```load configuration``` 或 `set configuration` 命令(SQL)至 IoTDB 可触发配置热加载。 + +## 环境配置项(datanode-env.sh/bat) + +环境配置项主要用于对 DataNode 运行的 Java 环境相关参数进行配置,如 JVM 相关配置。DataNode/Standalone 启动时,此部分配置会被传给 JVM,详细配置项说明如下: + +* MEMORY\_SIZE + +|名字|MEMORY\_SIZE| +|:---:|:---| +|描述|IoTDB DataNode 启动时分配的内存大小 | +|类型|String| +|默认值|取决于操作系统和机器配置。默认为机器内存的二分之一。| +|改后生效方式|重启服务生效| + +* ON\_HEAP\_MEMORY + +|名字|ON\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆内内存大小, 曾用名: MAX\_HEAP\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置。| +|改后生效方式|重启服务生效| + +* OFF\_HEAP\_MEMORY + +|名字|OFF\_HEAP\_MEMORY| +|:---:|:---| +|描述|IoTDB DataNode 能使用的堆外内存大小, 曾用名: MAX\_DIRECT\_MEMORY\_SIZE | +|类型|String| +|默认值|取决于MEMORY\_SIZE的配置| +|改后生效方式|重启服务生效| + +* JMX\_LOCAL + +|名字|JMX\_LOCAL| +|:---:|:---| +|描述|JMX 监控模式,配置为 true 表示仅允许本地监控,设置为 false 的时候表示允许远程监控。如想在本地通过网络连接JMX Service,比如nodeTool.sh会尝试连接127.0.0.1:31999,请将JMX_LOCAL设置为false。| +|类型|枚举 String : “true”, “false”| +|默认值|true| +|改后生效方式|重启服务生效| + +* JMX\_PORT + +|名字|JMX\_PORT| +|:---:|:---| +|描述|JMX 监听端口。请确认该端口是不是系统保留端口并且未被占用。| +|类型|Short Int: [0,65535]| +|默认值|31999| +|改后生效方式|重启服务生效| + +## 系统配置项(iotdb-system.properties) + +系统配置项是 IoTDB DataNode/Standalone 运行的核心配置,它主要用于设置 DataNode/Standalone 数据库引擎的参数。 + +### Data Node RPC 服务配置 + +* dn\_rpc\_address + +|名字| dn\_rpc\_address | +|:---:|:-----------------| +|描述| 客户端 RPC 服务监听地址 | +|类型| String | +|默认值| 0.0.0.0 | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_port + +|名字| dn\_rpc\_port | +|:---:|:---| +|描述| Client RPC 服务监听端口| +|类型| Short Int : [0,65535] | +|默认值| 6667 | +|改后生效方式|重启服务生效| + +* dn\_internal\_address + +|名字| dn\_internal\_address | +|:---:|:---| +|描述| DataNode 内网通信地址 | +|类型| string | +|默认值| 127.0.0.1 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_internal\_port + +|名字| dn\_internal\_port | +|:---:|:-------------------| +|描述| DataNode 内网通信端口 | +|类型| int | +|默认值| 10730 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +* dn\_mpp\_data\_exchange\_port + +|名字| dn\_mpp\_data\_exchange\_port | +|:---:|:---| +|描述| MPP 数据交换端口 | +|类型| int | +|默认值| 10740 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_schema\_region\_consensus\_port + +|名字| dn\_schema\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 元数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10750 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_data\_region\_consensus\_port + +|名字| dn\_data\_region\_consensus\_port | +|:---:|:---| +|描述| DataNode 数据副本的共识协议通信端口 | +|类型| int | +|默认值| 10760 | +|改后生效方式|仅允许在第一次启动服务前修改| + +* dn\_join\_cluster\_retry\_interval\_ms + +|名字| dn\_join\_cluster\_retry\_interval\_ms | +|:---:|:---------------------------------------| +|描述| DataNode 再次重试加入集群等待时间 | +|类型| long | +|默认值| 5000 | +|改后生效方式| 重启服务生效 | + + +### SSL 配置 + +* enable\_thrift\_ssl + +|名字| enable\_thrift\_ssl | +|:---:|:----------------------------------------------| +|描述| 当enable\_thrift\_ssl配置为true时,将通过dn\_rpc\_port使用 SSL 加密进行通信 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* enable\_https + +|名字| enable\_https | +|:---:|:-------------------------| +|描述| REST Service 是否开启 SSL 配置 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* key\_store\_path + +|名字| key\_store\_path | +|:---:|:-----------------| +|描述| ssl证书路径 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + +* key\_store\_pwd + +|名字| key\_store\_pwd | +|:---:|:----------------| +|描述| ssl证书密码 | +|类型| String | +|默认值| "" | +|改后生效方式| 重启服务生效 | + + +### SeedConfigNode 配置 + +* dn\_seed\_config\_node + +|名字| dn\_seed\_config\_node | +|:---:|:------------------------------------| +|描述| ConfigNode 地址,DataNode 启动时通过此地址加入集群,推荐使用 SeedConfigNode。V1.2.2 及以前曾用名是 dn\_target\_config\_node\_list | +|类型| String | +|默认值| 127.0.0.1:10710 | +|改后生效方式| 仅允许在第一次启动服务前修改 | + +### 连接配置 + +* dn\_session\_timeout\_threshold + +|名字| dn\_session_timeout_threshold | +|:---:|:------------------------------| +|描述| 最大的会话空闲时间 | +|类型| int | +|默认值| 0 | +|改后生效方式| 重启服务生效 | + + +* dn\_rpc\_thrift\_compression\_enable + +|名字| dn\_rpc\_thrift\_compression\_enable | +|:---:|:---------------------------------| +|描述| 是否启用 thrift 的压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_advanced\_compression\_enable + +|名字| dn\_rpc\_advanced\_compression\_enable | +|:---:|:-----------------------------------| +|描述| 是否启用 thrift 的自定制压缩机制 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启服务生效 | + +* dn\_rpc\_selector\_thread\_count + +| 名字 | rpc\_selector\_thread\_count | +|:------:|:-----------------------------| +| 描述 | rpc 选择器线程数量 | +| 类型 | int | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_min\_concurrent\_client\_num + +| 名字 | rpc\_min\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最小连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 1 | +| 改后生效方式 | 重启服务生效 | + +* dn\_rpc\_max\_concurrent\_client\_num + +| 名字 | dn\_rpc\_max\_concurrent\_client\_num | +|:------:|:----------------------------------| +| 描述 | 最大连接数 | +| 类型 | Short Int : [0,65535] | +| 默认值 | 65535 | +| 改后生效方式 | 重启服务生效 | + +* dn\_thrift\_max\_frame\_size + +|名字| dn\_thrift\_max\_frame\_size | +|:---:|:---| +|描述| RPC 请求/响应的最大字节数| +|类型| long | +|默认值| 536870912 (默认值512MB,应大于等于 512 * 1024 * 1024) | +|改后生效方式|重启服务生效| + +* dn\_thrift\_init\_buffer\_size + +|名字| dn\_thrift\_init\_buffer\_size | +|:---:|:---| +|描述| 字节数 | +|类型| long | +|默认值| 1024 | +|改后生效方式|重启服务生效| + +* dn\_connection\_timeout\_ms + +| 名字 | dn\_connection\_timeout\_ms | +|:------:|:----------------------------| +| 描述 | 节点连接超时时间 | +| 类型 | int | +| 默认值 | 60000 | +| 改后生效方式 | 重启服务生效 | + +* dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_core\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:--------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的核心 Client 个数 | +| 类型 | int | +| 默认值 | 200 | +| 改后生效方式 | 重启服务生效 | + +* dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager + +| 名字 | dn\_max\_client\_count\_for\_each\_node\_in\_client\_manager | +|:------:|:-------------------------------------------------------------| +| 描述 | 单 ClientManager 中路由到每个节点的最大 Client 个数 | +| 类型 | int | +| 默认值 | 300 | +| 改后生效方式 | 重启服务生效 | + +### 目录配置 + +* dn\_system\_dir + +| 名字 | dn\_system\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 元数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/system(Windows:data\\datanode\\system) | +| 改后生效方式 | 重启服务生效 | + +* dn\_data\_dirs + +| 名字 | dn\_data\_dirs | +|:------:|:-------------------------------------------------------------------| +| 描述 | IoTDB 数据存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/data(Windows:data\\datanode\\data) | +| 改后生效方式 | 重启服务生效 | + +* dn\_multi\_dir\_strategy + +| 名字 | dn\_multi\_dir\_strategy | +|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 描述 | IoTDB 在 data\_dirs 中为 TsFile 选择目录时采用的策略。可使用简单类名或类名全称。系统提供以下三种策略:
1. SequenceStrategy:IoTDB 按顺序选择目录,依次遍历 data\_dirs 中的所有目录,并不断轮循;
2. MaxDiskUsableSpaceFirstStrategy:IoTDB 优先选择 data\_dirs 中对应磁盘空余空间最大的目录;
您可以通过以下方法完成用户自定义策略:
1. 继承 org.apache.iotdb.db.storageengine.rescon.disk.strategy.DirectoryStrategy 类并实现自身的 Strategy 方法;
2. 将实现的类的完整类名(包名加类名,UserDefineStrategyPackage)填写到该配置项;
3. 将该类 jar 包添加到工程中。 | +| 类型 | String | +| 默认值 | SequenceStrategy | +| 改后生效方式 | 热加载 | + +* dn\_consensus\_dir + +| 名字 | dn\_consensus\_dir | +|:------:|:-------------------------------------------------------------------------| +| 描述 | IoTDB 共识层日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/consensus(Windows:data\\datanode\\consensus) | +| 改后生效方式 | 重启服务生效 | + +* dn\_wal\_dirs + +| 名字 | dn\_wal\_dirs | +|:------:|:---------------------------------------------------------------------| +| 描述 | IoTDB 写前日志存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/wal(Windows:data\\datanode\\wal) | +| 改后生效方式 | 重启服务生效 | + +* dn\_tracing\_dir + +| 名字 | dn\_tracing\_dir | +|:------:|:--------------------------------------------------------------------| +| 描述 | IoTDB 追踪根目录路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | datanode/tracing | +| 改后生效方式 | 重启服务生效 | + +* dn\_sync\_dir + +| 名字 | dn\_sync\_dir | +|:------:|:----------------------------------------------------------------------| +| 描述 | IoTDB sync 存储路径,默认存放在和 sbin 目录同级的 data 目录下。相对路径的起始目录与操作系统相关,建议使用绝对路径。 | +| 类型 | String | +| 默认值 | data/datanode/sync | +| 改后生效方式 | 重启服务生效 | + +### Metric 配置 + +## 开启 GC 日志 + +GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。 +若要打开 GC 日志,则需要在启动 IoTDB Server 的时候加上"printgc"参数: + +```bash +nohup sbin/start-datanode.sh printgc >/dev/null 2>&1 & +``` + +或者 + +```bash +sbin\start-datanode.bat printgc +``` + +GC 日志会被存储在`IOTDB_HOME/logs/gc.log`. 至多会存储 10 个 gc.log 文件,每个文件最多 10MB。 + +#### REST 服务配置 + +* enable\_rest\_service + +|名字| enable\_rest\_service | +|:---:|:--------------------| +|描述| 是否开启Rest服务。 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_service\_port + +|名字| rest\_service\_port | +|:---:|:------------------| +|描述| Rest服务监听端口号 | +|类型| int32 | +|默认值| 18080 | +|改后生效方式| 重启生效 | + +* enable\_swagger + +|名字| enable\_swagger | +|:---:|:-----------------------| +|描述| 是否启用swagger来展示rest接口信息 | +|类型| Boolean | +|默认值| false | +|改后生效方式| 重启生效 | + +* rest\_query\_default\_row\_size\_limit + +|名字| rest\_query\_default\_row\_size\_limit | +|:---:|:----------------------------------| +|描述| 一次查询能返回的结果集最大行数 | +|类型| int32 | +|默认值| 10000 | +|改后生效方式| 重启生效 | + +* cache\_expire + +|名字| cache\_expire | +|:---:|:--------------| +|描述| 缓存客户登录信息的过期时间 | +|类型| int32 | +|默认值| 28800 | +|改后生效方式| 重启生效 | + +* cache\_max\_num + +|名字| cache\_max\_num | +|:---:|:--------------| +|描述| 缓存中存储的最大用户数量 | +|类型| int32 | +|默认值| 100 | +|改后生效方式| 重启生效 | + +* cache\_init\_num + +|名字| cache\_init\_num | +|:---:|:---------------| +|描述| 缓存初始容量 | +|类型| int32 | +|默认值| 10 | +|改后生效方式| 重启生效 | + +* trust\_store\_path + +|名字| trust\_store\_path | +|:---:|:---------------| +|描述| keyStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* trust\_store\_pwd + +|名字| trust\_store\_pwd | +|:---:|:---------------| +|描述| trustStore 密码(非必填) | +|类型| String | +|默认值| "" | +|改后生效方式| 重启生效 | + +* idle\_timeout + +|名字| idle\_timeout | +|:---:|:--------------| +|描述| SSL 超时时间,单位为秒 | +|类型| int32 | +|默认值| 5000 | +|改后生效方式| 重启生效 | + + + +#### 多级存储配置 + +* dn\_default\_space\_usage\_thresholds + +|名字| dn\_default\_space\_usage\_thresholds | +|:---:|:--------------| +|描述| 定义每个层级数据目录的最小剩余空间比例;当剩余空间少于该比例时,数据会被自动迁移至下一个层级;当最后一个层级的剩余存储空间到低于此阈值时,会将系统置为 READ_ONLY | +|类型| double | +|默认值| 0.85 | +|改后生效方式| 热加载 | + +* remote\_tsfile\_cache\_dirs + +|名字| remote\_tsfile\_cache\_dirs | +|:---:|:--------------| +|描述| 云端存储在本地的缓存目录 | +|类型| string | +|默认值| data/datanode/data/cache | +|改后生效方式| 重启生效 | + +* remote\_tsfile\_cache\_page\_size\_in\_kb + +|名字| remote\_tsfile\_cache\_page\_size\_in\_kb | +|:---:|:--------------| +|描述| 云端存储在本地缓存文件的块大小 | +|类型| int | +|默认值| 20480 | +|改后生效方式| 重启生效 | + +* remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb + +|名字| remote\_tsfile\_cache\_max\_disk\_usage\_in\_mb | +|:---:|:--------------| +|描述| 云端存储本地缓存的最大磁盘占用大小 | +|类型| long | +|默认值| 51200 | +|改后生效方式| 重启生效 | + +* object\_storage\_type + +|名字| object\_storage\_type | +|:---:|:--------------| +|描述| 云端存储类型 | +|类型| string | +|默认值| AWS_S3 | +|改后生效方式| 重启生效 | + +* object\_storage\_bucket + +|名字| object\_storage\_bucket | +|:---:|:--------------| +|描述| 云端存储 bucket 的名称 | +|类型| string | +|默认值| iotdb_data | +|改后生效方式| 重启生效 | + +* object\_storage\_endpoiont + +|名字| object\_storage\_endpoiont | +|:---:|:--------------| +|描述| 云端存储的 endpoint | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | + +* object\_storage\_access\_key + +|名字| object\_storage\_access\_key | +|:---:|:--------------| +|描述| 云端存储的验证信息 key | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | + +* object\_storage\_access\_secret + +|名字| object\_storage\_access\_secret | +|:---:|:--------------| +|描述| 云端存储的验证信息 secret | +|类型| string | +|默认值| 无 | +|改后生效方式| 重启生效 | \ No newline at end of file