Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Übersicht
Wenn Sie einen Dataproc-Cluster erstellen, werden die Apache Hive-Anwendung und ihre Komponenten, einschließlich des Hive-Metastores, auf dem Cluster installiert und ein Standardpasswort wird in der Datei hive-site.xml auf dem Masterknoten des Clusters festgelegt.
Es wird empfohlen, ein eigenes Hive-Metastore-Passwort anzugeben, um die folgenden Ziele zu erreichen:
Als bewährte Sicherheitsmaßnahme, um den Zugriff auf den lokalen Hive-Metastore zu steuern, indem Sie Ihr eigenes Passwort angeben
Geben Sie ein bekanntes Passwort an, mit dem der Zugriff auf externe Hive-Metastores gesteuert wird, die mit externen Datenbanken verwendet werden, die von verschiedenen Clustern gemeinsam genutzt werden.
Dataproc unterstützt die folgenden Hive-Metastore-Szenarien nicht, unabhängig davon, ob Sie das Standardpasswort oder ein vom Nutzer angegebenes Hive-Metastore-Passwort verwenden:
Sie verwenden einen eingebetteten Metastore-Client im Spark-Treiber, der im Clustermodus ausgeführt wird. Daher benötigen die Worker-Knoten Hive-Passwörter. Dieses Szenario kann zu Verbindungsproblemen mit der Metastore-Datenbank führen, da die Verbindung nicht über den HiveMetaStore-Prozess auf dem Dataproc-Masterknoten hergestellt wird.
Sie deaktivieren den Hive-Metastore und hive-server2, um Ihre eigene MySQL-Datenbank zu verwenden.
In diesem Szenario hat die Property spark.hadoop.javax.jdo.option.ConnectionURL=jdbc:mysql://CLUSTER_NAME-m/metastore keine Auswirkungen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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."]]