Delete a Dataproc Metastore service

This page explains how to delete a Dataproc Metastore service.

You might want to delete your Dataproc Metastore service if you chose some configuration settings that can't be changed, such as the service name or the Hive metastore version.

Before you begin

Required roles

To get the permission that you need to delete a Dataproc Metastore service, ask your administrator to grant you the following IAM roles on your project, based on the principle of least privilege:

For more information about granting roles, see Manage access.

This predefined role contains the metastore.services.delete permission, which is required to delete a Dataproc Metastore service.

You might also be able to get this permission with custom roles or other predefined roles.

For more information about specific Dataproc Metastore roles and permissions, see Dataproc Metastore IAM overview.

Delete a service

The following instructions demonstrate how to delete a Dataproc Metastore service.

Considerations

  • Your Cloud Storage bucket isn't automatically deleted when you delete your Dataproc Metastore. To delete a bucket, see Deleting buckets.

  • After deleting a Dataproc Metastore, auto-created VPC Network Peering routes used by the service persist for up to 3 hours. Note that if any other Dataproc Metastore services continue to use these VPC Network Peering routes, they aren't deleted.

Console

  1. In the Google Cloud console, open the Dataproc Metastore page:

    Open Dataproc Metastore

  2. Select the service you want to delete.

  3. In the navigation bar, click Delete.

    A dialog opens.

  4. On the dialog, click Delete.

    Return to the Dataproc Metastore page, and verify that your deleted service no longer appears in the list.

You can also delete your service on the Service detail page.

  1. On the Dataproc Metastore page, click the service that you want to delete.

    The Service detail page for that service opens.

    Service detail page
  2. In the navigation bar, click Delete Service.

    A dialog opens.

  3. On the dialog, click Delete.

    Return to the Dataproc Metastore page, and verify that your deleted service no longer appears in the list.

gcloud CLI

  1. To delete a service, run the following gcloud metastore services delete command.

    gcloud metastore services delete SERVICE \
        --location=LOCATION
    

    Replace the following:

    • SERVICE: The name of the Dataproc Metastore service you're deleting.
    • LOCATION: The Google Cloud region that your Dataproc Metastore service resides in.
  2. Verify that the deletion was successful.

REST

Follow the API instructions to delete a service by using the APIs Explorer.

What's next