-
Notifications
You must be signed in to change notification settings - Fork 29k
SPARK-2636: Expose job ID in JobWaiter API #2176
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
Changes from all commits
6e2b87b
eb1ee79
d09f732
1b25abc
fbf5744
843276c
af4f5d9
3fa39f7
0ca320d
e2e01d5
5536d55
ccaafb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ import scala.reflect.ClassTag | |
| import com.google.common.base.Optional | ||
| import org.apache.hadoop.io.compress.CompressionCodec | ||
|
|
||
| import org.apache.spark.{Partition, SparkContext, TaskContext} | ||
| import org.apache.spark.{FutureAction, Partition, SparkContext, TaskContext} | ||
| import org.apache.spark.annotation.Experimental | ||
| import org.apache.spark.api.java.JavaPairRDD._ | ||
| import org.apache.spark.api.java.JavaSparkContext.fakeClassTag | ||
|
|
@@ -574,4 +574,17 @@ trait JavaRDDLike[T, This <: JavaRDDLike[T, This]] extends Serializable { | |
|
|
||
| def name(): String = rdd.name | ||
|
|
||
| /** | ||
| * :: Experimental :: | ||
| * The asynchronous version of the foreach action. | ||
| * | ||
| * @param f the function to apply to all the elements of the RDD | ||
| * @return a FutureAction for the action | ||
| */ | ||
| @Experimental | ||
| def foreachAsync(f: VoidFunction[T]): FutureAction[Unit] = { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we mark this as experimental in Java? I don't know if we have a way to mark stuff as experimental, but maybe put this in the javadoc: * THIS IS AN EXPERIMENTAL API THAT MIGHT CHANGE IN THE FUTURE.@pwendell thoughts?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Scala-land the javadocs start like this: Perhaps just prepend that to the first line in the javadoc (so the summary contains both the short description and that it's experimental).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rxin @lirui-intel Make it consistent with the other code where we do this. There is no need to have a big sentence with caps. The |
||
| import org.apache.spark.SparkContext._ | ||
| rdd.foreachAsync(x => f.call(x)) | ||
| } | ||
|
|
||
| } | ||
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.
add javadoc for this