Skip to content

Improve TestHiveConnectorTest test speed#13645

Merged
findepi merged 2 commits intotrinodb:masterfrom
findepi:findepi/improve-testhiveconnectortest-test-speed-bfaa0a
Aug 22, 2022
Merged

Improve TestHiveConnectorTest test speed#13645
findepi merged 2 commits intotrinodb:masterfrom
findepi:findepi/improve-testhiveconnectortest-test-speed-bfaa0a

Conversation

@findepi
Copy link
Copy Markdown
Member

@findepi findepi commented Aug 12, 2022

Writing to tables takes about two thirds of execution time, and
compression is apparently a dominant factor. Switch
TestHiveConnectorTest to use ZSTD instead of default GZIP in hope this
improves test execution speed. Very rough local testing showed about
two-digit percent improvement, but the error margin was high.

Writing to tables takes about two thirds of execution time, and
compression is apparently a dominant factor. Switch
`TestHiveConnectorTest` to use ZSTD instead of default GZIP in hope this
improves test execution speed.  Very rough local testing showed about
two-digit percent improvement, but the error margin was high.
@findepi findepi added test no-release-notes This pull request does not require release notes entry labels Aug 12, 2022
@cla-bot cla-bot bot added the cla-signed label Aug 12, 2022
.put("hive.storage-format", "TEXTFILE") // so that there's no minimum split size for the file
.put("hive.compression-codec", "NONE") // so that the file is splittable
.buildOrThrow();
hiveBucketedProperties = new HashMap<>(hiveBucketedProperties);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

undo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it's intentional. i need to override compression for the second catalog gets registered here

{
// Use faster compression codec in tests. TODO remove explicit config when default changes
verify(new HiveConfig().getHiveCompressionCodec() == HiveCompressionOption.GZIP);
String hiveCompressionCodec = HiveCompressionCodec.ZSTD.name();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not to inline this ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

you mean to use "ZSTD" string literal? i think the current way describes which enum this is referring to

@findepi findepi merged commit 2144181 into trinodb:master Aug 22, 2022
@findepi findepi deleted the findepi/improve-testhiveconnectortest-test-speed-bfaa0a branch August 22, 2022 11:21
@github-actions github-actions bot added this to the 394 milestone Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed no-release-notes This pull request does not require release notes entry test

Development

Successfully merging this pull request may close these issues.

5 participants