Dataproc Metastore API를 사용하는 대신 Google Cloud CLI gcloud metastore
명령어를 사용하여 Dataproc Metastore 서비스를 관리하고 액세스할 수 있습니다.
이 페이지에서는 Google Cloud CLI를 사용하여 Dataproc Metastore와 상호작용할 수 있도록 Cloud SDK 사용을 시작하는 방법을 설명합니다.
시작하기 전에
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
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
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Enable the Dataproc Metastore API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
Install the Google Cloud CLI.
-
외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.
-
gcloud CLI를 초기화하려면, 다음 명령어를 실행합니다.
gcloud init
-
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
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Enable the Dataproc Metastore API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
Install the Google Cloud CLI.
-
외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.
-
gcloud CLI를 초기화하려면, 다음 명령어를 실행합니다.
gcloud init
- 기본 프로젝트를 설정하려면 다음 명령어를 실행합니다.
gcloud config set project PROJECT_ID
여기서 PROJECT_ID는 Dataproc Metastore 서비스가 속한 Google Cloud 프로젝트의 ID입니다.
- Dataproc Metastore 위치를 구성하려면 다음 명령어를 실행합니다.
gcloud config set metastore/location LOCATION
여기서 LOCATION은
us-central1
과 같은 지원되는 리전입니다. - Dataproc Metastore 등급을 구성하려면 다음 명령어를 실행합니다.
gcloud config set metastore/tier TIER
여기서 TIER은 새 서비스의 용량을 설정합니다.
- (선택사항) gcloud CLI의 구성을 나열하려면 다음 명령어를 실행합니다.
gcloud config list
Google Cloud CLI 시작
gcloud CLI를 시작하려면 Google Cloud CLI 문서를 검토하세요.
--help
플래그를 사용하면 도구, 리소스, 명령어에 대한 도움말을 볼 수 있습니다.
gcloud metastore --help
Google Cloud CLI 참조에는 --help
플래그로 표시되는 정보도 제공됩니다.
로컬 클라이언트의 기본 구성 속성 설정
대부분의 gcloud metastore
명령어에는 위치 입력이 필요하며, 이는 --location
플래그를 사용하거나 기본 위치를 설정하여 지정합니다. Dataproc Metastore 서비스의 기본 프로젝트 및 등급을 설정할 수도 있습니다.