Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Puoi installare componenti aggiuntivi come Trino quando crei un cluster Dataproc utilizzando la funzionalità Componenti facoltativi. Questa pagina descrive come installare facoltativamente il componente Trino
su un cluster Dataproc.
Trino è un motore di query SQL distribuito in open source. Il server Trino e la UI web sono disponibili per impostazione predefinita sulla porta 8060 (o sulla porta 7778 se è abilitato Kerberos) sul primo nodo master del cluster.
Per impostazione predefinita, Trino su Dataproc è configurato per funzionare con i connettoriHive, BigQuery, Memory, TPCH e TPCDS.
Dopo aver creato un cluster con il componente Trino, puoi eseguire query:
da una finestra del terminale sul primo nodo master del cluster utilizzando l'interfaccia a riga di comando (CLI) trino. Per maggiori informazioni, consulta Utilizzare Trino con Dataproc.
Installa il componente
Installa il componente quando crei un cluster Dataproc.
Aggiungi il flag --properties al
comando gcloud dataproc clusters create per impostare
le proprietà di configurazione trino, trino-jvm e trino-catalog.
Proprietà dell'applicazione:utilizza le proprietà del cluster con il prefisso trino: per configurare le proprietà dell'applicazione Trino, ad esempio --properties="trino:join-distribution-type=AUTOMATIC".
Proprietà di configurazione JVM:utilizza le proprietà del cluster con il prefisso
trino-jvm: per configurare le proprietà JVM per i processi Java del coordinatore e del worker Trino, ad esempio --properties="trino-jvm:XX:+HeapDumpOnOutOfMemoryError".
Creazione di nuovi cataloghi e aggiunta di proprietà catalogo:utilizza
trino-catalog:catalog-name.property-name
per configurare i cataloghi Trino.
Esempio: il seguente flag `properties` può essere utilizzato
con il comando `gcloud dataproc clusters create` per creare un cluster Trino
con un catalogo Hive "prodhive". Un file prodhive.properties verrà
creato in /usr/lib/trino/etc/catalog/ per attivare
il catalogo prodhive.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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)."]]