#spark
Read more stories on Hashnode
Articles with this tag
利用TaskContext.getPartitionId()获取分区Id。 rdd.partitionBy(partitioner) .foreachPartition(iter->{ int id=TaskContext.getPartitionId(); ...