In spark, what does the parameter “minPartitions” works in SparkContext.textFile(path, minPartitions)?

前端 未结 1 1098
时光取名叫无心
时光取名叫无心 2020-12-31 22:39

In Spark, either SparkContext or JavaSparkContext, there is one parameter which is minPartitions when you call sc.textFile. what does this parameter imply?

1条回答
  •  庸人自扰
    2020-12-31 23:06

    minPartitions will be passed to Hadoop's InputFormat.getSplits. The parameter is a hint, so you may get more or less partitions, depending on the Hadoop InputFormat implementation.

    0 讨论(0)
提交回复
热议问题