在spark-shell
,我是不是有这个问题(1号线),当我叫2号线。
Line1: not found: value spark_partition_id
Line2: val countPerCustomPartition = businessesDataFrameCustomPartition.groupBy(spark_partition_id).count
然后,当我打电话spark-submit
,我得到了这个问题。我没有在计算器上看到了这一点之前,它结束了一个简单的,但并不明显修复。
该行添加到您的斯卡拉类的顶部:
import org.apache.spark.sql.functions.spark_partition_id