Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Ringkasan
Saat Anda membuat cluster Dataproc, aplikasi Apache Hive dan komponennya, termasuk metastore Hive, akan diinstal di cluster, dan sandi default akan ditetapkan dalam file hive-site.xml yang berada di node master cluster.
Sebaiknya tentukan sandi metastore Hive Anda sendiri untuk mencapai sasaran berikut:
Sebagai langkah keamanan terbaik untuk memastikan Anda mengontrol akses ke metastore Hive lokal dengan memberikan sandi Anda sendiri
Untuk menentukan sandi yang diketahui yang mengontrol akses ke metastore Hive eksternal yang digunakan dengan database eksternal yang dibagikan di antara berbagai cluster
Dataproc tidak mendukung skenario metastore Hive berikut,
terlepas dari apakah Anda menggunakan sandi metastore Hive default atau yang disediakan pengguna:
Anda menggunakan klien metastore tersemat di driver Spark yang berjalan dalam mode cluster,
sehingga node pekerja memerlukan sandi Hive. Skenario ini dapat menyebabkan masalah konektivitas dengan database metastore karena koneksi tidak dilakukan melalui proses HiveMetaStore yang berjalan di node master Dataproc.
Anda menonaktifkan metastore Hive dan hive-server2 untuk menggunakan database MySQL Anda sendiri.
Dalam skenario ini, properti
spark.hadoop.javax.jdo.option.ConnectionURL=jdbc:mysql://CLUSTER_NAME-m/metastore
tidak berpengaruh.
[[["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-09-02 UTC."],[[["\u003cp\u003eDataproc clusters install Hive, including its metastore, with a default password, which is modifiable during cluster creation.\u003c/p\u003e\n"],["\u003cp\u003eSpecifying a custom Hive metastore password enhances security and controls access to both local and external Hive metastores shared across clusters.\u003c/p\u003e\n"],["\u003cp\u003eYou can set the Hive metastore password during cluster creation using the \u003ccode\u003egcloud dataproc clusters create\u003c/code\u003e command with the \u003ccode\u003ehive:javax.jdo.option.ConnectionPassword\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe custom Hive metastore password is only stored on the master node(s) of the Dataproc cluster, not on worker nodes.\u003c/p\u003e\n"],["\u003cp\u003eDataproc does not support embedded metastore clients in the Spark driver or deactivation of the hive metastore to use a custom MySQL database.\u003c/p\u003e\n"]]],[],null,["| **Objective:** Replace the default Hive metastore password when you create a Dataproc cluster for added security.\n\nOverview\n\nWhen you create a Dataproc cluster, the Apache Hive application and its\ncomponents, including Hive metastore, are installed on the cluster, and\na default password is set in the `hive-site.xml` file located on the\ncluster master node.\n\nSpecifying your own Hive metastore password is recommended to accomplish the\nfollowing goals:\n\n- As a best-practice security measure to ensure you control access to the\n local Hive metastore by providing your own password\n\n- To specify a known password that controls access to external\n Hive metastores used with external databases that are shared among different\n clusters\n\nSet the Hive metastore password\n\nRun the following\n[Google Cloud CLI Dataproc clusters create](/sdk/gcloud/reference/dataproc/clusters/create)\ncommand to create a Dataproc cluster and specify a Hive\nmetastore password. \n\n```\ngcloud dataproc clusters create cluster-name\n --properties=\"hive:javax.jdo.option.ConnectionPassword=HIVE_METASTORE_PASSWORD\"\n```\n\nNotes:\n\n- See [Create a key](/kms/docs/create-key) to create a key in Cloud Key Management Service.\n- The Hive metastore password is stored only on cluster master node(s), not on worker nodes.\n\nFor additional information on securing Dataproc clusters see\n[Dataproc security best practices](/dataproc/docs/concepts/security-best-practices).\n\nUnsupported Scenarios\n\nDataproc does not support the following Hive metastore scenarios,\nregardless of whether you use the default or a user-supplied Hive metastore password:\n\n- You use an embedded metastore client in the Spark driver running in cluster mode,\n so that the worker nodes require Hive passwords. This scenario can cause\n connectivity problems with the metastore database since the connection\n is not made through the `HiveMetaStore` process running on the\n Dataproc master node.\n\n- You deactivate Hive metastore and `hive-server2` to use your own MySQL database.\n In this scenario, the\n `spark.hadoop.javax.jdo.option.ConnectionURL=jdbc:mysql://`\u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e`-m/metastore`\n property has no effect."]]