Spark 界面
Spark 界面会从 Managed Service for Apache Spark 交互式会话中收集 Apache Spark 执行详情。Spark 界面功能默认处于启用状态,无需付费。Spark 界面功能收集的数据会保留 90 天。
所需的 Identity and Access Management 权限和角色
如需将 Spark 界面功能与交互式会话搭配使用,需要以下权限:
数据收集权限:
dataproc.sessions.sparkApplicationWrite。必须向运行交互式会话的服务账号授予此权限。它包含在Managed Service for Apache Spark Worker角色中,该角色会自动授予 Managed Service for Apache Spark 默认使用的 Compute Engine 默认服务账号。不过,如果您为会话或运行时配置文件(会话模板)指定自定义服务账号,则必须向该服务账号添加此dataproc.sessions.sparkApplicationWrite权限(通常通过向服务账号授予 Managed Service for Apache SparkWorker角色来实现)。Spark 界面访问权限:
dataproc.sessions.sparkApplicationRead。必须向用户授予此权限,用户才能在Google Cloud 控制台中访问 Spark 界面。Dataproc Viewer、Dataproc Editor和Dataproc Administrator角色拥有此权限。如需在 Google Cloud 控制台中打开 Spark 界面,您必须拥有以下角色之一,或拥有包含此权限的自定义角色。
打开 Spark 界面
Spark 界面页面可在 Google Cloud 控制台中使用。
在 Google Cloud 控制台中,前往 Managed Service for Apache Spark 会话页面。
点击会话 ID 以打开会话详情页面。
点击顶部菜单中的查看 Spark 界面。
查看 Spark 界面链接是否已停用?如果未授予所需权限,或者您在交互式会话详情页面上取消选中启用 Spark 界面复选框,或者在创建会话或创建运行时配置文件(会话模板)时将 spark.dataproc.appContext.enabled 属性设置为 false(默认值:true),则查看 Spark 界面按钮会被停用。