インタラクティブ セッションとセッション テンプレートを作成する

このページでは、Managed Service for Apache Spark のインタラクティブ セッションとセッション テンプレートを作成する方法について説明します。セッション テンプレートを使用すると、セッション テンプレートの構成に基づいて複数のインタラクティブ セッションを作成できます。

インタラクティブ セッションを作成する

Managed Service for Apache Spark のインタラクティブ セッションを作成するには、Google Cloud CLI または Managed Service for Apache Spark API を使用します。

gcloud

gcloud beta dataproc sessions create command SESSION_NAME を使用して、Managed Service for Apache Spark のインタラクティブ セッションを作成できます。

gcloud beta dataproc sessions create spark SESSION_ID \
    --location=REGION \
    optional flags ...

次のように置き換えるか追加します。

REST

Managed Service for Apache Spark sessions.create API を使用して、Managed Service for Apache Spark のインタラクティブ セッションを作成できます。

注:

セッション テンプレートを作成する

Managed Service for Apache Spark セッション テンプレートは、1 つ以上の Managed Service for Apache Spark インタラクティブ セッションを作成するための構成設定を定義します。 Google Cloud コンソール、gcloud CLI、または Managed Service for Apache Spark API を使用して、Jupyter セッションまたは Spark Connect セッションの Managed Service for Apache Spark セッション テンプレートを作成できます。

コンソール

Google Cloud コンソールを使用して Managed Service for Apache Spark セッション テンプレートを作成するには、次の操作を行います。

  1. Google Cloud コンソールで、[セッション テンプレート] ページに移動します。

    [セッション テンプレート] に移動

    1. [作成] をクリックします。
  2. [セッション テンプレートの作成] ページで、テンプレート構成の設定を入力または確認します。次の点にご注意ください。

  3. [送信] をクリックしてセッション テンプレートを作成します。

gcloud

gcloud CLI を使用して Managed Service for Apache Spark セッション テンプレートを直接作成することはできませんが、gcloud beta dataproc session-templates import コマンドを使用して既存のセッション テンプレートをインポートできます。インポートしたテンプレートを編集してから、gcloud beta dataproc session-templates export コマンドを使用してエクスポートできます。

REST

Managed Service for Apache Spark sessionTemplates.create API を使用して、Managed Service for Apache Spark セッション テンプレートを作成できます。

注: