|
| 1 | +syntax = "proto2"; |
| 2 | +package proto; |
| 3 | + |
| 4 | +option java_package = "io.curvine.proto"; |
| 5 | +option java_multiple_files = true; |
| 6 | +option java_outer_classname = "ShuffleProto"; |
| 7 | + |
| 8 | +message StageKeyProto { |
| 9 | + required string app_id = 1; |
| 10 | + required string stage_id = 2; |
| 11 | +} |
| 12 | + |
| 13 | +message SplitKeyProto { |
| 14 | + required int32 part_id = 1; |
| 15 | + required int32 split_id = 2; |
| 16 | +} |
| 17 | + |
| 18 | +message InetAddrProto { |
| 19 | + required string hostname = 1; |
| 20 | + required int32 port = 2; |
| 21 | +} |
| 22 | + |
| 23 | +message SplitInfoProto { |
| 24 | + required int32 part_id = 1; |
| 25 | + required int32 split_id = 2; |
| 26 | + required int64 write_len = 3; |
| 27 | + required InetAddrProto worker_addr = 4; |
| 28 | +} |
| 29 | + |
| 30 | + |
| 31 | +message AllocWriterRequest { |
| 32 | + required StageKeyProto stage = 1; |
| 33 | + required int32 part_id = 2; |
| 34 | + required int64 split_size = 3; |
| 35 | + optional SplitInfoProto full_split = 4; |
| 36 | + repeated uint32 exclude_workers = 5; |
| 37 | +} |
| 38 | + |
| 39 | +message AllocWriterResponse { |
| 40 | + required StageKeyProto stage = 1; |
| 41 | + required int32 part_id = 2; |
| 42 | + required SplitInfoProto cur_split = 3; |
| 43 | +} |
| 44 | + |
| 45 | +message WriteDataRequest { |
| 46 | + required StageKeyProto stage = 1; |
| 47 | + required int32 part_id = 2; |
| 48 | + required int32 split_id = 3; |
| 49 | + required int64 split_size = 4; |
| 50 | +} |
| 51 | + |
| 52 | +message WriteDataResponse { |
| 53 | + optional SplitInfoProto full_split = 1; |
| 54 | +} |
| 55 | + |
| 56 | +message TaskCommitRequest { |
| 57 | + required StageKeyProto stage = 1; |
| 58 | + required int32 task_id = 2; |
| 59 | + required int32 num_tasks = 3; |
| 60 | +} |
| 61 | + |
| 62 | +message TaskCommitResponse { |
| 63 | +} |
| 64 | + |
| 65 | +// shuffle stage submission. This submission has two meanings: |
| 66 | +// 1. Aggregate shuffle, is_merge = true, submission can only be made after all tasks are completed |
| 67 | +// 2. Normal shuffle, is_merge = false, after the task is completed, the writer can submit immediately. |
| 68 | +message StageCommitRequest { |
| 69 | + required StageKeyProto stage = 1; |
| 70 | +} |
| 71 | + |
| 72 | +message StageCommitResponse { |
| 73 | + repeated SplitKeyProto splits = 1; |
| 74 | +} |
0 commit comments