אזור האשכול

כשיוצרים אשכול Dataproc, מציינים אזור של Compute Engine, כמו us-east1 או europe-west1. ‫Dataproc יבודד את משאבי האשכול, כמו מכונות וירטואליות, Cloud Storage ואחסון מטא-נתונים, בתוך תחום באזור שצוין.

כשיוצרים אשכול, אפשר לציין אזור בתוך אזור האשכול שצוין, כמו us-east1-a או europe-west1-b. אם לא מציינים את האזור, התכונה Dataproc Auto Zone Placement תבחר אזור בתוך אזור האשכול שצוין כדי לאתר את משאבי האשכולות.

מרחב השמות האזורי תואם לפלח /regions/REGION של מזהי משאבים אחידים (URI) של משאבי Dataproc (לדוגמה, networkUri של אשכול).

שמות האזורים

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

נקודות קצה למיקום ולאזור

‫Google Cloud APIs יכולים לספק תמיכה בנקודות קצה מבוססות-מיקום ואזוריות:

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

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

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

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

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

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

נקודת הקצה שמוגדרת כברירת מחדל ב-Dataproc היא נקודת קצה של מיקום. בנתוני הגרסה של Dataproc מופיעות הודעות על תמיכה בנקודות קצה אזוריות ב-Dataproc.

יצירת אשכול

‫CLI של gcloud

כשיוצרים אשכול, מציינים אזור באמצעות הדגל --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();
 }

המסוף

מציינים אזור Dataproc בקטע 'מיקום' בחלונית הגדרת אשכול בדף יצירת אשכול של Dataproc במסוף Google Cloud .

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