-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-5297][Streaming] Fix Java file stream type erasure problem #4101
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
Conversation
|
Test build #25749 has started for PR 4101 at commit
|
|
Test build #25749 has finished for PR 4101 at commit
|
|
Test PASSed. |
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.
I think you'll have to keep and deprecate the existing method. At least, that removes the need for a Mima exclusion, and doesn't do any harm.
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.
I'm not sure to deprecate the old method or just to modify the old one, which is best? because the problem is that the old method actually has a bug, not outdated. If we just deprecate it, users can still call this with only warning, and this will lead to exception.
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.
Agree, I doubt there are callers of the old method since, if we're right, it does not work at all. Still it is simple to retain and deprecate it to avoid removing a public API method.
|
So on this one, it took me a minute to figure out why this is breaking. The issue is that our workaround of casting to classtag[Any] doesn't work because we actually do need to pass a specific class when the In terms of removing this, from what I can tell, this definitely would immediately fail for anyone who wanted to use this at runtime since it will always assume |
|
This LGTM in the current form, but awaiting feedback from @srowen. |
|
@pwendell I'm OK with either approach. I agree that I can't see how this would work for anyone now, so removing the method only 'breaks' an API technically. I had thought it was merely simpler to deprecate rather than Mima-exclude, remove, and worry about it, but I have no objection to removing the method. |
|
@jerryshao mind bringing this up to date? |
|
OK, will do. |
|
Test build #25861 has started for PR 4101 at commit
|
|
Test build #25861 has finished for PR 4101 at commit
|
|
Test FAILed. |
|
Jenkins, retest this please. |
|
Test build #25867 has started for PR 4101 at commit
|
|
Test build #25867 has finished for PR 4101 at commit
|
|
Test PASSed. |
|
Okay - I'll merge it as-is. I prefer removing the old ones because otherwise users might be confused about which to use. I'm pretty ambivalent though, but no strong opinions from @srowen either. |
|
@jerryshao - this did not merge cleanly into Spark 1.2. Can you make a separate PR? |
|
Feel free to remove it, I dont have a strong preference either. |
|
Thanks a lot :), I will backport this to 1.2 branch. |
Current Java file stream doesn't support custom key/value type because of loss of type information, details can be seen in [SPARK-5297](https://issues.apache.org/jira/browse/SPARK-5297). Fix this problem by getting correct `ClassTag` from `Class[_]`. Author: jerryshao <[email protected]> Closes apache#4101 from jerryshao/SPARK-5297 and squashes the following commits: e022ca3 [jerryshao] Add Mima exclusion ecd61b8 [jerryshao] Fix Java fileInputStream type erasure problem
Current Java file stream doesn't support custom key/value type because of loss of type information, details can be seen in SPARK-5297. Fix this problem by getting correct
ClassTagfromClass[_].