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 `OlpClientSettings` class pulls together all the different settings for customization of the client library behavior.
@@ -196,7 +196,7 @@ Then pass it to the `CatalogClient` via `GetCatalog` method:
196
196
197
197
```cpp
198
198
// Run the CatalogRequest
199
-
auto future = serviceClient->GetCatalog(request);
199
+
auto future = catalog_client.GetCatalog(request);
200
200
```
201
201
202
202
The execution result is a `CancellableFuture` that contains `CatalogResponse` object. The `CatalogResponse` class holds details of the completed operation and is used to determine operation success and access resultant data.
@@ -207,18 +207,16 @@ The execution result is a `CancellableFuture` that contains `CatalogResponse` ob
@@ -250,20 +248,22 @@ The `ApiError` class contains details regarding to the incurred error, including
250
248
To retrieve partition metadata, create a `PartitionsRequest`. The `PartitionsRequest` class allows to set the properties of the catalog request, including:
251
249
252
250
*`WithBillingTag`: Sets the billing tag used for this request.
253
-
*`WithLayerId`: Sets the layer id that partition metadata is retrieved from.
254
251
255
252
```cpp
256
253
// Create a PartitionsRequest with appropriate LayerId
257
254
auto request = olp::dataservice::read::PartitionsRequest()
258
-
.WithLayerId(gLayerId)
259
255
.WithBillingTag(boost::none);
260
256
```
261
257
262
-
Then pass it to the `CatalogClient` via `GetPartitions` method:
258
+
Then pass it to the appropriate layer client, i.e. `VersionedLayerClient` via `GetPartitions` method:
263
259
264
260
```cpp
261
+
// Create appropriate layer client with HRN, layer name and settings.
auto future = serviceClient->GetPartitions(request);
266
+
auto future = layer_client.GetPartitions(request);
267
267
```
268
268
269
269
The execution result is a `CancellableFuture` that contains `PartitionsResponse` object. The `PartitionsResponse` class holds the details of the completed operation and is used to determine operation success and access resultant data.
@@ -274,20 +274,16 @@ The execution result is a `CancellableFuture` that contains `PartitionsResponse`
@@ -299,7 +295,7 @@ The `Partition` class contains partition metadata and exposes the following memb
299
295
300
296
*`GetChecksum`: Partition checksum.
301
297
*`GetCompressedDataSize`: Returns the size of the compressed partition data.
302
-
*`GetDataHandle`: Returns the handle that can be used by the `CatalogClient::GetData` function to retrieve the partition data.
298
+
*`GetDataHandle`: Returns the handle that can be used by the `GetData` function to retrieve the partition data.
303
299
*`GetDataSize`: Returns the size of the partition data.
304
300
*`GetPartition`: Returns the partition Id.
305
301
*`GetVersion`: Returns the latest catalog version for the partition.
@@ -308,43 +304,38 @@ The `Partition` class contains partition metadata and exposes the following memb
308
304
309
305
To retrieve partition data, create the `DataRequest`. The `DataRequest` class allows to specify the parameters of the `GetData` function, including:
310
306
311
-
*`WithLayerId`: Sets the layer id to use it for the request.
312
307
*`WithPartitionId`: Sets the partition for the data request.
313
308
*`WithDataHandle`: Sets the requested data handle, which can be found via the GetPartition call in the `olp::dataservice::read::model::Partition::GetDataHandle` member.
314
309
*`WithBillingTag`: Sets the billing tag for the request.
315
310
316
311
```cpp
317
312
// Create a DataRequest with appropriate LayerId and PartitionId
318
313
auto request = olp::dataservice::read::DataRequest()
319
-
.WithLayerId(gLayerId)
320
314
.WithPartitionId(gPartitionId)
321
315
.WithBillingTag(boost::none);
322
316
```
323
317
324
-
Then pass it to the `CatalogClient` via `GetData` method:
318
+
Then pass it to the `VersionedLayerClient` via `GetData` method:
325
319
326
320
```cpp
327
321
// Run the DataRequest
328
-
auto future = serviceClient->GetData(request);
322
+
auto future = layer_client.GetData(request);
329
323
```
330
324
331
325
The execution result is a `CancellableFuture` that contains `DataResponse` object.
0 commit comments