Explain fold() operation in spark?
Answer / Narendra Pal Singh
The fold() operation in Spark is a reduction function that reduces a RDD (Resilient Distributed Dataset) to a single value by iteratively combining all elements using an associative binary function. The fold() function takes two arguments: a seed value and a function for combining values. Unlike reduce(), fold() returns the initial seed value instead of the accumulator after iteration.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is apache spark core?
In how many ways RDDs can be created? Explain.
Define Partitions?
How much faster is Apache spark than Hadoop?
How can you minimize data transfers when working with Spark?
What is the difference between Spark Transform in DStream and map ?
What languages support spark?
Define Partition in Apache Spark?
What is the default partition in spark?
Explain the use of File system API in Apache Spark
List the advantage of Parquet file in Apache Spark?
What is the difference between map and flatmap?
Apache Hadoop (394)
MapReduce (354)
Apache Hive (345)
Apache Pig (225)
Apache Spark (991)
Apache HBase (164)
Apache Flume (95)
Apache Impala (72)
Apache Cassandra (392)
Apache Mahout (35)
Apache Sqoop (82)
Apache ZooKeeper (65)
Apache Ambari (93)
Apache HCatalog (34)
Apache HDFS Hadoop Distributed File System (214)
Apache Kafka (189)
Apache Avro (26)
Apache Presto (15)
Apache Tajo (26)
Hadoop General (407)