Skip to content

Commit f02bc1e

Browse files
committed
Minor fixes such as:
1. Update mima exclude 2. Update wording in TaskContext 3. Update JavaTaskContextCompileCheck as suggested in TaskContext note
1 parent 5753ee0 commit f02bc1e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,10 @@ abstract class TaskContext extends Serializable {
151151
def stageId(): Int
152152

153153
/**
154-
* The attempt ID of the stage that this task belongs to.
154+
* An ID that is unique to the stage attempt that this task belongs to.
155155
*/
156156
def stageAttemptId(): Int
157+
157158
/**
158159
* The ID of the RDD partition that is computed by this task.
159160
*/

core/src/test/java/test/org/apache/spark/JavaTaskContextCompileCheck.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public static void test() {
3838
tc.attemptNumber();
3939
tc.partitionId();
4040
tc.stageId();
41+
tc.stageAttemptId();
4142
tc.taskAttemptId();
4243
}
4344

@@ -51,6 +52,7 @@ public void onTaskCompletion(TaskContext context) {
5152
context.isCompleted();
5253
context.isInterrupted();
5354
context.stageId();
55+
context.stageAttemptId();
5456
context.partitionId();
5557
context.addTaskCompletionListener(this);
5658
}

project/MimaExcludes.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ object MimaExcludes {
9595

9696
// [SPARK-21087] CrossValidator, TrainValidationSplit expose sub models after fitting: Scala
9797
ProblemFilters.exclude[FinalClassProblem]("org.apache.spark.ml.tuning.CrossValidatorModel$CrossValidatorModelWriter"),
98-
ProblemFilters.exclude[FinalClassProblem]("org.apache.spark.ml.tuning.TrainValidationSplitModel$TrainValidationSplitModelWriter")
98+
ProblemFilters.exclude[FinalClassProblem]("org.apache.spark.ml.tuning.TrainValidationSplitModel$TrainValidationSplitModelWriter"),
99+
100+
// [SPARK-22897] Expose stageAttemptId in TaskContext
101+
ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.spark.TaskContext.stageAttemptId")
99102
)
100103

101104
// Exclude rules for 2.2.x

0 commit comments

Comments
 (0)