Skip to content

Commit b767644

Browse files
hekaishengxuye.qin
authored andcommitted
Use tell for prefetch
1 parent f320c0f commit b767644

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

mars/services/subtask/worker/processor.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@
2222
from .... import oscar as mo
2323
from ....core import ChunkGraph, OperandType, enter_mode, ExecutionError
2424
from ....core.context import get_context, set_context
25-
from ....core.operand import (
26-
Fetch,
27-
FetchShuffle,
28-
execute,
29-
MapReduceOperand,
30-
OperandStage,
31-
)
25+
from ....core.operand import Fetch, FetchShuffle, execute
3226
from ....metrics import Metrics
3327
from ....optimization.physical import optimize
3428
from ....typing import BandType, ChunkType
@@ -426,7 +420,7 @@ async def set_chunks_meta():
426420
# set result data size
427421
self.result.data_size = result_data_size
428422

429-
async def push_mapper_data(self, chunk_graph):
423+
async def _push_mapper_data(self, chunk_graph):
430424
# TODO: use task api to get reducer bands
431425
reducer_idx_to_band = dict()
432426
if not reducer_idx_to_band:
@@ -520,7 +514,7 @@ async def run(self):
520514

521515
await self.done()
522516
# after done, we push mapper data to reducers in advance.
523-
await self.push_mapper_data(chunk_graph)
517+
await self.ref()._push_mapper_data.tell(chunk_graph)
524518
if self.result.status == SubtaskStatus.succeeded:
525519
cost_time_secs = (
526520
self.result.execution_end_time - self.result.execution_start_time

0 commit comments

Comments
 (0)