Sample questions
Question 1Easy
Which file format is columnar?
- CSV
- Parquet
- JSON lines
- Plain text
Answer: B. Parquet
Explanation
Columnar formats store each column together, giving better compression and column pruning for analytics.
Step-by-step solution
- Row format: record together.
- Columnar: column together.
- Parquet is columnar.
Why the other options are wrong
- A. CSV stores row after row.
- C. Row oriented text.
- D. Row oriented.
Question 2Medium
Why do analytic queries on a few columns run faster on Parquet than on CSV?
- Parquet files are always smaller than 1 KB because Parquet compresses every column to a single byte
- CSV cannot hold numbers
- Only the needed columns are read and similar values compress well
- Parquet removes the need for a schema
Answer: C. Only the needed columns are read and similar values compress well
Explanation
Column pruning and column-wise encoding cut I/O sharply.
Step-by-step solution
- Columns stored separately.
- Read only wanted ones.
- Compression per column.
Why the other options are wrong
- A. False claim.
- B. CSV can.
- D. Parquet stores the schema.
Question 3Medium
Avro is often preferred over Parquet for
- Columnar analytics scans over thousands of columns at once in analytical queries
- Image storage
- Indexing text
- Row-oriented record streaming with schema evolution, such as Kafka messages
Answer: D. Row-oriented record streaming with schema evolution, such as Kafka messages
Explanation
Avro is row-based with an embedded schema, suited to write-heavy pipelines.
Step-by-step solution
- Row oriented.
- Schema travels with data.
- Good for messaging.
Why the other options are wrong
- A. Parquet is better for that.
- B. Not its role.
- C. Not its role.
Question 4Medium
A splittable file format allows
- Files to be larger than disk, which makes the cluster run faster by itself
- Different parts of a file to be processed in parallel by separate tasks
- Automatic encryption
- Faster network cables
Answer: B. Different parts of a file to be processed in parallel by separate tasks
Explanation
For example, plain gzip files are not splittable, so one task must read the whole file.
Step-by-step solution
- Splittable: can start at block.
- Parallel mappers.
- Gzip single-threaded.
Why the other options are wrong
- A. Not what it means.
- C. Unrelated.
- D. Unrelated.
Question 5Medium
Object stores like S3 differ from HDFS in that they
- Run the compute on the same nodes always, because the storage and the compute must share the same node
- Allow in-place edits of file parts
- Need a NameNode
- Store immutable objects accessed over HTTP APIs, with no true POSIX file system semantics
Answer: D. Store immutable objects accessed over HTTP APIs, with no true POSIX file system semantics
Explanation
This separation of storage and compute is common in cloud data platforms.
Step-by-step solution
- Objects in buckets.
- Replace whole objects.
- Compute separate.
Why the other options are wrong
- A. Storage is decoupled from compute.
- B. Objects are replaced as a whole.
- C. They do not use a NameNode.
Question 6Hard
A 10 GB gzip-compressed text file is read by Spark. How many tasks will read it?
- 80, one per 128 MB block, since every 128 MB block gets its own task
- 10
- 1, since gzip is not splittable
- As many as executors
Answer: C. 1, since gzip is not splittable
Explanation
Gzip streams must be decompressed from the start, so the file becomes one partition; use a splittable codec or convert to Parquet.
Step-by-step solution
- Gzip not splittable.
- One input split.
- One task reads all.
Why the other options are wrong
- A. Needs a splittable format.
- B. Not tied to gigabytes.
- D. The task count depends on splits.
Practise all 6 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →