How would you determine the quantity of parcels while making a RDD? What are the capacities?
Answer Posted / Ms Varsha
In PySpark, the number of parcels in a Resilient Distributed Dataset (RDD) can be determined by using actions like count(). The capacity of each parcel can be defined during the creation of RDD, for example, when reading data from a file or a database. Here is an example of creating an RDD with predefined capacities:
rdd = sc.textFile("data.txt", 4)
In this example, the textFile function takes two arguments - the path to the data and the number of splits (capacities).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers