https://github.com/apache/spark/blob/master/core/src/main/java/org/apache/spark/TaskContext.java
has a Java implementation if TaskContext wit a very useful method /** * Return the currently active TaskContext. This can be called inside of * user functions to access contextual information about running tasks. */ public static TaskContext get() { return taskContext.get(); } I would like to call this but my Spark 1.1 code seems to use a Scala Taskcontext lacking a get method How can one get a Task context and is which versions is get supported