MCPcopy
hub / github.com/chrislusf/glow / AddAllToOneStep

Method AddAllToOneStep

flow/context.go:62–76  ·  view source on GitHub ↗

the task should run on the destination dataset shard

(input *Dataset, output *Dataset)

Source from the content-addressed store, hash-verified

60
61// the task should run on the destination dataset shard
62func (f *FlowContext) AddAllToOneStep(input *Dataset, output *Dataset) (step *Step) {
63 step = f.NewStep()
64 FromStepToDataset(step, output)
65 FromDatasetToStep(input, step)
66
67 // setup the network
68 task := step.NewTask()
69 if output != nil {
70 FromTaskToDatasetShard(task, output.GetShards()[0])
71 }
72 for _, shard := range input.GetShards() {
73 FromDatasetShardToTask(shard, task)
74 }
75 return
76}
77
78// the task should run on the source dataset shard
79// input is nil for initial source dataset

Callers 2

MergeReduceMethod · 0.80
MergeSortedMethod · 0.80

Calls 7

NewStepMethod · 0.95
FromStepToDatasetFunction · 0.85
FromDatasetToStepFunction · 0.85
FromTaskToDatasetShardFunction · 0.85
FromDatasetShardToTaskFunction · 0.85
NewTaskMethod · 0.80
GetShardsMethod · 0.80

Tested by

no test coverage detected