-
Notifications
You must be signed in to change notification settings - Fork 1
/
MapReduce.proto
81 lines (69 loc) · 2.06 KB
/
MapReduce.proto
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
option java_package = 'MapReduceProto';
option java_outer_classname = "MapReduce";
message JobSubmitRequest {
optional string mapName = 1; // Java class, or name of C .so
optional string reducerName = 2; // Java class, or name of C .so
optional string inputFile = 3;
optional string outputFile = 4;
optional int32 numReduceTasks = 5;
}
message JobSubmitResponse {
optional int32 status = 1;
optional int32 jobId = 2;
}
message JobStatusRequest {
optional int32 jobId = 1;
}
message JobStatusResponse {
optional int32 status = 1;
optional bool jobDone = 2;
optional int32 totalMapTasks = 3;
optional int32 numMapTasksStarted = 4;
optional int32 totalReduceTasks = 5;
optional int32 numReduceTasksStarted = 6;
}
message MapTaskStatus {
optional int32 jobId = 1;
optional int32 taskId = 2;
optional bool taskCompleted = 3;
optional string mapOutputFile = 4;
}
message ReduceTaskStatus {
optional int32 jobId = 1;
optional int32 taskId = 2;
optional bool taskCompleted = 3;
}
message HeartBeatRequest {
optional int32 taskTrackerId = 1;
optional int32 numMapSlotsFree = 2;
optional int32 numReduceSlotsFree = 3;
repeated MapTaskStatus mapStatus = 4;
repeated ReduceTaskStatus reduceStatus = 5;
optional DataNodeLocation locations = 6; //addded
}
message DataNodeLocation {
optional string ip = 1 ;
optional int32 port = 2;
}
message BlockLocations {
optional int32 blockNumber = 1;
repeated DataNodeLocation locations = 2;
}
message MapTaskInfo {
optional int32 jobId = 1;
optional int32 taskId = 2;
optional string mapName = 3;
repeated BlockLocations inputBlocks = 4; // only one block per map task . not repeated
}
message ReducerTaskInfo {
optional int32 jobId = 1;
optional int32 taskId = 2;
optional string reducerName = 3;
repeated string mapOutputFiles = 4;
optional string outputFile = 5;
}
message HeartBeatResponse {
optional int32 status = 1;
repeated MapTaskInfo mapTasks = 2;
repeated ReducerTaskInfo reduceTasks = 3;
}