You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by Husky Zeng <56...@qq.com> on 2020/10/31 01:41:37 UTC

Re: 数据类型对于shuffle时数据传输IO速度有影响吗?

破案了,是写hive时有背压导致的。

我们的sql场景是动态分区。

写hive文件用的是
GroupedPartitionWriter,所以"先按照hive分区进行sort再写文件",和"乱序情况下写文件",两种方式的开销的差距非常大。因为GroupedPartitionWriter
每写完一个分区,就要把  OutputFormat 给close掉,打开新分区的OutputFormat 。而乱序会导致它持有的OutputFormat
不断打开关闭,几乎每条数据都要换分区。

所以导致第二种情况,写hive产生反压。导致IO速度变慢了,而并非文件格式等其他因素导致变慢。

标题误导大家了, 不好意思。。






--
Sent from: http://apache-flink.147419.n8.nabble.com/