Support Questions
Find answers, ask questions, and share your expertise

hbase snapshot accessing older version of cell

Mentor

I don't see the levels of detail in hbase reference guide whether cell version can be accessed via hbase snapshot. Use case is I'd like to access an older version of cell via hive over hbase snapshot or via spark, is that information retained in snapshot and do I need HBase to access it or this info is retained in hfile and I can access it with anything other than hbase?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: hbase snapshot accessing older version of cell

@Artem Ervits, @Randy Gelhausen

Based on your discussion, I added a few additional lines to the github repo mentioned above. The code will now return older versions of a cell. The maximum number of snapshot versions to fetch is specified in the props file (here).

View solution in original post

6 REPLIES 6

Re: hbase snapshot accessing older version of cell

@Artem Ervits

See @Dan Zaratsian's examples reading cell versions and timestamps from a snapshot here.

Re: hbase snapshot accessing older version of cell

Mentor

@Randy Gelhausen I don't see any reference to HBase cell versions here

Re: hbase snapshot accessing older version of cell

He filters all cells by timestamp here. If I understand correctly, without the filter, the DataFrame would expose all cell versions that exist in the snapshot.

Re: hbase snapshot accessing older version of cell

Mentor

I'll give it a whirl and let you know, until then you get +1

Re: hbase snapshot accessing older version of cell

Mentor

@Randy Gelhausen confirmed with @Devaraj Das snapshot captures all info including version information for completeness, here's an example http://stackoverflow.com/questions/28334940/how-to-get-all-versions-of-an-hbase-cell-in-a-spark-newa... just need to apply to snapshot rather than table

Re: hbase snapshot accessing older version of cell

@Artem Ervits, @Randy Gelhausen

Based on your discussion, I added a few additional lines to the github repo mentioned above. The code will now return older versions of a cell. The maximum number of snapshot versions to fetch is specified in the props file (here).

View solution in original post