Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plugin): Delete the compressed file after extraction #629

Merged

Conversation

rouellet99
Copy link
Contributor

feat: (plugin): Add a configuration to delete the compressed file after extraction

Add the flag fs.delete.compress.files.enabled indicating whether compressed file should be deleted after extraction.
This flag is added to avoid an infinit loop when using a compressed file with the following configuration:
"offset.attributes.string": "name+lastModified",
"fs.cleanup.policy.class": "io.streamthoughts.kafka.connect.filepulse.fs.clean.LocalMoveCleanupPolicy",
Im fact, if the compressed file is not removed, once extracted, the extracted file is processed, and move to the preconfigured folder. Therefore, the compressed file will be extrated again with a new lastModified value, and the extracted file would be processed again.

When using zipped file, is there any reason , why the zipped file is not removed from the directoty once unzipped? #603

Added a configuration to delete the compressed file after extraction
@rouellet99 rouellet99 requested a review from fhussonnois as a code owner March 27, 2024 13:59
@rouellet99 rouellet99 changed the title Delete the compressed file after extraction feat: (plugin): Delete the compressed file after extraction Mar 27, 2024
@rouellet99 rouellet99 changed the title feat: (plugin): Delete the compressed file after extraction feat (plugin): Delete the compressed file after extraction Mar 27, 2024
@rouellet99 rouellet99 changed the title feat (plugin): Delete the compressed file after extraction feat(plugin): Delete the compressed file after extraction Mar 27, 2024
fix: (plugin): change the code for the configuration to delete the compressed file after extraction

LocalFSDirectoryListing.java:[104,5] (metrics) CyclomaticComplexity: Cyclomatic Complexity is 16 (max allowed is 15).

When using zipped file, is there any reason , why the compressed file is not removed from the directory once extracted? streamthoughts#603
@fhussonnois fhussonnois merged commit 695c6f2 into streamthoughts:master May 7, 2024
3 checks passed
@rouellet99 rouellet99 deleted the feature/deleteCompressedFile branch May 10, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants