forked from bcongdon/corral
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask.go
45 lines (39 loc) · 965 Bytes
/
task.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package corral
import (
"github.com/bcongdon/corral/internal/pkg/corfs"
)
// Phase is a descriptor of the phase (i.e. Map or Reduce) of a Job
type Phase int
// Descriptors of the Job phase
const (
MapPhase Phase = iota
ReducePhase
MergePhase
CombinePhase
)
// task defines a serialized description of a single unit of work
// in a MapReduce job, as well as the necessary information for a
// remote executor to initialize itself and begin working.
type task struct {
JobNumber int
Phase Phase
BinID uint
IntermediateBins uint
Splits []inputSplit
FileSystemType corfs.FileSystemType
WorkingLocation string
Cleanup bool
NumMap int
NumReduce int
TaskID int
StartFileID int
EndFileID int
CombineOutputFilePath string
NeedToCombinedFiles []string
}
type taskResult struct {
BytesRead int
BytesWritten int
Lengths []int
RunningTime int64
}