Managed Service for Apache Spark 選用 Zeppelin 元件

建立 Managed Service for Apache Spark 叢集時,可以透過選用元件功能安裝 Zeppelin 等額外元件。本頁面提供 Zeppelin 元件的說明。

Zeppelin Notebook 是用於進行互動資料分析的網頁式筆記本。Zeppelin 網頁使用者介面位於叢集第一個主要節點的 8080 通訊埠上。

根據預設,筆記本會儲存在 Cloud Storage 中,位於叢集建立期間由使用者指定或系統自動建立的 Managed Service for Apache Spark 暫存 bucket。在建立叢集時,可以透過 zeppelin:zeppelin.notebook.gcs.dir 屬性來變更位置。

安裝元件

請在建立 Managed Service for Apache Spark 叢集時安裝元件。如要新增元件,則需使用以 Managed Service for Apache Spark 1.3 以上版本所建立的叢集。

請參閱「支援的 Dataproc 版本」,瞭解每個 Managed Service for Apache Spark 映像檔版本中包含的元件版本。

gcloud 指令

如要建立包含 Zeppelin 元件的 Managed Service for Apache Spark 叢集,請使用 gcloud dataproc clusters create cluster-name 指令並加上 --optional-components 旗標。

gcloud dataproc clusters create cluster-name \
    --optional-components=ZEPPELIN \
    --region=region \
    --enable-component-gateway \
    ... other flags

REST API

您可以透過 Managed Service for Apache Spark API,在 clusters.create 要求中納入 SoftwareConfig.Component,以指定 Zeppelin 元件。

控制台

  1. 啟用元件和元件閘道。
    • 在 Google Cloud 控制台中,開啟 Managed Service for Apache Spark 的「建立叢集」頁面。系統會選取「Set up cluster」(設定叢集) 面板。
    • 在「Components」(元件) 部分執行下列操作:
      • 在「Optional components」(選用元件) 下方,選取叢集所要安裝的 Zeppelin 及其他選用元件。
      • 在「Component Gateway」(元件閘道) 下方,選取「Enable component gateway」(啟用元件閘道) (請參閱「查看及存取元件閘道網址」)。

開啟 Zeppelin Notebook

如要在本機瀏覽器中開啟在叢集主要節點上執行的 Zeppelin 筆記本 UI,請點選查看及存取元件閘道網址一文中所述的 Google Cloud 控制台「Component Gateway」(元件閘道) 連結。