Stay organized with collections
Save and categorize content based on your preferences.
You can install additional components like Trino when you create a Dataproc
cluster using the
Optional components
feature. This page describes how you can optionally install the Trino component
on a Dataproc cluster.
Trino is an open
source distributed SQL query engine. The Trino server and
Web UI are by default available on port 8060 (or port 7778 if Kerberos is
enabled) on the cluster's first master node.
By default, Trino on Dataproc is configured to work with Hive, BigQuery,
Memory, TPCH and TPCDSconnectors.
After creating a cluster with the Trino component, you can run queries:
Add the --properties flag to the
gcloud dataproc clusters create command to set
trino, trino-jvm and trino-catalog
config properties.
Application properties: Use cluster properties with the
trino: prefix to configure
Trino application properties—for example, --properties="trino:join-distribution-type=AUTOMATIC".
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".
Creating new catalogs and adding catalog properties: Use
trino-catalog:catalog-name.property-name
to configure Trino catalogs.
Example: The following `properties` flag can be used
with the `gcloud dataproc clusters create` command to create a Trino cluster
with a "prodhive" Hive catalog. A prodhive.properties file will
be created under/usr/lib/trino/etc/catalog/ to enable the
prodhive catalog.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 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,["# Dataproc optional Trino component\n\nYou 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---------------------\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\n### Console\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\n### gcloud 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\n#### Configuring 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\n### REST 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)."]]