0
0
Hadoopdata~20 mins

HBase vs HDFS comparison in Hadoop - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
HBase vs HDFS Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Primary difference between HBase and HDFS

Which statement best describes the primary difference between HBase and HDFS?

AHBase stores data as files, while HDFS stores data in tables with rows and columns.
BHBase is designed for batch processing, while HDFS supports real-time queries.
CHBase is a NoSQL database for real-time read/write access, while HDFS is a distributed file system for batch processing.
DHBase and HDFS are both relational databases used for structured data storage.
Attempts:
2 left
💡 Hint

Think about how each system handles data access and storage format.

data_output
intermediate
1:30remaining
HBase data retrieval example output

Given the following HBase table snapshot, what will be the output of retrieving the value for row key 'user1' and column 'info:name'?

Hadoop
Row key: user1
Column Family: info
Columns:
  name: Alice
  age: 30
Row key: user2
Column Family: info
Columns:
  name: Bob
  age: 25
A"Alice"
B"user1"
C"info:name"
D"30"
Attempts:
2 left
💡 Hint

Focus on the value stored at the specified row and column.

Predict Output
advanced
1:00remaining
HDFS file replication factor effect

What will be the output of the following command showing the replication factor of a file in HDFS?

Hadoop
hdfs dfs -stat %r /user/data/file1.txt
A0
B1
CError: command not found
D3
Attempts:
2 left
💡 Hint

By default, what is the replication factor for files in HDFS?

🧠 Conceptual
advanced
2:00remaining
Use case best suited for HBase over HDFS

Which use case is best suited for HBase rather than HDFS?

ARunning MapReduce jobs on large datasets.
BReal-time querying of user profile data with frequent updates.
CArchiving large video files for long-term storage.
DStoring large log files for batch analysis.
Attempts:
2 left
💡 Hint

Consider which system supports fast random reads and writes.

🔧 Debug
expert
3:00remaining
Identifying error in HBase data insertion code

What error will the following Python code produce when trying to insert data into HBase using the HappyBase library?

Hadoop
import happybase
connection = happybase.Connection('localhost')
table = connection.table('users')
table.put('user1', {'info:name': 'Alice', 'info:age': b'30'})
ATypeError: expected bytes, int found
BConnectionError: Could not connect to HBase
CSyntaxError: invalid syntax
DNo error, data inserted successfully
Attempts:
2 left
💡 Hint

Check the data types required by HappyBase for values.