Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
Question 1 of 60 · Limitations of MapReduce in Hadoop · Easy
What is a common limitation of Hadoop MapReduce?
Not quite. Try another option.
Answer: It is mainly designed for batch processing
MapReduce is well suited for batch jobs, but it is less suitable for interactive and real-time processing.
Question 2 of 60 · Limitations of MapReduce in Hadoop · Easy
Why can repeated MapReduce jobs be slow?
Not quite. Try another option.
Answer: They repeatedly read and write data to disk
MapReduce often stores intermediate results on disk, which adds input/output overhead between stages.
Question 3 of 60 · Limitations of MapReduce in Hadoop · Easy
Which type of workload is difficult for traditional MapReduce?
Not quite. Try another option.
Answer: Iterative machine learning
Iterative algorithms repeatedly use the same data, and disk-based MapReduce can make these repetitions inefficient.
Question 4 of 60 · Comparison of batch vs. real-time analytics · Easy
What does batch analytics do?
Not quite. Try another option.
Answer: Processes collected data in groups
Batch analytics gathers data and processes it together at scheduled or requested times.
Question 5 of 60 · Comparison of batch vs. real-time analytics · Easy
What is a key characteristic of real-time analytics?
Not quite. Try another option.
Answer: It provides results with low delay
Real-time analytics analyzes incoming data quickly so that results are available with minimal delay.
Question 6 of 60 · Comparison of batch vs. real-time analytics · Easy
Which example best represents batch analytics?
Not quite. Try another option.
Answer: Generating a monthly sales report
A monthly sales report processes accumulated data at a scheduled time, which is a batch operation.
Question 7 of 60 · Comparison of batch vs. real-time analytics · Easy
Which application commonly requires real-time analytics?
Not quite. Try another option.
Answer: Fraud detection during a payment
Payment fraud detection often needs immediate analysis so that suspicious transactions can be identified quickly.
Question 8 of 60 · Application of stream processing and in-memory processing · Easy
What is stream processing?
Not quite. Try another option.
Answer: Processing data as it arrives
Stream processing analyzes continuous flows of data while events are being generated.
Question 9 of 60 · Application of stream processing and in-memory processing · Easy
Which is an example of stream processing?
Not quite. Try another option.
Answer: Monitoring live sensor readings
Sensor readings arrive continuously, making live monitoring a common stream-processing application.
Question 10 of 60 · Application of stream processing and in-memory processing · Easy
What does in-memory processing mean?
Not quite. Try another option.
Answer: Keeping data in RAM during computation
In-memory processing stores working data in main memory, reducing repeated disk access.
Question 11 of 60 · Application of stream processing and in-memory processing · Easy
Why can in-memory processing improve performance?
Not quite. Try another option.
Answer: Memory access is faster than disk access
Reading data from RAM is generally faster than repeatedly reading and writing the same data on disk.
Question 12 of 60 · Features and benefits of Spark · Easy
Apache Spark is primarily a platform for what purpose?
Not quite. Try another option.
Answer: Distributed data processing
Spark distributes data processing tasks across multiple computers in a cluster.
Question 13 of 60 · Features and benefits of Spark · Easy
Which feature allows Spark to reuse data efficiently?
Not quite. Try another option.
Answer: Caching data in memory
Spark can cache frequently used datasets in memory, which helps speed up repeated operations.
Question 14 of 60 · Features and benefits of Spark · Easy
Which Spark component is used for SQL queries?
Not quite. Try another option.
Answer: Spark SQL
Spark SQL provides tools for working with structured data using SQL queries and DataFrame APIs.
Question 15 of 60 · Features and benefits of Spark · Easy
Which Spark component supports machine learning tasks?
Not quite. Try another option.
Answer: MLlib
MLlib is Spark's library for common machine learning algorithms and utilities.
Question 16 of 60 · Installation of Spark as a standalone user · Easy
Which software is generally required before installing Apache Spark?
Not quite. Try another option.
Answer: Java
Spark runs on the Java Virtual Machine, so a compatible Java installation is generally required.
Question 17 of 60 · Installation of Spark as a standalone user · Easy
Which command commonly starts the Spark interactive shell for Scala?
Not quite. Try another option.
Answer: spark-shell
The spark-shell command opens an interactive Scala shell with Spark support.
Question 18 of 60 · Installation of Spark as a standalone user · Easy
What is the purpose of setting the SPARK_HOME environment variable?
Not quite. Try another option.
Answer: It identifies the Spark installation directory
SPARK_HOME points to the directory where Apache Spark is installed.
Question 19 of 60 · Comparison of Spark vs. Hadoop ecosystem · Easy
Which Hadoop component is commonly used for distributed file storage?
Not quite. Try another option.
Answer: HDFS
HDFS, or Hadoop Distributed File System, stores large files across multiple machines.
Question 20 of 60 · Comparison of Spark vs. Hadoop ecosystem · Easy
Compared with traditional MapReduce, Spark is often faster because it can do what?
Not quite. Try another option.
Answer: Keep intermediate data in memory
Spark can keep intermediate results in memory, reducing repeated disk input and output.
Question 21 of 60 · Limitations of MapReduce in Hadoop · Medium
A machine learning algorithm repeatedly processes the same dataset for 50 iterations. Why is traditional Hadoop MapReduce likely to perform poorly for this workload?
Not quite. Try another option.
Answer: Each iteration must write intermediate results to disk
MapReduce commonly materializes intermediate results on disk between jobs, creating substantial I/O overhead for iterative algorithms.
Question 22 of 60 · Limitations of MapReduce in Hadoop · Medium
A data-processing workflow contains ten dependent MapReduce jobs. Which limitation is most likely to increase the total execution time?
Not quite. Try another option.
Answer: The workflow requires repeated job startup and synchronization
Each MapReduce job introduces scheduling, startup, and synchronization overhead, which becomes significant in long multi-stage workflows.
Question 23 of 60 · Limitations of MapReduce in Hadoop · Medium
Which workload best illustrates a weakness of the MapReduce programming model?
Not quite. Try another option.
Answer: An iterative graph algorithm using updated vertex values
Iterative graph algorithms repeatedly reuse changing intermediate state, while MapReduce is optimized more naturally for independent batch stages.
Question 24 of 60 · Comparison of batch vs. real-time analytics · Medium
A bank wants to block suspicious card transactions within two seconds of their occurrence. Which processing approach is most appropriate?
Not quite. Try another option.
Answer: Real-time analytics over continuously arriving events
Fraud blocking requires decisions with very low latency, so continuously processing incoming events is more suitable than scheduled batch processing.
Question 25 of 60 · Comparison of batch vs. real-time analytics · Medium
A retailer calculates monthly revenue from completed sales records. Which characteristic supports using batch analytics?
Not quite. Try another option.
Answer: The data can be collected before scheduled processing
Batch analytics is appropriate when data can accumulate and results are needed periodically rather than immediately.
Question 26 of 60 · Comparison of batch vs. real-time analytics · Medium
Which statement best compares batch and real-time analytics for a temperature-monitoring system?
Not quite. Try another option.
Answer: Real-time processing responds while measurements arrive
Real-time analytics evaluates events as they arrive, enabling rapid responses to threshold violations or other conditions.
Question 27 of 60 · Application of stream processing and in-memory processing · Medium
An application receives click events continuously and updates a dashboard every five seconds. Which technique is being applied?
Not quite. Try another option.
Answer: Stream processing with short time windows
The system processes continuously arriving events and aggregates them over short intervals, which is stream processing with time windows.
Question 28 of 60 · Application of stream processing and in-memory processing · Medium
Why can caching a repeatedly used dataset in Spark memory improve an iterative analysis?
Not quite. Try another option.
Answer: It reduces repeated reads from disk
Caching keeps reusable partitions in memory when possible, reducing disk I/O and improving performance across repeated operations.
Question 29 of 60 · Application of stream processing and in-memory processing · Medium
A streaming application must calculate the number of unique users observed during each ten-minute interval. Which concept is most directly required?
Not quite. Try another option.
Answer: Windowed aggregation over streaming data
A ten-minute interval defines a window, and the application must aggregate events within each window.
Question 30 of 60 · Features and benefits of Spark · Medium
Which Spark feature allows the same application to combine SQL queries, machine learning, and streaming operations?
Not quite. Try another option.
Answer: A unified engine with multiple processing libraries
Spark provides integrated libraries such as Spark SQL, MLlib, and Structured Streaming within a common execution engine.
Question 31 of 60 · Features and benefits of Spark · Medium
A Spark transformation is defined but no output is requested. Why might no computation occur immediately?
Not quite. Try another option.
Answer: Spark transformations are evaluated lazily
Spark builds a logical execution plan for transformations and generally runs it only when an action requires a result.
Question 32 of 60 · Features and benefits of Spark · Medium
A Spark job fails after a worker loses a partition that was derived from source data. Which feature can help Spark recover the missing partition?
Not quite. Try another option.
Answer: Lineage-based recomputation of lost partitions
Spark tracks how partitions were derived and can recompute a lost partition from its lineage instead of requiring all intermediate data to be replicated.
Question 33 of 60 · Features and benefits of Spark · Medium
Which situation most strongly favors Spark over a disk-oriented batch engine?
Not quite. Try another option.
Answer: The job repeatedly reuses a large working dataset
Spark can cache reusable datasets in memory, making iterative and interactive workloads more efficient.
Question 34 of 60 · Installation of Spark as a standalone user · Medium
A user wants to run Spark locally without installing Hadoop. Which deployment mode is most appropriate for initial learning and testing?
Not quite. Try another option.
Answer: Local mode using a local Spark installation
Local mode runs Spark using processes on the user’s machine and is suitable for learning, development, and small tests.
Question 35 of 60 · Installation of Spark as a standalone user · Medium
After installing Spark, a user runs a Spark application and receives an error indicating that Java cannot be found. Which configuration should be checked first?
Not quite. Try another option.
Answer: The JAVA_HOME environment variable
Spark runs on the JVM, so the Java installation and the JAVA_HOME environment variable must be correctly configured.
Question 36 of 60 · Installation of Spark as a standalone user · Medium
Which command is commonly used to verify that a local Spark installation can start an interactive Python shell?
Not quite. Try another option.
Answer: pyspark
pyspark launches Spark’s interactive Python shell, making it a practical installation test for Python users.
Question 37 of 60 · Installation of Spark as a standalone user · Medium
A standalone user wants to execute a Python Spark program from a terminal. Which tool is designed for submitting the application?
Not quite. Try another option.
Answer: spark-submit
spark-submit packages the necessary launch configuration and starts a Spark application in the selected deployment mode.
Question 38 of 60 · Comparison of Spark vs. Hadoop ecosystem · Medium
Which comparison between Spark and Hadoop MapReduce is most accurate?
Not quite. Try another option.
Answer: Spark can cache data, while MapReduce commonly materializes stages on disk
Spark emphasizes fast computation through memory caching, whereas MapReduce typically writes intermediate results to disk between stages.
Question 39 of 60 · Comparison of Spark vs. Hadoop ecosystem · Medium
A company already uses HDFS for storage but wants faster iterative analytics. Which adoption strategy is reasonable?
Not quite. Try another option.
Answer: Run Spark on the existing Hadoop storage infrastructure
Spark can read data from HDFS and can coexist with Hadoop components, allowing organizations to improve processing without replacing existing storage.
Question 40 of 60 · Comparison of Spark vs. Hadoop ecosystem · Medium
Which workload is generally a better fit for Spark than traditional Hadoop MapReduce?
Not quite. Try another option.
Answer: Interactive querying of a dataset reused across many analyses
Spark is well suited to interactive and iterative workloads because data can remain cached and execution can avoid repeated disk materialization.
Question 41 of 60 · Limitations of MapReduce in Hadoop · Hard
A machine-learning algorithm performs 30 iterations over the same training data. Each iteration reads the previous iteration's output and produces a new model. Why is classic Hadoop MapReduce generally slower than Spark for this workload?
Not quite. Try another option.
Answer: MapReduce serializes intermediate results to distributed storage between iterations
Classic MapReduce materializes intermediate output to storage between jobs. Spark can cache repeatedly used data and execute iterations through a DAG, reducing repeated disk and network I/O.
Question 42 of 60 · Limitations of MapReduce in Hadoop · Hard
A workflow contains filter → map → filter → reduceByKey. In classic MapReduce, implementing each transformation as a separate job produces unnecessary overhead. Which Spark capability most directly reduces this overhead?
Not quite. Try another option.
Answer: Pipelining of narrow transformations within a stage
Spark pipelines compatible narrow transformations in one stage. Classic MapReduce workflows often require multiple jobs and materialized intermediate results.
Question 43 of 60 · Limitations of MapReduce in Hadoop · Hard
A MapReduce application receives continuously arriving events but launches one job every minute. Processing takes 40 seconds and job startup takes 20 seconds. What is the most fundamental obstacle to sub-second result latency?
Not quite. Try another option.
Answer: Job-oriented scheduling and bounded-input execution add substantial latency
Classic MapReduce is designed for finite batch jobs. Repeated scheduling, startup, synchronization, and output materialization make it unsuitable for sub-second continuous analytics.
Question 44 of 60 · Comparison of batch vs. real-time analytics · Hard
A fraud system must block suspicious payments within 500 ms, while its detection model is retrained nightly from six months of transaction history. Which architecture best matches these requirements?
Not quite. Try another option.
Answer: Use streaming detection and batch-oriented historical model training
Immediate fraud decisions require stream processing, whereas training over large historical datasets is naturally handled as a batch workload.
Question 45 of 60 · Comparison of batch vs. real-time analytics · Hard
Events may arrive up to 10 minutes late. A dashboard computes five-minute event-time windows and must eventually include late events without retaining state forever. Which design is most appropriate?
Not quite. Try another option.
Answer: Use event-time windows with a watermark defining lateness tolerance
Event-time windows place records according to when events occurred, while watermarks bound how long state is retained for late arrivals.
Question 46 of 60 · Comparison of batch vs. real-time analytics · Hard
A stream receives events at an average rate of 50,000 records/s. A micro-batch interval is 2 seconds, but each micro-batch requires 3 seconds to complete under sustained load. What is the most likely long-term behavior?
Not quite. Try another option.
Answer: Backlog grows because processing cannot keep pace with ingestion
When each batch takes longer than the arrival interval under sustained load, queued data accumulates and end-to-end latency increases.
Question 47 of 60 · Application of stream processing and in-memory processing · Hard
A stateful streaming job counts purchases per customer. After a failure, some input records may be replayed. Which combination provides the strongest basis for exactly-once observable results?
Not quite. Try another option.
Answer: A replayable source, checkpointed state, and an idempotent or transactional sink
Recovery requires deterministic replay and restored state. Preventing duplicate external effects additionally requires a sink that supports idempotent or transactional writes.
Question 48 of 60 · Application of stream processing and in-memory processing · Hard
Which workload is most likely to gain the greatest benefit from explicitly caching a Spark dataset?
Not quite. Try another option.
Answer: A recursive algorithm that scans the same graph partitions repeatedly
Caching is most valuable when an expensive dataset is reused across many actions or iterations, as in graph and machine-learning algorithms.
Question 49 of 60 · Application of stream processing and in-memory processing · Hard
An RDD is reused by several actions, but it is larger than aggregate executor memory. Which persistence strategy best avoids recomputation while tolerating memory pressure?
Not quite. Try another option.
Answer: Use a memory-and-disk storage level for cached partitions
A memory-and-disk level stores partitions in memory when possible and spills the remainder to disk, reducing costly lineage recomputation.
Question 50 of 60 · Features and benefits of Spark · Hard
A Spark program defines several transformations on a dataset, but no cluster work begins until count() is called. Which Spark design principle explains this behavior?
Not quite. Try another option.
Answer: Transformations are lazy, and actions trigger DAG execution
Spark records transformations as a logical lineage. An action triggers optimization, stage construction, task scheduling, and execution.
Question 51 of 60 · Features and benefits of Spark · Hard
An executor loses three cached partitions of an RDD, but the source data remains available. Under normal conditions, how does Spark recover those partitions?
Not quite. Try another option.
Answer: It reconstructs them by replaying the required lineage transformations
RDD lineage records how partitions were derived. Spark can recompute only the lost partitions from available parent data rather than replicating every cached partition.
Question 52 of 60 · Features and benefits of Spark · Hard
Which transformation most directly introduces a wide dependency and therefore normally creates a shuffle boundary between Spark stages?
Not quite. Try another option.
Answer: reduceByKey, because values for each key may cross partitions
reduceByKey generally redistributes records so that equal keys meet in the same partition. This shuffle creates a wide dependency and stage boundary.
Question 53 of 60 · Features and benefits of Spark · Hard
A Spark job joins a 5 TB fact table with a 20 MB dimension table. Both are initially partitioned incompatibly. Which optimization most directly avoids shuffling the fact table?
Not quite. Try another option.
Answer: Broadcast the dimension table to executors and use a broadcast join
Broadcasting the small dimension table makes it locally available to executors, allowing fact-table partitions to be joined without a large fact-side shuffle.
Question 54 of 60 · Installation of Spark as a standalone user · Hard
Spark is unpacked in /opt/spark, but running spark-shell from another directory returns command not found. Java is already installed. Which configuration most directly fixes the issue for the current user?
Not quite. Try another option.
Answer: Set SPARK_HOME=/opt/spark and add $SPARK_HOME/bin to PATH
SPARK_HOME identifies the installation directory, while adding its bin directory to PATH makes commands such as spark-shell directly executable.
Question 55 of 60 · Installation of Spark as a standalone user · Hard
A user runs spark-submit --master local[*] app.py on a machine that is also configured as a Spark standalone worker. Where will the application's tasks execute?
Not quite. Try another option.
Answer: On the submitting machine using its available local cores
local[*] selects local mode and uses the logical cores of the submitting machine. It does not contact the standalone cluster master.
Question 56 of 60 · Installation of Spark as a standalone user · Hard
A standalone Spark master is reachable at spark://master.example:7077. A submission using --master local[8] never appears in the master's web interface. What change is required?
Not quite. Try another option.
Answer: Replace local[8] with spark://master.example:7077
local[8] runs Spark locally. Submitting to a standalone cluster requires the master's spark://host:port URL, not its web-interface URL.
Question 57 of 60 · Installation of Spark as a standalone user · Hard
In Spark standalone mode, an application is submitted with deploy mode client. The user's terminal process is then terminated unexpectedly. Which outcome is most likely?
Not quite. Try another option.
Answer: The driver is lost, so the application normally terminates
In client deploy mode, the driver runs in the submitting client process. Terminating that process removes the application's coordinator and normally ends the application.
Question 58 of 60 · Comparison of Spark vs. Hadoop ecosystem · Hard
Which statement most accurately describes the relationship between Apache Spark and the Hadoop ecosystem?
Not quite. Try another option.
Answer: Spark can use Hadoop storage and YARN without using MapReduce execution
Spark is a processing engine that can integrate with HDFS, YARN, Hive, and Hadoop formats while replacing MapReduce as the computation engine for a workload.
Question 59 of 60 · Comparison of Spark vs. Hadoop ecosystem · Hard
An organization stores data in HDFS and manages resources with YARN. It wants to migrate computation from MapReduce to Spark while retaining storage and resource management. Which change is sufficient in principle?
Not quite. Try another option.
Answer: Run Spark on YARN and continue reading and writing HDFS data
Spark can execute under YARN and directly access HDFS. The processing engine can therefore change without replacing the existing storage and resource-management layers.
Question 60 of 60 · Comparison of Spark vs. Hadoop ecosystem · Hard
A 100 TB archival transformation runs once per month, performs one sequential pass, and has no interactive or iterative reuse. Which conclusion about choosing Spark over MapReduce is most defensible?
Not quite. Try another option.
Answer: Spark's advantage may be modest because the workload has little data reuse
Spark can process data larger than memory, but its largest gains often arise from pipelining and reuse across iterations or actions. A one-pass archival job may benefit less.
That's unit 1
Answer a few questions and your score shows up here.
Nearly through. Did unit 1 of INT315 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 1 of INT315 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.