You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2022/11/24 03:49:15 UTC

[iotdb] branch adjust_doc created (now 3252b4d582)

This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a change to branch adjust_doc
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 3252b4d582 fix tsfile split tool doc

This branch includes the following new commits:

     new 3252b4d582 fix tsfile split tool doc

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: fix tsfile split tool doc

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch adjust_doc
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 3252b4d582352bc0cd7fca15552c6a21a30c1b0d
Author: qiaojialin <64...@qq.com>
AuthorDate: Thu Nov 24 11:49:01 2022 +0800

    fix tsfile split tool doc
---
 .../Maintenance-Tools/TsFile-Split-Tool.md         | 25 ++++++++--------------
 docs/UserGuide/{API => Reference}/Status-Codes.md  |  0
 .../Maintenance-Tools/TsFile-Split-Tool.md         | 20 +++++++----------
 .../UserGuide/{API => Reference}/Status-Codes.md   |  0
 .../java/org/apache/iotdb/rpc/TSStatusCode.java    |  4 ++--
 site/src/main/.vuepress/config.js                  |  4 ++--
 6 files changed, 21 insertions(+), 32 deletions(-)

diff --git a/docs/UserGuide/Maintenance-Tools/TsFile-Split-Tool.md b/docs/UserGuide/Maintenance-Tools/TsFile-Split-Tool.md
index 4ed9a060ef..e0fae81b29 100644
--- a/docs/UserGuide/Maintenance-Tools/TsFile-Split-Tool.md
+++ b/docs/UserGuide/Maintenance-Tools/TsFile-Split-Tool.md
@@ -21,33 +21,26 @@
 
 # TsFile Split Tool
 
-IoTDB version 0.12 could produce large files, which leads to difficulties in maintenance. Therefore, since version 0.12.5 and 0.13, TsFile split tool is provided. The split tool can split the large TsFile into several small TsFile according to the configuration.
+TsFile split tool is used to split a TsFile into multiple TsFiles. The location is tools/tsfile/split-tsfile-tool
 
-After building the server, the startup script of this tool will appear under the `server\target\iotdb-server-{version}\tools\tsfileToolSet` directory.
-
-Command:
+How to use:
 
 For Windows:
 
 ```
-.\split-tsfile-tool.bat <path of your TsFile> (-level <LEVEL of the target files>) (-size <SIZE of the target files>)
+.\split-tsfile-tool.bat <path of your TsFile> (-level <inner space compaction num in new file name, default is 10>) (-size <size of new files in byte, default is 1048576000>)
 ```
 
 For Linux or MacOs:
 
 ```
-./split-tsfile-tool.sh <path of your TsFile> (-level <LEVEL of the target files>) (-size <SIZE of the target files>)
+./split-tsfile-tool.sh <path of your TsFile> (-level <inner space compaction num in new file name, default is 10>) (-size <size of new files in byte, default is 1048576000>)
 ```
 
-> Note that if `-level` is not set, the default level of target files is 10; if `-size` is not set, the default size of target files is about 1GB. The unit of `-size` is byte.
-> For example, if the target files size is 100MB, and the level is 6, the command would be `./split-tsfile-tool.sh test.tsfile -level 6 -size 1048576000` (Linux or MacOs)
-
-Here are some configurations:
-
-1. The size of target files could be configured by the input param, which is 1GB by default. This configuration is also the target file size in compaction in 0.13. File size could determine whether the compaction is proceeded in 0.13, so this configuration could make sure there is no compaction after restarting.
-2. The level of target files is determined by the input param, which is 10 by default. File level could determine whether the compaction is proceeded in 0.12, so this configuration could make sure there is no compaction after restarting.
-3. The points number of chunk could be configured by `chunk_point_num_lower_bound_in_compaction`, which is 100 by default. This configuration is also the points number of target file in compaction in 0.13.
+> For example, if the new files size is 100MB, and the compaction num is 6, the command is `./split-tsfile-tool.sh test.tsfile -level 6 -size 1048576000` (Linux or MacOs)
 
 Here are some more tips:
-1. TsFile split tool is offline maintenance tool. Before splitting a file, you should make sure the file to be split is closed (aka with `tsFile.resource`) and IoTDB is shut down. After splitting, restart IoTDB.
-2. TsFile split tool doesn't support splitting TsFile with deletion interval (aka with `.mods` file) and with aligned timeseries.
+1. TsFile split tool is for one closed TsFile, need to ensure this TsFile is closed. If the TsFile is in IoTDB, a `.resource` file represent it is closed.
+2. When doing split, make sure the TsFile is not in a running IoTDB.
+3. Currently, we do not resolve the corresponding mods file, if you wish to put the new files into the IoTDB data dir and be loaded by restarting, you need to copy the related mods file(if exist) and rename them, make sure each new file has one mods.
+4. This tools do not support aligned timeseries currently.
\ No newline at end of file
diff --git a/docs/UserGuide/API/Status-Codes.md b/docs/UserGuide/Reference/Status-Codes.md
similarity index 100%
rename from docs/UserGuide/API/Status-Codes.md
rename to docs/UserGuide/Reference/Status-Codes.md
diff --git a/docs/zh/UserGuide/Maintenance-Tools/TsFile-Split-Tool.md b/docs/zh/UserGuide/Maintenance-Tools/TsFile-Split-Tool.md
index 1863bac1f4..a091ee45a1 100644
--- a/docs/zh/UserGuide/Maintenance-Tools/TsFile-Split-Tool.md
+++ b/docs/zh/UserGuide/Maintenance-Tools/TsFile-Split-Tool.md
@@ -21,32 +21,28 @@
 
 # TsFile 拆分工具
 
-0.12 版本的 IoTDB 会产生很大的文件,在运维过程中分析起来比较困难。因此,从 0.12.5 版本和 0.13 版本起,提供TsFile 分离工具,该工具可以将大的 TsFile 文件根据配置项拆分为数个小文件。该启动脚本会在编译 server 之后生成至 `server\target\iotdb-server-{version}\tools\tsfileToolSet` 目录中。
+TsFile 拆分工具用来将一个 TsFile 拆分为多个 TsFile,工具位置为 tools/tsfile/split-tsfile-tool
 
 使用方式:
 
 Windows:
 
 ```
-.\split-tsfile-tool.bat <TsFile 文件路径> (-level <所拆分文件的层级>) (-size <所拆分文件的大小>)
+.\split-tsfile-tool.bat <TsFile 文件路径> (-level <新生成文件名的空间内合并次数,默认为10>) (-size <新生成文件的大小(字节),默认为 1048576000>)
 ```
 
 
 Linux or MacOs:
 
 ```
-./split-tsfile-tool.sh <TsFile 文件路径> (-level <所拆分文件的层级>) (-size <所拆分文件的大小>)
+./split-tsfile-tool.sh <TsFile 文件路径> (-level <新生成文件名的空间内合并次数,默认为10>) (-size <新生成文件的大小(字节),默认为 1048576000>)
 ```
-> 注意:如果不传入`-level`,所拆分文件的层级为 10;如果不传入`-size`,所拆分文件的大小约为 1GB;`-size` 后参数单位为 byte。
-> 例如,需要指定拆分为 100MB 的文件,且文件层级数为6,则命令为 `./split-tsfile-tool.sh test.tsfile -level 6 -size 1048576000` (Linux or MacOs)
 
-拆分中可以调节的配置项如下:
-
-1. 拆分所生成的文件大小通过命令传入参数确定的,默认为 1GB。这个配置项同样也是 0.13 版本中合并所能生成文件的目标大小。在 0.13 版本中,文件是否可以合并是通过文件大小确定的,可以通过此配置项控制重启后不继续合并。
-2. 文件所在层级是通过命令传入参数确定的,默认为 10。在 0.12 版本中,文件是否可以合并是通过文件所在层级确定的,可以通过此配置项控制重启后不继续合并。
-3. 文件中 chunk 点数可以通过 `chunk_point_num_lower_bound_in_compaction` 进行配置,默认为 100。这个配置项同样也是 0.13 版本中合并所能生成文件的 chunk 中点数。
+> 例如,需要指定生成 100MB 的文件,且空间内合并次数为 6,则命令为 `./split-tsfile-tool.sh test.tsfile -level 6 -size 1048576000` (Linux or MacOs)
 
 使用拆分工具需要注意如下事项:
 
-1. 拆分工具为离线运维工具,使用前需关闭 IoTDB,确保所拆分的文件已经完全落盘(即有`tsFile.resource`文件)。拆分后需移除原文件后重启。
-2. 拆分工具目前尚不支持拆分带有删除区间的 TsFile(即有`.mods`文件)和写有对齐时间序列的 TsFile。
+1. 拆分工具针对单个已经封口的 TsFile 进行操作,需要确保此 TsFile 已经封口,如 TsFile 在 IoTDB 内,则需要有对应的 `.resource` 文件。
+2. 拆分过程需确保文件已经从 IoTDB 中卸载。
+3. 目前未处理 TsFile 对应的 mods 文件,如果希望拆分后继续放入 IoTDB 目录中通过重启加载,需要手动将 mods 文件拷贝多份,并修改命名,为每个新生成的文件配备一个 mods 文件。
+4. 拆分工具目前尚不支持保存对齐时间序列的 TsFile。
diff --git a/docs/zh/UserGuide/API/Status-Codes.md b/docs/zh/UserGuide/Reference/Status-Codes.md
similarity index 100%
rename from docs/zh/UserGuide/API/Status-Codes.md
rename to docs/zh/UserGuide/Reference/Status-Codes.md
diff --git a/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java b/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
index 0d665fc28c..7009054844 100644
--- a/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
+++ b/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
@@ -25,9 +25,9 @@ import java.util.Map;
 /**
  * When update this class, remember to update the following files
  *
- * <p>docs/UserGuide/API/Status-Codes.md
+ * <p>docs/UserGuide/Reference/Status-Codes.md
  *
- * <p>docs/zh/UserGuide/API/Status-Codes.md
+ * <p>docs/zh/UserGuide/Reference/Status-Codes.md
  */
 public enum TSStatusCode {
   SUCCESS_STATUS(200),
diff --git a/site/src/main/.vuepress/config.js b/site/src/main/.vuepress/config.js
index 21b79a95d7..1f96af4a6b 100644
--- a/site/src/main/.vuepress/config.js
+++ b/site/src/main/.vuepress/config.js
@@ -885,7 +885,6 @@ var config = {
 							['API/RestService','REST API'],
 							['API/Programming-TsFile-API','TsFile API'],
 							['API/InfluxDB-Protocol','InfluxDB Protocol'],
-							['API/Status-Codes','Status Codes'],
 							['API/Interface-Comparison', 'Interface Comparison']
 						]
 					},
@@ -1027,6 +1026,7 @@ var config = {
 						children: [
 							['Reference/ConfigNode-Config-Manual','ConfigNode Config Manual'],
 							['Reference/DataNode-Config-Manual','DataNode Config Manual'],
+							['API/Status-Codes','Status Codes'],
 							['Reference/Keywords','Keywords'],
 							['Reference/TSDB-Comparison','TSDB Comparison']
 						]
@@ -1837,7 +1837,6 @@ var config = {
 							['API/RestService','REST API'],
 							['API/Programming-TsFile-API','TsFile API'],
 							['API/InfluxDB-Protocol','InfluxDB 协议适配器'],
-							['API/Status-Codes','状态码'],
 							['API/Interface-Comparison', '原生接口对比']
 						]
 					},
@@ -1993,6 +1992,7 @@ var config = {
 						children: [
 							['Reference/ConfigNode-Config-Manual','ConfigNode配置参数'],
 							['Reference/DataNode-Config-Manual','DataNode配置参数'],
+							['API/Status-Codes','状态码'],
 							['Reference/Keywords','关键字'],
 							['Reference/TSDB-Comparison','时间序列数据库比较']
 						]