Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Vous pouvez installer des composants supplémentaires comme Trino lorsque vous créez un cluster Dataproc à l'aide de la fonctionnalité Composants facultatifs. Cette page explique comment installer le composant Trino sur un cluster Dataproc.
Trino est un moteur de requêtes SQL Open Source distribué. Le serveur Trino et l'interface utilisateur Web sont disponibles par défaut sur le port 8060 (ou le port 7778 si Kerberos est activé) sur le premier nœud maître du cluster.
Par défaut, Trino sur Dataproc est configuré pour fonctionner avec les connecteursHive, BigQuery, Memory, TPCH et TPCDS.
Après avoir créé un cluster avec le composant Trino, vous pouvez exécuter des requêtes :
à partir d'une fenêtre de terminal sur le premier nœud maître du cluster à l'aide de l'interface de ligne de commande trino (voir Utiliser Trino avec Dataproc).
Installer le composant
Installez le composant lorsque vous créez un cluster Dataproc.
Consultez la section Versions Dataproc compatibles pour obtenir la version de composant incluse dans chaque version d'image Dataproc.
Console
Dans la console Google Cloud , accédez à la page Dataproc Créer un cluster.
Ajoutez l'option --properties à la commande gcloud dataproc clusters create pour définir les propriétés de configuration trino, trino-jvm et trino-catalog.
Propriétés de l'application : utilisez les propriétés du cluster avec le préfixe trino: pour configurer les propriétés de l'application Trino (par exemple, --properties="trino:join-distribution-type=AUTOMATIC").
Propriétés de configuration de la JVM : utilisez les propriétés du cluster avec le préfixe trino-jvm: pour configurer les propriétés de la JVM pour les processus Java des coordinateurs et des nœuds de calcul Trino, par exemple --properties="trino-jvm:XX:+HeapDumpOnOutOfMemoryError".
Créer des catalogues et ajouter des propriétés de catalogue : utilisez trino-catalog:catalog-name.property-name pour configurer les catalogues Trino.
Exemple : l'option "propriétés" suivante peut être utilisée avec la commande "gcloud dataproc clusters create" pour créer un cluster Trino avec un catalogue Hive "prodhive". Un fichier prodhive.properties sera créé sous /usr/lib/trino/etc/catalog/ pour activer le catalogue de prodhives.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eTrino, an open-source distributed SQL query engine, can be installed as an optional component when creating a Dataproc cluster.\u003c/p\u003e\n"],["\u003cp\u003eBy default, Trino on Dataproc is configured to work with Hive, BigQuery, Memory, TPCH, and TPCDS connectors.\u003c/p\u003e\n"],["\u003cp\u003eYou can run Trino queries using the \u003ccode\u003egcloud dataproc jobs submit trino\u003c/code\u003e command from a local terminal or the \u003ccode\u003etrino\u003c/code\u003e CLI on the cluster's master node.\u003c/p\u003e\n"],["\u003cp\u003eThe Trino Web UI is accessible via port 8060 (or 7778 if Kerberos is enabled) and can be accessed through the Component Gateway by enabling it during cluster creation.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the \u003ccode\u003egcloud dataproc clusters create\u003c/code\u003e command with specific flags to install Trino, enable the component gateway, and configure Trino application, JVM, and catalog properties.\u003c/p\u003e\n"]]],[],null,["You can install additional components like Trino when you create a Dataproc\ncluster using the\n[Optional components](/dataproc/docs/concepts/components/overview#available_optional_components)\nfeature. This page describes how you can optionally install the Trino component\non a Dataproc cluster.\n\n[Trino](https://trino.io/) is an open\nsource distributed SQL query engine. The Trino server and\nWeb UI are by default available on port `8060` (or port `7778` if Kerberos is\nenabled) on the cluster's first master node.\n\nBy default, Trino on Dataproc is configured to work with `Hive`, `BigQuery`,\n`Memory`, `TPCH` and `TPCDS` [connectors](https://trino.io/docs/current/connector.html).\n\nAfter creating a cluster with the Trino component, you can run queries:\n\n- from a local terminal with the [`gcloud dataproc jobs submit trino`](/sdk/gcloud/reference/dataproc/jobs/submit/trino) command\n- from a terminal window on the cluster's first master node using the `trino` CLI (Command Line Interface)---see [Use Trino with Dataproc](/dataproc/docs/tutorials/trino-dataproc).\n\nInstall the component\n\nInstall the component when you create a Dataproc cluster.\n\nSee\n[Supported Dataproc versions](/dataproc/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions)\nfor the component version included in each Dataproc image release. \n\nConsole\n\n1. In the Google Cloud console, go to the Dataproc **Create a cluster** page.\n\n [Go to Create a cluster](https://console.cloud.google.com/dataproc/clustersAdd)\n\n The **Set up cluster** panel is selected.\n2. In the Components section:\n - In **Optional components**, select Trino and other optional components to install on your cluster.\n - Under Component Gateway, select Enable component gateway (see [Viewing and Accessing Component Gateway URLs](/dataproc/docs/concepts/accessing/dataproc-gateways#viewing_and_accessing_component_gateway_urls)).\n\ngcloud CLI\n\nTo create a Dataproc cluster that includes the Trino component,\nuse the\n[gcloud dataproc clusters create](/sdk/gcloud/reference/dataproc/clusters/create)\ncommand with the `--optional-components` flag. \n\n```\ngcloud dataproc clusters create CLUSTER_NAME \\\n --optional-components=TRINO \\\n --region=region \\\n --enable-component-gateway \\\n ... other flags\n \n```\nNotes:\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: The name of the cluster.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: A [Compute Engine region](/compute/docs/regions-zones#available) where the cluster will be located.\n\nConfiguring properties\n\nAdd the [`--properties`](/dataproc/docs/concepts/configuring-clusters/cluster-properties#how_the_properties_flag_works) flag to the\n`gcloud dataproc clusters create` command to set\n`trino`, `trino-jvm` and `trino-catalog`\nconfig properties.\n\n- **Application properties:** Use cluster properties with the `trino:` prefix to configure [Trino application properties](https://trino.io/docs/current/admin/properties.html)---for example, `--properties=\"trino:join-distribution-type=AUTOMATIC\"`.\n- **JVM configuration properties:** Use cluster properties with the `trino-jvm:` prefix to configure JVM properties for Trino coordinator and worker Java processes---for example, `--properties=\"trino-jvm:XX:+HeapDumpOnOutOfMemoryError\"`.\n- **Creating new catalogs and adding catalog properties:** Use `trino-catalog:`\u003cvar translate=\"no\"\u003ecatalog-name\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003eproperty-name\u003c/var\u003e to configure Trino catalogs.\n\n\n **Example:** The following \\`properties\\` flag can be used\n with the \\`gcloud dataproc clusters create\\` command to create a Trino cluster\n with a \"prodhive\" Hive catalog. A `prodhive.properties` file will\n be created under`/usr/lib/trino/etc/catalog/` to enable the\n prodhive catalog. \n\n ```\n --properties=\"trino-catalog:prodhive.connector.name=hive,trino-catalog:prodhive.hive.metastore.uri=thrift://localhost:9000\"\n ```\n\nREST API\n\nThe Trino component can be specified through the Dataproc API using\n[SoftwareConfig.Component](/dataproc/docs/reference/rest/v1/ClusterConfig#Component)\nas part of a\n[clusters.create](/dataproc/docs/reference/rest/v1/projects.regions.clusters/create)\nrequest.\n| Using the [Dataproc `v1` API](/dataproc/docs/reference/rest), set the [EndpointConfig.enableHttpPortAccess](/dataproc/docs/reference/rest/v1/ClusterConfig#endpointconfig) property to `true` as part of the clusters.create request to enable connecting to the Trino Web UI using the [Component Gateway](/dataproc/docs/concepts/accessing/dataproc-gateways)."]]