What are the exact differences between reduce and fold operation in Spark?
Answer / Trapti Kansal
reduce: It is a transformational action in Spark that reduces an RDD to a single value by applying an associative and commutative binary function. The default function is concatenation for strings, addition for numbers, etc.nfold: It is a more generalized version of reduce. Instead of reducing to a single value, fold can accumulate the result into a user-defined datatype (not just a single value).
| Is This Answer Correct ? | 0 Yes | 0 No |
Do you need to install spark on all nodes of yarn cluster?
Are spark dataframes immutable?
Is Apache Spark a good fit for Reinforcement learning?
What is the command to start and stop the Spark in an interactive shell?
How do sparks work?
Explain the various Transformation on Apache Spark RDD like distinct(), union(), intersection(), and subtract()?
What is the method to create a data frame?
Who uses apache spark?
Where is apache spark used?
What are the actions in spark?
What apache spark is used for?
Describe Spark SQL?
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)