@@ -33,9 +33,17 @@ object TaskContext {
33
33
34
34
private val taskContext : ThreadLocal [TaskContext ] = new ThreadLocal [TaskContext ]
35
35
36
- private [spark] def setTaskContext (tc : TaskContext ): Unit = taskContext.set(tc)
36
+ // Note: protected[spark] instead of private[spark] to prevent the following two from
37
+ // showing up in JavaDoc.
38
+ /**
39
+ * Set the thread local TaskContext. Internal to Spark.
40
+ */
41
+ protected [spark] def setTaskContext (tc : TaskContext ): Unit = taskContext.set(tc)
37
42
38
- private [spark] def unset (): Unit = taskContext.remove()
43
+ /**
44
+ * Unset the thread local TaskContext. Internal to Spark.
45
+ */
46
+ protected [spark] def unset (): Unit = taskContext.remove()
39
47
}
40
48
41
49
@@ -62,7 +70,6 @@ abstract class TaskContext extends Serializable {
62
70
*/
63
71
def isInterrupted (): Boolean
64
72
65
- /** @deprecated use { @link #isRunningLocally()}*/
66
73
@ deprecated(" 1.2.0" , " use isRunningLocally" )
67
74
def runningLocally (): Boolean
68
75
@@ -91,8 +98,6 @@ abstract class TaskContext extends Serializable {
91
98
* is for HadoopRDD to register a callback to close the input stream.
92
99
* Will be called in any situation - success, failure, or cancellation.
93
100
*
94
- * @deprecated use { @link #addTaskCompletionListener(scala.Function1)}
95
- *
96
101
* @param f Callback function.
97
102
*/
98
103
@ deprecated(" 1.2.0" , " use addTaskCompletionListener" )
@@ -114,7 +119,6 @@ abstract class TaskContext extends Serializable {
114
119
*/
115
120
def attemptNumber (): Int
116
121
117
- /** @deprecated use { @link #taskAttemptId()}; it was renamed to avoid ambiguity. */
118
122
@ deprecated(" 1.3.0" , " use attemptNumber" )
119
123
def attemptId (): Long
120
124
0 commit comments