Skip to content

Commit 12bd943

Browse files
author
Andrew Or
committed
Add back deprecated things
1 parent 269031f commit 12bd943

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

core/src/main/scala/org/apache/spark/executor/TaskMetrics.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ class TaskMetrics extends Serializable {
149149
*/
150150
def outputMetrics: Option[OutputMetrics] = _outputMetrics
151151

152+
@deprecated("setting OutputMetrics is for internal use only", "2.0.0")
153+
def outputMetrics_=(om: Option[OutputMetrics]): Unit = {
154+
_outputMetrics = om
155+
}
156+
152157
/**
153158
* Get or create a new [[OutputMetrics]] associated with this task.
154159
*/
@@ -225,6 +230,11 @@ class TaskMetrics extends Serializable {
225230
*/
226231
def shuffleWriteMetrics: Option[ShuffleWriteMetrics] = _shuffleWriteMetrics
227232

233+
@deprecated("setting ShuffleWriteMetrics is for internal use only", "2.0.0")
234+
def shuffleWriteMetrics_=(swm: Option[ShuffleWriteMetrics]): Unit = {
235+
_shuffleWriteMetrics = swm
236+
}
237+
228238
/**
229239
* Get or create a new [[ShuffleWriteMetrics]] associated with this task.
230240
*/
@@ -244,6 +254,11 @@ class TaskMetrics extends Serializable {
244254
*/
245255
def updatedBlockStatuses: Seq[(BlockId, BlockStatus)] = _updatedBlockStatuses
246256

257+
@deprecated("setting updated blocks is for internal use only", "2.0.0")
258+
def updatedBlocks_=(ub: Option[Seq[(BlockId, BlockStatus)]]): Unit = {
259+
_updatedBlockStatuses = ub.getOrElse(Seq.empty[(BlockId, BlockStatus)])
260+
}
261+
247262
private[spark] def incUpdatedBlockStatuses(v: Seq[(BlockId, BlockStatus)]): Unit = {
248263
_updatedBlockStatuses ++= v
249264
}

0 commit comments

Comments
 (0)