1syntax = "proto3"; 2 3package tensorflow.data; 4 5import "tensorflow/core/data/service/common.proto"; 6import "tensorflow/core/protobuf/data_service.proto"; 7 8// Message representing journaled dispatcher metadata updates. When we apply 9// one of these changes to the dispatcher's in-memory state, we also write an 10// Update message to the journal. 11// Next tag: 14 12message Update { 13 oneof update_type { 14 RegisterDatasetUpdate register_dataset = 1; 15 RegisterWorkerUpdate register_worker = 5; 16 CreateJobUpdate create_job = 2; 17 ProduceSplitUpdate produce_split = 8; 18 AcquireJobClientUpdate acquire_job_client = 6; 19 ReleaseJobClientUpdate release_job_client = 7; 20 GarbageCollectJobUpdate garbage_collect_job = 12; 21 RemoveTaskUpdate remove_task = 11; 22 CreatePendingTaskUpdate create_pending_task = 9; 23 ClientHeartbeatUpdate client_heartbeat = 10; 24 CreateTaskUpdate create_task = 3; 25 FinishTaskUpdate finish_task = 4; 26 SetElementSpecUpdate set_element_spec = 13; 27 } 28} 29 30// Next tag: 3 31message RegisterDatasetUpdate { 32 int64 dataset_id = 1; 33 uint64 fingerprint = 2; 34} 35 36// Next tag: 3 37message RegisterWorkerUpdate { 38 string worker_address = 1; 39 string transfer_address = 2; 40} 41 42// Next tag: 3 43message NamedJobKeyDef { 44 string name = 1; 45 int64 index = 2; 46} 47 48// Next tag: 11 49message CreateJobUpdate { 50 reserved 3, 5, 6; 51 int64 job_id = 1; 52 int64 dataset_id = 2; 53 ProcessingModeDef processing_mode_def = 9; 54 int64 num_split_providers = 8; 55 // Only some jobs have names, so this may be unset. 56 NamedJobKeyDef named_job_key = 4; 57 // Optional number of consumers. If set, the job's tasks will provide their 58 // elements to consumers round-robin. 59 oneof optional_num_consumers { 60 int64 num_consumers = 7; 61 } 62 // Specifies which workers the client of this job reads from. 63 TargetWorkers target_workers = 10; 64} 65 66// Next tag: 5 67message ProduceSplitUpdate { 68 int64 job_id = 1; 69 int64 repetition = 2; 70 int64 split_provider_index = 4; 71 // Whether the split provider reached its end. 72 bool finished = 3; 73} 74 75// Next tag: 3 76message AcquireJobClientUpdate { 77 int64 job_id = 1; 78 int64 job_client_id = 2; 79} 80 81// Next tag: 3 82message ReleaseJobClientUpdate { 83 int64 job_client_id = 1; 84 // The time when the client was released, measured in microseconds since the 85 // epoch. 86 int64 time_micros = 2; 87} 88 89// Next tag: 2 90message GarbageCollectJobUpdate { 91 int64 job_id = 1; 92} 93 94// Next tag: 2 95message RemoveTaskUpdate { 96 int64 task_id = 1; 97} 98 99// Indicates that a client failed to block before reaching the target round. 100// Next tag: 2 101message TaskRejected { 102 // A new target round to try adding the task in. 103 int64 new_target_round = 1; 104} 105 106// Updates dispatcher state based on a client heartbeat. 107// Next tag: 4 108message ClientHeartbeatUpdate { 109 int64 job_client_id = 1; 110 bool task_accepted = 2; 111 TaskRejected task_rejected = 3; 112} 113 114// Next tag: 6 115message CreatePendingTaskUpdate { 116 int64 task_id = 1; 117 int64 job_id = 2; 118 string worker_address = 3; 119 string transfer_address = 4; 120 int64 starting_round = 5; 121} 122 123// Next tag: 7 124message CreateTaskUpdate { 125 reserved 3, 5; 126 int64 task_id = 1; 127 int64 job_id = 2; 128 string worker_address = 4; 129 string transfer_address = 6; 130} 131 132// Next tag: 2 133message FinishTaskUpdate { 134 int64 task_id = 1; 135} 136 137message SetElementSpecUpdate { 138 int64 dataset_id = 1; 139 bytes element_spec = 2; 140} 141