Skip to content

Call validateTaps in toIterator codepath#1490

Merged
ianoc merged 2 commits intotwitter:developfrom
rubanm:rmonu/invalidsourcetap_openforread
Feb 2, 2016
Merged

Call validateTaps in toIterator codepath#1490
ianoc merged 2 commits intotwitter:developfrom
rubanm:rmonu/invalidsourcetap_openforread

Conversation

@rubanm
Copy link
Contributor

@rubanm rubanm commented Feb 1, 2016

#1458 was meant to ensure we throw InvalidSourceException for all cases, but caused RuntimeException to be thrown in the toIterator codepath (instead of hadoop's InvalidInputException as was the case before that change). I looked into fixing it so that it throws InvalidSourceException.

As a more uniform solution though, I propose we call validateTaps in the toIterator codepath for all sources. Currently, toIterator can throw a few different exception types (hadoop's InvalidInputException, scalding' InvalidSourceException, RuntimeException) depending on whether we are in strict vs non strict mode, etc. This change will help ensure we throw scalding's InvalidSourceException for all cases.

@johnynek
Copy link
Collaborator

johnynek commented Feb 2, 2016

LGTM. others?

@ianoc
Copy link
Collaborator

ianoc commented Feb 2, 2016

LGTM also

ianoc added a commit that referenced this pull request Feb 2, 2016
@ianoc ianoc merged commit c2a5e92 into twitter:develop Feb 2, 2016
@reconditesea
Copy link
Contributor

LGTM.

@rubanm rubanm deleted the rmonu/invalidsourcetap_openforread branch April 7, 2016 18:31
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.

4 participants