Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [metastore] added Admin Interface (v1) #9612

Merged
merged 2 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions java-dataproc-metastore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.16.0</version>
<version>26.18.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dataproc-metastore.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataproc-metastore/2.20.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataproc-metastore/2.21.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2535,6 +2535,297 @@ public final UnaryCallable<DeleteBackupRequest, Operation> deleteBackupCallable(
return stub.deleteBackupCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Query DPMS metadata.
*
* <p>Sample code:
*
* <pre>{@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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
* QueryMetadataRequest request =
* QueryMetadataRequest.newBuilder()
* .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
* .setQuery("query107944136")
* .build();
* QueryMetadataResponse response = dataprocMetastoreClient.queryMetadataAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<QueryMetadataResponse, OperationMetadata> queryMetadataAsync(
QueryMetadataRequest request) {
return queryMetadataOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Query DPMS metadata.
*
* <p>Sample code:
*
* <pre>{@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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
* QueryMetadataRequest request =
* QueryMetadataRequest.newBuilder()
* .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
* .setQuery("query107944136")
* .build();
* OperationFuture<QueryMetadataResponse, OperationMetadata> future =
* dataprocMetastoreClient.queryMetadataOperationCallable().futureCall(request);
* // Do something.
* QueryMetadataResponse response = future.get();
* }
* }</pre>
*/
public final OperationCallable<QueryMetadataRequest, QueryMetadataResponse, OperationMetadata>
queryMetadataOperationCallable() {
return stub.queryMetadataOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Query DPMS metadata.
*
* <p>Sample code:
*
* <pre>{@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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
* QueryMetadataRequest request =
* QueryMetadataRequest.newBuilder()
* .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
* .setQuery("query107944136")
* .build();
* ApiFuture<Operation> future =
* dataprocMetastoreClient.queryMetadataCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<QueryMetadataRequest, Operation> queryMetadataCallable() {
return stub.queryMetadataCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Move a table to another database.
*
* <p>Sample code:
*
* <pre>{@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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
* MoveTableToDatabaseRequest request =
* MoveTableToDatabaseRequest.newBuilder()
* .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
* .setTableName("tableName-1988717703")
* .setDbName("dbName-1339126743")
* .setDestinationDbName("destinationDbName-2077361705")
* .build();
* MoveTableToDatabaseResponse response =
* dataprocMetastoreClient.moveTableToDatabaseAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<MoveTableToDatabaseResponse, OperationMetadata>
moveTableToDatabaseAsync(MoveTableToDatabaseRequest request) {
return moveTableToDatabaseOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Move a table to another database.
*
* <p>Sample code:
*
* <pre>{@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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
* MoveTableToDatabaseRequest request =
* MoveTableToDatabaseRequest.newBuilder()
* .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
* .setTableName("tableName-1988717703")
* .setDbName("dbName-1339126743")
* .setDestinationDbName("destinationDbName-2077361705")
* .build();
* OperationFuture<MoveTableToDatabaseResponse, OperationMetadata> future =
* dataprocMetastoreClient.moveTableToDatabaseOperationCallable().futureCall(request);
* // Do something.
* MoveTableToDatabaseResponse response = future.get();
* }
* }</pre>
*/
public final OperationCallable<
MoveTableToDatabaseRequest, MoveTableToDatabaseResponse, OperationMetadata>
moveTableToDatabaseOperationCallable() {
return stub.moveTableToDatabaseOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Move a table to another database.
*
* <p>Sample code:
*
* <pre>{@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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
* MoveTableToDatabaseRequest request =
* MoveTableToDatabaseRequest.newBuilder()
* .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
* .setTableName("tableName-1988717703")
* .setDbName("dbName-1339126743")
* .setDestinationDbName("destinationDbName-2077361705")
* .build();
* ApiFuture<Operation> future =
* dataprocMetastoreClient.moveTableToDatabaseCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<MoveTableToDatabaseRequest, Operation> moveTableToDatabaseCallable() {
return stub.moveTableToDatabaseCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Alter metadata resource location. The metadata resource can be a database, table, or partition.
* This functionality only updates the parent directory for the respective metadata resource and
* does not transfer any existing data to the new location.
*
* <p>Sample code:
*
* <pre>{@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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
* AlterMetadataResourceLocationRequest request =
* AlterMetadataResourceLocationRequest.newBuilder()
* .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
* .setResourceName("resourceName-384566343")
* .setLocationUri("locationUri552310135")
* .build();
* AlterMetadataResourceLocationResponse response =
* dataprocMetastoreClient.alterMetadataResourceLocationAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<AlterMetadataResourceLocationResponse, OperationMetadata>
alterMetadataResourceLocationAsync(AlterMetadataResourceLocationRequest request) {
return alterMetadataResourceLocationOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Alter metadata resource location. The metadata resource can be a database, table, or partition.
* This functionality only updates the parent directory for the respective metadata resource and
* does not transfer any existing data to the new location.
*
* <p>Sample code:
*
* <pre>{@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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
* AlterMetadataResourceLocationRequest request =
* AlterMetadataResourceLocationRequest.newBuilder()
* .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
* .setResourceName("resourceName-384566343")
* .setLocationUri("locationUri552310135")
* .build();
* OperationFuture<AlterMetadataResourceLocationResponse, OperationMetadata> future =
* dataprocMetastoreClient
* .alterMetadataResourceLocationOperationCallable()
* .futureCall(request);
* // Do something.
* AlterMetadataResourceLocationResponse response = future.get();
* }
* }</pre>
*/
public final OperationCallable<
AlterMetadataResourceLocationRequest,
AlterMetadataResourceLocationResponse,
OperationMetadata>
alterMetadataResourceLocationOperationCallable() {
return stub.alterMetadataResourceLocationOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Alter metadata resource location. The metadata resource can be a database, table, or partition.
* This functionality only updates the parent directory for the respective metadata resource and
* does not transfer any existing data to the new location.
*
* <p>Sample code:
*
* <pre>{@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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
* AlterMetadataResourceLocationRequest request =
* AlterMetadataResourceLocationRequest.newBuilder()
* .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
* .setResourceName("resourceName-384566343")
* .setLocationUri("locationUri552310135")
* .build();
* ApiFuture<Operation> future =
* dataprocMetastoreClient.alterMetadataResourceLocationCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<AlterMetadataResourceLocationRequest, Operation>
alterMetadataResourceLocationCallable() {
return stub.alterMetadataResourceLocationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
Expand Down
Loading