1/26
Original instructor Deck 07, cards 1–27. Quiz 3 scope. Instructor wording and answers preserved.
What does GFS stand for?
Google File System
What is the Hadoop system similar to GFS?
HDFS (Hadoop File System)
What is a Hadoop system similar to Google's BigTable?
HBase
What is a distributed analytics system that many people have started using instead of MapReduce?
Spark
When Google MapReduce and BigTable were first created, where did they store their data?
GFS
What is the technical word for having multiple copies of our data on different systems?
replication
What is the technical word for breaking our data (for example, a file) into smaller pieces that are more manageable?
partitioning
HDFS has a boss/worker architecture. What are the specific names given to the boss and workers in an HDFS cluster?
boss: NameNode worker: DataNode
When a client wants to read an HDFS file, how does it interact with the NameNode and DataNodes?
First it tells the NameNode what it wants to read, and the NameNode responds with information about where the client can find the data. Then, the client fetches the data directly from the DataNodes. Data does not flow through the NameNode because otherwise having a single NameNode would be a major bottleneck.
What are pipelined writes?
If a client wants to write 3 replicas of a block to DataNodes DN1, DN2, and DN3, it does not send the data directly to each of them. Instead, it sends the data to DN1, which forwards to DN2, which forwards to DN3. This prevents any one computer from having too much work (most importantly, the client isn't doing all the work, because the client may be a weaker machine than the servers).
If you write 1 MB to a triply replicated file, how much disk I/O does that generate? What if you read 1 MB from a triply replicated file?
Write: 3 MB (need a copy on each machine, for safety) Read: 1 MB (the three machines have identical data, so there is no point in requesting it from more than one)
How do you format an HDFS NameNode?
hdfs namenode -format
How do you start running an HDFS NameNode with hostname "main" and port 9000?
hdfs namenode --fs hdfs://main:9000
How can you get an HDFS cluster report for hdfs://main:9000/?
hdfs dfsadmin -fs hdfs://main:9000/ -report
How can you start a DataNode and connect it to a NameNode with hostname "main" on port 9000?
hdfs datanode -fs hdfs://main:9000
If you want to use commands like mkdir, cp, ls, cat, and du on HDFS, how do you do it?
hdfs dfs -COMMAND ARGS For example, to run "ls" on the "data" directory: hdfs dfs -ls hdfs://main:9000/data/
If a file is 3MB and the HDFS block size is 64MB, how much disk space is used?
3MB. HDFS does not waste the remaining 61MB — a smaller block is used. If a file does NOT fit in 1 block, it is split into multiple blocks.
Benefits of high replication?
Better fault tolerance. Higher read bandwidth (more DataNodes can serve the same block).
Benefits of low replication?
More efficient writes (a byte of logical data is written to fewer machines). Less storage used.
Benefits of large block size in HDFS?
Less memory consumed for NameNode block-map entries, and fewer lookups to the block-map (assuming files are usually bigger than the block size). More sequential I/O (more efficient).
How does the NameNode detect DataNode failure?
DataNodes send heartbeat messages every T seconds. > M seconds silent → stale (no writes) > N seconds silent → dead (underreplicated, must re-replicate)
What happens if a stale DataNode comes back online?
Data can become overreplicated — extra copies may be deleted.
In HDFS, what is the granularity of block size and replication factor?
Both are per file .
What does hdfs dfs -du -h show?
Two sizes: logical (actual) and physical (with replication). Example: 14.9K / 44.6K → 3 replicas.
What is the difference between logical blocks and physical blocks in HDFS?
Logical = chunk of the original file. Physical = a replica on a DataNode. 1 logical block × 3x replication = 3 physical blocks.
A client writes 4MB to a 5x replicated file. How much does the client send over the network?
4MB. Pipelined writes — client sends to first DN only; each DN forwards to the next.
Which nodes need formatting before starting an HDFS cluster?
Only the NameNode .