- 0.64.0 (latest)
- 0.63.0
- 0.62.0
- 0.61.0
- 0.60.0
- 0.58.0
- 0.56.0
- 0.55.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
| GitHub Repository | Product Reference |
Service Description: BigLake Metastore is a serverless, highly available, multi-tenant runtime metastore for Google Cloud Data Analytics products.
The BigLake Metastore API defines the following resource model:
- A collection of Google Cloud projects:
/projects/* - Each project has a collection of available locations:
/locations/* - Each location has a collection of catalogs:
/catalogs/* - Each catalog has a collection of databases:
/databases/* - Each database has a collection of tables:
/tables/*
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 and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Catalog catalog = Catalog.newBuilder().build();
String catalogId = "catalogId1455933204";
Catalog response = metastoreServiceClient.createCatalog(parent, catalog, catalogId);
}
Note: close() needs to be called on the MetastoreServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
CreateCatalog |
Creates a new catalog. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteCatalog |
Deletes an existing catalog specified by the catalog ID. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetCatalog |
Gets the catalog specified by the resource name. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListCatalogs |
List all catalogs in a specified project. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDatabase |
Creates a new database. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDatabase |
Deletes an existing database specified by the database ID. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDatabase |
Updates an existing database specified by the database ID. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDatabase |
Gets the database specified by the resource name. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDatabases |
List all databases in a specified catalog. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTable |
Creates a new table. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTable |
Deletes an existing table specified by the table ID. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTable |
Updates an existing table specified by the table ID. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RenameTable |
Renames an existing table specified by the table ID. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTable |
Gets the table specified by the resource name. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTables |
List all tables in a specified database. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return 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 MetastoreServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
MetastoreServiceSettings metastoreServiceSettings =
MetastoreServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
MetastoreServiceClient metastoreServiceClient =
MetastoreServiceClient.create(metastoreServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
MetastoreServiceSettings metastoreServiceSettings =
MetastoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
MetastoreServiceClient metastoreServiceClient =
MetastoreServiceClient.create(metastoreServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
MetastoreServiceSettings metastoreServiceSettings =
MetastoreServiceSettings.newHttpJsonBuilder().build();
MetastoreServiceClient metastoreServiceClient =
MetastoreServiceClient.create(metastoreServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final MetastoreServiceClient create()Constructs an instance of MetastoreServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(MetastoreServiceSettings settings)
public static final MetastoreServiceClient create(MetastoreServiceSettings settings)Constructs an instance of MetastoreServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
MetastoreServiceSettings |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(MetastoreServiceStub stub)
public static final MetastoreServiceClient create(MetastoreServiceStub stub)Constructs an instance of MetastoreServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(MetastoreServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
MetastoreServiceStub |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient |
|
Constructors
MetastoreServiceClient(MetastoreServiceSettings settings)
protected MetastoreServiceClient(MetastoreServiceSettings settings)Constructs an instance of MetastoreServiceClient, 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.
| Parameter | |
|---|---|
| Name | Description |
settings |
MetastoreServiceSettings |
MetastoreServiceClient(MetastoreServiceStub stub)
protected MetastoreServiceClient(MetastoreServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
MetastoreServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
close()
public final void close()createCatalog(CreateCatalogRequest request)
public final Catalog createCatalog(CreateCatalogRequest request)Creates a new catalog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CreateCatalogRequest request =
CreateCatalogRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setCatalog(Catalog.newBuilder().build())
.setCatalogId("catalogId1455933204")
.build();
Catalog response = metastoreServiceClient.createCatalog(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateCatalogRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Catalog |
|
createCatalog(LocationName parent, Catalog catalog, String catalogId)
public final Catalog createCatalog(LocationName parent, Catalog catalog, String catalogId)Creates a new catalog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Catalog catalog = Catalog.newBuilder().build();
String catalogId = "catalogId1455933204";
Catalog response = metastoreServiceClient.createCatalog(parent, catalog, catalogId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource where this catalog will be created. Format: projects/{project_id_or_number}/locations/{location_id} |
catalog |
CatalogRequired. The catalog to create. The |
catalogId |
StringRequired. The ID to use for the catalog, which will become the final component of the catalog's resource name. |
| Returns | |
|---|---|
| Type | Description |
Catalog |
|
createCatalog(String parent, Catalog catalog, String catalogId)
public final Catalog createCatalog(String parent, Catalog catalog, String catalogId)Creates a new catalog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Catalog catalog = Catalog.newBuilder().build();
String catalogId = "catalogId1455933204";
Catalog response = metastoreServiceClient.createCatalog(parent, catalog, catalogId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this catalog will be created. Format: projects/{project_id_or_number}/locations/{location_id} |
catalog |
CatalogRequired. The catalog to create. The |
catalogId |
StringRequired. The ID to use for the catalog, which will become the final component of the catalog's resource name. |
| Returns | |
|---|---|
| Type | Description |
Catalog |
|
createCatalogCallable()
public final UnaryCallable<CreateCatalogRequest,Catalog> createCatalogCallable()Creates a new catalog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CreateCatalogRequest request =
CreateCatalogRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setCatalog(Catalog.newBuilder().build())
.setCatalogId("catalogId1455933204")
.build();
ApiFuture<Catalog> future =
metastoreServiceClient.createCatalogCallable().futureCall(request);
// Do something.
Catalog response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateCatalogRequest,Catalog> |
|
createDatabase(CatalogName parent, Database database, String databaseId)
public final Database createDatabase(CatalogName parent, Database database, String databaseId)Creates a new database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
Database database = Database.newBuilder().build();
String databaseId = "databaseId1688905718";
Database response = metastoreServiceClient.createDatabase(parent, database, databaseId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
CatalogNameRequired. The parent resource where this database will be created. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id} |
database |
DatabaseRequired. The database to create. The |
databaseId |
StringRequired. The ID to use for the database, which will become the final component of the database's resource name. |
| Returns | |
|---|---|
| Type | Description |
Database |
|
createDatabase(CreateDatabaseRequest request)
public final Database createDatabase(CreateDatabaseRequest request)Creates a new database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CreateDatabaseRequest request =
CreateDatabaseRequest.newBuilder()
.setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
.setDatabase(Database.newBuilder().build())
.setDatabaseId("databaseId1688905718")
.build();
Database response = metastoreServiceClient.createDatabase(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateDatabaseRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Database |
|
createDatabase(String parent, Database database, String databaseId)
public final Database createDatabase(String parent, Database database, String databaseId)Creates a new database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
Database database = Database.newBuilder().build();
String databaseId = "databaseId1688905718";
Database response = metastoreServiceClient.createDatabase(parent, database, databaseId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this database will be created. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id} |
database |
DatabaseRequired. The database to create. The |
databaseId |
StringRequired. The ID to use for the database, which will become the final component of the database's resource name. |
| Returns | |
|---|---|
| Type | Description |
Database |
|
createDatabaseCallable()
public final UnaryCallable<CreateDatabaseRequest,Database> createDatabaseCallable()Creates a new database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CreateDatabaseRequest request =
CreateDatabaseRequest.newBuilder()
.setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
.setDatabase(Database.newBuilder().build())
.setDatabaseId("databaseId1688905718")
.build();
ApiFuture<Database> future =
metastoreServiceClient.createDatabaseCallable().futureCall(request);
// Do something.
Database response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateDatabaseRequest,Database> |
|
createTable(CreateTableRequest request)
public final Table createTable(CreateTableRequest request)Creates a new table.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CreateTableRequest request =
CreateTableRequest.newBuilder()
.setParent(
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString())
.setTable(Table.newBuilder().build())
.setTableId("tableId-1552905847")
.build();
Table response = metastoreServiceClient.createTable(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateTableRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Table |
|
createTable(DatabaseName parent, Table table, String tableId)
public final Table createTable(DatabaseName parent, Table table, String tableId)Creates a new table.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DatabaseName parent = DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]");
Table table = Table.newBuilder().build();
String tableId = "tableId-1552905847";
Table response = metastoreServiceClient.createTable(parent, table, tableId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
DatabaseNameRequired. The parent resource where this table will be created. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id} |
table |
TableRequired. The table to create. The |
tableId |
StringRequired. The ID to use for the table, which will become the final component of the table's resource name. |
| Returns | |
|---|---|
| Type | Description |
Table |
|
createTable(String parent, Table table, String tableId)
public final Table createTable(String parent, Table table, String tableId)Creates a new table.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String parent =
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString();
Table table = Table.newBuilder().build();
String tableId = "tableId-1552905847";
Table response = metastoreServiceClient.createTable(parent, table, tableId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this table will be created. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id} |
table |
TableRequired. The table to create. The |
tableId |
StringRequired. The ID to use for the table, which will become the final component of the table's resource name. |
| Returns | |
|---|---|
| Type | Description |
Table |
|
createTableCallable()
public final UnaryCallable<CreateTableRequest,Table> createTableCallable()Creates a new table.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CreateTableRequest request =
CreateTableRequest.newBuilder()
.setParent(
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString())
.setTable(Table.newBuilder().build())
.setTableId("tableId-1552905847")
.build();
ApiFuture<Table> future = metastoreServiceClient.createTableCallable().futureCall(request);
// Do something.
Table response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateTableRequest,Table> |
|
deleteCatalog(CatalogName name)
public final Catalog deleteCatalog(CatalogName name)Deletes an existing catalog specified by the catalog ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CatalogName name = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
Catalog response = metastoreServiceClient.deleteCatalog(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
CatalogNameRequired. The name of the catalog to delete. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id} |
| Returns | |
|---|---|
| Type | Description |
Catalog |
|
deleteCatalog(DeleteCatalogRequest request)
public final Catalog deleteCatalog(DeleteCatalogRequest request)Deletes an existing catalog specified by the catalog ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DeleteCatalogRequest request =
DeleteCatalogRequest.newBuilder()
.setName(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
.build();
Catalog response = metastoreServiceClient.deleteCatalog(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteCatalogRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Catalog |
|
deleteCatalog(String name)
public final Catalog deleteCatalog(String name)Deletes an existing catalog specified by the catalog ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String name = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
Catalog response = metastoreServiceClient.deleteCatalog(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the catalog to delete. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id} |
| Returns | |
|---|---|
| Type | Description |
Catalog |
|
deleteCatalogCallable()
public final UnaryCallable<DeleteCatalogRequest,Catalog> deleteCatalogCallable()Deletes an existing catalog specified by the catalog ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DeleteCatalogRequest request =
DeleteCatalogRequest.newBuilder()
.setName(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
.build();
ApiFuture<Catalog> future =
metastoreServiceClient.deleteCatalogCallable().futureCall(request);
// Do something.
Catalog response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteCatalogRequest,Catalog> |
|
deleteDatabase(DatabaseName name)
public final Database deleteDatabase(DatabaseName name)Deletes an existing database specified by the database ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DatabaseName name = DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]");
Database response = metastoreServiceClient.deleteDatabase(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
DatabaseNameRequired. The name of the database to delete. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id} |
| Returns | |
|---|---|
| Type | Description |
Database |
|
deleteDatabase(DeleteDatabaseRequest request)
public final Database deleteDatabase(DeleteDatabaseRequest request)Deletes an existing database specified by the database ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DeleteDatabaseRequest request =
DeleteDatabaseRequest.newBuilder()
.setName(
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString())
.build();
Database response = metastoreServiceClient.deleteDatabase(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteDatabaseRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Database |
|
deleteDatabase(String name)
public final Database deleteDatabase(String name)Deletes an existing database specified by the database ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String name =
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString();
Database response = metastoreServiceClient.deleteDatabase(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the database to delete. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id} |
| Returns | |
|---|---|
| Type | Description |
Database |
|
deleteDatabaseCallable()
public final UnaryCallable<DeleteDatabaseRequest,Database> deleteDatabaseCallable()Deletes an existing database specified by the database ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DeleteDatabaseRequest request =
DeleteDatabaseRequest.newBuilder()
.setName(
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString())
.build();
ApiFuture<Database> future =
metastoreServiceClient.deleteDatabaseCallable().futureCall(request);
// Do something.
Database response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteDatabaseRequest,Database> |
|
deleteTable(DeleteTableRequest request)
public final Table deleteTable(DeleteTableRequest request)Deletes an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DeleteTableRequest request =
DeleteTableRequest.newBuilder()
.setName(
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]")
.toString())
.build();
Table response = metastoreServiceClient.deleteTable(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteTableRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Table |
|
deleteTable(TableName name)
public final Table deleteTable(TableName name)Deletes an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
TableName name =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]");
Table response = metastoreServiceClient.deleteTable(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
TableNameRequired. The name of the table to delete. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id} |
| Returns | |
|---|---|
| Type | Description |
Table |
|
deleteTable(String name)
public final Table deleteTable(String name)Deletes an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String name =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]").toString();
Table response = metastoreServiceClient.deleteTable(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the table to delete. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id} |
| Returns | |
|---|---|
| Type | Description |
Table |
|
deleteTableCallable()
public final UnaryCallable<DeleteTableRequest,Table> deleteTableCallable()Deletes an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DeleteTableRequest request =
DeleteTableRequest.newBuilder()
.setName(
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]")
.toString())
.build();
ApiFuture<Table> future = metastoreServiceClient.deleteTableCallable().futureCall(request);
// Do something.
Table response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteTableRequest,Table> |
|
getCatalog(CatalogName name)
public final Catalog getCatalog(CatalogName name)Gets the catalog specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CatalogName name = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
Catalog response = metastoreServiceClient.getCatalog(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
CatalogNameRequired. The name of the catalog to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id} |
| Returns | |
|---|---|
| Type | Description |
Catalog |
|
getCatalog(GetCatalogRequest request)
public final Catalog getCatalog(GetCatalogRequest request)Gets the catalog specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
GetCatalogRequest request =
GetCatalogRequest.newBuilder()
.setName(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
.build();
Catalog response = metastoreServiceClient.getCatalog(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetCatalogRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Catalog |
|
getCatalog(String name)
public final Catalog getCatalog(String name)Gets the catalog specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String name = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
Catalog response = metastoreServiceClient.getCatalog(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the catalog to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id} |
| Returns | |
|---|---|
| Type | Description |
Catalog |
|
getCatalogCallable()
public final UnaryCallable<GetCatalogRequest,Catalog> getCatalogCallable()Gets the catalog specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
GetCatalogRequest request =
GetCatalogRequest.newBuilder()
.setName(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
.build();
ApiFuture<Catalog> future = metastoreServiceClient.getCatalogCallable().futureCall(request);
// Do something.
Catalog response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetCatalogRequest,Catalog> |
|
getDatabase(DatabaseName name)
public final Database getDatabase(DatabaseName name)Gets the database specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DatabaseName name = DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]");
Database response = metastoreServiceClient.getDatabase(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
DatabaseNameRequired. The name of the database to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id} |
| Returns | |
|---|---|
| Type | Description |
Database |
|
getDatabase(GetDatabaseRequest request)
public final Database getDatabase(GetDatabaseRequest request)Gets the database specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
GetDatabaseRequest request =
GetDatabaseRequest.newBuilder()
.setName(
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString())
.build();
Database response = metastoreServiceClient.getDatabase(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetDatabaseRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Database |
|
getDatabase(String name)
public final Database getDatabase(String name)Gets the database specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String name =
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString();
Database response = metastoreServiceClient.getDatabase(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the database to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id} |
| Returns | |
|---|---|
| Type | Description |
Database |
|
getDatabaseCallable()
public final UnaryCallable<GetDatabaseRequest,Database> getDatabaseCallable()Gets the database specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
GetDatabaseRequest request =
GetDatabaseRequest.newBuilder()
.setName(
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString())
.build();
ApiFuture<Database> future = metastoreServiceClient.getDatabaseCallable().futureCall(request);
// Do something.
Database response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetDatabaseRequest,Database> |
|
getSettings()
public final MetastoreServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
MetastoreServiceSettings |
|
getStub()
public MetastoreServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
MetastoreServiceStub |
|
getTable(GetTableRequest request)
public final Table getTable(GetTableRequest request)Gets the table specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
GetTableRequest request =
GetTableRequest.newBuilder()
.setName(
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]")
.toString())
.build();
Table response = metastoreServiceClient.getTable(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetTableRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Table |
|
getTable(TableName name)
public final Table getTable(TableName name)Gets the table specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
TableName name =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]");
Table response = metastoreServiceClient.getTable(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
TableNameRequired. The name of the table to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id} |
| Returns | |
|---|---|
| Type | Description |
Table |
|
getTable(String name)
public final Table getTable(String name)Gets the table specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String name =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]").toString();
Table response = metastoreServiceClient.getTable(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the table to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id} |
| Returns | |
|---|---|
| Type | Description |
Table |
|
getTableCallable()
public final UnaryCallable<GetTableRequest,Table> getTableCallable()Gets the table specified by the resource name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
GetTableRequest request =
GetTableRequest.newBuilder()
.setName(
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]")
.toString())
.build();
ApiFuture<Table> future = metastoreServiceClient.getTableCallable().futureCall(request);
// Do something.
Table response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetTableRequest,Table> |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listCatalogs(ListCatalogsRequest request)
public final MetastoreServiceClient.ListCatalogsPagedResponse listCatalogs(ListCatalogsRequest request)List all catalogs in a specified project.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
ListCatalogsRequest request =
ListCatalogsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Catalog element : metastoreServiceClient.listCatalogs(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListCatalogsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient.ListCatalogsPagedResponse |
|
listCatalogs(LocationName parent)
public final MetastoreServiceClient.ListCatalogsPagedResponse listCatalogs(LocationName parent)List all catalogs in a specified project.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Catalog element : metastoreServiceClient.listCatalogs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent, which owns this collection of catalogs. Format: projects/{project_id_or_number}/locations/{location_id} |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient.ListCatalogsPagedResponse |
|
listCatalogs(String parent)
public final MetastoreServiceClient.ListCatalogsPagedResponse listCatalogs(String parent)List all catalogs in a specified project.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Catalog element : metastoreServiceClient.listCatalogs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of catalogs. Format: projects/{project_id_or_number}/locations/{location_id} |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient.ListCatalogsPagedResponse |
|
listCatalogsCallable()
public final UnaryCallable<ListCatalogsRequest,ListCatalogsResponse> listCatalogsCallable()List all catalogs in a specified project.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
ListCatalogsRequest request =
ListCatalogsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListCatalogsResponse response = metastoreServiceClient.listCatalogsCallable().call(request);
for (Catalog element : response.getCatalogsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListCatalogsRequest,ListCatalogsResponse> |
|
listCatalogsPagedCallable()
public final UnaryCallable<ListCatalogsRequest,MetastoreServiceClient.ListCatalogsPagedResponse> listCatalogsPagedCallable()List all catalogs in a specified project.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
ListCatalogsRequest request =
ListCatalogsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Catalog> future =
metastoreServiceClient.listCatalogsPagedCallable().futureCall(request);
// Do something.
for (Catalog element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListCatalogsRequest,ListCatalogsPagedResponse> |
|
listDatabases(CatalogName parent)
public final MetastoreServiceClient.ListDatabasesPagedResponse listDatabases(CatalogName parent)List all databases in a specified catalog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
for (Database element : metastoreServiceClient.listDatabases(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
CatalogNameRequired. The parent, which owns this collection of databases. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id} |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient.ListDatabasesPagedResponse |
|
listDatabases(ListDatabasesRequest request)
public final MetastoreServiceClient.ListDatabasesPagedResponse listDatabases(ListDatabasesRequest request)List all databases in a specified catalog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
ListDatabasesRequest request =
ListDatabasesRequest.newBuilder()
.setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Database element : metastoreServiceClient.listDatabases(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListDatabasesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient.ListDatabasesPagedResponse |
|
listDatabases(String parent)
public final MetastoreServiceClient.ListDatabasesPagedResponse listDatabases(String parent)List all databases in a specified catalog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
for (Database element : metastoreServiceClient.listDatabases(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of databases. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id} |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient.ListDatabasesPagedResponse |
|
listDatabasesCallable()
public final UnaryCallable<ListDatabasesRequest,ListDatabasesResponse> listDatabasesCallable()List all databases in a specified catalog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
ListDatabasesRequest request =
ListDatabasesRequest.newBuilder()
.setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListDatabasesResponse response =
metastoreServiceClient.listDatabasesCallable().call(request);
for (Database element : response.getDatabasesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDatabasesRequest,ListDatabasesResponse> |
|
listDatabasesPagedCallable()
public final UnaryCallable<ListDatabasesRequest,MetastoreServiceClient.ListDatabasesPagedResponse> listDatabasesPagedCallable()List all databases in a specified catalog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
ListDatabasesRequest request =
ListDatabasesRequest.newBuilder()
.setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Database> future =
metastoreServiceClient.listDatabasesPagedCallable().futureCall(request);
// Do something.
for (Database element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDatabasesRequest,ListDatabasesPagedResponse> |
|
listTables(DatabaseName parent)
public final MetastoreServiceClient.ListTablesPagedResponse listTables(DatabaseName parent)List all tables in a specified database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
DatabaseName parent = DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]");
for (Table element : metastoreServiceClient.listTables(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
DatabaseNameRequired. The parent, which owns this collection of tables. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id} |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient.ListTablesPagedResponse |
|
listTables(ListTablesRequest request)
public final MetastoreServiceClient.ListTablesPagedResponse listTables(ListTablesRequest request)List all tables in a specified database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
ListTablesRequest request =
ListTablesRequest.newBuilder()
.setParent(
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setView(TableView.forNumber(0))
.build();
for (Table element : metastoreServiceClient.listTables(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListTablesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient.ListTablesPagedResponse |
|
listTables(String parent)
public final MetastoreServiceClient.ListTablesPagedResponse listTables(String parent)List all tables in a specified database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String parent =
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString();
for (Table element : metastoreServiceClient.listTables(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of tables. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id} |
| Returns | |
|---|---|
| Type | Description |
MetastoreServiceClient.ListTablesPagedResponse |
|
listTablesCallable()
public final UnaryCallable<ListTablesRequest,ListTablesResponse> listTablesCallable()List all tables in a specified database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
ListTablesRequest request =
ListTablesRequest.newBuilder()
.setParent(
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setView(TableView.forNumber(0))
.build();
while (true) {
ListTablesResponse response = metastoreServiceClient.listTablesCallable().call(request);
for (Table element : response.getTablesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTablesRequest,ListTablesResponse> |
|
listTablesPagedCallable()
public final UnaryCallable<ListTablesRequest,MetastoreServiceClient.ListTablesPagedResponse> listTablesPagedCallable()List all tables in a specified database.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
ListTablesRequest request =
ListTablesRequest.newBuilder()
.setParent(
DatabaseName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setView(TableView.forNumber(0))
.build();
ApiFuture<Table> future =
metastoreServiceClient.listTablesPagedCallable().futureCall(request);
// Do something.
for (Table element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTablesRequest,ListTablesPagedResponse> |
|
renameTable(RenameTableRequest request)
public final Table renameTable(RenameTableRequest request)Renames an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
RenameTableRequest request =
RenameTableRequest.newBuilder()
.setName(
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]")
.toString())
.setNewName(
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]")
.toString())
.build();
Table response = metastoreServiceClient.renameTable(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
RenameTableRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Table |
|
renameTable(TableName name, TableName newName)
public final Table renameTable(TableName name, TableName newName)Renames an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
TableName name =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]");
TableName newName =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]");
Table response = metastoreServiceClient.renameTable(name, newName);
}
| Parameters | |
|---|---|
| Name | Description |
name |
TableNameRequired. The table's |
newName |
TableNameRequired. The new |
| Returns | |
|---|---|
| Type | Description |
Table |
|
renameTable(TableName name, String newName)
public final Table renameTable(TableName name, String newName)Renames an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
TableName name =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]");
String newName =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]").toString();
Table response = metastoreServiceClient.renameTable(name, newName);
}
| Parameters | |
|---|---|
| Name | Description |
name |
TableNameRequired. The table's |
newName |
StringRequired. The new |
| Returns | |
|---|---|
| Type | Description |
Table |
|
renameTable(String name, TableName newName)
public final Table renameTable(String name, TableName newName)Renames an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String name =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]").toString();
TableName newName =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]");
Table response = metastoreServiceClient.renameTable(name, newName);
}
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The table's |
newName |
TableNameRequired. The new |
| Returns | |
|---|---|
| Type | Description |
Table |
|
renameTable(String name, String newName)
public final Table renameTable(String name, String newName)Renames an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
String name =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]").toString();
String newName =
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]").toString();
Table response = metastoreServiceClient.renameTable(name, newName);
}
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The table's |
newName |
StringRequired. The new |
| Returns | |
|---|---|
| Type | Description |
Table |
|
renameTableCallable()
public final UnaryCallable<RenameTableRequest,Table> renameTableCallable()Renames an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
RenameTableRequest request =
RenameTableRequest.newBuilder()
.setName(
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]")
.toString())
.setNewName(
TableName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[DATABASE]", "[TABLE]")
.toString())
.build();
ApiFuture<Table> future = metastoreServiceClient.renameTableCallable().futureCall(request);
// Do something.
Table response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<RenameTableRequest,Table> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateDatabase(Database database, FieldMask updateMask)
public final Database updateDatabase(Database database, FieldMask updateMask)Updates an existing database specified by the database ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
Database database = Database.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Database response = metastoreServiceClient.updateDatabase(database, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
database |
DatabaseRequired. The database to update. The database's |
updateMask |
FieldMaskThe list of fields to update. For the |
| Returns | |
|---|---|
| Type | Description |
Database |
|
updateDatabase(UpdateDatabaseRequest request)
public final Database updateDatabase(UpdateDatabaseRequest request)Updates an existing database specified by the database ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
UpdateDatabaseRequest request =
UpdateDatabaseRequest.newBuilder()
.setDatabase(Database.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Database response = metastoreServiceClient.updateDatabase(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateDatabaseRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Database |
|
updateDatabaseCallable()
public final UnaryCallable<UpdateDatabaseRequest,Database> updateDatabaseCallable()Updates an existing database specified by the database ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
UpdateDatabaseRequest request =
UpdateDatabaseRequest.newBuilder()
.setDatabase(Database.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Database> future =
metastoreServiceClient.updateDatabaseCallable().futureCall(request);
// Do something.
Database response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateDatabaseRequest,Database> |
|
updateTable(Table table, FieldMask updateMask)
public final Table updateTable(Table table, FieldMask updateMask)Updates an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
Table table = Table.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Table response = metastoreServiceClient.updateTable(table, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
table |
TableRequired. The table to update. The table's |
updateMask |
FieldMaskThe list of fields to update. For the |
| Returns | |
|---|---|
| Type | Description |
Table |
|
updateTable(UpdateTableRequest request)
public final Table updateTable(UpdateTableRequest request)Updates an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
UpdateTableRequest request =
UpdateTableRequest.newBuilder()
.setTable(Table.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Table response = metastoreServiceClient.updateTable(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateTableRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Table |
|
updateTableCallable()
public final UnaryCallable<UpdateTableRequest,Table> updateTableCallable()Updates an existing table specified by the table ID.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (MetastoreServiceClient metastoreServiceClient = MetastoreServiceClient.create()) {
UpdateTableRequest request =
UpdateTableRequest.newBuilder()
.setTable(Table.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Table> future = metastoreServiceClient.updateTableCallable().futureCall(request);
// Do something.
Table response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateTableRequest,Table> |
|