Skip to content

Conversation

@adoroszlai
Copy link
Contributor

@adoroszlai adoroszlai commented Jan 31, 2023

What changes were proposed in this pull request?

Initial implementation of push replication had hard-coded "no compression", ignoring the configuration, which is currently only used by the pull direction. The goal of this change is to use the compression defined in the config for push, too.

PushReplicator and DownloadAndImportReplicator take the compression from config. Other components (ContainerDownloader, ContainerImporter, ContainerReplicationSource) apply the compression passed to them by their callers. This is required because the actual compression is decided by the datanode that initiates the replication (source or target, depending on direction). The other party applies the compression specified in the request.

Refactored CopyContainerCompression to use enum features instead of a string-based mapping, and moved all compressor-related logic into it.

https://issues.apache.org/jira/browse/HDDS-7821

How was this patch tested?

Added unit tests.

Regular CI:
https://github.com/adoroszlai/hadoop-ozone/actions/runs/4056964585

@adoroszlai adoroszlai self-assigned this Jan 31, 2023
Copy link
Contributor

@sodonnel sodonnel left a comment

Choose a reason for hiding this comment

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

LGTM, and I believe you are planning to add some integration tests or acceptance test in another PR will will help give more confidence on the new flow and compression settings.

@adoroszlai adoroszlai merged commit 1a796f1 into apache:master Feb 1, 2023
@adoroszlai adoroszlai deleted the HDDS-7821 branch February 1, 2023 21:33
@adoroszlai
Copy link
Contributor Author

Thanks @sodonnel for the review.

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