Data Client MetadataApi

The MetadataApi mirrors the Metadata Rest Api.

It provides a way to get information (metadata) about layers and partitions stored in a catalog.

For the full MetadataApi specification, see MetadataApi.

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

Example

Scala
Java
val client = BaseClient()
val metadataApi = client.of[MetadataApi]

val someHrn = "hrn:here:data::olp-here-test:whatever"
val result: Future[VersionResponse] = metadataApi.latestVersion(someHrn, -1L).executeToEntity()

result
  .andThen {
    case Success(response) =>
      // do something with the version
      println(s"latest version of catalog ${someHrn} is ${response.version}")
    case Failure(ex) =>
      ex.printStackTrace()
  }
  .andThen {
    case _ =>
      client.shutdown()
  }

Await.result(result, Duration.Inf)
BaseClient client = BaseClientJava.instance();
MetadataApi metadataApi = new MetadataApi(client);

String someHrn = "hrn:here:data::olp-here-test:whatever";

VersionResponse versionResult =
    metadataApi
        .latestVersion(someHrn, -1L, Optional.empty())
        .executeToEntity()
        .toCompletableFuture()
        .join();

// do something with the version
System.out.printf("latest version of catalog %s is %d\n", someHrn, versionResult.getVersion());

client.shutdown().toCompletableFuture().join();

results matching ""

    No results matching ""