随机播放最后一个任务需要太多时间才能完成
shuffle last task taking too much time to complete
enter image description hereI have around 80GB of data , everything is going smooth till last shuffle task comes up ,all the task are getting finished within 30 mins, but last task takes more than 2 hours to complete it . enter image description here
加入:(左加入)
加入 3-tables,table 之一相对较小(2 MB)数据,对于该设置广播变量,即使我删除了第 3 个 table,它也没有解决我的问题.
下面是配置的参数。
spark.conf.set("spark.sql.autoBroadcastJoinThreshold", "904857600")
spark.conf.set("spark.cleaner.referenceTracking.blocking", "false")
spark.conf.set("spark.cleaner.periodicGC.interval", "5min")
spark.conf.set("spark.default.parallelism","6000")
spark.conf.set("spark.sql.shuffle.partitions","2000")
spark.conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
您正在遭受数据 Skew 的困扰。基本上大部分工作是由 1 个节点完成的,而不是分布在多个节点上的工作。
这就是为什么我想澄清工作或 [task/stage].
您应该考虑将 salt 添加到您的连接键以帮助跨多个节点分配工作。这将需要更多的洗牌,但它会减轻对一个节点完成所有工作的影响。
向联接中的所有列添加盐
使用 salt 列进行 3 种方式连接。
然后执行辅助分组以从查询中删除盐。
这将更好地分配工作。
enter image description hereI have around 80GB of data , everything is going smooth till last shuffle task comes up ,all the task are getting finished within 30 mins, but last task takes more than 2 hours to complete it . enter image description here 加入:(左加入) 加入 3-tables,table 之一相对较小(2 MB)数据,对于该设置广播变量,即使我删除了第 3 个 table,它也没有解决我的问题.
下面是配置的参数。
spark.conf.set("spark.sql.autoBroadcastJoinThreshold", "904857600")
spark.conf.set("spark.cleaner.referenceTracking.blocking", "false")
spark.conf.set("spark.cleaner.periodicGC.interval", "5min")
spark.conf.set("spark.default.parallelism","6000")
spark.conf.set("spark.sql.shuffle.partitions","2000")
spark.conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
您正在遭受数据 Skew 的困扰。基本上大部分工作是由 1 个节点完成的,而不是分布在多个节点上的工作。 这就是为什么我想澄清工作或 [task/stage].
您应该考虑将 salt 添加到您的连接键以帮助跨多个节点分配工作。这将需要更多的洗牌,但它会减轻对一个节点完成所有工作的影响。
向联接中的所有列添加盐
使用 salt 列进行 3 种方式连接。
然后执行辅助分组以从查询中删除盐。
这将更好地分配工作。