Ven*_*r M 6 apache-spark apache-spark-sql pyspark pyspark-sql apache-spark-2.0
环境:
我们正在使用EMR,Spark 2.1和EMR FS.
我们正在做的流程:
我们正在运行PySpark作业来加入2个Hive表,并使用saveAsTable基于此结果创建另一个hive表,并将其存储为带分区的ORC
问题:
18/01/23 10:21:28 INFO OutputCommitCoordinator: Task was denied committing,
stage: 84, partition: 901, attempt: 10364
18/01/23 10:21:28 INFO TaskSetManager: Starting task 901.10365 in stage 84.0
(TID 212686, ip-172-31-46-97.ec2.internal, executor 10, partition 901,
PROCESS_LOCAL, 6235 bytes)
18/01/23 10:21:28 WARN TaskSetManager: Lost task 884.10406 in stage 84.0
(TID 212677, ip-172-31-46-97.ec2.internal, executor 85): TaskCommitDenied
(Driver denied task commit) for job: 84, partition: 884, attemptNumber: 10406
Run Code Online (Sandbox Code Playgroud)
这个特定的日志信息是从Spark日志中递归出来的,当我们杀死这个作业时,我们已经看到这个约为~170000(160595)次,如下所示:Spark-Task Commit Denied
从源代码中可以看出:
/** * :: DeveloperApi :: * Task requested the driver to commit, but was denied. */
@DeveloperApicase class TaskCommitDenied
( jobID: Int,
partitionID: Int,
attemptNumber: Int) extends TaskFailedReason
{
override def toErrorString: String = s"TaskCommitDenied (Driver denied task commit)" +
s" for job: $jobID, partition: $partitionID, attemptNumber: $attemptNumber"
/** * If a task failed because its attempt to commit was denied, do not count this failure * towards failing the stage. This is intended to prevent spurious stage failures in cases * where many speculative tasks are launched and denied to commit. */
override def countTowardsTaskFailures: Boolean = false
}
Run Code Online (Sandbox Code Playgroud)
请注意我们没有启用spark.speculation即(它是假的)并且从spark作业环境我们根本没有看到这个属性.
但是当作业运行时,我们可以看到相应的文件是在表临时目录下的EMRFS下创建的,如:
HDFS://ip-172-31-18-155.ec2.internal:8020 /蜂房/位置/ hive.db/hivetable/_temporary/0/task_1513431588574_1185_3_01_000000/00000_0.orc
我们可以看到这些关于2001的文件夹(因为我们已经给出了spark.sql.shuffle.partitions = 2001)
1)即使我们没有启用spark.speculation,什么可能导致作业启动~170000任务
2)当完成将数据写入HDFS(EMRFS)时,为什么每个执行程序都试图启动新任务
3)有没有办法可以避免这种情况?
非常感谢您对此进行调查.任何与此相关的输入都会对我们有所帮助.
Venkat
| 归档时间: |
|
| 查看次数: |
870 次 |
| 最近记录: |