Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Is hbase snapshot valid after hfiles get deleted?

Solved Go to solution

Is hbase snapshot valid after hfiles get deleted?

Explorer

After successfully taking hbase snapshot of table, if hfiles for the table gets removed, will my snapshot be still valid?

Snapshot was taken as

hbase shell> snapshot 'tableName', 'tableSnapshot'

 

Soon after this, if all corresponding hfiles for the table is removed at OS level, what happens to the snapshot?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Is hbase snapshot valid after hfiles get deleted?

Master Guru
A snapshot in HBase is a function of some captured metadata and associated archived HFiles covering the data. If either of these were to be permanently lost, then the snapshot would be inconsistent.

There is a snapshot info utility you can invoke on snapshot name directories to have it examine the contents:

~> hbase org.apache.hadoop.hbase.snapshot.SnapshotInfo -snapshot "NAME OF SNAPSHOT"

(For more, run with -help)
3 REPLIES 3

Re: Is hbase snapshot valid after hfiles get deleted?

Rising Star
Even you hit a single host crash, the corresponding blocks are replicated
in the other hosts. That is, the hfile in the HDFS level should be safe.
Otherwise, are you running the cluster as standalone mode?

Thanks,
Dice.



--
Sent from my mobile

Re: Is hbase snapshot valid after hfiles get deleted?

Master Guru
A snapshot in HBase is a function of some captured metadata and associated archived HFiles covering the data. If either of these were to be permanently lost, then the snapshot would be inconsistent.

There is a snapshot info utility you can invoke on snapshot name directories to have it examine the contents:

~> hbase org.apache.hadoop.hbase.snapshot.SnapshotInfo -snapshot "NAME OF SNAPSHOT"

(For more, run with -help)

Re: Is hbase snapshot valid after hfiles get deleted?

Explorer
Thanks.