Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Metadaten aus Apache Hive für die Migration extrahieren
In diesem Dokument wird beschrieben, wie Sie mit dem Tool dwh-migration-dumper die erforderlichen Metadaten extrahieren, bevor Sie eine Migration von Apache Hive-Daten oder ‑Berechtigungen ausführen.
In diesem Dokument wird die Metadatenextraktion aus den folgenden Datenquellen behandelt:
Apache Hive
Apache Hadoop Distributed File System (HDFS)
Apache Ranger
Cloudera Manager
Apache Hive-Abfragelogs
Hinweise
Bevor Sie das Tool dwh-migration-dumper verwenden können, müssen Sie Folgendes tun:
Java installieren
Auf dem Server, auf dem Sie das dwh-migration-dumper-Tool ausführen möchten, muss Java 8 oder höher installiert sein. Ist dies nicht der Fall, laden Sie Java von der Java-Downloadseite herunter und installieren Sie es.
Erforderliche Berechtigungen
Das Nutzerkonto, das Sie für die Verbindung des dwh-migration-dumper-Tools mit dem Quellsystem angeben, muss Berechtigungen zum Lesen von Metadaten aus diesem System haben.
Prüfen Sie, ob dieses Konto die entsprechende Rollenmitgliedschaft hat, um die für Ihre Plattform verfügbaren Metadatenressourcen abzufragen. Beispielsweise ist INFORMATION_SCHEMA eine Metadatenressource, die mehrere Plattformen gemeinsam haben.
Installieren Sie das dwh-migration-dumper-Tool.
So installieren Sie das dwh-migration-dumper-Tool:
Ersetzen Sie RELEASE_ZIP_FILENAME durch den heruntergeladenen ZIP-Dateinamen des dwh-migration-dumper-Befehlszeilen-Extraktionstools, z. B. dwh-migration-tools-v1.0.52.zip.
Das Ergebnis True bestätigt die erfolgreiche Prüfsummenverifizierung.
Das Ergebnis False weist auf einen Überprüfungsfehler hin. Achten Sie darauf, dass die Prüfsumme und die ZIP-Dateien aus derselben Releaseversion heruntergeladen und im selben Verzeichnis gespeichert werden.
Extrahieren Sie die ZIP-Datei. Die Binärdatei des Extraktionstools befindet sich im Unterverzeichnis /bin des Ordners, der durch Extrahieren der ZIP-Datei erstellt wurde.
Aktualisieren Sie die Umgebungsvariable PATH so, dass sie den Installationspfad für das Extraktionstool enthält.
Metadaten für die Migration extrahieren
Wählen Sie eine der folgenden Optionen aus, um zu erfahren, wie Sie Metadaten für Ihre Datenquelle extrahieren:
Apache Hive
Führen Sie die Schritte im Abschnitt „Apache Hive“ unter Metadaten und Abfragelogs aus Ihrem Data Warehouse extrahieren aus, um Ihre Apache Hive-Metadaten zu extrahieren. Anschließend können Sie die Metadaten in den Cloud Storage-Bucket hochladen, der Ihre Migrationsdateien enthält.
HDFS
Führen Sie den folgenden Befehl aus, um Metadaten aus HDFS zu extrahieren. Verwenden Sie dazu das Tool dwh-migration-dumper.
HDFS-PORT: die Portnummer des HDFS-NameNode. Sie können dieses Argument überspringen, wenn Sie den 8020-Standardport verwenden.
MIGRATION-BUCKET: Der Cloud Storage-Bucket, den Sie zum Speichern der Migrationsdateien verwenden.
Mit diesem Befehl werden Metadaten aus HDFS in eine Datei namens hdfs-dumper-output.zip im Verzeichnis MIGRATION-BUCKET extrahiert.
Beim Extrahieren von Metadaten aus HDFS gibt es mehrere bekannte Einschränkungen:
Einige Aufgaben in diesem Connector sind optional und können fehlschlagen. In der Ausgabe wird dann ein vollständiger Stacktrace protokolliert. Solange die erforderlichen Aufgaben erfolgreich abgeschlossen wurden und die hdfs-dumper-output.zip generiert wurde, können Sie mit der HDFS-Migration fortfahren.
Der Extraktionsprozess kann fehlschlagen oder langsamer als erwartet ausgeführt werden, wenn die konfigurierte Threadpoolgröße zu groß ist. Wenn diese Probleme auftreten, empfehlen wir, die Threadpool-Größe mit dem Befehlszeilenargument --thread-pool-size zu verringern.
Apache Ranger
Führen Sie den folgenden Befehl aus, um Metadaten aus Apache Ranger mit dem Tool dwh-migration-dumper zu extrahieren.
RANGER-HOST: der Hostname der Apache Ranger-Instanz
RANGER-USER: Der Nutzername des Apache Ranger-Nutzers
RANGER-PASSWORD: Das Passwort des Apache Ranger-Nutzers.
RANGER-SCHEME: Gibt an, ob Apache Ranger http oder https verwendet. Der Standardwert ist http.
MIGRATION-BUCKET: Der Cloud Storage-Bucket, den Sie zum Speichern der Migrationsdateien verwenden.
Sie können auch die folgenden optionalen Flags einfügen:
--kerberos-auth-for-hadoop: Ersetzt --user und --password, wenn Apache Ranger durch Kerberos anstelle der einfachen Authentifizierung geschützt ist. Sie müssen den Befehl kinit vor dem Tool dwh-migration-dumper ausführen, um dieses Flag zu verwenden.
--ranger-disable-tls-validation: Fügen Sie dieses Flag ein, wenn das von der API verwendete HTTPS-Zertifikat selbstsigniert ist. Zum Beispiel bei Verwendung von Cloudera.
Mit diesem Befehl werden Metadaten aus Apache Ranger in eine Datei mit dem Namen ranger-dumper-output.zip im Verzeichnis MIGRATION-BUCKET extrahiert.
Cloudera
Führen Sie den folgenden Befehl aus, um Metadaten aus Cloudera mit dem Tool dwh-migration-dumper zu extrahieren.
CLOUDERA-USER: Der Nutzername des Cloudera-Nutzers.
CLOUDERA-PASSWORD: Das Passwort des Cloudera-Nutzers
MIGRATION-BUCKET: Der Cloud Storage-Bucket, den Sie zum Speichern der Migrationsdateien verwenden.
APPLICATION-TYPES: (Optional) Liste aller vorhandenen Anwendungstypen aus Hadoop YARN. Beispiel: SPARK, MAPREDUCE.
PAGE-SIZE: (Optional) Geben Sie an, wie viele Daten von Drittanbieterdiensten wie der Hadoop YARN API abgerufen werden. Der Standardwert ist 1000, was 1.000 Entitäten pro Anfrage entspricht.
Mit diesem Befehl werden Metadaten aus Cloudera in eine Datei mit dem Namen dwh-migration-cloudera.zip im Verzeichnis MIGRATION-BUCKET extrahiert.
Apache Hive-Abfragelogs
Führen Sie die Schritte im Abschnitt „Apache Hive“ unter Abfragelogs mit dem Logging-Hook hadoop-migration-assessment extrahieren aus, um Ihre Apache Hive-Abfragelogs zu extrahieren. Anschließend können Sie die Logs in den Cloud Storage-Bucket hochladen, der Ihre Migrationsdateien enthält.
Nächste Schritte
Mit den extrahierten Metadaten aus Hadoop können Sie die folgenden Aktionen ausführen:
[[["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-04 (UTC)."],[],[],null,["# Extracting metadata from Apache Hive for migration\n==================================================\n\n|\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n| **Note:** To get support or provide feedback for this feature, contact [bigquery-permission-migration-support@google.com](mailto:bigquery-permission-migration-support@google.com).\n\nThis document shows how you can use the `dwh-migration-dumper` tool to extract\nthe necessary metadata before running a Apache Hive data or permissions\nmigration.\n\nThis document covers metadata extraction from the following data sources:\n\n- Apache Hive\n- Apache Hadoop Distributed File System (HDFS)\n- Apache Ranger\n- Cloudera Manager\n- Apache Hive query logs\n\nBefore you begin\n----------------\n\nBefore you can use the `dwh-migration-dumper` tool, do the following:\n\n### Install Java\n\nThe server on which you plan to run `dwh-migration-dumper` tool must have\nJava 8 or higher installed. If it doesn't, download Java from the\n[Java downloads page](https://www.java.com/download/)\nand install it.\n\n### Required permissions\n\nThe user account that you specify for connecting the `dwh-migration-dumper` tool to\nthe source system must have permissions to read metadata from that system.\nConfirm that this account has appropriate role membership to query the metadata\nresources available for your platform. For example, `INFORMATION_SCHEMA` is a\nmetadata resource that is common across several platforms.\n\nInstall the `dwh-migration-dumper` tool\n---------------------------------------\n\nTo install the `dwh-migration-dumper` tool, follow these steps:\n\n1. On the machine where you want to run the `dwh-migration-dumper` tool, download the zip file from the [`dwh-migration-dumper` tool GitHub repository](https://github.com/google/dwh-migration-tools/releases/latest).\n2. To validate the `dwh-migration-dumper` tool zip file, download the\n [`SHA256SUMS.txt` file](https://github.com/google/dwh-migration-tools/releases/latest/download/SHA256SUMS.txt)\n and run the following command:\n\n ### Bash\n\n ```bash\n sha256sum --check SHA256SUMS.txt\n ```\n\n If verification fails, see [Troubleshooting](#corrupted_zip_file).\n\n ### Windows PowerShell\n\n ```bash\n (Get-FileHash RELEASE_ZIP_FILENAME).Hash -eq ((Get-Content SHA256SUMS.txt) -Split \" \")[0]\n ```\n\n Replace the \u003cvar translate=\"no\"\u003eRELEASE_ZIP_FILENAME\u003c/var\u003e with the downloaded\n zip filename of the `dwh-migration-dumper` command-line extraction tool release---for example,\n `dwh-migration-tools-v1.0.52.zip`\n\n The `True` result confirms successful checksum verification.\n\n The `False` result indicates verification error. Make sure the checksum and\n zip files are downloaded from the same release version and placed in the\n same directory.\n3. Extract the zip file. The extraction tool binary is in the\n `/bin` subdirectory of the folder created by extracting the zip file.\n\n4. Update the `PATH` environment variable to include the installation path for\n the extraction tool.\n\nExtracting metadata for migration\n---------------------------------\n\nSelect one of the following options to learn how to extract metadata for your\ndata source: \n\n### Apache Hive\n\nPerform the steps in the Apache Hive section [Extract metadata and query logs from your data warehouse](/bigquery/docs/migration-assessment#apache-hive)\nto extract your Apache Hive metadata. You can then upload the metadata\nto your Cloud Storage bucket containing your migration files.\n\n### HDFS\n\nRun the following command to extract extract metadata from HDFS\nusing the `dwh-migration-dumper` tool. \n\n dwh-migration-dumper \\\n --connector hdfs \\\n --host \u003cvar translate=\"no\"\u003eHDFS-HOST\u003c/var\u003e \\\n --port \u003cvar translate=\"no\"\u003eHDFS-PORT\u003c/var\u003e \\\n --output gs://\u003cvar translate=\"no\"\u003eMIGRATION-BUCKET\u003c/var\u003e/hdfs-dumper-output.zip \\\n --assessment \\\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eHDFS-HOST\u003c/var\u003e: the HDFS NameNode hostname\n- \u003cvar translate=\"no\"\u003eHDFS-PORT\u003c/var\u003e: the HDFS NameNode port number. You can skip this argument if you are using the default `8020` port.\n- \u003cvar translate=\"no\"\u003eMIGRATION-BUCKET\u003c/var\u003e: the Cloud Storage bucket that you are using to store the migration files.\n\nThis command extracts metadata from HDFS to a\nfile named `hdfs-dumper-output.zip` in the \u003cvar translate=\"no\"\u003eMIGRATION-BUCKET\u003c/var\u003e\ndirectory.\n\nThere are several known limitations when extracting metadata from HDFS:\n\n- Some tasks in this connector are optional and can fail, logging a full stack trade in the output. As long as the required tasks have succeeded and the `hdfs-dumper-output.zip` is generated, then you can proceed with the HDFS migration.\n- The extraction process might fail or run slower than expected if the configured thread pool size is too large. If you are encountering these issues, we recommend decreasing the thread pool size using the command line argument `--thread-pool-size`.\n\n### Apache Ranger\n\nRun the following command to extract extract metadata from Apache Ranger\nusing the `dwh-migration-dumper` tool. \n\n dwh-migration-dumper \\\n --connector ranger \\\n --host \u003cvar translate=\"no\"\u003eRANGER-HOST\u003c/var\u003e \\\n --port 6080 \\\n --user \u003cvar translate=\"no\"\u003eRANGER-USER\u003c/var\u003e \\\n --password \u003cvar translate=\"no\"\u003eRANGER-PASSWORD\u003c/var\u003e \\\n --ranger-scheme \u003cvar translate=\"no\"\u003eRANGER-SCHEME\u003c/var\u003e \\\n --output gs://\u003cvar translate=\"no\"\u003eMIGRATION-BUCKET\u003c/var\u003e/ranger-dumper-output.zip \\\n --assessment \\\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eRANGER-HOST\u003c/var\u003e: the hostname of the Apache Ranger instance\n- \u003cvar translate=\"no\"\u003eRANGER-USER\u003c/var\u003e: the username of the Apache Ranger user\n- \u003cvar translate=\"no\"\u003eRANGER-PASSWORD\u003c/var\u003e: the password of the Apache Ranger user\n- \u003cvar translate=\"no\"\u003eRANGER-SCHEME\u003c/var\u003e: specify if Apache Ranger is using `http` or `https`. Default value is `http`.\n- \u003cvar translate=\"no\"\u003eMIGRATION-BUCKET\u003c/var\u003e: the Cloud Storage bucket that you are using to store the migration files.\n\nYou can also include the following optional flags:\n\n- `--kerberos-auth-for-hadoop`: replaces `--user` and `--password`, if Apache Ranger is protected by kerberos instead of basic authentication. You must run the `kinit` command before the `dwh-migration-dumper` tool tool to use this flag.\n- `--ranger-disable-tls-validation`: include this flag if the https certificate used by the API is self signed. For example, when using Cloudera.\n\nThis command extracts metadata from Apache Ranger to a\nfile named `ranger-dumper-output.zip` in the \u003cvar translate=\"no\"\u003eMIGRATION-BUCKET\u003c/var\u003e\ndirectory.\n\n### Cloudera\n\nRun the following command to extract metadata from Cloudera\nusing the `dwh-migration-dumper` tool. \n\n dwh-migration-dumper \\\n --connector cloudera-manager \\\n --url \u003cvar translate=\"no\"\u003eCLOUDERA-URL\u003c/var\u003e \\\n --user \u003cvar translate=\"no\"\u003eCLOUDERA-USER\u003c/var\u003e \\\n --password \u003cvar translate=\"no\"\u003eCLOUDERA-PASSWORD\u003c/var\u003e \\\n --output gs://\u003cvar translate=\"no\"\u003eMIGRATION-BUCKET\u003c/var\u003e/cloudera-dumper-output.zip \\\n --yarn-application-types \u003cvar translate=\"no\"\u003eAPPLICATION-TYPES\u003c/var\u003e \\\n --pagination-page-size \u003cvar translate=\"no\"\u003ePAGE-SIZE\u003c/var\u003e \\\n --assessment \\\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCLOUDERA-URL\u003c/var\u003e: the URL for Cloudera Manager\n- \u003cvar translate=\"no\"\u003eCLOUDERA-USER\u003c/var\u003e: the username of the Cloudera user\n- \u003cvar translate=\"no\"\u003eCLOUDERA-PASSWORD\u003c/var\u003e: the password of the Cloudera user\n- \u003cvar translate=\"no\"\u003eMIGRATION-BUCKET\u003c/var\u003e: the Cloud Storage bucket that you are using to store the migration files.\n- \u003cvar translate=\"no\"\u003eAPPLICATION-TYPES\u003c/var\u003e: (Optional) list of all existing application types from Hadoop YARN. For example, `SPARK, MAPREDUCE`.\n- \u003cvar translate=\"no\"\u003ePAGE-SIZE\u003c/var\u003e: (Optional) specify how much data is fetched from 3rd party services, like the Hadoop YARN API. The default value is `1000`, which represents 1000 entities per request.\n\nThis command extracts metadata from Cloudera to a\nfile named `dwh-migration-cloudera.zip` in the \u003cvar translate=\"no\"\u003eMIGRATION-BUCKET\u003c/var\u003e\ndirectory.\n\n### Apache Hive query logs\n\nPerform the steps in the Apache Hive section [Extract query logs with the `hadoop-migration-assessment` logging hook](/bigquery/docs/migration-assessment#apache-hive)\nto extract your Apache Hive query logs. You can then upload the logs\nto your Cloud Storage bucket containing your migration files.\n\nWhat's next\n-----------\n\nWith your extracted metadata from Hadoop, you can use\nthese metadata files to do the following:\n\n- [Migrate permissions from Hadoop](/bigquery/docs/hadoop-permissions-migration)\n- [Schedule a Hadoop transfer](/bigquery/docs/hadoop-transfer)"]]