adoroszlai commented on code in PR #4089:
URL: https://github.com/apache/ozone/pull/4089#discussion_r1049664898
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/OnDemandContainerReplicationSource.java:
##########
@@ -37,11 +43,16 @@
private final ContainerController controller;
- private final TarContainerPacker packer = new TarContainerPacker();
+ private Map<String, TarContainerPacker> packer = new HashMap<>();
public OnDemandContainerReplicationSource(
ContainerController controller) {
this.controller = controller;
+ this.packer.put("NO_COMPRESSION", new
TarContainerPacker("no_compression"));
+ this.packer.put("GZIP", new TarContainerPacker(GZIP));
+ this.packer.put("LZ4", new TarContainerPacker(LZ4_FRAMED));
+ this.packer.put("SNAPPY", new TarContainerPacker(SNAPPY_FRAMED));
+ this.packer.put("ZSTD", new TarContainerPacker(ZSTANDARD));
Review Comment:
I think we should define a public Ozone compression name -> commons-compress
name mapping. It can be used to create `TarContainerPacker` on-demand, instead
of eagerly creating one for each compression type.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]