File Formats & Storage Questions with Answers

6 practice questions on File Formats & Storage (Big Data (Hadoop & Spark)) with answers and step-by-step solutions. Try 6 samples below, then practise all 6 free in the AptiNest app.

Sample questions

Question 1Easy

Which file format is columnar?

  1. CSV
  2. Parquet
  3. JSON lines
  4. Plain text

Answer: B. Parquet

Explanation

Columnar formats store each column together, giving better compression and column pruning for analytics.

Step-by-step solution

  1. Row format: record together.
  2. Columnar: column together.
  3. 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?

  1. Parquet files are always smaller than 1 KB because Parquet compresses every column to a single byte
  2. CSV cannot hold numbers
  3. Only the needed columns are read and similar values compress well
  4. 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

  1. Columns stored separately.
  2. Read only wanted ones.
  3. 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

  1. Columnar analytics scans over thousands of columns at once in analytical queries
  2. Image storage
  3. Indexing text
  4. 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

  1. Row oriented.
  2. Schema travels with data.
  3. 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

  1. Files to be larger than disk, which makes the cluster run faster by itself
  2. Different parts of a file to be processed in parallel by separate tasks
  3. Automatic encryption
  4. 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

  1. Splittable: can start at block.
  2. Parallel mappers.
  3. 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

  1. Run the compute on the same nodes always, because the storage and the compute must share the same node
  2. Allow in-place edits of file parts
  3. Need a NameNode
  4. 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

  1. Objects in buckets.
  2. Replace whole objects.
  3. 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?

  1. 80, one per 128 MB block, since every 128 MB block gets its own task
  2. 10
  3. 1, since gzip is not splittable
  4. 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

  1. Gzip not splittable.
  2. One input split.
  3. 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 →

Related topics

See all Big Data (Hadoop & Spark) topics · All topics