Reply
Highlighted
Explorer
Posts: 11
Registered: ‎07-26-2016
Accepted Solution

Is hbase snapshot valid after hfiles get deleted?

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?

 

Cloudera Employee
Posts: 92
Registered: ‎08-01-2013

Re: Is hbase snapshot valid after hfiles get deleted?

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
Posts: 1,903
Kudos: 435
Solutions: 307
Registered: ‎07-31-2013

Re: Is hbase snapshot valid after hfiles get deleted?

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)
Explorer
Posts: 11
Registered: ‎07-26-2016

Re: Is hbase snapshot valid after hfiles get deleted?

Thanks.