Skip to content

Commit 573756f

Browse files
committed
style fixes and javadoc fixes.
1 parent 87dd537 commit 573756f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

core/src/main/scala/org/apache/spark/TaskContext.scala

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,17 @@ object TaskContext {
3333

3434
private val taskContext: ThreadLocal[TaskContext] = new ThreadLocal[TaskContext]
3535

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)
3742

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()
3947
}
4048

4149

@@ -62,7 +70,6 @@ abstract class TaskContext extends Serializable {
6270
*/
6371
def isInterrupted(): Boolean
6472

65-
/** @deprecated use { @link #isRunningLocally()}*/
6673
@deprecated("1.2.0", "use isRunningLocally")
6774
def runningLocally(): Boolean
6875

@@ -91,8 +98,6 @@ abstract class TaskContext extends Serializable {
9198
* is for HadoopRDD to register a callback to close the input stream.
9299
* Will be called in any situation - success, failure, or cancellation.
93100
*
94-
* @deprecated use { @link #addTaskCompletionListener(scala.Function1)}
95-
*
96101
* @param f Callback function.
97102
*/
98103
@deprecated("1.2.0", "use addTaskCompletionListener")
@@ -114,7 +119,6 @@ abstract class TaskContext extends Serializable {
114119
*/
115120
def attemptNumber(): Int
116121

117-
/** @deprecated use { @link #taskAttemptId()}; it was renamed to avoid ambiguity. */
118122
@deprecated("1.3.0", "use attemptNumber")
119123
def attemptId(): Long
120124

0 commit comments

Comments
 (0)