32
32
import org .apache .spark .util .TaskCompletionListener ;
33
33
import org .apache .spark .util .TaskCompletionListenerException ;
34
34
35
+ /**
36
+ * :: DeveloperApi ::
37
+ * Contextual information about a task which can be read or mutated during execution.
38
+ */
35
39
@ DeveloperApi
36
40
public class TaskContext implements Serializable {
37
41
@@ -41,6 +45,17 @@ public class TaskContext implements Serializable {
41
45
private Boolean runningLocally ;
42
46
private TaskMetrics taskMetrics ;
43
47
48
+ /**
49
+ * :: DeveloperApi ::
50
+ * Contextual information about a task which can be read or mutated during execution.
51
+ *
52
+ * @param stageId stage id
53
+ * @param partitionId index of the partition
54
+ * @param attemptId the number of attempts to execute this task
55
+ * @param runningLocally whether the task is running locally in the driver JVM
56
+ * @param taskMetrics performance metrics of the task
57
+ */
58
+ @ DeveloperApi
44
59
public TaskContext (Integer stageId , Integer partitionId , Long attemptId , Boolean runningLocally ,
45
60
TaskMetrics taskMetrics ) {
46
61
this .attemptId = attemptId ;
@@ -51,6 +66,17 @@ public TaskContext(Integer stageId, Integer partitionId, Long attemptId, Boolean
51
66
taskContext .set (this );
52
67
}
53
68
69
+
70
+ /**
71
+ * :: DeveloperApi ::
72
+ * Contextual information about a task which can be read or mutated during execution.
73
+ *
74
+ * @param stageId stage id
75
+ * @param partitionId index of the partition
76
+ * @param attemptId the number of attempts to execute this task
77
+ * @param runningLocally whether the task is running locally in the driver JVM
78
+ */
79
+ @ DeveloperApi
54
80
public TaskContext (Integer stageId , Integer partitionId , Long attemptId ,
55
81
Boolean runningLocally ) {
56
82
this .attemptId = attemptId ;
@@ -61,6 +87,16 @@ public TaskContext(Integer stageId, Integer partitionId, Long attemptId,
61
87
taskContext .set (this );
62
88
}
63
89
90
+
91
+ /**
92
+ * :: DeveloperApi ::
93
+ * Contextual information about a task which can be read or mutated during execution.
94
+ *
95
+ * @param stageId stage id
96
+ * @param partitionId index of the partition
97
+ * @param attemptId the number of attempts to execute this task
98
+ */
99
+ @ DeveloperApi
64
100
public TaskContext (Integer stageId , Integer partitionId , Long attemptId ) {
65
101
this .attemptId = attemptId ;
66
102
this .partitionId = partitionId ;
0 commit comments