How to dump an HBase table?

How can I find out last transaction in hbase table ? based on timestamp of rows

  • is there any way to do it from hbase shell ?

  • Answer:

    Your term "last transaction" is actually vague.  In a technical sense, there is no relation between the timestamp & transaction ordering.  The timestamp is a user-specified ID for ordering.  This means that you can validly write: R1:TS1, R1:TS2, R1:TS1 What is the "last transaction"?  For DB purposes, the write to TS1 is the last transaction.  For scan or get purposes, TS2 will always show up first.  The DB knows that TS1 is last because it assigns a Sequence ID: a per-region, server-specified ID for transaction ordering.  This is used for DR and for deeply-integrated systems like Backup & Replication.  The Sequence ID is not publicly exposed, but can be obtained through Coprocessors.  For universal support, you would need the transaction's Sequence ID for understanding the last transaction. However, most people don't go off and write crazy deep-inspection coprocessors by default.  You probably just want to enforce some application-level restrictions on your schema.  If you are doing any sort of user-pinning on the cache side, then your caching server is a single point of truth and you can explicityly specify the TS with System.currentTimeMillis() there to get proper relative ordering.

Nicolas Spiegelberg at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.