A cluster that exists for three hours a night
Kabir's new company streams cricket and films. Every night a job crunches the day's viewing logs into recommendations. Their old Hadoop cluster ran 24 hours a day for a job that needed three. Now the logs sit in cloud object storage. At 1 AM a script creates 20 machines, runs the job, writes the results back and deletes the machines. The data stays; the cluster does not.
Sir, so is Hadoop dead in the cloud? We don't even have HDFS there.
The storage moved, not the ideas. Their job still runs on YARN with Spark, reads splits in parallel, shuffles by key and uses the same Hive tables. What changed is that data lives in object storage like S3, GCS or ADLS, and clusters come and go around it.
And companies that can't move everything, like banks?
Many run Cloudera on their own servers, or a mix: sensitive data on-premises, burst work in the cloud. Today we compare the options using the numbers from our own lab, and look at what each cloud offers in October 2026.
Hadoop in the cloud
Hadoop in the cloud means running Hadoop-ecosystem engines (YARN, Spark, Hive, Trino, HBase and others) on rented virtual machines or containers, usually as a managed service such as Amazon EMR, Google Cloud Dataproc or Azure HDInsight, with data kept in object storage (Amazon S3, Google Cloud Storage, Azure Data Lake Storage) accessed through Hadoop file-system connectors (s3a://, gs://, abfs://) instead of HDFS. This separation of compute and storage allows clusters to be created per job (transient), resized automatically (autoscaling) and run partly on discounted interruptible capacity (spot or preemptible instances), while table metadata lives in a shared catalog. Cloudera provides a commercial distribution of the same open-source stack for on-premises data centres and public clouds, with central management, security and governance.
The data sits in cheap cloud storage that never switches off. When there is work, you rent a cluster for an hour, point it at the data, and delete it afterwards. Cloudera sells the same Hadoop tools, packaged and supported, for companies that run their own servers.
Words you'll meet in this lesson
s3a://, gs://, abfs://.What the platforms ship (checked 22 Oct 2026)
| Amazon EMR 7.14.0 | Hadoop 3.4.2, Spark 3.5.8, Hive 3.1.3, HBase 2.6.4, Tez 0.10.2, ZooKeeper 3.9.3, Flink 1.20.0, Trino 479, Iceberg 1.10.1, Delta 3.3.2, Hudi 1.0.2. Pig 0.17.0 and Oozie 5.2.1 still included; Sqoop dropped from emr-7.4.0 |
|---|---|
| Google Dataproc 2.3.37 | Released 30 Sep 2026: Hadoop 3.3.6, Spark 3.5.3, Hive 3.1.3, Trino 432 (optional), Iceberg 1.6.1 (1.10 available), Java 11, on Debian 12, Ubuntu 22 or Rocky Linux 9 |
| Azure HDInsight | 5.1 (GA 1 Nov 2023) is the only supported version, in maintenance mode with no new version announced; HDInsight 4.0 retired 31 Mar 2025; HDInsight on AKS retired 31 Jan 2025 |
| Cloudera Base on premises 7.3.2 | March 2026, long-term support through 2032: Hadoop 3.4, Spark 3.5, HBase 2.6.3, Ranger 2.6, Atlas 2.4, Knox 2.1; Iceberg across Hive and Impala; Ozone; JDK 17 default (8 and 11 removed) |
| Our lab, for comparison | Apache Hadoop 3.5.0 (released 2 Apr 2026) with Spark 4.0.4 on YARN; no cloud run in this lesson, costs below are illustrative |
Architecture at a glance
Left: the classic cluster, where every worker stores blocks and runs containers. Right: the cloud pattern, where storage is a service and clusters are temporary.
The cloud at three levels
Beginner Renting a kitchen by the hour
- An always-on cluster is like owning a big kitchen that you use for three hours a day. Rent, electricity and staff are paid all day.
- In the cloud the ingredients (data) stay in a cold store that never closes. You rent a kitchen (a cluster) when it is time to cook, and hand it back after.
- The recipes (Spark, Hive, MapReduce) are the same. Only the kitchen is temporary.
Intermediate What changes when storage leaves the cluster
- Paths:
hdfs://namenode/databecomess3a://bucket/data,gs://bucket/dataorabfs://container@account.dfs.core.windows.net/data. Jobs barely change. - Locality: blocks are no longer on the worker, so every read crosses the network. Cloud networks are fast, and engines read columnar files (Lesson 10.2), so this is usually fine.
- Renames are slow: in object stores a "rename" copies the data. Classic MapReduce output commit renames folders, so use the cloud-aware committers (for example the S3A "magic" committer) or table formats like Iceberg that commit by writing metadata.
- Metadata must be shared: because clusters are deleted, the metastore or catalog runs outside them (Glue, a managed Hive metastore, an Iceberg REST catalog).
Advanced Elasticity, interruption and governance
- Autoscaling watches pending YARN containers (Lesson 11.3) and adds workers; it removes them when the queue is empty, after graceful decommissioning (Lesson 6.4 idea).
- Spot/preemptible workers are much cheaper but can disappear. MapReduce and Spark rerun lost tasks (Lesson 8.6), so put them on task-only nodes and keep the AM and driver on regular nodes.
- Security moves from Kerberos keytabs (Lesson 12.5) to cloud identity (IAM roles), though Kerberos and Ranger still appear on long-running clusters and in Cloudera.
- Cost governance becomes engineering: tags, budgets, auto-termination of idle clusters, lifecycle rules that move old objects to colder storage classes.
Exam tip: For “Compare HDFS with cloud object storage”, write four rows: locality (yes vs no), cost model (disks for three copies, always on vs pay per GB stored), operations (rename is a metadata change vs a copy), lifetime (dies with the cluster vs independent of any cluster). Add one example connector such as s3a://.
Ways to run Hadoop workloads today
| Option | Where data lives | Clusters | Good for | Watch out for |
|---|---|---|---|---|
| Self-managed Apache Hadoop | HDFS on your servers | Long-running | Full control, learning, steady load | You do every upgrade and patch |
| Cloudera Base on premises | HDFS or Ozone on your servers | Long-running, managed by Cloudera Manager | Regulated industries, large steady estates | Licence cost, hardware cycles |
| EMR on EC2 / Dataproc / HDInsight | S3 / GCS / ADLS | Transient or long-running | Lift-and-shift, nightly batch | Idle clusters left running; HDInsight is in maintenance mode |
| EMR on EKS, EMR Serverless, Dataproc Serverless | Object storage | No cluster to manage | Spark jobs of all sizes | Less tuning control, per-job start-up |
| Cloudera public cloud / data services | Object storage | Managed by Cloudera in your cloud account | Same tools on-prem and in cloud (hybrid) | Two bills: Cloudera and the cloud |
Migration patterns
Lift-and-shift
Copy HDFS data to object storage (DistCp, Lesson 12.2), run the same jobs on a long-running cloud cluster. Fast, but keeps on-prem habits and cost.
weeksRe-platform
Same Spark and Hive code, but transient clusters, autoscaling, spot workers and a shared catalog. Most of the saving comes here.
monthsRe-architect
Move to a lakehouse: Iceberg/Delta tables, serverless engines, streaming ingestion. MapReduce jobs are rewritten in Spark SQL.
a year+Hybrid
Keep regulated data and steady jobs on Cloudera on-prem; burst experiments and seasonal peaks to the cloud with copies of non-sensitive data.
common in IndiaAnimated example: one night on a transient cluster
- 01:00: a scheduler (Airflow, say) asks the cloud for a cluster; four workers boot from a managed image.
- 01:06: Spark reads the day's logs directly from object storage; the shared catalog tells it where the table lives.
- 01:20: YARN has many pending containers, so autoscaling adds four cheaper spot workers.
- 03:40: results are committed as an Iceberg table. One spot worker was reclaimed; its tasks reran elsewhere.
- 04:00: the job is done and the cluster is terminated. Data and table definitions remain in storage and the catalog.
- The bill: only the hours the machines existed, plus storage. (Illustrative story; times and sizes are examples.)
The most common cloud waste is a cluster nobody remembered to stop. Every managed service has an auto-termination or idle-timeout setting; turn it on before the first job, and tag clusters with an owner and a cost centre.
Deciding with numbers
We did not create cloud resources for this lesson, so there is no cloud lab output here. Instead we feed numbers we measured on our own cluster into a small calculator, cloud_vs_onprem.py, with prices clearly marked as illustrative.
Measure your own throughput first
Cloud sizing starts with how fast your jobs and copies really are. Our laptop numbers are small, but the method is the same on a 200-node cluster.DistCp, 5 files, 162 MB, prod → DR 25.5 s (Lesson 12.2) TestDFSIO write, 1 task 113 MB/s (Lesson 12.3) TestDFSIO write, 6 tasks, aggregate ~210 MB/s on one shared laptop disk Spark on YARN, item revenue, wall time ~46–50 s incl. executor start (Lesson 13.2)Compare compute: always-on vs per-night
The ratio is what matters: 3 h 15 min of 24 h is 14%. Spot workers cut it further. Prices are placeholders: check the provider's price page.always_on = workers * 24 * 30 * NODE_HOUR transient = workers * (job_hours + 0.25) * 30 * NODE_HOURalways-on 20 workers : Rs 576,000 transient, 3h15m a night : Rs 78,000 (14% of always-on) transient, 4 core + 16 spot: Rs 40,560 (7%)Compare storage: three copies on disks vs object storage
100 TB in HDFS needs about 429 TB of raw disk (three copies, 30% headroom, Lesson 12.3). Erasure coding (Lesson 7.3) or Parquet compression (Lesson 10.2) shrink both sides.hdfs = data_tb * 3 / 0.7 * DISK_TB_MONTH # x3 copies, disks at most 70% full obj = data_tb * OBJECT_TB_MONTHHDFS: 429 TB of raw disk : Rs 385,714 object storage, 100 TB : Rs 170,000Estimate the move
Migration is often limited by the network link, not by Hadoop. Large moves use dedicated links or physical transfer appliances, and DistCp withmb_s = gbps * 1000 / 8 * 0.7 # 70% of the link usableat our lab's DistCp speed (6.4 MB/s): 191 days over a 1 Gbps link at 70% use (88 MB/s): 13.9 days over a 10 Gbps link at 70% use (875 MB/s): 1.4 days-updatecatches up the changes made during the copy.Change the paths, not the logic
The Hadoop FileSystem API (Lesson 6.5) hides the store behind a URI scheme. What changes is configuration: credentials come from cloud roles, and output commit uses a cloud-aware committer.spark-submit job.py hdfs://namenode/user/hadoop/data/student_orders.csv # our lab spark-submit job.py s3a://canteen-data/orders/ # AWS spark-submit job.py gs://canteen-data/orders/ # Google Cloud
Copying data to the cloud is easy; copying it back can cost a lot (data egress is usually billed) and take weeks. Decide early which copy is the master and keep the other in sync with DistCp -update or snapshot-diff (Lesson 12.2).
The same job, two lifecycles
Six steps of one nightly job: on a long-running on-premises cluster (left in each picture) and on a transient cloud cluster.
- On-prem the cluster is always running; in the cloud the job starts by creating one with auto-termination on.
- The job itself is the same; only the input URI changes from hdfs:// to s3a://.
- On-prem most maps read local blocks; in the cloud every read crosses the network.
- When work piles up, on-prem jobs wait in the queue; the cloud cluster grows with spot workers.
- Committing output differs: an HDFS rename is cheap, an object-store rename is a copy, so cloud jobs use special committers or table formats.
- Afterwards the on-prem cluster idles and the cloud cluster is deleted. (Costs illustrative.)
- On-prem the workers are already up; in the cloud a few workers boot from a managed image.
- Both run YARN and Spark; one reads HDFS, the other object storage through the s3a connector.
- On-prem tasks find their blocks on the same node; cloud tasks stream data over the network.
- On-prem a full queue means waiting; the cloud cluster adds spot workers for the peak.
- On-prem the committer renames a temporary folder; in the cloud the commit writes metadata instead of renaming.
- On-prem the machines idle until the next run; the cloud cluster is gone and only storage remains.
Cloud and Cloudera at work
1. Streaming and media: nightly transient clusters
OTT platforms process the day's viewing logs on a cluster created at night over object storage, scaling out on match days and deleting the cluster afterwards.
2. Banking: hybrid Cloudera
Banks often keep customer and transaction data on Cloudera clusters in their own data centres, governed by Ranger and Atlas, and use the cloud for masked or aggregated data in analytics experiments.
3. Retail: autoscaling for sale days
An e-commerce company's clickstream jobs need five times the usual compute during festival sales. Autoscaling with spot workers covers the peak without buying servers that sit idle the rest of the year.
4. Telecom: migrating a 2 PB estate
An operator moves call-record history to object storage in waves: DistCp for the bulk, -update runs to catch up changes, then jobs switch their URIs table by table.
5. Research and government data: serverless Spark
Small teams processing survey or scheme data run occasional Spark jobs on serverless offerings, paying per job and never managing a cluster at all.
Simplified; organisations differ in tools, prices, contracts and regulations. This is not legal or financial advice.
Sources (checked 22 Oct 2026): Amazon EMR 7.x application versions · Dataproc 2.3.x release versions · HDInsight roadmap (Directions on Microsoft) · HDInsight 4.0 retirement · HDInsight on AKS retirement · Cloudera Base on premises 7.3.2 · Apache Hadoop releases
Always-on vs transient: a cost and time calculator
Prices are illustrative variables, not quotes: change them to the numbers on your provider's price page. The structure of the comparison is what matters.
NODE_HOUR = 40.0 # illustrative Rs per worker-hour
workers, job_hours, nights = 20, 3, 30
setup = 0.25 # 15 minutes to create and terminate
always_on = workers * 24 * nights * NODE_HOUR
transient = workers * (job_hours + setup) * nights * NODE_HOUR
print(f"always-on : Rs {always_on:>9,.0f} a month")
print(f"transient : Rs {transient:>9,.0f} a month ({transient / always_on:.0%})")
busy = job_hours / 24
print(f"the always-on cluster is busy {busy:.0%} of the time")transient = workers * (job_hours + setup) * nights * NODE_HOURYou pay only while the cluster exists, including a few minutes to boot and shut down.busy = job_hours / 24Utilisation decides the winner. A cluster busy 20 hours a day is cheaper to keep running.
Run it on your PC: compare the options with your own numbers
No cloud account is needed: this lesson did not create cloud resources. cloud_vs_onprem.py takes the throughput we measured in Lessons 12.2 and 12.3 and illustrative prices, and prints the three comparisons from Part 4. Put your provider's real prices into the variables at the top before using the numbers for a decision.
Compute, storage and migration time
# cloud_vs_onprem.py: always-on cluster vs a transient (per-job) cloud cluster, and the time to
# move data to the cloud. ALL PRICES ARE ILLUSTRATIVE - check the provider's price page.
# Measured inputs come from our lab: DistCp 162 MB in 25.5 s (12.2), TestDFSIO aggregate write
# ~210 MB/s on one shared laptop disk (12.3).
# --- 1. compute: a nightly 3-hour job on 20 workers -----------------------------------------
NODE_HOUR = 40.0 # illustrative Rs per worker-hour (on-demand)
SPOT_DISCOUNT = 0.6 # illustrative: spot/preemptible workers 60% cheaper
workers, job_hours = 20, 3
always_on = workers * 24 * 30 * NODE_HOUR
transient = workers * (job_hours + 0.25) * 30 * NODE_HOUR # +15 min to create and terminate
spot = 4 * (job_hours + 0.25) * 30 * NODE_HOUR + 16 * (job_hours + 0.25) * 30 * NODE_HOUR * (1 - SPOT_DISCOUNT)
print("1. Compute for a month (illustrative prices)")
print(f" always-on 20 workers : Rs {always_on:>10,.0f}")
print(f" transient, 3h15m a night : Rs {transient:>10,.0f} ({transient / always_on:.0%} of always-on)")
print(f" transient, 4 core + 16 spot: Rs {spot:>10,.0f} ({spot / always_on:.0%})")
# --- 2. storage: 100 TB of data, HDFS x3 replication vs object storage ---------------------
data_tb = 100
DISK_TB_MONTH = 900.0 # illustrative Rs per raw TB-month of cluster disk (server + power + ops)
OBJECT_TB_MONTH = 1700.0 # illustrative Rs per TB-month of object storage (replication included)
hdfs = data_tb * 3 / 0.7 * DISK_TB_MONTH # x3 copies, keep disks <= 70% full
obj = data_tb * OBJECT_TB_MONTH
print("2. Storage for 100 TB a month (illustrative prices)")
print(f" HDFS: {data_tb * 3 / 0.7:.0f} TB of raw disk : Rs {hdfs:>10,.0f}")
print(f" object storage, 100 TB : Rs {obj:>10,.0f}")
# --- 3. moving data: our measured DistCp speed, and a real network link --------------------
lab_mb_s = 162 / 25.5
print("3. Moving 100 TB")
print(f" at our lab's DistCp speed ({lab_mb_s:.1f} MB/s): {100 * 1024 * 1024 / lab_mb_s / 86400:,.0f} days")
for gbps in [1, 10]:
mb_s = gbps * 1000 / 8 * 0.7 # assume 70% of the link is usable
print(f" over a {gbps:>2} Gbps link at 70% use ({mb_s:,.0f} MB/s): {100 * 1024 * 1024 / mb_s / 86400:5.1f} days")
# Run: python3 cloud_vs_onprem.pyReal output of the script. The prices inside it are illustrative placeholders; the measured inputs (6.4 MB/s DistCp in our lab) are real.
Which URI scheme talks to which store?
Hadoop picks a FileSystem class from the scheme of the path. Follow four paths through the lookup.
Worked examples: real problems, solved and traced in memory
Four cloud decisions from different industries, each with the numbers written out. All prices are illustrative.
A streaming company: always-on or nightly cluster?
Problem statement
A nightly recommendation job needs 30 workers for 4 hours. A worker costs ₹50 an hour (illustrative). Compare a month of an always-on cluster with a cluster created each night (add 15 minutes for start and stop).
30 workers · 4 h a night · ₹50/hour · 30 nights
always-on Rs 1,080,000, transient Rs 191,250 (18%)
Approach
- Always-on: workers × 24 h × 30 nights × price.
- Transient: workers × (4 + 0.25) h × 30 nights × price.
- Compare the ratio.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
A hospital archive: HDFS or object storage?
Problem statement
A hospital network keeps 40 TB of de-identified imaging metadata. On HDFS it needs 3 copies with disks at most 70% full, at ₹900 per raw TB-month; object storage costs ₹1,700 per TB-month (both illustrative). Which is cheaper per month?
40 TB · ×3 / 0.7 · ₹900 vs ₹1,700
HDFS 171 TB raw: Rs 154,286 | object store: Rs 68,000
Approach
- Raw HDFS disk = 40 × 3 / 0.7.
- Multiply each by its price.
- Remember what each price includes (servers, power, staff vs a service).
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
How long to move 2 PB to the cloud?
Problem statement
A telecom operator wants to move 2 PB of call-record history. Its link to the cloud is 10 Gbps, and 70% can be used for the move. How many days does the bulk copy take?
2 PB · 10 Gbps · 70%
28 days at 875 MB/s
Approach
- Usable speed in MB/s = 10,000 / 8 × 0.7.
- Size in MB = 2 × 1024 × 1024 × 1024.
- Days = size / speed / 86,400.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Which platform for a payments analytics team?
Problem statement
A fintech must keep raw payment data in India, runs a steady 18-hour-a-day ETL, and has bursty fraud-model training a few days a month. Score three options: (A) Cloudera on-prem only, (B) cloud only, (C) hybrid: Cloudera on-prem for raw data and ETL, cloud for training on masked data.
3 options · 4 criteria
A on-prem total 9 (residency, steady, burst, ops) = [3, 3, 1, 2] B cloud total 9 (residency, steady, burst, ops) = [2, 1, 3, 3] C hybrid total 10 (residency, steady, burst, ops) = [3, 3, 3, 1]
Approach
- List the criteria: residency, steady load cost, burst cost, operations effort.
- Score each option 1–3 (illustrative judgement).
- Add up, then sanity-check the winner against the hard rule (residency).
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Check yourself
Quick revision
Lesson 13.3 in one screen
- Cloud pattern: data in object storage (S3, GCS, ADLS via
s3a://,gs://,abfs://), clusters transient and autoscaled, metadata in a shared catalog. - Trade-offs: no data locality; renames are copies (use cloud-aware committers or table formats); pay per hour; egress costs.
- Spot/preemptible workers for task nodes; keep the AM/driver on regular nodes.
- Oct 2026: EMR 7.14.0 (Hadoop 3.4.2, Spark 3.5.8, Iceberg 1.10.1); Dataproc 2.3.37 (Hadoop 3.3.6, Spark 3.5.3); HDInsight 5.1 maintenance mode; Cloudera Base on premises 7.3.2 LTS to 2032.
- Migration path: lift-and-shift → re-platform (transient, autoscale) → re-architect (lakehouse). Hybrid is common for regulated data.
- Illustrative calculator: 20 workers, 3 h a night → transient ≈ 14% of always-on; 100 TB on HDFS needs ≈ 429 TB raw disk.
Interview and viva questions
Is Hadoop still used in the cloud?
Its pieces are. Managed services such as Amazon EMR and Google Dataproc run YARN, Spark, Hive, HBase and other Hadoop-ecosystem projects, and Hadoop's FileSystem connectors (s3a, gs, abfs) are how those engines read cloud storage. What is used less is HDFS as the main store: data usually lives in object storage and clusters are temporary.
What is the difference between HDFS and Amazon S3 for Hadoop jobs?
HDFS stores blocks on the cluster's own disks with three copies, gives data locality and cheap renames, but lives and dies with the cluster. S3 is a separately billed object store, independent of any cluster, without data locality and where a rename is a copy. Jobs switch by changing hdfs:// to s3a:// and using a suitable committer.
What is a transient cluster?
A cluster created for a job or a batch window and deleted when the work finishes. Because the data is in object storage and table definitions are in a shared catalog, nothing is lost when the machines go away, and you pay only for the hours they ran.
What does Cloudera offer today?
A supported distribution of the open-source data stack (Hadoop, Hive, Impala, Spark, HBase, Kafka, Ranger, Atlas and others) for your own data centres (Cloudera Base on premises, with 7.3.2 announced in March 2026 as an LTS release supported through 2032) and for public clouds, managed with Cloudera Manager. Hortonworks merged into Cloudera in 2019, and MapR's platform became HPE Ezmeral Data Fabric.
Should a company move its Hadoop cluster to the cloud?
It depends on utilisation, data rules and skills. Bursty or mostly idle workloads usually save money on transient cloud clusters; steady, heavily used clusters may be cheaper on owned hardware; regulated data may need to stay in a specific location. Many organisations choose a hybrid. Compare with your own measured throughput and real prices, and treat this lesson's numbers as illustrative.
Practice problems
Cloud and Cloudera exercises using our lab measurements and illustrative prices.
Utilisation
A cluster runs jobs 6 hours a day. What percentage of the day is it busy?
6 / 24
25% busy
Show solution and explanation
print(f"{6 / 24:.0%} busy")How it works: 25%: three quarters of an always-on cluster's cost pays for idle time.
Change the path
Rewrite the input path hdfs://namenode/data/orders for S3 bucket "shop" and for GCS bucket "shop".
one path, two stores
s3a://shop/data/orders gs://shop/data/orders
Show solution and explanation
path = "hdfs://namenode/data/orders"
rest = path.split("/", 3)[3]
print("s3a://shop/" + rest)
print("gs://shop/" + rest)How it works: s3a://shop/data/orders and gs://shop/data/orders: the job code stays the same.
Raw disk for HDFS
How much raw disk does 25 TB of data need on HDFS with 3 copies and disks at most 70% full?
25 × 3 / 0.7
107 TB
Show solution and explanation
print(f"{25 * 3 / 0.7:.0f} TB")How it works: About 107 TB: object storage bills you for the 25 TB you store.
Break-even hours
Transient clusters cost 15 extra minutes per run. Above how many busy hours a day does always-on become cheaper, if spot gives no discount?
hours + 0.25 vs 24
6 transient cheaper 12 transient cheaper 18 transient cheaper 23 transient cheaper 23.75 always-on cheaper or equal 24 always-on cheaper or equal
Show solution and explanation
for h in [6, 12, 18, 23, 23.75, 24]:
print(h, "transient cheaper" if h + 0.25 < 24 else "always-on cheaper or equal")How it works: Only above 23.75 hours: without other differences, per-run clusters win almost always on compute; in practice storage, start-up delays and staff time decide.
Spot savings
A nightly job uses 10 workers for 5 hours at ₹40/hour; 8 of them can be spot at 60% off (illustrative). What is the monthly saving?
10 workers · 5 h · 30 nights
Rs 60,000 -> Rs 31,200, saving Rs 28,800
Show solution and explanation
full = 10 * 5 * 30 * 40
spot = 2 * 5 * 30 * 40 + 8 * 5 * 30 * 40 * 0.4
print(f"Rs {full:,.0f} -> Rs {spot:,.0f}, saving Rs {full - spot:,.0f}")How it works: ₹60,000 → ₹31,200, saving ₹28,800 a month (illustrative), as long as reruns after reclaimed workers stay rare.
Transfer at lab speed
At our lab's DistCp speed (162 MB in 25.5 s), how many hours does a 100 GB daily increment take?
100 GB · 6.35 MB/s
4.5 hours
Show solution and explanation
mb_s = 162 / 25.5
print(f"{100 * 1024 / mb_s / 3600:.1f} hours")How it works: About 4.5 hours on our laptop lab; production clusters copy with many maps in parallel and much faster disks and networks.
Idle cluster alarm
A forgotten 50-worker cluster at ₹40/hour (illustrative) runs over a long weekend of 72 hours. What does it cost, and what setting prevents it?
50 × 72 × ₹40
Rs 144,000
Show solution and explanation
print(f"Rs {50 * 72 * 40:,}")How it works: ₹1,44,000 for nothing; enable auto-termination or an idle timeout and tag clusters with an owner.
Pick the platform
Write a function that suggests on-prem, cloud or hybrid from three answers: data must stay on own premises (yes/no), average utilisation (0–1), burstiness (low/high).
3 inputs
(True, 0.8, 'high') -> hybrid: regulated data on-prem, masked data to the cloud for peaks (False, 0.15, 'high') -> cloud with transient clusters (False, 0.85, 'low') -> compare carefully: steady load can be cheaper on owned hardware (True, 0.5, 'low') -> on-prem (e.g. Cloudera Base)
Show solution and explanation
def suggest(on_prem_rule, utilisation, burst):
if on_prem_rule and burst == "high":
return "hybrid: regulated data on-prem, masked data to the cloud for peaks"
if on_prem_rule:
return "on-prem (e.g. Cloudera Base)"
if utilisation > 0.7 and burst == "low":
return "compare carefully: steady load can be cheaper on owned hardware"
return "cloud with transient clusters"
for case in [(True, 0.8, "high"), (False, 0.15, "high"), (False, 0.85, "low"), (True, 0.5, "low")]:
print(case, "->", suggest(*case))How it works: A simple rule of thumb in code. Real decisions also weigh skills, contracts and exit costs.
Real-world scenario questions (asked in company interviews)
Cloud-migration and platform questions are common for senior data engineers and architects.
“How is running Spark on EMR or Dataproc different from our Hadoop cluster?”
An interviewer checks whether you understand the cloud pattern.
The interviewer is checking: compute–storage separation.
Show a strong answer
- Same engines (YARN, Spark, Hive), but data in object storage via s3a:// or gs://, not HDFS.
- Clusters can be transient and autoscaled; you pay per hour; spot workers for task nodes.
- Differences to handle: no data locality, renames are copies (use the right committer), shared catalog outside the cluster.
Plan the migration of a 1 PB on-prem cluster to the cloud
Hundreds of Hive tables, nightly Spark and MapReduce jobs, a 6-month deadline.
The interviewer is checking: phasing and risk control.
Show a strong answer
- Inventory tables, jobs, owners and dependencies; decide what to retire.
- Bulk copy with DistCp in waves, keep in sync with -update or snapshot-diff; migrate the metastore.
- Move jobs table by table with parallel runs and result comparison; then switch, then decommission. Estimate network time first (1 PB at 10 Gbps ≈ 2 weeks of pure transfer).
“Our cloud bill doubled after moving off Hadoop. Why?”
A manager expected savings.
The interviewer is checking: cloud cost habits.
Show a strong answer
- Lift-and-shift kept always-on clusters sized for peak; enable autoscaling, auto-termination and spot task nodes.
- Check egress, small files and full-table scans (use Parquet/ORC, partitioning).
- Tag resources per team and set budgets and alerts.
A bank asks: Cloudera on-prem, cloud, or both?
Regulated customer data, steady ETL, bursty data-science work.
The interviewer is checking: balanced reasoning without legal claims.
Show a strong answer
- Start from data rules (confirmed with compliance), then utilisation and burst patterns.
- Steady, regulated workloads fit on-prem (e.g. Cloudera Base with Ranger/Atlas); bursts fit cloud with masked data.
- Plan one identity, one catalog and one policy model across both, or the hybrid becomes two silos.