-
Notifications
You must be signed in to change notification settings - Fork 29k
Spark 615 map partitions with index callable from java #16
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
Closed
holdenk
wants to merge
25
commits into
apache:master
from
holdenk:spark-615-mapPartitionsWithIndex-callable-from-java
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
215a9bf
Fix Java API for mapPartitionsWithIndex
holdenk e2331ed
Check all the values
holdenk 0d624bf
Add missing class
holdenk 4421ecc
Use fakeClassTag
holdenk 8d849a1
Fix Java API for mapPartitionsWithIndex
holdenk 958efa4
Check all the values
holdenk 6ad1a3c
Add missing class
holdenk e64e1ad
Use fakeClassTag
holdenk 8bfd3f3
It compiles with the Java 8 happy pandas
holdenk b6a613f
merge
holdenk 36c7831
Remove old function
holdenk 79d1bc1
Check all the values
holdenk ec80d7a
Add missing class
holdenk e4962ab
Use fakeClassTag
holdenk f484afc
Fix Java API for mapPartitionsWithIndex
holdenk 4eb9c0f
Add missing class
holdenk 96a86c7
It compiles with the Java 8 happy pandas
holdenk df6922a
Remove old function
holdenk 4fa42b0
Revert "Remove old function (accidently removed a file)"
holdenk 2aa2fc9
Make it work with the new Java API style
holdenk cc4050d
Add Java 8 API test
holdenk ee6ebea
Some CR feedback
holdenk 780120d
Remove MappartitionsWithIndeFunction
holdenk a5cd2fa
Fix Java API
holdenk b231375
Fix the classtag bits
holdenk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix Java API for mapPartitionsWithIndex
- Loading branch information
commit f484afce126108375e1205f2b68f1577c4ef9598
There are no files selected for viewing
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
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.
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.
Just wondering - why isn't this version callable from Java? It seems better to me not to define a new
Functionclass... I'm trying to understand why the existing one can't be called as-is (modulo the classtag stuff).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 believe it was just the classtag stuff. The new function class was for convience and in keeping with the other functions being defined (FlatMapFunction etc.). I can get of the new function class if you want.
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.
hey @holdenk now that I look more I'm all confused because it looks like
FlatMapFunctionis e.g. used for mapPartitions despite it's name. I'll have to defer to @mateiz on this one who has more recently looked at the java API.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.
Yeah I agree, did you try using the old one? It lacked a test but maybe it can work. Throughout the Java API we only pass the ClassTag for java.lang.Object, we don't try to pass a real class tag.
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 tried calling the old one, but that was pre the big Java API refactoring, and it didn't work.
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.
Try updating this to just take a
Function2<Integer, java.util.Iterator<A>, java.util.Iterator<B>>. I'm pretty sure it would work and we won't need a new type of class.