Skip empty files for local, hdfs, and cloud input sources#9450
Merged
jihoonson merged 10 commits intoapache:masterfrom Mar 4, 2020
Merged
Skip empty files for local, hdfs, and cloud input sources#9450jihoonson merged 10 commits intoapache:masterfrom
jihoonson merged 10 commits intoapache:masterfrom
Conversation
ccaominh
reviewed
Mar 3, 2020
| public class MaxSizeSplitHintSpec implements SplitHintSpec | ||
| { | ||
| public static final String TYPE = "maxSize"; | ||
| private static final Logger LOG = new Logger(MaxSizeSplitHintSpec.class); |
|
|
||
| import com.fasterxml.jackson.databind.ObjectMapper; | ||
| import nl.jqno.equalsverifier.EqualsVerifier; | ||
| import org.apache.commons.compress.utils.Lists; |
Contributor
There was a problem hiding this comment.
Should this be the one from guava instead? (same for MaxSizeSplitHintSpecTest)
Comment on lines
+121
to
+122
| prepareNextRequest(); | ||
| fetchNextBatch(); |
Contributor
There was a problem hiding this comment.
This branch is not covered by unit tests
ccaominh
reviewed
Mar 3, 2020
| for (int i = 0; i < 10; i++) { | ||
| filesInBaseDir.add(File.createTempFile("local-input-source", ".data", baseDir)); | ||
| final File file = File.createTempFile("local-input-source", ".data", baseDir); | ||
| try (FileWriter writer = new FileWriter(file)) { |
Contributor
There was a problem hiding this comment.
The forbidden apis checks is flagging this: java.io.FileWriter [Uses default charset]
ccaominh
reviewed
Mar 3, 2020
|
|
||
| package org.apache.druid.storage.azure; | ||
|
|
||
| import com.google.api.client.util.Lists; |
Contributor
There was a problem hiding this comment.
You'll need to update the pom to add this dependency:
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<scope>test</scope>
</dependency>
Contributor
Author
There was a problem hiding this comment.
Ah, this was a mistake. I'm not sure why the Intellij keeps adding a wrong one. Fixed it now.
ccaominh
approved these changes
Mar 3, 2020
ccaominh
approved these changes
Mar 4, 2020
jihoonson
added a commit
to jihoonson/druid
that referenced
this pull request
Mar 4, 2020
* Skip empty files for local, hdfs, and cloud input sources * split hint spec doc * doc for skipping empty files * fix typo; adjust tests * unnecessary fluent iterable * address comments * fix test * use the right lists * fix test * fix test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR modifies the input sources to skip empty files except for the HTTP input source. This PR additionally fixes the two bugs:
This PR has: