Is there a way to rollback values to a previous stage at cell level (row level might work also)
I imported a file with wrong data and I just need to go back to previous stage.
Is there a way to rollback values to a previous stage at cell level (row level might work also)
I imported a file with wrong data and I just need to go back to previous stage.
There are no ways to roll back a Put to HBase. However, HBase can store multiple versions of any cell, depending upon the configuration of a column family. By default it stores the most recent 3 versions of each cell. When a new Put is done, you can specify the timestamp it's written to, otherwise, it uses the current server time.
So, if you're using the defaults, and you've done no more than 1 or 2 Puts to each cell, you should be able to read out your previous data by doing a Scan.setTimeStamp(timestampBeforeYouImportedBadData).
While there is no rollback, if you made no other changes at the time and are storing more than one version you could:
run a scan over your table using setTimeRange (just specify a range that your bad data falls into)
Use the data from the scan to create timestamp restricted Delete's for all the bad data.
Of course, if you're only storing one version, you're out of luck :/