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

Compress the swadl string to save storage #257

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

yinan-symphony
Copy link
Contributor

Add Spring Jpa attribute converter to compress and decompress the swadl attribute string, in order to save storage.

Description

Please put here the intent of your pull request.

Dependencies

List the other pull requests that should be merged before/along this one.

Checklist

  • Referenced a ticket in the PR title or description
  • Filled properly the description and dependencies, if any
  • Unit/Integration tests updated or added
  • Javadoc added or updated
  • Updated the documentation in docs folder

BigStringCompressor compressor = new BigStringCompressor();
byte[] converted = compressor.convertToDatabaseColumn(inputString);
assertThat(converted.length).isLessThan(inputString.length());
System.out.printf("Before compressed size : %d, after compressed size: %d%n", inputString.length(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be removed

Copy link
Contributor

@symphony-soufiane symphony-soufiane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. maybe add more tests where a io exception is thrown for full coverage.

Add Spring Jpa attribute converter to compress and decompress
the swadl attribute string, in order to save storage.
@yinan-symphony yinan-symphony merged commit 1e22a1e into finos:master Apr 21, 2023
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