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

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

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

clintropolis
Copy link
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