跳至主要內容

TsFile 拆分工具

...大约 1 分钟

TsFile 拆分工具

TsFile 拆分工具用来将一个 TsFile 拆分为多个 TsFile,工具位置为 tools/tsfile/split-tsfile-tool

使用方式:

Windows:

.\split-tsfile-tool.bat <TsFile 文件路径> (-level <新生成文件名的空间内合并次数,默认为10>) (-size <新生成文件的大小(字节),默认为 1048576000>)

Linux or MacOs:

./split-tsfile-tool.sh <TsFile 文件路径> (-level <新生成文件名的空间内合并次数,默认为10>) (-size <新生成文件的大小(字节),默认为 1048576000>)

例如,需要指定生成 100MB 的文件,且空间内合并次数为 6,则命令为 ./split-tsfile-tool.sh test.tsfile -level 6 -size 1048576000 (Linux or MacOs)

使用拆分工具需要注意如下事项:

  1. 拆分工具针对单个已经封口的 TsFile 进行操作,需要确保此 TsFile 已经封口,如 TsFile 在 IoTDB 内,则需要有对应的 .resource 文件。
  2. 拆分过程需确保文件已经从 IoTDB 中卸载。
  3. 目前未处理 TsFile 对应的 mods 文件,如果希望拆分后继续放入 IoTDB 目录中通过重启加载,需要手动将 mods 文件拷贝多份,并修改命名,为每个新生成的文件配备一个 mods 文件。
  4. 拆分工具目前尚不支持保存对齐时间序列的 TsFile。

Copyright © 2024 The Apache Software Foundation.
Apache IoTDB, IoTDB, Apache, the Apache feather logo, and the Apache IoTDB project logo are either registered trademarks or trademarks of The Apache Software Foundation in all countries

Have a question? Connect with us on QQ, WeChat, or Slack. Join the community now.