You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/10/03 14:04:13 UTC

[GitHub] [iotdb] choubenson commented on a change in pull request #4024: [IOTDB-1635] settle TsFiles and mods

choubenson commented on a change in pull request #4024:
URL: https://github.com/apache/iotdb/pull/4024#discussion_r720833973



##########
File path: docs/zh/SystemDesign/Tools/Settle.md
##########
@@ -0,0 +1,119 @@
+<!--
+
+```
+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.
+```
+
+-->
+
+## TsFile整理工具
+
+### 介绍
+
+1. 整理工具可以帮助你整理已封口的tsFile文件和.mods文件,过滤掉删除的数据并生成新的tsFile。整理完后会将本地旧的.mods文件删除,若某tsFile里的数据被全部删除了,则会删除本地该tsFile文件和对应的.resource文件。
+
+2. 整理工具只能针对v0.12版本的IOTDB来使用,即只能针对版本为V3的tsFile进行整理,若低于此版本则必须先用在线升级工具将tsFile升级到V3版本。
+3. tsFile整理工具分为在线整理工具和离线整理工具,两者在整理的时候都会记录日志,供下次恢复先前整理失败的文件。在执行整理的时候会先去检测日志里是否存在失败的文件,有的话则优先整理它们。
+
+### 1. 离线整理工具
+
+离线整理工具是以命令行的方式来启动,该工具的启动脚本settle.bat和settle.sh在编译了server后会生成至server\target\iotdb-server-{version}\tools\tsFileToolSet目录中。在使用的时候必须保证IOTDB Server是停止运行的,否则会出现整理错误。具体使用方式详见用户手册。
+
+#### 1.1 涉及的相关类
+
+整理工具类:org.apache.iotdb.db.tools.settle.tsFileAndModSettleTool
+
+### 2.在线整理工具
+
+在线整理工具是当用户在IOTDB客户端输入了settle命令后,会在后台注册启动一个整理服务Settle Service,该服务会去寻找指定存储组下的所有tsFile文件,并为每个tsFile开启一个整理线程进行整理。下面讲解整理线程的工作流程。

Review comment:
       There is one parameter to control the size of settleThreadPool, which value is 1.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org