Support Questions

Find answers, ask questions, and share your expertise

Is hbase snapshot valid after hfiles get deleted?

avatar
Contributor

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

avatar
Mentor
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)

View solution in original post

3 REPLIES 3

avatar
Expert Contributor
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

avatar
Mentor
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)

avatar
Contributor
Thanks.