You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new services extend chunk allocations (placement) to include all
existing replicas for the chunks in question instead of just one
allocation per chunk. The extended services are meant to be used by
the ingest workflows to push multiple replicas of a chunk in scenarios
where the replication level is bigger than 1 and multiple replicas
already exist in Qserv. The older services would fail in such scenarios.
Minor refactoring on the older code.
Fixed a bug in the JSON schema of of the chunks allocation service
that was returning the key "location" instead of "locations". Migrated
the integration test accordingly.
Fixed a bug in the integration test.
Migratd the documentation on the Ingest API.
Copy file name to clipboardExpand all lines: doc/ingest/api/reference/rest/controller/table-location.rst
+120-3Lines changed: 120 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,10 +119,66 @@ The service also supports an alternative method accepting a transaction identifi
119
119
120
120
If a request succeeded, the System would respond with the following JSON object:
121
121
122
+
.. code-block::
123
+
124
+
{ "location" : {
125
+
"chunk" : <number>,
126
+
"worker" : <string>,
127
+
"host" : <string>,
128
+
"host_name" : <string>,
129
+
"port" : <number>,
130
+
"http_host" : <string>,
131
+
"http_host_name" : <string>,
132
+
"http_port" : <number>
133
+
},
134
+
...
135
+
}
136
+
137
+
Where, the object represents a worker where the Ingest system requests the workflow to forward the chunk contributions.
138
+
See an explanation of the attributes in:
139
+
140
+
- :ref:`table-location-connect-params`
141
+
142
+
143
+
.. _table-location-chunks-one-multi:
144
+
145
+
Single chunk allocation (all replicas of a chunk)
146
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147
+
148
+
The following service is meant to be used for allocating/locating (potentially) multiple replicas of a single chunk-multi:
149
+
150
+
.. list-table::
151
+
:widths: 10 90
152
+
:header-rows: 0
153
+
154
+
* - ``POST``
155
+
- ``/ingest/chunk-multi``
156
+
157
+
Where the request object has the following schema, in which a client would have to provide the name of a database:
158
+
159
+
.. code-block::
160
+
161
+
{ "database" : <string>,
162
+
"chunk" : <number>
163
+
}
164
+
165
+
The service also supports an alternative method accepting a transaction identifier (transactions are always associated with the corresponding databases):
166
+
167
+
.. code-block::
168
+
169
+
{ "transaction_id" : <number>,
170
+
"chunk" : <number>
171
+
}
172
+
173
+
**Note** the difference in the object schema - unlike the single-chunk allocator, this one expects an array of chunk numbers.
174
+
175
+
If a request succeeded, the System would respond with the following JSON object:
176
+
122
177
.. code-block::
123
178
124
179
{ "locations" : [
125
-
{ "worker" : <string>,
180
+
{ "chunk" : <number>,
181
+
"worker" : <string>,
126
182
"host" : <string>,
127
183
"host_name" : <string>,
128
184
"port" : <number>,
@@ -134,11 +190,12 @@ If a request succeeded, the System would respond with the following JSON object:
134
190
]
135
191
}
136
192
137
-
Where, the object represents a worker where the Ingest system requests the workflow to forward the chunk contributions.
193
+
Where, each object in the array represents a particular worker where the corresponding replica of the chunk is located.
138
194
See an explanation of the attributes in:
139
195
140
196
- :ref:`table-location-connect-params`
141
197
198
+
142
199
.. _table-location-chunks-many:
143
200
144
201
Multiple chunks allocation
@@ -161,7 +218,7 @@ Where the request object has the following schema, in which a client would have
161
218
"chunks" : [<number>, <number>, ... <number>]
162
219
}
163
220
164
-
Like the above-explained case of the single chunk allocation service, this one also supports an alternative method accepting
221
+
Like the above-explained case of other chunk allocation service, this one also supports an alternative method accepting
165
222
a transaction identifier (transactions are always associated with the corresponding databases):
166
223
167
224
.. code-block::
@@ -194,6 +251,66 @@ Where, each object in the array represents a particular worker. See an explanati
194
251
195
252
- :ref:`table-location-connect-params`
196
253
254
+
255
+
256
+
.. _table-location-chunks-many-multi:
257
+
258
+
Multiple chunks allocation (all replicas of each chunk)
0 commit comments