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 |
What are Actions? Give some examples.
What is meant by Transformation? Give some examples.
What is lambda architecture spark?
What exactly is spark?
Explain parquet file?
Explain about the different cluster managers in Apache Spark
What do you mean by Speculative execution in Apache Spark?
Name the two types of shared variable available in Apache Spark?
Does spark replace hadoop?
Explain Spark Executor
Explain the lookup() operation in Spark?
Who invented the first spark plug?
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)