Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="dataflow_v1b3.html">Google Dataflow API</a> . <a href="dataflow_v1b3.projects.html">projects</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="dataflow_v1b3.projects.jobs.html">jobs()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the jobs Resource.</p> |
| 81 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 82 | <p class="toc_element"> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 83 | <code><a href="dataflow_v1b3.projects.locations.html">locations()</a></code> |
| 84 | </p> |
| 85 | <p class="firstline">Returns the locations Resource.</p> |
| 86 | |
| 87 | <p class="toc_element"> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 88 | <code><a href="dataflow_v1b3.projects.templates.html">templates()</a></code> |
| 89 | </p> |
| 90 | <p class="firstline">Returns the templates Resource.</p> |
| 91 | |
| 92 | <p class="toc_element"> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 93 | <code><a href="#workerMessages">workerMessages(projectId, body, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Send a worker_message to the service.</p> |
| 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
| 97 | <code class="details" id="workerMessages">workerMessages(projectId, body, x__xgafv=None)</code> |
| 98 | <pre>Send a worker_message to the service. |
| 99 | |
| 100 | Args: |
| 101 | projectId: string, The project to send the WorkerMessages to. (required) |
| 102 | body: object, The request body. (required) |
| 103 | The object takes the form of: |
| 104 | |
| 105 | { # A request for sending worker messages to the service. |
| 106 | "workerMessages": [ # The WorkerMessages to send. |
| 107 | { # WorkerMessage provides information to the backend about a worker. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 108 | "workerHealthReport": { # WorkerHealthReport contains information about the health of a worker. # The health of a worker. |
| 109 | # |
| 110 | # The VM should be identified by the labels attached to the WorkerMessage that |
| 111 | # this health ping belongs to. |
| 112 | "pods": [ # The pods running on the worker. See: |
| 113 | # http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod |
| 114 | # |
| 115 | # This field is used by the worker to send the status of the indvidual |
| 116 | # containers running on each worker. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 117 | { |
| 118 | "a_key": "", # Properties of the object. |
| 119 | }, |
| 120 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 121 | "reportInterval": "A String", # The interval at which the worker is sending health reports. |
| 122 | # The default value of 0 should be interpreted as the field is not being |
| 123 | # explicitly set by the worker. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 124 | "vmStartupTime": "A String", # The time the VM was booted. |
| 125 | "vmIsHealthy": True or False, # Whether the VM is healthy. |
| 126 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 127 | "labels": { # Labels are used to group WorkerMessages. |
| 128 | # For example, a worker_message about a particular container |
| 129 | # might have the labels: |
| 130 | # { "JOB_ID": "2015-04-22", |
| 131 | # "WORKER_ID": "wordcount-vm-2015…" |
| 132 | # "CONTAINER_TYPE": "worker", |
| 133 | # "CONTAINER_ID": "ac1234def"} |
| 134 | # Label tags typically correspond to Label enum values. However, for ease |
| 135 | # of development other strings can be used as tags. LABEL_UNSPECIFIED should |
| 136 | # not be used here. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 137 | "a_key": "A String", |
| 138 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 139 | "workerMetrics": { # Worker metrics exported from workers. This contains resource utilization # Resource metrics reported by workers. |
| 140 | # metrics accumulated from a variety of sources. For more information, see |
| 141 | # go/df-resource-signals. |
| 142 | "cpuTime": [ # CPU utilization samples. |
| 143 | { # Modeled after information exposed by /proc/stat. |
| 144 | "timestamp": "A String", # Timestamp of the measurement. |
| 145 | "rate": 3.14, # Average CPU utilization rate (% non-idle cpu / second) since previous |
| 146 | # sample. |
| 147 | "totalMs": "A String", # Total active CPU time across all cores (ie., non-idle) in milliseconds |
| 148 | # since start-up. |
| 149 | }, |
| 150 | ], |
| 151 | }, |
| 152 | "workerMessageCode": { # A message code is used to report status and error messages to the service. # A worker message code. |
| 153 | # The message codes are intended to be machine readable. The service will |
| 154 | # take care of translating these into user understandable messages if |
| 155 | # necessary. |
| 156 | # |
| 157 | # Example use cases: |
| 158 | # 1. Worker processes reporting successful startup. |
| 159 | # 2. Worker processes reporting specific errors (e.g. package staging |
| 160 | # failure). |
| 161 | "code": "A String", # The code is a string intended for consumption by a machine that identifies |
| 162 | # the type of message being sent. |
| 163 | # Examples: |
| 164 | # 1. "HARNESS_STARTED" might be used to indicate the worker harness has |
| 165 | # started. |
| 166 | # 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error downloading |
| 167 | # a GCS file as part of the boot process of one of the worker containers. |
| 168 | # |
| 169 | # This is a string and not an enum to make it easy to add new codes without |
| 170 | # waiting for an API change. |
| 171 | "parameters": { # Parameters contains specific information about the code. |
| 172 | # |
| 173 | # This is a struct to allow parameters of different types. |
| 174 | # |
| 175 | # Examples: |
| 176 | # 1. For a "HARNESS_STARTED" message parameters might provide the name |
| 177 | # of the worker and additional data like timing information. |
| 178 | # 2. For a "GCS_DOWNLOAD_ERROR" parameters might contain fields listing |
| 179 | # the GCS objects being downloaded and fields containing errors. |
| 180 | # |
| 181 | # In general complex data structures should be avoided. If a worker |
| 182 | # needs to send a specific and complicated data structure then please |
| 183 | # consider defining a new proto and adding it to the data oneof in |
| 184 | # WorkerMessageResponse. |
| 185 | # |
| 186 | # Conventions: |
| 187 | # Parameters should only be used for information that isn't typically passed |
| 188 | # as a label. |
| 189 | # hostname and other worker identifiers should almost always be passed |
| 190 | # as labels since they will be included on most messages. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 191 | "a_key": "", # Properties of the object. |
| 192 | }, |
| 193 | }, |
| 194 | "time": "A String", # The timestamp of the worker_message. |
| 195 | }, |
| 196 | ], |
| 197 | } |
| 198 | |
| 199 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 200 | Allowed values |
| 201 | 1 - v1 error format |
| 202 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 203 | |
| 204 | Returns: |
| 205 | An object of the form: |
| 206 | |
| 207 | { # The response to the worker messages. |
| 208 | "workerMessageResponses": [ # The servers response to the worker messages. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame^] | 209 | { # A worker_message response allows the server to pass information to the |
| 210 | # sender. |
| 211 | "workerHealthReportResponse": { # WorkerHealthReportResponse contains information returned to the worker # The service's response to a worker's health report. |
| 212 | # in response to a health ping. |
| 213 | "reportInterval": "A String", # A positive value indicates the worker should change its reporting interval |
| 214 | # to the specified value. |
| 215 | # |
| 216 | # The default value of zero means no change in report rate is requested by |
| 217 | # the server. |
| 218 | }, |
| 219 | "workerMetricsResponse": { # Service-side response to WorkerMessage reporting resource utilization. # Service's response to reporting worker metrics (currently empty). |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 220 | }, |
| 221 | }, |
| 222 | ], |
| 223 | }</pre> |
| 224 | </div> |
| 225 | |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 226 | </body></html> |