Practice Library
All MCQs
Browse exam-wise, subject-wise, and country-wise MCQs with explanations.
Choose an option to check your answer.
A.
A component that fits a model or Transformer from a DataFrame
B.
A component that only writes data
C.
A fixed SQL expression
D.
A cached RDD partition
Show Answer
Correct Answer: A. A component that fits a model or Transformer from a DataFrame
Explanation:
An Estimator exposes fit() and learns parameters from input data.
The resulting object is usually a Transformer.
Choose an option to check your answer.
A.
A component that learns parameters from data
B.
A YARN container type
C.
An HDFS file converter only
D.
A component that converts one DataFrame into another using an existing model or rule
Show Answer
Correct Answer: D. A component that converts one DataFrame into another using an existing model or rule
Explanation:
Transformers add predictions or derived features through transform().
Models and feature-processing stages can both be Transformers.
Choose an option to check your answer.
A.
An HDFS metadata service
B.
A Scala compiler
C.
Spark's library for scalable machine learning and related utilities
D.
A YARN scheduling algorithm
Show Answer
Correct Answer: C. Spark's library for scalable machine learning and related utilities
Explanation:
MLlib provides algorithms, feature tools, pipelines, and evaluators.
Its APIs operate on distributed Spark data structures.
Choose an option to check your answer.
A.
NULL equals every value
B.
It yields unknown rather than true, so null-specific functions are needed
C.
NULL is automatically converted to zero
D.
The query always fails
Show Answer
Correct Answer: B. It yields unknown rather than true, so null-specific functions are needed
Explanation:
SQL uses three-valued logic for nulls.
Functions such as isNull or null-safe equality express the intended test.
Choose an option to check your answer.
A.
The optimizer has less visibility and may incur serialization overhead
B.
UDFs always run on the driver
C.
Built-in functions cannot use executors
D.
UDFs disable schemas entirely
Show Answer
Correct Answer: A. The optimizer has less visibility and may incur serialization overhead
Explanation:
Built-in expressions participate fully in Catalyst optimization and code generation.
UDF boundaries can limit optimization and add data-conversion costs.
Choose an option to check your answer.
A.
The values of every row
B.
The contents of executor memory
C.
The HDFS replication history
D.
Its logical and physical execution plans
Show Answer
Correct Answer: D. Its logical and physical execution plans
Explanation:
Execution plans show scans, joins, exchanges, and other operators.
They are essential for diagnosing performance.
Choose an option to check your answer.
A.
Reducing executor count
B.
Removing RDD lineage
C.
Skipping data partitions whose partition values cannot satisfy a query
D.
Deleting table partitions
Show Answer
Correct Answer: C. Skipping data partitions whose partition values cannot satisfy a query
Explanation:
Filters on partition columns allow Spark to avoid opening unrelated directories.
Good partition design can greatly reduce scanned data.
Choose an option to check your answer.
A.
They store every row as plain text
B.
They are columnar and support compression, column pruning, and predicate statistics
C.
They cannot contain schemas
D.
They require one file per value
Show Answer
Correct Answer: B. They are columnar and support compression, column pruning, and predicate statistics
Explanation:
Columnar storage reads only relevant fields and compresses similar values well.
Metadata can also help skip unnecessary data.
Choose an option to check your answer.
A.
Reading or processing only columns required by the query
B.
Deleting columns permanently from source files
C.
Reducing the number of rows
D.
Changing columns to partitions
Show Answer
Correct Answer: A. Reading or processing only columns required by the query
Explanation:
Structured formats can avoid reading unused columns.
This lowers I/O, memory use, and CPU work.
Medium
Choose an option to check your answer.
A.
Moving filters from executors to the driver
B.
Sorting predicates alphabetically
C.
Broadcasting every row
D.
Applying supported filters inside the data source before loading all records
Show Answer
Correct Answer: D. Applying supported filters inside the data source before loading all records
Explanation:
Pushdown reduces the amount of data read and transferred.
Its availability depends on the file format and connector.
Choose an option to check your answer.
A.
The HDFS replication manager
B.
A Scala collection library
C.
The framework's logical and physical query optimizer
D.
A streaming input source
Show Answer
Correct Answer: C. The framework's logical and physical query optimizer
Explanation:
Catalyst applies analysis and optimization rules to query plans.
It selects an executable physical strategy.
Choose an option to check your answer.
A.
A global sort only
B.
Grouped aggregation over one or more columns
C.
A row-wise map with no grouping
D.
A file-system checkpoint
Show Answer
Correct Answer: B. Grouped aggregation over one or more columns
Explanation:
Rows sharing grouping values are combined for aggregate functions.
The operation generally requires a shuffle.