130 likes | 304 Views
JIRA HBASE-11447 A Common Transactional API for HBase. John de Roo Hewlett Packard, July 2014. Acknowledgements. Horton Works Continuuity SalesForce.com Xiaomi and others. What are our aims?. Simple API with all the required transactional support
E N D
JIRA HBASE-11447 A Common Transactional API for HBase John de Roo Hewlett Packard, July 2014
Acknowledgements • Horton Works • Continuuity • SalesForce.com • Xiaomi • and others
What are our aims? • Simple API with all the required transactional support • Single, consistent transaction interface for HBase developers • Easy, parameterized switching between Transaction Managers • Code once and select the best Transaction Manager for the purpose
What do we hope to achieve? • Accelerate transaction adoption within the HBase community • Provide HBase developers with a choice of Transaction Managers • But why now? • There are a number of HBase TM implementations both Open source and proprietary • All have different interfaces • Emerging usage models like OLTP expect transaction capabilities
API Summary • Transaction Manager independent • Simple interface - similar to existing transactional APIs on HBase • Full transactional functionality • Transaction Managers can be switched in hbase-site.xml • Extensible – TMs can add additional function • Not part of proposal • Two-phased commit/heterogeneous transaction support • DDL support – does not cover table create, delete • Allows only one Transaction Manager at a time • No protection from mixing transactional and non-transactional work
Classes • TransactionService • Represents the Transaction Manager service • Transaction • Represents a transaction • TransactionTable Interface • Represents a transactional HTable
Only need one of these Accepts Configuration as a parameter Global get/set operations for the transaction service API – TransactionService class
API – Transaction class • Creating a transaction object begins a transaction • Transaction representation • Methods for commit and rollback
API – TransactionTable interface • Subclasses HTableInterface • One new method - setTransaction sets the transaction • Method signature for all other methods unchanged – eg put
For more information • Look up JIRA HBASE-11447 • The latest version of the proposal is 0.5 • Contains the entire discussion history • More to come: • Sample application code • Compatibility shim • And please please give us your feedback on the JIRA.