אזור האשכול

ב-Managed Service for Apache Spark אתם יכולים לציין אזור ב-Compute Engine, כמו us-east1 או europe-west1, כדי לקבוע איפה האשכול יפעל. השירות מבודד משאבים – כולל מכונות וירטואליות, Cloud Storage ואחסון מטא-נתונים – באזור אחד באותו אזור.

כשיוצרים אשכול, אפשר לבחור אזור, כמו us-east1-a או europe-west1-b. אם לא תציינו אזור, המיקום האוטומטי של Managed Service for Apache Spark יבחר אזור באופן אוטומטי.

שמות האזורים

שמות האזורים מבוססים על האזורים של Compute Engine. לדוגמה, השם של האזור Central US הוא us-central1, והשם של האזור Western Europe הוא europe-west1. מריצים את הפקודה gcloud compute regions list כדי לראות רשימה של האזורים הזמינים.

נקודות קצה (endpoints) לפי מיקום ואזור

Cloud de Confiance by S3NS ממשקי API יכולים לספק תמיכה בנקודות קצה (endpoint) מבוססות-מיקום ואזוריות:

  • נקודות קצה מבוססות-מיקום מבטיחות שהנתונים בהעברה יישארו במיקום שצוין כשניגשים אליהם דרך קישוריות פרטית.

    פורמט: {location}-{service}.googleapis.com

    לדוגמה: us-central-1-dataproc.googleapis.com

  • נקודות קצה אזוריות מבטיחות שהנתונים במעבר יישארו במיקום שצוין, גם אם הגישה אליהם היא דרך קישוריות פרטית וגם אם היא דרך האינטרנט הציבורי.

    פורמט: {service}.{location}.rep.googleapis.com

    לדוגמה: dataproc.us-central1.rep.googleapis.com

נקודת הקצה שמוגדרת כברירת מחדל ב-Managed Service for Apache Spark היא נקודת הקצה של המיקום. בנתוני הגרסה של Managed Service for Apache Spark מפורטות הודעות על התמיכה של Managed Service for Apache Spark בנקודות קצה אזוריות.

יצירת אשכול

המסוף

מציינים אזור של Compute Engine בשדה Region שבקטע Define your cluster בדף Create cluster במסוף Cloud de Confiance .

Google Cloud CLI

כשיוצרים אשכול, מציינים אזור באמצעות הדגל הנדרש --region.

gcloud dataproc clusters create CLUSTER_NAME \
    --region=REGION \
    other args ...

‫API בארכיטקטורת REST

כדי לציין את אזור האשכול, משתמשים בפרמטר REGION של כתובת ה-URL בבקשת clusters.create.

gRPC

מגדירים את כתובת הטרנספורט של הלקוח לנקודת הקצה מבוססת-המיקום, לפי התבנית הבאה:

REGION-dataproc.googleapis.com

דוגמה ל-Python‏ (google-cloud-python):

from google.cloud import dataproc_v1
from google.cloud.dataproc_v1.gapic.transports import cluster_controller_grpc_transport

transport = cluster_controller_grpc_transport.ClusterControllerGrpcTransport(
    address='us-central1-dataproc.googleapis.com:443')
client = dataproc_v1.ClusterControllerClient(transport)

project_id = 'my-project'
region = 'us-central1'
cluster = {...}

דוגמה ל-Java‏(google-cloud-java):

ClusterControllerSettings settings =
     ClusterControllerSettings.newBuilder()
        .setEndpoint("us-central1-dataproc.googleapis.com:443")
        .build();
 try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create(settings)) {
   String projectId = "my-project";
   String region = "us-central1";
   Cluster cluster = Cluster.newBuilder().build();
   Cluster response =
       clusterControllerClient.createClusterAsync(projectId, region, cluster).get();
 }

המאמרים הבאים