- 1.53.0 (latest)
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.2
- 1.0.1
- 0.2.2
public class MetadataServiceClient implements BackgroundResource
Service Description: Metadata service manages metadata resources such as tables, filesets and partitions.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
Entity entity = Entity.newBuilder().build();
Entity response = metadataServiceClient.createEntity(parent, entity);
}
Note: close() needs to be called on the MetadataServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of MetadataServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
MetadataServiceSettings metadataServiceSettings =
MetadataServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
MetadataServiceClient metadataServiceClient =
MetadataServiceClient.create(metadataServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
MetadataServiceSettings metadataServiceSettings =
MetadataServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
MetadataServiceClient metadataServiceClient =
MetadataServiceClient.create(metadataServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final MetadataServiceClient create()
Constructs an instance of MetadataServiceClient with default settings.
Type | Description |
MetadataServiceClient |
Type | Description |
IOException |
create(MetadataServiceSettings settings)
public static final MetadataServiceClient create(MetadataServiceSettings settings)
Constructs an instance of MetadataServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | MetadataServiceSettings |
Type | Description |
MetadataServiceClient |
Type | Description |
IOException |
create(MetadataServiceStub stub)
public static final MetadataServiceClient create(MetadataServiceStub stub)
Constructs an instance of MetadataServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(MetadataServiceSettings).
Name | Description |
stub | MetadataServiceStub |
Type | Description |
MetadataServiceClient |
Constructors
MetadataServiceClient(MetadataServiceSettings settings)
protected MetadataServiceClient(MetadataServiceSettings settings)
Constructs an instance of MetadataServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Name | Description |
settings | MetadataServiceSettings |
MetadataServiceClient(MetadataServiceStub stub)
protected MetadataServiceClient(MetadataServiceStub stub)
Name | Description |
stub | MetadataServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createEntity(CreateEntityRequest request)
public final Entity createEntity(CreateEntityRequest request)
Create a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
CreateEntityRequest request =
CreateEntityRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setEntity(Entity.newBuilder().build())
.setValidateOnly(true)
.build();
Entity response = metadataServiceClient.createEntity(request);
}
Name | Description |
request | CreateEntityRequest The request object containing all of the parameters for the API call. |
Type | Description |
Entity |
createEntity(ZoneName parent, Entity entity)
public final Entity createEntity(ZoneName parent, Entity entity)
Create a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
Entity entity = Entity.newBuilder().build();
Entity response = metadataServiceClient.createEntity(parent, entity);
}
Name | Description |
parent | ZoneName Required. The resource name of the parent zone:
|
entity | Entity Required. Entity resource. |
Type | Description |
Entity |
createEntity(String parent, Entity entity)
public final Entity createEntity(String parent, Entity entity)
Create a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString();
Entity entity = Entity.newBuilder().build();
Entity response = metadataServiceClient.createEntity(parent, entity);
}
Name | Description |
parent | String Required. The resource name of the parent zone:
|
entity | Entity Required. Entity resource. |
Type | Description |
Entity |
createEntityCallable()
public final UnaryCallable<CreateEntityRequest,Entity> createEntityCallable()
Create a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
CreateEntityRequest request =
CreateEntityRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setEntity(Entity.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Entity> future = metadataServiceClient.createEntityCallable().futureCall(request);
// Do something.
Entity response = future.get();
}
Type | Description |
UnaryCallable<CreateEntityRequest,Entity> |
createPartition(CreatePartitionRequest request)
public final Partition createPartition(CreatePartitionRequest request)
Create a metadata partition.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
CreatePartitionRequest request =
CreatePartitionRequest.newBuilder()
.setParent(
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
.toString())
.setPartition(Partition.newBuilder().build())
.setValidateOnly(true)
.build();
Partition response = metadataServiceClient.createPartition(request);
}
Name | Description |
request | CreatePartitionRequest The request object containing all of the parameters for the API call. |
Type | Description |
Partition |
createPartition(EntityName parent, Partition partition)
public final Partition createPartition(EntityName parent, Partition partition)
Create a metadata partition.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
EntityName parent = EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]");
Partition partition = Partition.newBuilder().build();
Partition response = metadataServiceClient.createPartition(parent, partition);
}
Name | Description |
parent | EntityName Required. The resource name of the parent zone:
|
partition | Partition Required. Partition resource. |
Type | Description |
Partition |
createPartition(String parent, Partition partition)
public final Partition createPartition(String parent, Partition partition)
Create a metadata partition.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
String parent =
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]").toString();
Partition partition = Partition.newBuilder().build();
Partition response = metadataServiceClient.createPartition(parent, partition);
}
Name | Description |
parent | String Required. The resource name of the parent zone:
|
partition | Partition Required. Partition resource. |
Type | Description |
Partition |
createPartitionCallable()
public final UnaryCallable<CreatePartitionRequest,Partition> createPartitionCallable()
Create a metadata partition.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
CreatePartitionRequest request =
CreatePartitionRequest.newBuilder()
.setParent(
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
.toString())
.setPartition(Partition.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Partition> future =
metadataServiceClient.createPartitionCallable().futureCall(request);
// Do something.
Partition response = future.get();
}
Type | Description |
UnaryCallable<CreatePartitionRequest,Partition> |
deleteEntity(DeleteEntityRequest request)
public final void deleteEntity(DeleteEntityRequest request)
Delete a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
DeleteEntityRequest request =
DeleteEntityRequest.newBuilder()
.setName(
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
.toString())
.setEtag("etag3123477")
.build();
metadataServiceClient.deleteEntity(request);
}
Name | Description |
request | DeleteEntityRequest The request object containing all of the parameters for the API call. |
deleteEntity(EntityName name)
public final void deleteEntity(EntityName name)
Delete a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
EntityName name = EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]");
metadataServiceClient.deleteEntity(name);
}
Name | Description |
name | EntityName Required. The resource name of the entity:
|
deleteEntity(String name)
public final void deleteEntity(String name)
Delete a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
String name =
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]").toString();
metadataServiceClient.deleteEntity(name);
}
Name | Description |
name | String Required. The resource name of the entity:
|
deleteEntityCallable()
public final UnaryCallable<DeleteEntityRequest,Empty> deleteEntityCallable()
Delete a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
DeleteEntityRequest request =
DeleteEntityRequest.newBuilder()
.setName(
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = metadataServiceClient.deleteEntityCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteEntityRequest,Empty> |
deletePartition(DeletePartitionRequest request)
public final void deletePartition(DeletePartitionRequest request)
Delete a metadata partition.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
DeletePartitionRequest request =
DeletePartitionRequest.newBuilder()
.setName(
PartitionName.of(
"[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]")
.toString())
.setEtag("etag3123477")
.build();
metadataServiceClient.deletePartition(request);
}
Name | Description |
request | DeletePartitionRequest The request object containing all of the parameters for the API call. |
deletePartition(PartitionName name)
public final void deletePartition(PartitionName name)
Delete a metadata partition.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
PartitionName name =
PartitionName.of(
"[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]");
metadataServiceClient.deletePartition(name);
}
Name | Description |
name | PartitionName Required. The resource name of the partition. format:
|
deletePartition(String name)
public final void deletePartition(String name)
Delete a metadata partition.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
String name =
PartitionName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]")
.toString();
metadataServiceClient.deletePartition(name);
}
Name | Description |
name | String Required. The resource name of the partition. format:
|
deletePartitionCallable()
public final UnaryCallable<DeletePartitionRequest,Empty> deletePartitionCallable()
Delete a metadata partition.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
DeletePartitionRequest request =
DeletePartitionRequest.newBuilder()
.setName(
PartitionName.of(
"[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = metadataServiceClient.deletePartitionCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeletePartitionRequest,Empty> |
getEntity(EntityName name)
public final Entity getEntity(EntityName name)
Get a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
EntityName name = EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]");
Entity response = metadataServiceClient.getEntity(name);
}
Name | Description |
name | EntityName Required. The resource name of the entity:
|
Type | Description |
Entity |
getEntity(GetEntityRequest request)
public final Entity getEntity(GetEntityRequest request)
Get a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
GetEntityRequest request =
GetEntityRequest.newBuilder()
.setName(
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
.toString())
.build();
Entity response = metadataServiceClient.getEntity(request);
}
Name | Description |
request | GetEntityRequest The request object containing all of the parameters for the API call. |
Type | Description |
Entity |
getEntity(String name)
public final Entity getEntity(String name)
Get a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
String name =
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]").toString();
Entity response = metadataServiceClient.getEntity(name);
}
Name | Description |
name | String Required. The resource name of the entity:
|
Type | Description |
Entity |
getEntityCallable()
public final UnaryCallable<GetEntityRequest,Entity> getEntityCallable()
Get a metadata entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
GetEntityRequest request =
GetEntityRequest.newBuilder()
.setName(
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
.toString())
.build();
ApiFuture<Entity> future = metadataServiceClient.getEntityCallable().futureCall(request);
// Do something.
Entity response = future.get();
}
Type | Description |
UnaryCallable<GetEntityRequest,Entity> |
getPartition(GetPartitionRequest request)
public final Partition getPartition(GetPartitionRequest request)
Get a metadata partition of an entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
GetPartitionRequest request =
GetPartitionRequest.newBuilder()
.setName(
PartitionName.of(
"[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]")
.toString())
.build();
Partition response = metadataServiceClient.getPartition(request);
}
Name | Description |
request | GetPartitionRequest The request object containing all of the parameters for the API call. |
Type | Description |
Partition |
getPartition(PartitionName name)
public final Partition getPartition(PartitionName name)
Get a metadata partition of an entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
PartitionName name =
PartitionName.of(
"[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]");
Partition response = metadataServiceClient.getPartition(name);
}
Name | Description |
name | PartitionName Required. The resource name of the partition:
|
Type | Description |
Partition |
getPartition(String name)
public final Partition getPartition(String name)
Get a metadata partition of an entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
String name =
PartitionName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]")
.toString();
Partition response = metadataServiceClient.getPartition(name);
}
Name | Description |
name | String Required. The resource name of the partition:
|
Type | Description |
Partition |
getPartitionCallable()
public final UnaryCallable<GetPartitionRequest,Partition> getPartitionCallable()
Get a metadata partition of an entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
GetPartitionRequest request =
GetPartitionRequest.newBuilder()
.setName(
PartitionName.of(
"[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]")
.toString())
.build();
ApiFuture<Partition> future =
metadataServiceClient.getPartitionCallable().futureCall(request);
// Do something.
Partition response = future.get();
}
Type | Description |
UnaryCallable<GetPartitionRequest,Partition> |
getSettings()
public final MetadataServiceSettings getSettings()
Type | Description |
MetadataServiceSettings |
getStub()
public MetadataServiceStub getStub()
Type | Description |
MetadataServiceStub |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listEntities(ListEntitiesRequest request)
public final MetadataServiceClient.ListEntitiesPagedResponse listEntities(ListEntitiesRequest request)
List metadata entities in a zone.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
ListEntitiesRequest request =
ListEntitiesRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
for (Entity element : metadataServiceClient.listEntities(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListEntitiesRequest The request object containing all of the parameters for the API call. |
Type | Description |
MetadataServiceClient.ListEntitiesPagedResponse |
listEntities(ZoneName parent)
public final MetadataServiceClient.ListEntitiesPagedResponse listEntities(ZoneName parent)
List metadata entities in a zone.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
for (Entity element : metadataServiceClient.listEntities(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | ZoneName Required. The resource name of the parent zone:
|
Type | Description |
MetadataServiceClient.ListEntitiesPagedResponse |
listEntities(String parent)
public final MetadataServiceClient.ListEntitiesPagedResponse listEntities(String parent)
List metadata entities in a zone.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString();
for (Entity element : metadataServiceClient.listEntities(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The resource name of the parent zone:
|
Type | Description |
MetadataServiceClient.ListEntitiesPagedResponse |
listEntitiesCallable()
public final UnaryCallable<ListEntitiesRequest,ListEntitiesResponse> listEntitiesCallable()
List metadata entities in a zone.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
ListEntitiesRequest request =
ListEntitiesRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
while (true) {
ListEntitiesResponse response = metadataServiceClient.listEntitiesCallable().call(request);
for (Entity element : response.getEntitiesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListEntitiesRequest,ListEntitiesResponse> |
listEntitiesPagedCallable()
public final UnaryCallable<ListEntitiesRequest,MetadataServiceClient.ListEntitiesPagedResponse> listEntitiesPagedCallable()
List metadata entities in a zone.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
ListEntitiesRequest request =
ListEntitiesRequest.newBuilder()
.setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
ApiFuture<Entity> future =
metadataServiceClient.listEntitiesPagedCallable().futureCall(request);
// Do something.
for (Entity element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListEntitiesRequest,ListEntitiesPagedResponse> |
listPartitions(EntityName parent)
public final MetadataServiceClient.ListPartitionsPagedResponse listPartitions(EntityName parent)
List metadata partitions of an entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
EntityName parent = EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]");
for (Partition element : metadataServiceClient.listPartitions(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | EntityName Required. The resource name of the parent entity:
|
Type | Description |
MetadataServiceClient.ListPartitionsPagedResponse |
listPartitions(ListPartitionsRequest request)
public final MetadataServiceClient.ListPartitionsPagedResponse listPartitions(ListPartitionsRequest request)
List metadata partitions of an entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
ListPartitionsRequest request =
ListPartitionsRequest.newBuilder()
.setParent(
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
for (Partition element : metadataServiceClient.listPartitions(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListPartitionsRequest The request object containing all of the parameters for the API call. |
Type | Description |
MetadataServiceClient.ListPartitionsPagedResponse |
listPartitions(String parent)
public final MetadataServiceClient.ListPartitionsPagedResponse listPartitions(String parent)
List metadata partitions of an entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
String parent =
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]").toString();
for (Partition element : metadataServiceClient.listPartitions(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The resource name of the parent entity:
|
Type | Description |
MetadataServiceClient.ListPartitionsPagedResponse |
listPartitionsCallable()
public final UnaryCallable<ListPartitionsRequest,ListPartitionsResponse> listPartitionsCallable()
List metadata partitions of an entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
ListPartitionsRequest request =
ListPartitionsRequest.newBuilder()
.setParent(
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
while (true) {
ListPartitionsResponse response =
metadataServiceClient.listPartitionsCallable().call(request);
for (Partition element : response.getPartitionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListPartitionsRequest,ListPartitionsResponse> |
listPartitionsPagedCallable()
public final UnaryCallable<ListPartitionsRequest,MetadataServiceClient.ListPartitionsPagedResponse> listPartitionsPagedCallable()
List metadata partitions of an entity.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
ListPartitionsRequest request =
ListPartitionsRequest.newBuilder()
.setParent(
EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
ApiFuture<Partition> future =
metadataServiceClient.listPartitionsPagedCallable().futureCall(request);
// Do something.
for (Partition element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListPartitionsRequest,ListPartitionsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateEntity(UpdateEntityRequest request)
public final Entity updateEntity(UpdateEntityRequest request)
Update a metadata entity. Only supports full resource update.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
UpdateEntityRequest request =
UpdateEntityRequest.newBuilder()
.setEntity(Entity.newBuilder().build())
.setValidateOnly(true)
.build();
Entity response = metadataServiceClient.updateEntity(request);
}
Name | Description |
request | UpdateEntityRequest The request object containing all of the parameters for the API call. |
Type | Description |
Entity |
updateEntityCallable()
public final UnaryCallable<UpdateEntityRequest,Entity> updateEntityCallable()
Update a metadata entity. Only supports full resource update.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
UpdateEntityRequest request =
UpdateEntityRequest.newBuilder()
.setEntity(Entity.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Entity> future = metadataServiceClient.updateEntityCallable().futureCall(request);
// Do something.
Entity response = future.get();
}
Type | Description |
UnaryCallable<UpdateEntityRequest,Entity> |