Skip to content

consolidate CompressionUtils files in druid-core, move 'makeEvilZip' to tests#6908

Merged
gianm merged 1 commit intoapache:masterfrom
clintropolis:one-true-compressionutils
Mar 13, 2019
Merged

consolidate CompressionUtils files in druid-core, move 'makeEvilZip' to tests#6908
gianm merged 1 commit intoapache:masterfrom
clintropolis:one-true-compressionutils

Conversation

@clintropolis
Copy link
Copy Markdown
Member

Follow-up to #6443, moves CompressionUtils.java of the former java-util to the place of CompressionUtils.java of the former druid-api (since it is marked @PublicApi).
The latter was a wrapper around the former, with the exception of this method:

public static void gunzip(File pulledFile, File outDir)	

which mentioned in it's javadoc:

Unlike org.apache.druid.java.util.common.CompressionUtils.gunzip, this function takes an
output DIRECTORY and tries to guess the file name. It is recommended that the caller use org.apache.druid.java.util.common.CompressionUtils.gunzip and specify the output file themselves to ensure names are as expected

I don't think it's likely a big deal, as far as I can tell this method has been marked deprecated since before druid-api was moved into the main repo (over 3 years ago), but we should probably call out in release notes.

Additionally, makeEvilZip, which sounds way too scary to be in the core library and was only used by tests has been moved out of CompressionUtils and into CompressionUtilsTest. druid-hadoop-indexing was also using this method, so it now includes a test reference to druid-core for test jar.

Unfortunately this is showing up in github as deleting the java-util version instead of moving it to the previously same named files location, but the only change to the java-util version is the addition of @PublicApi and moving the makeEvilZip to the test.

I would like to move the other assortment of *Utils.java classes scattered around druid-core to org.apache.druid.utils package as well, but thought it conservative to split this out first since it's not totally cosmetic.

@gianm gianm merged commit 3895914 into apache:master Mar 13, 2019
@clintropolis clintropolis deleted the one-true-compressionutils branch March 13, 2019 22:39
@jihoonson jihoonson added this to the 0.15.0 milestone May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants