Dataproc은 major.minor 버전을 최신 하위 부 버전 버전으로 결정합니다(2.0은 2.0.x로 결정됨). 참고: 클러스터에 특정 하위 부 버전을 사용해야 하는 경우 이를 지정할 수 있습니다(예: --image-version=2.0.x). 자세한 내용은 버전 관리 방식을 참조하세요.
Dataproc 미리보기 이미지 버전
새 마이너 버전의 Dataproc 이미지는 표준 마이너 이미지 버전 트랙에서 출시되기 전에 preview 버전에서 사용할 수 있습니다. 프로덕션에 표준 마이너 이미지 버전을 채택하기 전에 미리보기 이미지를 사용하여 새로운 마이너 이미지 버전에 대한 작업을 테스트하고 검증합니다.
자세한 내용은 Dataproc 버전 관리를 참조하세요.
필요한 경우 커스텀 이미지 사용
기본 Python 라이브러리, 보안 강화 또는 바이러스 보호 소프트웨어 등 클러스터에 추가할 종속 항목이 있는 경우 대상 마이너 이미지 버전 트랙의 최신 이미지에서 커스텀 이미지를 만듭니다. 이렇게 하면 커스텀 이미지를 사용하여 클러스터를 만들 때 종속 항목 요구사항을 충족할 수 있습니다. 커스텀 이미지를 다시 빌드하여 종속 항목 요구사항을 업데이트하는 경우 마이너 이미지 트랙 내에서 사용 가능한 최신 하위 마이너 이미지 버전을 사용합니다.
Dataproc 서비스에 작업 제출
gcloud CLI 또는 Google Cloud 콘솔을 사용하여 jobs.submit 호출로 작업을 Dataproc 서비스에 제출합니다. Dataproc 역할을 부여하여 작업 및 클러스터 권한을 설정합니다. 커스텀 역할을 사용하여 작업 제출 권한과 클러스터 액세스 권한을 분리합니다.
Dataproc 서비스에 작업을 제출할 때의 이점:
복잡한 네트워킹 설정이 필요 없음 - API에 대한 광범위한 연결
쉬운 IAM 권한 및 역할 관리
작업 상태 추적 - 결과를 복잡하게 만드는 Dataproc 작업 메타데이터가 없음
프로덕션에서 고정된 마이너 이미지 버전(예: --image-version=2.0)의 클러스터 수준 종속 항목에만 의존하는 작업을 실행합니다. 작업이 제출되면 종속 항목을 작업과 함께 번들로 묶습니다. Spark 또는 맵리듀스에 uber jar를 제출하는 것이 이를 위한 일반적인 방법입니다.
예를 들어 작업 jar이 args4j 및 spark-sql에 종속되고 작업에 해당하는 args4j 및 spark-sql 클러스터 수준 종속 항목이 있는 경우 작업의 uber jar에 args4j를 번들로 묶습니다.
초기화 작업 위치 제어
초기화 작업을 사용하면 Dataproc 클러스터를 만들 때 스크립트를 자동으로 실행하거나 구성요소를 설치할 수 있습니다(일반적인 Dataproc 초기화 작업은 dataproc-initialization-actions GitHub 저장소 참조).
프로덕션 환경에서 클러스터 초기화 작업을 사용할 때는 공개 저장소에서 소싱하는 대신 초기화 스크립트를 Cloud Storage에 복사합니다. 이렇게 하면 다른 사용자가 수정할 수 있는 초기화 스크립트를 실행하지 않아도 됩니다.
Dataproc 출시 노트 모니터링
Dataproc에서는 새로운 하위 마이너 이미지 버전을 정기적으로 출시합니다.
Dataproc 출시 노트를 확인하거나 구독하여 최신 Dataproc 이미지 버전 출시 및 기타 공지사항, 변경사항, 수정 사항을 파악하세요.
스테이징 버킷을 확인하여 오류 조사
클러스터의 스테이징 버킷에서 클러스터 및 작업 오류 메시지를 조사합니다.
일반적으로 다음 샘플 오류 메시지에서 굵게 표시된 텍스트처럼 스테이징 버킷 Cloud Storage 위치가 오류 메시지에 표시됩니다.
[[["이해하기 쉬움","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-27(UTC)"],[[["\u003cp\u003eThis document outlines Dataproc best practices for running reliable and efficient data processing jobs in production environments.\u003c/p\u003e\n"],["\u003cp\u003eFor production, specify a \u003ccode\u003emajor.minor\u003c/code\u003e Dataproc image version when creating a cluster to ensure consistency, and consider testing new minor versions with preview images beforehand.\u003c/p\u003e\n"],["\u003cp\u003eUse custom images to incorporate dependencies, security measures, or virus protection software, and regularly update these images to the latest sub-minor version.\u003c/p\u003e\n"],["\u003cp\u003eSubmit jobs to the Dataproc service for benefits like simplified networking, easy IAM management, and streamlined job status tracking, while bundling job-specific dependencies.\u003c/p\u003e\n"],["\u003cp\u003eMonitor Dataproc release notes for updates and use the cluster's staging bucket to diagnose cluster and job-related issues.\u003c/p\u003e\n"]]],[],null,["This document discusses Dataproc best practices that can help you\nrun reliable, efficient, and insightful data processing jobs on\nDataproc clusters in production environments.\n\nSpecify cluster image versions\n\nDataproc uses [image versions](/dataproc/docs/concepts/versioning/dataproc-versions)\nto bundle operating system, big data [components](/dataproc/docs/concepts/components/overview),\nand Google Cloud connectors into a package that is deployed on a cluster.\nIf you don't specify an image version when creating a cluster, Dataproc\ndefaults to the most recent stable image version.\n\nFor production environments, associate your cluster with a specific\n`major.minor` Dataproc image version, as\nshown in the following gcloud CLI command. \n\n```\ngcloud dataproc clusters create CLUSTER_NAME \\\n --region=region \\\n --image-version=2.0\n```\n\nDataproc resolves the `major.minor` version to the latest sub-minor version version\n(`2.0` is resolved to `2.0.x`). Note: if you need to rely on a specific sub-minor version for your cluster,\nyou can specify it: for example, `--image-version=2.0.x`. See\n[How versioning works](/dataproc/docs/concepts/versioning/overview#how_versioning_works) for\nmore information.\n| Each supported minor image version page, such as [2.0.x release versions](/dataproc/docs/concepts/versioning/dataproc-release-2.0), lists the component versions available with the current and previous four sub-minor image releases.\n\nDataproc preview image versions\n\nNew minor versions of Dataproc\nimages are available in a `preview` version prior to release\nin the standard minor image version track. Use a preview image\nto test and validate your jobs against a new minor image version\nprior to adopting the standard minor image version in production.\nSee [Dataproc versioning](/dataproc/docs/concepts/versioning/overview)\nfor more information.\n\nUse custom images when necessary\n\nIf you have dependencies to add to the cluster, such as native\nPython libraries, or security hardening or virus protection software,\n[create a custom image](/dataproc/docs/guides/dataproc-images) from the **latest image**\nin your target minor image version track. This practice allows you to meet dependency requirements\nwhen you create clusters using your custom image. When you rebuild your custom image to\nupdate dependency requirements, use the latest available sub-minor image version within the minor image track.\n\nSubmit jobs to the Dataproc service\n\nSubmit jobs to the Dataproc service with a\n[jobs.submit](/dataproc/docs/reference/rest/v1/projects.regions.jobs/submit)\ncall using the\n[gcloud CLI](/sdk/gcloud/reference/dataproc/jobs/submit)\nor the Google Cloud console. Set job and cluster permissions by granting\n[Dataproc roles](/dataproc/docs/concepts/iam/iam#roles). Use\ncustom roles to separate cluster access from job submit permissions.\n\nBenefits of submitting jobs to the Dataproc service:\n\n- No complicated networking settings required - the API is widely reachable\n- Easy to manage IAM permissions and roles\n- Track job status easily - no Dataproc job metadata to complicate results.\n\nIn production, run jobs that only depend on cluster-level\ndependencies at a fixed minor image version, (for example, `--image-version=2.0`). Bundle\ndependencies with jobs when the jobs are submitted. Submitting\nan [uber jar](https://imagej.net/Uber-JAR) to\nSpark or MapReduce is a common way to do this.\n\n- Example: If a job jar depends on `args4j` and `spark-sql`, with `args4j` specific to the job and `spark-sql` a cluster-level dependency, bundle `args4j` in the job's uber jar.\n\nControl initialization action locations\n\n[Initialization actions](/dataproc/docs/concepts/configuring-clusters/init-actions)\nallow you to automatically run scripts or install\ncomponents when you create a Dataproc cluster (see the\n[dataproc-initialization-actions](https://github.com/GoogleCloudPlatform/dataproc-initialization-actions)\nGitHub repository for common Dataproc initialization actions).\nWhen using cluster initialization actions in a production\nenvironment, copy initialization scripts to Cloud Storage\nrather than sourcing them from a public repository. This practice avoids running\ninitialization scripts that are subject to modification by others.\n\nMonitor Dataproc release notes\n\nDataproc regularly releases new sub-minor image versions.\nView or subscribe to [Dataproc release notes](/dataproc/docs/release-notes)\nto be aware of the latest Dataproc image version releases and other\nannouncements, changes, and fixes.\n\nView the staging bucket to investigate failures\n\n1. Look at your cluster's\n [staging bucket](/dataproc/docs/concepts/configuring-clusters/staging-bucket)\n to investigate cluster and job error messages.\n Typically, the staging bucket Cloud Storage location is shown in\n error messages, as shown in the **bold** text in the following sample error\n message:\n\n \u003cbr /\u003e\n\n ```\n ERROR:\n (gcloud.dataproc.clusters.create) Operation ... failed:\n ...\n - Initialization action failed. Failed action ... see output in:\n gs://dataproc-\u003cBUCKETID\u003e-us-central1/google-cloud-dataproc-metainfo/CLUSTERID/\u003cCLUSTER_ID\u003e\\dataproc-initialization-script-0_output\n \n ```\n\n \u003cbr /\u003e\n\n2. Use the gcloud CLI to view staging bucket contents:\n\n ```\n gcloud storage cat gs://STAGING_BUCKET\n ```\n Sample output: \n\n ```\n + readonly RANGER_VERSION=1.2.0\n ... Ranger admin password not set. Please use metadata flag - default-password\n ```\n\n \u003cbr /\u003e\n\nGet support\n\nGoogle Cloud supports your production OSS workloads and helps you meet your\nbusiness SLAs through [tiers of support](/support). Also, Google Cloud\n[Consulting Services](/consulting) can provide guidance on best practices\nfor your team's production deployments.\n\nFor more information\n\n- Read the Google Cloud blog [Dataproc best practices guide](https://cloud.google.com/blog/topics/developers-practitioners/dataproc-best-practices-guide).\n\n- View [Democratizing Dataproc](https://www.youtube.com/watch?v=2ksD7udWFys) on YouTube."]]