[To dev/1.3] Pipe: Add a tool for validating and repairing isGeneratedByPipe mark in tsfile resources #15934
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new validation and repair tool for
TsFileResource
objects in Apache IoTDB, along with corresponding scripts for Windows and Linux environments. The tool checks whetherTsFileResource
objects are marked as "generated by pipe" and repairs them if necessary. Key changes include the implementation of the Java tool, the addition of batch scripts for execution, and improvements to the project's usability and maintainability.Tool Implementation:
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/validate/TsFileResourceIsGeneratedByPipeMarkValidationAndRepairTool.java
: Added a Java tool that validates and repairsTsFileResource
objects based on whether they are marked as "generated by pipe." It supports command-line arguments for specifying expected marks and directories to validate.Windows Script:
iotdb-core/datanode/src/assembly/resources/tools/tsfile/mark-is-generated-by-pipe.bat
: Added a batch script for Windows to execute the validation and repair tool, including environment setup and error handling for missingJAVA_HOME
.Linux Script:
iotdb-core/datanode/src/assembly/resources/tools/tsfile/mark-is-generated-by-pipe.sh
: Added a shell script for Linux to execute the validation and repair tool, leveraging common IoTDB environment setup functions.