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