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
[BEAM-2005] Swap to use Lists within MatchResult instead of arrays. #2772
Conversation
} | ||
|
||
File parent = file.getAbsoluteFile().getParentFile(); | ||
if (!parent.exists()) { | ||
return MatchResult.create(Status.NOT_FOUND, EMPTY_METADATA); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete the variable too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured it out
@@ -120,8 +119,8 @@ public String getFilePattern() { | |||
do { | |||
try { | |||
// Match inputPath which may contains glob | |||
Collection<Metadata> files = Arrays.asList(Iterables.getOnlyElement( | |||
FileSystems.match(ImmutableList.of(filePattern))).metadata()); | |||
Collection<Metadata> files = Iterables.getOnlyElement( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List
instead of Collection
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to leave as is.
Changes Unknown when pulling 697b5d8 on lukecwik:hdfs2 into ** on apache:master**. |
Changes Unknown when pulling 697b5d8 on lukecwik:hdfs2 into ** on apache:master**. |
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
[BEAM-<Jira issue #>] Description of pull request
mvn clean verify
. (Even better, enableTravis-CI on your fork and ensure the whole test matrix passes).
<Jira issue #>
in the title with the actual Jira issuenumber, if there is one.
Individual Contributor License Agreement.
Everywhere in our codebase we go through and want to have lists as the return type. This also AutoValue's them.