Farooque
Farooque

Reputation: 3766

What happens if RegionServer crashes and data is not yet written to DataNode?

What happens if RegionServer crashes and data is not yet written to DataNode?

Upvotes: 0

Views: 1388

Answers (1)

Umberto Griffo
Umberto Griffo

Reputation: 931

If the write-ahead log is enabled while writing data (you could disable it for fast insertions), you don't lose the data. When the client issues a Put request, HBase write the data to the write-ahead log. The WAL is used to recover not-yet-persisted data in case a server crashes. All writes and Reads are to/from the primary node. HDFS replicates the WAL and HFile blocks. HFile block replication happens automatically. HBase relies on HDFS to provide the data safety as it stores its files. When data is written in HDFS, one copy is written locally, and then it is replicated to a secondary node, and a third copy is written to a tertiary node.

Upvotes: 2

Related Questions