Untuk mendapatkan izin yang
diperlukan untuk memperbarui layanan Dataproc Metastore,
minta administrator Anda untuk memberi Anda
peran IAM berikut di project Anda, berdasarkan prinsip hak istimewa paling rendah:
Untuk mengetahui informasi selengkapnya tentang peran dan izin Dataproc Metastore tertentu, lihat Ringkasan IAM Dataproc Metastore.
Tentang memperbarui layanan
Anda dapat mengupdate parameter Dataproc Metastore berikut.
Transfer nomor. Perbarui nomor port TCP antarmuka Apache Thrift.
Tingkatan layanan. Beralih antara tingkat layanan Developer atau tingkat layanan Enterprise. Tingkatan ini memengaruhi kapasitas layanan.
Sinkronisasi Data Catalog. Aktifkan atau nonaktifkan fitur sinkronisasi Katalog Data.
Masa pemeliharaan. Ubah frekuensi masa pemeliharaan Anda, termasuk Hari dalam seminggu dan Jam dalam sehari.
Kerberos. Aktifkan atau nonaktifkan autentikasi Kerberos. Jika sebelumnya diaktifkan, Anda dapat memperbarui file konfigurasi Kerberos.
Konfigurasi metastore Hive. Perbarui lokasi direktori gudang Hive Anda.
Konfigurasi versi tambahan (Pratinjau). Aktifkan, nonaktifkan, atau tambahkan versi tambahan.
Label. Tambahkan atau hapus label opsional yang mendeskripsikan metadata Anda.
Faktor penskalaan. Ubah faktor penskalaan. Anda dapat mengaktifkan atau menonaktifkan penskalaan otomatis dan memperbarui faktor penskalaan minimum atau maksimum.
Mengupdate layanan
Sebelum menjalankan update, perhatikan pertimbangan berikut:
Anda hanya dapat menjalankan satu tugas update dalam satu waktu (untuk setiap layanan Dataproc Metastore).
Anda dapat memperbarui beberapa parameter dalam satu tugas pembaruan.
Anda tetap dapat menggunakan Dataproc Metastore saat diupdate.
Jika update berhasil, Dataproc Metastore akan otomatis memasuki status aktif. Jika update gagal,
layanan Dataproc Metastore akan di-roll back ke status sehat sebelumnya.
Petunjuk berikut menunjukkan cara mengupdate layanan Dataproc Metastore.
Konsol
Di konsol Google Cloud , buka halaman Dataproc Metastore:
LOCATION: Google Cloud Region tempat layanan Dataproc Metastore Anda berada.
PORT: Opsional: Port TCP antarmuka Thrift yang Anda gunakan dengan layanan Dataproc Metastore.
TIER: Opsional: Kapasitas tingkat layanan Dataproc Metastore Anda.
MAINTENANCE_WINDOW_DAY: Opsional: Hari dalam seminggu saat
periode layanan dimulai.
MAINTENANCE_WINDOW_HOUR: Opsional: Jam dalam sehari saat
periode layanan dimulai.
KERBEROS_PRINCIPAL: Opsional: Principal Kerberos yang ada di keytab dan KDC. Principal umum
berbentuk "primary/instance@REALM", tetapi tidak ada
format yang tepat.
KEYTAB: Opsional: File keytab Kerberos yang
digunakan untuk mengautentikasi nama utama layanan dengan Key
Distribution Center Kerberos.
KRB5_CONFIG: Opsional: File krb5.config
menentukan KDC dan informasi realm Kerberos, yang mencakup
lokasi KDC dan default untuk realm dan aplikasi
Kerberos.
[KEY, ...]: Opsional: Konfigurasi metastore Hive yang ingin Anda perbarui.
Jika variabel ada di kolom ini, nilainya akan diperbarui. Jika tidak, variabel baru akan dibuat.
Jika tanda ini disetel, -clear-hive-metastore-configs juga akan
disetel secara otomatis.
[KEY, ...]: Opsional: Konfigurasi metastore Hive yang ingin Anda hapus.
[KEY=VALUE, ...]: Opsional: Konfigurasi pasangan nilai kunci metastore Hive atau label yang ingin Anda perbarui.
[KEY, ...]: Opsional: Label atau
konfigurasi pasangan nilai kunci metastore Hive
yang ingin Anda hapus.
Jika direktori warehouse Hive Anda ada di Cloud Storage, Anda harus menetapkan penggantian konfigurasi Metastore. Penggantian ini menetapkan data warehouse spesifik Anda sebagai
direktori warehouse default untuk Dataproc Metastore
Sebelum Anda menyetel penggantian ini, pastikan layanan Dataproc Metastore Anda memiliki izin baca dan tulis objek untuk mengakses direktori gudang data.
Untuk mengetahui informasi selengkapnya, lihat Direktori gudang Hive.
Petunjuk berikut menunjukkan cara memperbarui penggantian konfigurasi Hive Metastore.
Konsol
Di konsol Google Cloud , buka halaman Dataproc Metastore:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-27 UTC."],[[["\u003cp\u003eThis guide outlines how to update your Dataproc Metastore service, allowing you to modify configuration settings and enable or disable optional features.\u003c/p\u003e\n"],["\u003cp\u003eYou can update parameters such as port number, service tier, Data Catalog sync, maintenance window, Kerberos, Hive metastore configurations, auxiliary version config, labels, and scaling factor, but some parameters require you to delete and recreate the service to modify.\u003c/p\u003e\n"],["\u003cp\u003eUpdating a service can be done via the Google Cloud console, the gcloud CLI, or REST API, and multiple parameters can be changed in a single update job without interrupting the service's operation.\u003c/p\u003e\n"],["\u003cp\u003eTo modify the Hive Metastore warehouse directory, you must set a Metastore config override with the \u003ccode\u003ehive.metastore.warehouse.dir\u003c/code\u003e key and your Cloud Storage directory as its value, and the service requires read and write permissions to access this directory.\u003c/p\u003e\n"],["\u003cp\u003eBefore updating, ensure you have the necessary IAM permissions, specifically \u003ccode\u003emetastore.services.update\u003c/code\u003e, which is included in the predefined \u003ccode\u003eroles/metastore.editor\u003c/code\u003e and \u003ccode\u003eroles/metastore.admin\u003c/code\u003e roles.\u003c/p\u003e\n"]]],[],null,["# Update a Dataproc Metastore service\n\nThis page explains how to update a Dataproc Metastore service.\n\nYou can update your Dataproc Metastore service to change\nconfiguration settings, or to enable or disable optional features.\n\nBefore you begin\n----------------\n\n- [Enable Dataproc Metastore in your project](/dataproc-metastore/docs/enable-service).\n- [Create a Dataproc Metastore service](/dataproc-metastore/docs/create-service).\n\n### Required roles\n\n\nTo get the permission that\nyou need to update a Dataproc Metastore service,\n\nask your administrator to grant you the\nfollowing IAM roles on your project, based on the principle of least privilege:\n\n- [Grant full control of Dataproc Metastore resources](/iam/docs/roles-permissions/metastore#metastore.editor) (`roles/metastore.editor`)\n- [Grant full access to all Dataproc Metastore resources, including IAM policy administration](/iam/docs/roles-permissions/metastore#metastore.admin) (`roles/metastore.admin`)\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nThis predefined role contains the\n` metastore.services.update`\npermission,\nwhich is required to\nupdate a Dataproc Metastore service.\n\n\nYou might also be able to get\nthis permission\nwith [custom roles](/iam/docs/creating-custom-roles) or\nother [predefined roles](/iam/docs/roles-overview#predefined).\nFor more information about specific Dataproc Metastore roles and permissions, see [Dataproc Metastore IAM overview](/dataproc-metastore/docs/iam-and-access-control).\n\n\u003cbr /\u003e\n\nAbout updating a service\n------------------------\n\nYou can update the following Dataproc Metastore parameters.\n\n- **Port number**. Update the TCP port number of the Apache Thrift interface.\n- **Service tier** . Switch between the **Developer** service tier or **Enterprise** service tier. These tiers influence the capacity of the service.\n- **Data Catalog sync**. Toggle the Data Catalog sync feature on or off.\n- **Maintenance window** . Change the frequency of your maintenance window, including **Day of week** and **Hour of day**.\n- **Kerberos**. Enable or disable Kerberos authentication. If previously enabled, you can update your Kerberos configuration files.\n- **Hive metastore configurations**. Update the location of your Hive warehouse directory.\n- **Auxiliary version config** ([Preview](/products#product-launch-stages)). Enable, disable, or add additional auxiliary versions.\n- **Labels**. Add or remove optional labels that describe your metadata.\n- **Scaling factor**. Change the scaling factor. You can enable or disable autoscaling and update the minimum or maximum scaling factors.\n\n| **Note:** To update other Dataproc Metastore parameters that aren't included in the previous list, you must [delete your service](/dataproc-metastore/docs/delete-service) and create a new one.\n\nUpdate a service\n----------------\n\nBefore running an update, note the following considerations:\n\n- You can only run a single update job at a time (for each Dataproc Metastore service).\n- You can update multiple parameters in a single update job.\n- You can still use your Dataproc Metastore while it's being updated.\n\nWhen the update succeeds, Dataproc Metastore automatically enters an [active](/dataproc-metastore/docs/reference/rest/v1/projects.locations.services#state) state. If the update fails,\nthen the Dataproc Metastore service rolls back to its previous healthy state.\n\nThe following instructions show you how to update a Dataproc Metastore\nservice. \n\n### Console\n\n1. In the Google Cloud console, open the **Dataproc Metastore** page:\n\n [Open Dataproc Metastore](https://console.cloud.google.com/dataproc/metastore/services)\n2. On the **Dataproc Metastore** page, click the service name of the\n service that you want to update.\n\n The **Service detail** page opens.\n The Dataproc Metastore Service detail page\n3. On the **Configuration** tab, click **Edit**.\n\n The **Edit service** page opens.\n4. Choose the values that you want to update for your service.\n\n5. Click **Submit**.\n\n Return to the **Dataproc Metastore** page, and\n verify that your service was successfully updated.\n\n### gcloud CLI\n\n1. To update a service, run the following [`gcloud metastore services update`](/sdk/gcloud/reference/metastore/services/update) command:\n\n ```\n gcloud metastore services update SERVICE \\\n --location=LOCATION \\\n --port=PORT \\\n --tier=TIER \\\n --maintenance-window-day=MAINTENANCE_WINDOW_DAY \\\n --maintenance-window-hour=MAINTENANCE_WINDOW_HOUR \\\n --kerberos_principal=KERBEROS_PRINCIPAL \\\n --keytab=KEYTAB \\\n --krb5-config=KRB5_CONFIG \\\n --update-hive-metastore-configs-from-file=[KEY=VALUE, ...] \\\n --clear-hive-metastore-configs \\\n --remove-hive-metastore-configs=[KEY, ...] \\\n --update-labels=[KEY=VALUE, ...] \\\n --clear-labels \\\n --remove-labels=[KEY, ...]\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e: The name of your Dataproc Metastore service.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: The Google Cloud region that your Dataproc Metastore service resides in.\n - \u003cvar translate=\"no\"\u003ePORT\u003c/var\u003e: Optional: The TCP port of the Thrift interface you're using with your Dataproc Metastore service.\n - \u003cvar translate=\"no\"\u003eTIER\u003c/var\u003e: Optional: The tier capacity of your Dataproc Metastore service.\n - \u003cvar translate=\"no\"\u003eMAINTENANCE_WINDOW_DAY\u003c/var\u003e: Optional: The day of week when the service window starts.\n - \u003cvar translate=\"no\"\u003eMAINTENANCE_WINDOW_HOUR\u003c/var\u003e: Optional: The hour of day when the service window starts.\n - \u003cvar translate=\"no\"\u003eKERBEROS_PRINCIPAL\u003c/var\u003e: Optional: A Kerberos principal that exists in both the keytab and the KDC. A typical principal is of the form \"primary/instance@REALM\", but there's no exact format.\n - \u003cvar translate=\"no\"\u003eKEYTAB\u003c/var\u003e: Optional: A Kerberos keytab file that is used to authenticate a service principal with a Kerberos Key Distribution Center.\n - \u003cvar translate=\"no\"\u003eKRB5_CONFIG\u003c/var\u003e: Optional: The krb5.config file specifies the KDC and the Kerberos realm information, which includes locations of KDCs and defaults for the realm and Kerberos applications.\n - \u003cvar translate=\"no\"\u003e[KEY, ...]\u003c/var\u003e: Optional: The Hive metastore configs you want to update. If a variable exists in this field, its value is updated. Otherwise, a new variable is created. If this flag is set, then `-clear-hive-metastore-configs` is automatically set as well.\n - \u003cvar translate=\"no\"\u003e[KEY, ...]\u003c/var\u003e: Optional: The Hive metastore configs you want to remove.\n - \u003cvar translate=\"no\"\u003e[KEY=VALUE, ...]\u003c/var\u003e: Optional: The labels or Hive metastore key-value pair configs you want to update.\n - \u003cvar translate=\"no\"\u003e[KEY, ...]\u003c/var\u003e: Optional: The labels or Hive metastore key-value pair configs you want to remove.\n2. Verify that the update was successful.\n\n### REST\n\nFollow the API instructions to [update a service](/dataproc-metastore/docs/reference/rest/v1/projects.locations.services/patch)\nby using the APIs Explorer.\n\nUpdate the Hive Metastore warehouse config\n------------------------------------------\n\nIf your Hive warehouse directory is on Cloud Storage, you should set a Metastore\nconfig override. This override sets your specific data warehouse as the\ndefault warehouse directory for Dataproc Metastore\n\nBefore you set this override, make sure that your Dataproc Metastore service\nhas object read and write permissions to access the warehouse directory.\nFor more information, see [Hive warehouse directory](/dataproc-metastore/docs/hive-metastore#hive-warehouse-dir).\n\nThe following instructions show you how to update a Hive Metastore config override. \n\n### Console\n\n1. In the Google Cloud console, open the Dataproc Metastore page:\n\n [Open Dataproc Metastore](https://console.cloud.google.com/dataproc/metastore/services)\n2. On the **Dataproc Metastore** page, click the service name of the\n service want to update.\n\n The **Service detail** page opens.\n3. On the **Configuration** tab, click **Edit**.\n\n The **Edit service** page opens.\n4. In the **Metastore config overrides**, enter the following:\n\n - **Key** : Enter the following value: `hive.metastore.warehouse.dir`.\n - **Value** : The Cloud Storage location of your warehouse directory. For example: `gs://my-bucket/path/to/location`.\n5. Click **Submit**.\n\n Return to the **Dataproc Metastore** page, and\n verify that your service was successfully updated.\n\n### gcloud\n\n1. To update a service, run the following `gcloud metastore services update` command:\n\n ```\n gcloud metastore services update SERVICE \\\n --location=LOCATION \\\n --update-hive-metastore-configs=\"hive.metastore.warehouse.dir=CUSTOMER_DIR\"\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e: The name of your Dataproc Metastore service.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: The Google Cloud region that your Dataproc Metastore service resides in.\n - \u003cvar translate=\"no\"\u003eCUSTOMER_DIR\u003c/var\u003e: The Cloud Storage location of your warehouse directory. For example: `gs://my-bucket/path/to/location`\n2. Verify that the update was successful.\n\nWhat's next\n-----------\n\n- [Cloud audit logging](/dataproc-metastore/docs/audit-logging)\n- [Dataproc Metastore IAM and access control](/dataproc-metastore/docs/iam-and-access-control)\n- [Service access](/dataproc-metastore/docs/access-service)"]]