선택적 구성요소 기능을 사용하여 Dataproc 클러스터를 만들 때 Solr과 같은 추가 구성요소를 설치할 수 있습니다. 이 페이지에서는 Solr 구성요소를 설명합니다.
Apache Solr 구성요소는 오픈소스 기반의 엔터프라이즈 검색 플랫폼입니다. Solr 서버 및 웹 UI는 클러스터의 마스터 노드에 있는 포트 8983에서 사용할 수 있습니다.
Solr 파일 유지: 기본적으로 Solr는 HDFS에서 색인 및 트랜잭션 로그 파일을 쓰고 읽습니다.
Solr 파일을 유지하려면 구성요소를 설치할 때dataproc:solr.gcs.path클러스터 속성을 설정하여 Cloud Storage 경로를 Solr 홈 디렉터리로 사용합니다.
구성요소 설치
Dataproc 클러스터를 만들 때 구성요소를 설치합니다.
구성요소는 Dataproc 버전 1.3 이상으로 만든 클러스터에 추가할 수 있습니다.
Solr 구성요소를 포함하는 Dataproc 클러스터를 만들려면 --optional-components 플래그와 함께 gcloud dataproc clusters createcluster-name 명령어를 사용합니다. 아래의 샘플 명령어는 선택적인 properties 플래그를 사용하여 Cloud Storage 경로를 Solr 홈 디렉터리로 설정합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-26(UTC)"],[[["\u003cp\u003eThe Apache Solr component, an open-source search platform, can be installed on Dataproc clusters, with the Solr server and Web UI accessible via port 8983 on the master node(s).\u003c/p\u003e\n"],["\u003cp\u003eSolr files can be persisted in Cloud Storage by setting the \u003ccode\u003edataproc:solr.gcs.path\u003c/code\u003e cluster property to a Cloud Storage path during cluster creation.\u003c/p\u003e\n"],["\u003cp\u003eThe Solr component is installed on the Dataproc cluster using the \u003ccode\u003egcloud dataproc clusters create\u003c/code\u003e command with the \u003ccode\u003e--optional-components=SOLR\u003c/code\u003e flag, and the \u003ccode\u003e--enable-component-gateway\u003c/code\u003e to access the component gateway.\u003c/p\u003e\n"],["\u003cp\u003eThe Solr component can be added via REST API with \u003ccode\u003eSoftwareConfig.Component\u003c/code\u003e, and by enabling \u003ccode\u003eEndpointConfig.enableHttpPortAccess\u003c/code\u003e to connect to the Solr Web UI using the Component Gateway.\u003c/p\u003e\n"],["\u003cp\u003eWhen creating a Dataproc cluster using the Google Cloud console, the Solr component and Component Gateway can be enabled within the Components section of the cluster setup.\u003c/p\u003e\n"]]],[],null,["You can install additional components like Solr when you create a Dataproc\ncluster using the\n[Optional components](/dataproc/docs/concepts/components/overview#available_optional_components)\nfeature. This page describes the Solr component.\n\nThe [Apache Solr](https://lucene.apache.org/solr/)\ncomponent is an open source enterprise search platform. The Solr server and\nWeb UI are available on port `8983` on the cluster's master node(s).\n\n**Persisting Solr files:** By default, Solr writes and reads the index and\ntransaction log files in\n[HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_design.html).\nTo persist Solr files, use a Cloud Storage path as the Solr home\ndirectory by setting the `dataproc:solr.gcs.path`\n[cluster property](/dataproc/docs/concepts/configuring-clusters/cluster-properties#dataproc-properties) when you [install the component](#install_the_component).\n\nInstall the component\n\nInstall the component when you create a Dataproc cluster.\nComponents can be added to clusters created with\nDataproc [version 1.3](/dataproc/docs/concepts/versioning/dataproc-release-1.3)\nand later.\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\ngcloud command\n\nTo create a Dataproc cluster that includes the Solr component,\nuse the\n[gcloud dataproc clusters create](/sdk/gcloud/reference/dataproc/clusters/create) \u003cvar translate=\"no\"\u003ecluster-name\u003c/var\u003e\ncommand with the `--optional-components` flag. The sample command below uses the optional `properties`\nflag to set a Cloud Storage path as the Solr home directory.\nWhen creating the cluster, use [gcloud dataproc clusters create](/sdk/gcloud/reference/dataproc/clusters/create) command with the `--enable-component-gateway` flag, as shown below, to enable connecting to the Solr Web UI using the [Component Gateway](/dataproc/docs/concepts/accessing/dataproc-gateways). \n\n```\ngcloud dataproc clusters create cluster-name \\\n --region=region \\\n --optional-components=SOLR \\\n --enable-component-gateway \\\n ... other flags\n```\nAdd the `--properties=\"dataproc:solr.gcs.path=gs://`\u003cvar translate=\"no\"\u003ebucket-name/\u003c/var\u003e`\"` [cluster property](/dataproc/docs/concepts/configuring-clusters/cluster-properties#service_properties) to the `gcloud dataproc clusters create` command to set a Cloud Storage bucket where Solr documents will be stored (Solr home directory).\n\nREST API\n\nThe Solr 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| As part of your `clusters.create` request, you can:\n|\n| 1. Set the [EndpointConfig.enableHttpPortAccess](/dataproc/docs/reference/rest/v1/ClusterConfig#EndpointConfig.description) property to `true` to enable connecting to the Solr Web UI using the [Component Gateway](/dataproc/docs/concepts/accessing/dataproc-gateways).\n| 2. Set the `\"dataproc:solr.gcs.path=gs://`\u003cvar translate=\"no\"\u003ebucket-name\u003c/var\u003e`\"` [cluster property](/dataproc/docs/concepts/configuring-clusters/cluster-properties#service_properties) in the [SoftwareConfig.Component.properties](/static/dataproc/docs/reference/rest/v1/ClusterConfig#SoftwareConfig.FIELDS.properties) field to set a Cloud Storage bucket where Solr documents will be stored (Solr home directory).\n\nConsole\n\n1. Enable the component and component gateway.\n - In the Google Cloud console, open the Dataproc [Create a cluster](https://console.cloud.google.com/dataproc/clustersAdd) page. The Set up cluster panel is selected.\n - In the Components section:\n - Under Optional components, select Solr 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))."]]