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.
After building the server, the startup script of this tool will appear under the server\target\iotdb-server-{version}\tools\tsfileToolSet
directory.
Command:
For Windows:
.\split-tsfile-tool.bat <path of your TsFile> (-level <LEVEL of the target files>) (-size <SIZE of the target files>)
For Linux or MacOs:
./split-tsfile-tool.sh <path of your TsFile> (-level <LEVEL of the target files>) (-size <SIZE of the target files>)
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:
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.Here are some more tips:
tsFile.resource
) and IoTDB is shut down. After splitting, restart IoTDB..mods
file) and with aligned timeseries.