pyspark.RDD.getNumPartitions

抽样。 getNumPartitions ( )→int

返回在抽样数量的分区

例子

> > >抽样=sc并行化([1,2,3,4),2)> > >抽样getNumPartitions()2