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

[BEAM-2005] Swap to use Lists within MatchResult instead of arrays. #2772

Closed
wants to merge 2 commits into from

Conversation

lukecwik
Copy link
Member

@lukecwik lukecwik commented Apr 28, 2017

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace <Jira issue #> in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    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.

@lukecwik
Copy link
Member Author

R: @davorbonaci @dhalperi

}

File parent = file.getAbsoluteFile().getParentFile();
if (!parent.exists()) {
return MatchResult.create(Status.NOT_FOUND, EMPTY_METADATA);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete the variable too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what variable?

Copy link
Member Author

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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List instead of Collection?

Copy link
Member Author

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.

@asfgit asfgit closed this in b236104 Apr 29, 2017
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 697b5d8 on lukecwik:hdfs2 into ** on apache:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 697b5d8 on lukecwik:hdfs2 into ** on apache:master**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants