我在运行我的 emr-serverless pyspark sql 代码时收到错误:
ERROR:root:An error occurred while calling o221.collectToPython.
: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 53.0 failed 1 times, most recent failure: Lost task 0.0 in stage 53.0 (TID 176) (ip-10-1-20-165.ec2.internal executor driver): TaskResultLost (result lost from block manager)
在 vpc 外运行时我没有看到这个问题,但在 vpc 中运行时我看到了。当我在具有少量行的 vpc 中运行时 (< 10k) I dont receive the error either.
我使用 sqlspark 进行一些操作以及数据框功能。我将数据分区
dfp = df.repartition(200, "vehicle_id")
.
虽然 emr-serverless 应该可以扩展,但我从以下配置开始:
InitialCapacity:
- Key: DRIVER
Value:
WorkerCount: 2
WorkerConfiguration:
Cpu: 16vCPU
Memory: "64GB"
Disk: "200GB"
- Key: EXECUTOR
Value:
WorkerCount: 5
WorkerConfiguration:
Cpu: 16vCPU
Memory: "64GB"
Disk: "200GB"
我希望这段代码能正常工作,我之前使用相同的 vpc 在配置的 emr 容器中运行相同的代码,没有问题。