Data Client BlobApi

The BlobApi mirrors the Blob Rest Api.

It supports the upload and retrieval of large volumes of data from the storage of a catalog.

For the full BlobApi specification, see BlobApi.

The following pages describe the per-request configuration and metrics.

Example

Scala
Java
val client = BaseClient()
val blobApi = client.of[BlobApi]

val someHrn = "hrn:here:data::olp-here-test:whatever"
val someLayer = "whateverLayer"
val someDataHandle = "whateverDataHandle"
val result: Future[Array[Byte]] =
  blobApi.getBlob(someHrn, someLayer, someDataHandle).executeToBytes()

result
  .andThen {
    case Success(response) =>
      // do something with the byte array
      println(s"received ${response.length} bytes")
    case Failure(ex) =>
      ex.printStackTrace()
  }

Await.result(result, Duration.Inf)
BaseClient client = BaseClientJava.instance();
BlobApi blobApi = new BlobApi(client);

String someHrn = "hrn:here:data::olp-here-test:whatever";
String someLayer = "whateverLayer";
String someDataHandle = "whateverDataHandle";
byte[] result =
    blobApi
        .getBlob(
            someHrn,
            someLayer,
            someDataHandle,
            Optional.empty(),
            Optional.empty(),
            Optional.empty())
        .executeToBytes()
        .toCompletableFuture()
        .join();

// do something with the byte array
System.out.printf("received %d bytes\n", result.length);

results matching ""

    No results matching ""