이 페이지에서는 Managed Service for Apache Spark 클러스터의 가상 머신(VM)에 하이퍼디스크를 연결하는 방법을 보여줍니다. 마스터, 기본 워커 노드, 보조 워커 노드 그룹에 대해 디스크를 독립적으로 구성할 수 있습니다. 이러한 디스크는 부팅 디스크 및 로컬 SSD 외에 클러스터 노드에 연결됩니다.
시작하기 전에
- 계정에 로그인합니다. Google Cloud 를 처음 사용하는 경우 Google Cloud, 계정을 만들어 실제 시나리오에서 제품이 어떻게 작동하는지 평가하세요. 신규 고객에게는 워크로드를 실행, 테스트, 배포하는 데 사용할 수 있는 $300의 무료 크레딧이 제공됩니다.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that you have the permissions required to complete this guide.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Managed Service for Apache Spark API.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that you have the permissions required to complete this guide.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Managed Service for Apache Spark API.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.
필요한 역할
이 페이지의 예시를 실행하려면 특정 IAM 역할이 필요합니다. 조직 정책에 따라 이러한 역할이 이미 부여되었을 수 있습니다. 역할 부여를 확인하려면 역할을 부여해야 하나요?를 참고하세요.
역할 부여에 대한 상세 설명은 프로젝트, 폴더, 조직에 대한 액세스 관리를 참조하세요.
사용자 역할
Managed Service for Apache Spark 클러스터를 만드는 데 필요한 권한을 얻으려면 관리자에게 다음 IAM 역할을 부여해 달라고 요청하세요.
- Dataproc 편집자 (
roles/dataproc.editor) 프로젝트에 대한 - Compute Engine 기본 서비스 계정의 서비스 계정 사용자 역할 (
roles/iam.serviceAccountUser)
서비스 계정 역할
Compute Engine 기본 서비스 계정에 Managed Service for Apache Spark 클러스터를 만드는 데 필요한 권한이 있는지 확인하려면 관리자에게 프로젝트의 Compute Engine 기본 서비스 계정에 Dataproc 작업자 (roles/dataproc.worker) IAM 역할을 부여해 달라고 요청하세요.
디스크 특성
연결된 디스크에는 다음과 같은 특성이 있습니다.
- 수명 주기: 연결된 디스크의 수명은 연결된 VM 의 수명과 일치합니다. Managed Service for Apache Spark는 VM을 만들 때 디스크를 만들고 VM을 삭제할 때 디스크를 삭제합니다.
- 불변성: 클러스터가 생성된 후에는 크기, IOPS, 처리량과 같은 연결된 디스크의 속성을 업데이트할 수 없습니다.
- 마운트 및 사용: Managed Service for Apache Spark는
/mnt/N에 디스크를 마운트합니다. 여기서N는 양의 정수입니다(예:/mnt/1,/mnt/2). HDFS 및 스크래치 데이터(예: 셔플 출력)는 부팅 영구 디스크 대신 연결된 디스크를 사용합니다.
디스크 구성
Managed Service for Apache Spark 클러스터 노드에 디스크를 연결할 때 다음 디스크 구성 매개변수를 지정할 수 있습니다.
디스크 유형 - 필수: VM 인스턴스에 연결할 디스크 유형입니다. 다음 하이퍼디스크 가 지원됩니다.
hyperdisk-balancedhyperdisk-extremehyperdisk-mlhyperdisk-throughput
hyperdisk balanced high availability유형 및 영구 디스크는 클러스터 노드에 연결할 수 없습니다.크기 - 선택사항: 디스크의 크기입니다. 값은 정수여야 하며 기가바이트의 경우
GB, 테라바이트의 경우TB가 뒤따라야 합니다. 예를 들어10GB는 10기가바이트 디스크를 연결합니다. 자세한 내용은 하이퍼디스크 크기 한도를 참고하세요.IOPS - 선택사항: 연결된 디스크에 프로비저닝할 IOPS를 나타냅니다. 이 매개변수는 초당 디스크 I/O 작업의 한도를 설정합니다. 자세한 내용은 기본 성능 수준을 참고하세요.
처리량 - 선택사항: 연결된 디스크에 프로비저닝할 처리량을 나타냅니다. 이 매개변수는 초당
MiB의 처리량 한도를 설정합니다. 자세한 내용은 기본 성능 수준을 참고하세요.
클러스터에 디스크 연결
gcloud CLI
클러스터를 만들 때 디스크를 연결하려면
--master-attached-disks,--worker-attached-disks, 또는--secondary-worker-attached-disks플래그를gcloud dataproc clusters create명령어와 함께 사용합니다.각 플래그는 세미콜론으로 구분된 디스크 구성 목록을 허용합니다. 각 디스크 구성은
type,size,iops,throughput의 쉼표로 구분된 키-값 쌍 목록입니다 (디스크 구성 참고).
예: 다음 명령어는 클러스터를 만들고 각 기본 워커 노드에 Hyperdisk 2개를 연결합니다.
gcloud dataproc clusters create CLUSTER_NAME \
--region=REGION \
--worker-attached-disks='type=hyperdisk-balanced,size=100GB,iops=5000,throughput=200;type=hyperdisk-throughput,size=9000GB'
API
디스크를 연결하려면
attachedDiskConfigs배열을diskConfig객체에 포함합니다.masterConfig,workerConfig, 또는secondaryWorkerConfig인스턴스 그룹clusters.createAPI 요청의 본문에 구성을 제공합니다.
예: 다음 JSON 스니펫은 하이퍼디스크 2개를 연결하는 attachedDiskConfigs 배열을 보여줍니다.
[
{
"diskType": "HYPERDISK_BALANCED",
"diskSizeGb": 100,
"provisionedIops": 5000,
"provisionedThroughput": 200
},
{
"diskType": "HYPERDISK_THROUGHPUT",
"diskSizeGb": 9000
}
]