File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
core/src/main/scala/org/apache/spark Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -46,5 +46,5 @@ trait BlockDataManager {
4646 /**
4747 * Release locks acquired by [[putBlockData() ]] and [[getBlockData() ]].
4848 */
49- def releaseLock (blockId : BlockId ): Unit
49+ def releaseLock (blockId : BlockId , taskAttemptId : Option [ Long ] ): Unit
5050}
Original file line number Diff line number Diff line change @@ -717,17 +717,13 @@ private[spark] class BlockManager(
717717 blockInfoManager.downgradeLock(blockId)
718718 }
719719
720- /**
721- * Release a lock on the given block.
722- */
723- def releaseLock (blockId : BlockId ): Unit = releaseLock(blockId, taskAttemptId = None )
724-
725720 /**
726721 * Release a lock on the given block with explicit TID.
727- * This method should be used in case we can't get the correct TID from TaskContext, for example,
728- * the input iterator of a cached RDD iterates to the end in a child thread.
722+ * The param `taskAttemptId` should be passed in case we can't get the correct TID from
723+ * TaskContext, for example, the input iterator of a cached RDD iterates to the end in a child
724+ * thread.
729725 */
730- def releaseLock (blockId : BlockId , taskAttemptId : Option [Long ]): Unit = {
726+ def releaseLock (blockId : BlockId , taskAttemptId : Option [Long ] = None ): Unit = {
731727 blockInfoManager.unlock(blockId, taskAttemptId)
732728 }
733729
You can’t perform that action at this time.
0 commit comments