The [Hive WebHCat](https://cwiki.apache.org/confluence/display/Hive/WebHCat) component lets you interact with HCatalog through a REST API. You can install WebHCat when you create a Managed Service for Apache Spark cluster by using the [Optional components](https://docs.cloud.google.com/managed-spark/docs/concepts/components/overview.md.txt#available_optional_components) feature. The REST service is available on port `50111` on the cluster's first master node.

## Install the component

Install the component when you create a Managed Service for Apache Spark cluster.
Components can be added to clusters created with
Managed Service for Apache Spark [version 1.3](https://docs.cloud.google.com/managed-spark/docs/concepts/versioning/dataproc-release-1.3)
and later.

See
[Supported Managed Service for Apache Spark versions](https://docs.cloud.google.com/managed-spark/docs/concepts/versioning/dataproc-versions#supported_cloud_dataproc_versions)
for the component version included in each Managed Service for Apache Spark image release.

### Google Cloud console

1. In the Google Cloud console, open [**Create cluster**](https://console.cloud.google.com/dataproc/clusters/create) page.
2. Click **Additional configuration** to expand that section.
3. Edit **Optional components**.
4. In the panel that opens, select the checkbox for **Hive WebHCat** , then click **Save**.

### gcloud CLI

To create a Managed Service for Apache Spark cluster that includes the Hive WebHCat component,
use the
[gcloud dataproc clusters create](https://docs.cloud.google.com/sdk/gcloud/reference/dataproc/clusters/create.md.txt) <var translate="no">cluster-name</var>
command with the `--optional-components` flag.

```
gcloud dataproc clusters create cluster-name \
    --optional-components=HIVE_WEBHCAT \
    --region=region \
    ... other args
```

### REST API

The Hive WebHCat component can be specified through the Dataproc API using [SoftwareConfig.Component](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/ClusterConfig.md.txt#Component) as part of a [clusters.create](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters/create.md.txt) request.