Managed Service for Apache Spark 可选 Pig 组件

使用可选组件功能创建 Managed Service for Apache Spark 集群时,可以安装 Apache Pig 等其他组件。本页面介绍了 Pig 组件,这是一个用于分析大型数据集的开源平台。

安装组件

在创建 Managed Service for Apache Spark 集群时安装该组件。

Apache Pig 是 Managed Service for Apache Spark 2.3 及更高版本映像中的可选组件。

如需了解最新版 Managed Service for Apache Spark 映像版本中包含的组件版本,请参阅支持的 Managed Service for Apache Spark 版本

Google Cloud 控制台

  1. 在 Google Cloud 控制台中,打开创建集群页面。
  2. 点击其他配置以展开该部分。
  3. 修改可选组件
  4. 在随即打开的面板中,选中 Pig 的复选框,然后点击保存

gcloud CLI

如需创建包含 Pig 组件的 Managed Service for Apache Spark 集群,请将 gcloud dataproc clusters create CLUSTER_NAME 命令与 --optional-components 标志结合使用(使用映像版本 2.3 或更高版本)。

gcloud dataproc clusters create CLUSTER_NAME \
    --region=REGION \
    --optional-components=PIG \
    --image-version=2.3 \
    ... other flags

REST API

可通过 Dataproc API 在 clusters.create 请求中使用 SoftwareConfig.Component 来指定 Pig 组件。