Apache Zeppelin 選用元件可讓您在叢集上執行網頁式互動資料分析。使用選用元件建立 Managed Service for Apache Spark 叢集時,您可以安裝 Zeppelin,以便執行 Spark 工作負載,並在共用筆記本中以視覺化方式呈現資料。
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 映像檔版本中包含的元件版本。
Google Cloud 控制台
- 在 Google Cloud 控制台,開啟「Create cluster」(建立叢集) 頁面。
- 按一下「其他設定」展開該部分。
- 編輯「Optional components」(選用元件)。
- 在開啟的面板中,勾選「Zeppelin Notebook」核取方塊,然後按一下「Save」(儲存)。
gcloud CLI
如要建立包含 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
您可以透過 Dataproc API,在 clusters.create 要求中納入 SoftwareConfig.Component,以指定 Zeppelin 元件。開啟 Zeppelin Notebook
如要在本機瀏覽器中開啟在叢集主要節點上執行的 Zeppelin 筆記本 UI,請點選查看及存取元件閘道網址一文中所述的 Google Cloud 控制台「Component Gateway」(元件閘道) 連結。