SlideShare una empresa de Scribd logo
1 de 46
Secondary Indexing in Phoenix
Jesse Yates
HBase Committer
Software Engineer
HBase BoF – June 25, 2013
Outline
• Motivation
• History
• HBase Consistent Indexing
– Index Management
– Recovery Mechanism
• Conclusion
HBase BoF - June 20132
A quick note…
HBase BoF - June 20133
Outline
• Motivation
• History
• HBase Consistent Indexing
– Index Management
– Recovery Mechanism
• Conclusion
HBase BoF - June 20134
Why do we need them?
• Sorted by key
– Great for accessing on that key
HBase BoF - June 20135
What if we want to access by another dimension!?
A short example
HBase BoF - June 20136
• Easy to search by name of food
• Hard to search on another dimension
Name Type Date Received Manufacturer Current Count
Apple Macintosh 6/23/13 Good Farm Inc. 200
Turkey Breast 6/23/13 Tasty Meat Co. 42
Chicken Drumstick 6/18/13 Pretty Ok Food 3
Jam Strawberry 6/18/10 Mash It Up Inc. 700
A short example
Name Type Date Received Manufacturer Current Count
Apple Macintosh 6/23/13 Good Farm Inc. 200
Turkey Breast 6/23/13 Tasty Meat Co. 42
Chicken Drumstick 6/18/13 Pretty Ok Food 3
Jam Strawberry 6/18/10 Mash It Up Inc. 700
HBase BoF - June 20137
Date Received Name Type Manufacturer Current Count
6/18/13 Jam Strawberry Mash It Up Inc. 700
6/18/13 Chicken Drumstick Pretty Ok Food 3
6/23/13 Apple Macintosh Good Farm Inc. 200
6/23/13 Turkey Breast Tasty Meat Co. 42
Outline
• Motivation
• History
• HBase Consistent Indexing
– Index Management
– Recovery Mechanism
• Conclusion
HBase BoF - June 20138
HBase is “Special”…
• Partitioned Keys (“HRegion”)
• Scales because regions are independent
• Built-in data recovery mechanisms
HBase BoF - June 20139
Hasn’t someone tried this?
• Omid
• Percolator
• Culvert
• Lily
• TrendMicro
• Client-coordinated
HBase BoF - June 201310
We’ve gotten better…
• NGData
– HBase-SEP
– HBase-Indexer
• Intel
– Lucene Full Text Indexing
HBase BoF - June 201311
Still missing some things
• In-HBase index storage
– Just another table in HBase
• Simple consistency guarantees
– If X fails, then Y
• Minimal overhead for covered indexes
– Network roundtrips
HBase BoF - June 201312
Outline
• Motivation
• History
• HBase Consistent Indexing
– Index Management
– Recovery Mechanism
• Conclusion
HBase BoF - June 201313
Two Major Components
• Index Management
– Build index updates
– Ensures index is ‘cleaned up’
• Recovery Mechanism
– Ensures index updates are “ACID”
HBase BoF - June 201314
Index Management
HBase BoF - June 201315
• Lives within a RegionCoprocesorObesrver
• Access to the local Hregion
• Specifies the mutations to apply to the index
tables
public interface IndexBuilder {
public void setup(RegionCoprocessorEnvironment env);
public Map<Mutation, String> getIndexUpdate(Put put);
public Map<Mutation, String> getIndexUpdate(Delete delete);
}
Index Management
HBase BoF - June 201316
Key Observation #1
“We shouldn’t need to provide stronger
guarantees than HBase - that is just asking for
a bad time.”
- Jon Hsieh
HBase BoF - June 201317
* Paraphrased
*
HBase ACID
• Does NOT give you:
– Cross-row consistency
– Cross-table consistency
• Does give you:
– Durable data on success
– Visibility on success without partial rows
HBase BoF - June 201318
Key Observation #2
“Secondary indexing is inherently an easier
problem than full transactions… secondary
index updates are idempotent.”
- Lars Hofhansl
HBase BoF - June 201319
Idempotent Index Updates
• Doesn’t need full transactions
• Replay as many times as needed
• Can tolerate a little lag
– As long as we get the order right
HBase BoF - June 201320
Taking a little ACID…
HBase BoF - June 201321
HBase BoF - June 201322
Durable Indexing: Standard Write Path
HBase BoF - June 201323
Client HRegion
RegionCoprocessorHost
WAL
RegionCoprocessorHost
MemStore
Durable Indexing: Standard Write Path
HBase BoF - June 201324
Client HRegion
RegionCoprocessorHost
WAL
RegionCoprocessorHost
MemStore
Durable Indexing
HBase BoF - June 201325
Region
Coprocessor
Host
WAL
RegionCoprocessorHost
Indexer Index
Builder
WAL Updater
Durable!
Indexer
Index Table
Index Table
Index Table
Failure Situations
• Before writing the WAL
– Nothing is durable, nothing is visible
HBase BoF - June 201326
Durable Indexing
HBase BoF - June 201327
Client HRegion
RegionCoprocessorHost
WAL
RegionCoprocessorHost
MemStore
Indexer
Indexer
Index
TableIndex
TableIndex
Table
Failure Situations
• Before writing the WAL
– Nothing is durable, nothing is visible
HBase BoF - June 201328
✔
Failure Situations
• Before writing the WAL
– Nothing is durable, nothing is visible
• After writing WAL, before index update
– WAL Replay updates the index table and the
primary table
HBase BoF - June 201329
✔
Durable Indexing
HBase BoF - June 201330
Client HRegion
RegionCoprocessorHost
WAL
RegionCoprocessorHost
MemStore
Indexer
Indexer
Index
TableIndex
TableIndex
Table
Failure Situations
• Before writing the WAL
– Nothing is durable, nothing is visible
• After writing WAL, before index update
– WAL Replay updates the index table and the
primary table
HBase BoF - June 201331
✔
✔
Failure Situations
• Before writing the WAL
– Nothing is durable, nothing is visible
• After writing WAL, before index update
– WAL Replay updates the index table and the
primary table
• Mid-index update
– WAL Replay finishes index update, primary table
update
HBase BoF - June 201332
✔
✔
Durable Indexing
HBase BoF - June 201333
Client HRegion
RegionCoprocessorHost
WAL
RegionCoprocessorHost
MemStore
Indexer
Indexer
Index
TableIndex
TableIndex
Table
Failure Situations
• Before writing the WAL
– Nothing is durable, nothing is visible
• After writing WAL, before index update
– WAL Replay updates the index table and the primary
table
• Mid-index update
– WAL Replay finishes index update, primary table
update
HBase BoF - June 201334
✔
✔
✔
Failure Situations
• Before writing the WAL
– Nothing is durable, nothing is visible
• After writing WAL, before index update
– WAL Replay updates the index table and the primary
table
• Mid-index update
– WAL Replay finishes index update, primary table
update
• After index updates, before primary
– WAL Replay restores primary state, idempotently
applies index updates
HBase BoF - June 201335
✔
✔
✔
Durable Indexing
HBase BoF - June 201336
Client HRegion
RegionCoprocessorHost
WAL
RegionCoprocessorHost
MemStore
Indexer
Indexer
Index
TableIndex
TableIndex
Table
Failure Situations
• Before writing the WAL
– Nothing is durable, nothing is visible
• After writing WAL, before index update
– WAL Replay updates the index table and the primary
table
• Mid-index update
– WAL Replay finishes index update, primary table
update
• After index updates, before primary
– WAL Replay restores primary state, idempotently
applies index updates
HBase BoF - June 201337
✔
✔
✔
✔
Special Note: Failed Index Updates
• Index is corrupted
– Index Table does not exist
– Index table does not have write schema
– Etc.
• Fail-fast behavior
– Kill the whole server
– Forces WAL Replay to enforce correctness
– Modular enough to support alternative schemes
HBase BoF - June 201338
Key Points
• Custom KeyValues to enable index durability
in primary table WAL
• Custom WALEdit Codec for index update with
WAL Replay
• Will see index updates before primary
– Only a little bit of lag and never ‘wrong’
– Matches HBase consistency
• Fail-fast behavior to enforce correctness
HBase BoF - June 201339
Upcoming Work
• Performance testing
• Standard covered index managers
• Index cleanup on compaction
HBase BoF - June 201340
Outline
• Motivation
• History
• HBase Consistent Indexing
– Index Management
– Recovery Mechanism
• Conclusion
HBase BoF - June 201341
Conclusion
• Fully transparent to client
• Easy to build custom index maintenance
• Meets current HBase consistency guarantees
• Supports HBase 0.94.9+
– Coming to 0.96/0.98 soon!
HBase BoF - June 201342
hbase-index
HBase BoF - June 201343
https://github.com/forcedotcom/phoenix/tre
e/master/contrib/hbase-index
Detailed Blog Post
HBase BoF - June 201344
http://jyates.github.io/2013/06/11/hbase-
consistent-secondary-indexing.html
Bonus!
• Usable as a standalone module
• Coming to phoenix*
– Built-in support
• Future: added to HBase core (?)
HBase BoF - June 201345
* https://github.com/forcedotcom/phoenix
Thanks! Questions!
HBase BoF - June 201346
@jesse_yates
jesse.k.yates@gmail.com

Más contenido relacionado

La actualidad más candente

SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013
SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013
SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013Shereen Qumsieh
 
Why Java Professionals Should Learn Hadoop
Why Java Professionals Should Learn HadoopWhy Java Professionals Should Learn Hadoop
Why Java Professionals Should Learn HadoopBigClasses Com
 
S4 HANA Simplification
S4 HANA SimplificationS4 HANA Simplification
S4 HANA SimplificationSalient ERP
 
SharePoint 2010 Upgrade Best Practices Teched Brazil by Joel Oleson
SharePoint 2010 Upgrade Best Practices Teched Brazil by Joel OlesonSharePoint 2010 Upgrade Best Practices Teched Brazil by Joel Oleson
SharePoint 2010 Upgrade Best Practices Teched Brazil by Joel OlesonJoel Oleson
 
Efficient transaction processing in sap hana
Efficient transaction processing in sap hanaEfficient transaction processing in sap hana
Efficient transaction processing in sap hanaMysa Vijay
 
Sap hana training in hyderabad
Sap hana training in hyderabadSap hana training in hyderabad
Sap hana training in hyderabadRajitha D
 
Converting your e resource records to rda-guajardo
Converting your e resource records to rda-guajardoConverting your e resource records to rda-guajardo
Converting your e resource records to rda-guajardoNASIG
 

La actualidad más candente (8)

SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013
SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013
SharePoint Saturday Silicon Valley - Upgrading from SharePoint 2010 to 2013
 
Why Java Professionals Should Learn Hadoop
Why Java Professionals Should Learn HadoopWhy Java Professionals Should Learn Hadoop
Why Java Professionals Should Learn Hadoop
 
S4 HANA Simplification
S4 HANA SimplificationS4 HANA Simplification
S4 HANA Simplification
 
Hadoop course content
Hadoop course contentHadoop course content
Hadoop course content
 
SharePoint 2010 Upgrade Best Practices Teched Brazil by Joel Oleson
SharePoint 2010 Upgrade Best Practices Teched Brazil by Joel OlesonSharePoint 2010 Upgrade Best Practices Teched Brazil by Joel Oleson
SharePoint 2010 Upgrade Best Practices Teched Brazil by Joel Oleson
 
Efficient transaction processing in sap hana
Efficient transaction processing in sap hanaEfficient transaction processing in sap hana
Efficient transaction processing in sap hana
 
Sap hana training in hyderabad
Sap hana training in hyderabadSap hana training in hyderabad
Sap hana training in hyderabad
 
Converting your e resource records to rda-guajardo
Converting your e resource records to rda-guajardoConverting your e resource records to rda-guajardo
Converting your e resource records to rda-guajardo
 

Destacado

Hadoop World 2011: Advanced HBase Schema Design
Hadoop World 2011: Advanced HBase Schema DesignHadoop World 2011: Advanced HBase Schema Design
Hadoop World 2011: Advanced HBase Schema DesignCloudera, Inc.
 
20090713 Hbase Schema Design Case Studies
20090713 Hbase Schema Design Case Studies20090713 Hbase Schema Design Case Studies
20090713 Hbase Schema Design Case StudiesEvan Liu
 
HBaseCon 2013: Full-Text Indexing for Apache HBase
HBaseCon 2013: Full-Text Indexing for Apache HBaseHBaseCon 2013: Full-Text Indexing for Apache HBase
HBaseCon 2013: Full-Text Indexing for Apache HBaseCloudera, Inc.
 
Intro to HBase Internals & Schema Design (for HBase users)
Intro to HBase Internals & Schema Design (for HBase users)Intro to HBase Internals & Schema Design (for HBase users)
Intro to HBase Internals & Schema Design (for HBase users)alexbaranau
 
HBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
HBaseCon 2012 | HBase Schema Design - Ian Varley, SalesforceHBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
HBaseCon 2012 | HBase Schema Design - Ian Varley, SalesforceCloudera, Inc.
 
Apache Phoenix: Transforming HBase into a SQL Database
Apache Phoenix: Transforming HBase into a SQL DatabaseApache Phoenix: Transforming HBase into a SQL Database
Apache Phoenix: Transforming HBase into a SQL DatabaseDataWorks Summit
 

Destacado (7)

April 2014 HUG : Apache Phoenix
April 2014 HUG : Apache PhoenixApril 2014 HUG : Apache Phoenix
April 2014 HUG : Apache Phoenix
 
Hadoop World 2011: Advanced HBase Schema Design
Hadoop World 2011: Advanced HBase Schema DesignHadoop World 2011: Advanced HBase Schema Design
Hadoop World 2011: Advanced HBase Schema Design
 
20090713 Hbase Schema Design Case Studies
20090713 Hbase Schema Design Case Studies20090713 Hbase Schema Design Case Studies
20090713 Hbase Schema Design Case Studies
 
HBaseCon 2013: Full-Text Indexing for Apache HBase
HBaseCon 2013: Full-Text Indexing for Apache HBaseHBaseCon 2013: Full-Text Indexing for Apache HBase
HBaseCon 2013: Full-Text Indexing for Apache HBase
 
Intro to HBase Internals & Schema Design (for HBase users)
Intro to HBase Internals & Schema Design (for HBase users)Intro to HBase Internals & Schema Design (for HBase users)
Intro to HBase Internals & Schema Design (for HBase users)
 
HBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
HBaseCon 2012 | HBase Schema Design - Ian Varley, SalesforceHBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
HBaseCon 2012 | HBase Schema Design - Ian Varley, Salesforce
 
Apache Phoenix: Transforming HBase into a SQL Database
Apache Phoenix: Transforming HBase into a SQL DatabaseApache Phoenix: Transforming HBase into a SQL Database
Apache Phoenix: Transforming HBase into a SQL Database
 

Similar a Secondary Indexing in Phoenix - Hadoop Summit 2012 - HBase BoF

suresh resume BI ABAP
suresh resume  BI ABAPsuresh resume  BI ABAP
suresh resume BI ABAPsuresh m
 
suresh resume BI ABAP
suresh resume  BI ABAPsuresh resume  BI ABAP
suresh resume BI ABAPsuresh m
 
Time Series Vs Order based Planning in SAP IBP
Time Series Vs Order based Planning in SAP IBPTime Series Vs Order based Planning in SAP IBP
Time Series Vs Order based Planning in SAP IBPAYAN BISHNU
 
Joy SAP BW/HANA
Joy SAP BW/HANAJoy SAP BW/HANA
Joy SAP BW/HANASai Teja
 
South Florida SQL Saturday - Power BI Report Server Enterprise Architecture, ...
South Florida SQL Saturday - Power BI Report Server Enterprise Architecture, ...South Florida SQL Saturday - Power BI Report Server Enterprise Architecture, ...
South Florida SQL Saturday - Power BI Report Server Enterprise Architecture, ...Vishal Pawar
 
XWBI_Migrating to BusinessObjects 4.2
XWBI_Migrating to BusinessObjects 4.2XWBI_Migrating to BusinessObjects 4.2
XWBI_Migrating to BusinessObjects 4.2Nicolas Henry
 
Bi4.1 and beyond
Bi4.1 and beyondBi4.1 and beyond
Bi4.1 and beyondsapbisignz
 
Power BI Report Server Enterprise Architecture, Tools to Publish reports and ...
Power BI Report Server Enterprise Architecture, Tools to Publish reports and ...Power BI Report Server Enterprise Architecture, Tools to Publish reports and ...
Power BI Report Server Enterprise Architecture, Tools to Publish reports and ...Vishal Pawar
 
ASUG82313 - Preparing to Migrate Data to SAP S4HANA Finance.pptx
ASUG82313 - Preparing to Migrate Data to SAP S4HANA Finance.pptxASUG82313 - Preparing to Migrate Data to SAP S4HANA Finance.pptx
ASUG82313 - Preparing to Migrate Data to SAP S4HANA Finance.pptxVSKrishnaAchanta
 
Monitoring on premise biz talk applications using cloud based power bi saas
Monitoring on premise biz talk applications using cloud based power bi saasMonitoring on premise biz talk applications using cloud based power bi saas
Monitoring on premise biz talk applications using cloud based power bi saasBizTalk360
 
Intro to Report Developer Role
Intro to Report Developer RoleIntro to Report Developer Role
Intro to Report Developer RoleJonathan Bloom
 
Mirza SAP BW_BO Consultant
Mirza  SAP BW_BO ConsultantMirza  SAP BW_BO Consultant
Mirza SAP BW_BO ConsultantMirza Beg
 
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 3: BI 4.1 Sizing and Virtualization
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 3: BI 4.1 Sizing and VirtualizationSAP #BOBJ #BI 4.1 Upgrade Webcast Series 3: BI 4.1 Sizing and Virtualization
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 3: BI 4.1 Sizing and VirtualizationSAP Analytics
 
SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query TuningSQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query TuningJavier Villegas
 
OBIEE12c and Embedded Essbase 12c - An Initial Look at Query Acceleration Use...
OBIEE12c and Embedded Essbase 12c - An Initial Look at Query Acceleration Use...OBIEE12c and Embedded Essbase 12c - An Initial Look at Query Acceleration Use...
OBIEE12c and Embedded Essbase 12c - An Initial Look at Query Acceleration Use...Mark Rittman
 
HBaseCon 2013: Rebuilding for Scale on Apache HBase
HBaseCon 2013: Rebuilding for Scale on Apache HBaseHBaseCon 2013: Rebuilding for Scale on Apache HBase
HBaseCon 2013: Rebuilding for Scale on Apache HBaseCloudera, Inc.
 
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR usesEarl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR usesoramanc
 
AVATA Webinar: Upgrading ASCP - The New Face of ASCP is Here! www.avata.com
AVATA Webinar:  Upgrading ASCP - The New Face of ASCP is Here! www.avata.comAVATA Webinar:  Upgrading ASCP - The New Face of ASCP is Here! www.avata.com
AVATA Webinar: Upgrading ASCP - The New Face of ASCP is Here! www.avata.comAVATA
 

Similar a Secondary Indexing in Phoenix - Hadoop Summit 2012 - HBase BoF (20)

suresh resume BI ABAP
suresh resume  BI ABAPsuresh resume  BI ABAP
suresh resume BI ABAP
 
suresh resume BI ABAP
suresh resume  BI ABAPsuresh resume  BI ABAP
suresh resume BI ABAP
 
Time Series Vs Order based Planning in SAP IBP
Time Series Vs Order based Planning in SAP IBPTime Series Vs Order based Planning in SAP IBP
Time Series Vs Order based Planning in SAP IBP
 
Joy SAP BW/HANA
Joy SAP BW/HANAJoy SAP BW/HANA
Joy SAP BW/HANA
 
South Florida SQL Saturday - Power BI Report Server Enterprise Architecture, ...
South Florida SQL Saturday - Power BI Report Server Enterprise Architecture, ...South Florida SQL Saturday - Power BI Report Server Enterprise Architecture, ...
South Florida SQL Saturday - Power BI Report Server Enterprise Architecture, ...
 
XWBI_Migrating to BusinessObjects 4.2
XWBI_Migrating to BusinessObjects 4.2XWBI_Migrating to BusinessObjects 4.2
XWBI_Migrating to BusinessObjects 4.2
 
Resume _Tulasi Krishna Bimana
Resume _Tulasi Krishna BimanaResume _Tulasi Krishna Bimana
Resume _Tulasi Krishna Bimana
 
Bi4.1 and beyond
Bi4.1 and beyondBi4.1 and beyond
Bi4.1 and beyond
 
Power BI Report Server Enterprise Architecture, Tools to Publish reports and ...
Power BI Report Server Enterprise Architecture, Tools to Publish reports and ...Power BI Report Server Enterprise Architecture, Tools to Publish reports and ...
Power BI Report Server Enterprise Architecture, Tools to Publish reports and ...
 
ASUG82313 - Preparing to Migrate Data to SAP S4HANA Finance.pptx
ASUG82313 - Preparing to Migrate Data to SAP S4HANA Finance.pptxASUG82313 - Preparing to Migrate Data to SAP S4HANA Finance.pptx
ASUG82313 - Preparing to Migrate Data to SAP S4HANA Finance.pptx
 
Monitoring on premise biz talk applications using cloud based power bi saas
Monitoring on premise biz talk applications using cloud based power bi saasMonitoring on premise biz talk applications using cloud based power bi saas
Monitoring on premise biz talk applications using cloud based power bi saas
 
Intro to Report Developer Role
Intro to Report Developer RoleIntro to Report Developer Role
Intro to Report Developer Role
 
Mirza SAP BW_BO Consultant
Mirza  SAP BW_BO ConsultantMirza  SAP BW_BO Consultant
Mirza SAP BW_BO Consultant
 
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 3: BI 4.1 Sizing and Virtualization
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 3: BI 4.1 Sizing and VirtualizationSAP #BOBJ #BI 4.1 Upgrade Webcast Series 3: BI 4.1 Sizing and Virtualization
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 3: BI 4.1 Sizing and Virtualization
 
SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query TuningSQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
 
OBIEE12c and Embedded Essbase 12c - An Initial Look at Query Acceleration Use...
OBIEE12c and Embedded Essbase 12c - An Initial Look at Query Acceleration Use...OBIEE12c and Embedded Essbase 12c - An Initial Look at Query Acceleration Use...
OBIEE12c and Embedded Essbase 12c - An Initial Look at Query Acceleration Use...
 
HBaseCon 2013: Rebuilding for Scale on Apache HBase
HBaseCon 2013: Rebuilding for Scale on Apache HBaseHBaseCon 2013: Rebuilding for Scale on Apache HBase
HBaseCon 2013: Rebuilding for Scale on Apache HBase
 
SAP BI:BW and FICO Res
SAP BI:BW and FICO ResSAP BI:BW and FICO Res
SAP BI:BW and FICO Res
 
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR usesEarl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
 
AVATA Webinar: Upgrading ASCP - The New Face of ASCP is Here! www.avata.com
AVATA Webinar:  Upgrading ASCP - The New Face of ASCP is Here! www.avata.comAVATA Webinar:  Upgrading ASCP - The New Face of ASCP is Here! www.avata.com
AVATA Webinar: Upgrading ASCP - The New Face of ASCP is Here! www.avata.com
 

Último

0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Lviv Startup Club
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insightsseri bangash
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetDenis Gagné
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurSuhani Kapoor
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaShree Krishna Exports
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in managementchhavia330
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Tina Ji
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfOnline Income Engine
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...noida100girls
 

Último (20)

0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insights
 
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature SetCreating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
Creating Low-Code Loan Applications using the Trisotech Mortgage Feature Set
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in India
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in management
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
Russian Faridabad Call Girls(Badarpur) : ☎ 8168257667, @4999
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdf
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...BEST ✨ Call Girls In  Indirapuram Ghaziabad  ✔️ 9871031762 ✔️ Escorts Service...
BEST ✨ Call Girls In Indirapuram Ghaziabad ✔️ 9871031762 ✔️ Escorts Service...
 

Secondary Indexing in Phoenix - Hadoop Summit 2012 - HBase BoF

  • 1. Secondary Indexing in Phoenix Jesse Yates HBase Committer Software Engineer HBase BoF – June 25, 2013
  • 2. Outline • Motivation • History • HBase Consistent Indexing – Index Management – Recovery Mechanism • Conclusion HBase BoF - June 20132
  • 3. A quick note… HBase BoF - June 20133
  • 4. Outline • Motivation • History • HBase Consistent Indexing – Index Management – Recovery Mechanism • Conclusion HBase BoF - June 20134
  • 5. Why do we need them? • Sorted by key – Great for accessing on that key HBase BoF - June 20135 What if we want to access by another dimension!?
  • 6. A short example HBase BoF - June 20136 • Easy to search by name of food • Hard to search on another dimension Name Type Date Received Manufacturer Current Count Apple Macintosh 6/23/13 Good Farm Inc. 200 Turkey Breast 6/23/13 Tasty Meat Co. 42 Chicken Drumstick 6/18/13 Pretty Ok Food 3 Jam Strawberry 6/18/10 Mash It Up Inc. 700
  • 7. A short example Name Type Date Received Manufacturer Current Count Apple Macintosh 6/23/13 Good Farm Inc. 200 Turkey Breast 6/23/13 Tasty Meat Co. 42 Chicken Drumstick 6/18/13 Pretty Ok Food 3 Jam Strawberry 6/18/10 Mash It Up Inc. 700 HBase BoF - June 20137 Date Received Name Type Manufacturer Current Count 6/18/13 Jam Strawberry Mash It Up Inc. 700 6/18/13 Chicken Drumstick Pretty Ok Food 3 6/23/13 Apple Macintosh Good Farm Inc. 200 6/23/13 Turkey Breast Tasty Meat Co. 42
  • 8. Outline • Motivation • History • HBase Consistent Indexing – Index Management – Recovery Mechanism • Conclusion HBase BoF - June 20138
  • 9. HBase is “Special”… • Partitioned Keys (“HRegion”) • Scales because regions are independent • Built-in data recovery mechanisms HBase BoF - June 20139
  • 10. Hasn’t someone tried this? • Omid • Percolator • Culvert • Lily • TrendMicro • Client-coordinated HBase BoF - June 201310
  • 11. We’ve gotten better… • NGData – HBase-SEP – HBase-Indexer • Intel – Lucene Full Text Indexing HBase BoF - June 201311
  • 12. Still missing some things • In-HBase index storage – Just another table in HBase • Simple consistency guarantees – If X fails, then Y • Minimal overhead for covered indexes – Network roundtrips HBase BoF - June 201312
  • 13. Outline • Motivation • History • HBase Consistent Indexing – Index Management – Recovery Mechanism • Conclusion HBase BoF - June 201313
  • 14. Two Major Components • Index Management – Build index updates – Ensures index is ‘cleaned up’ • Recovery Mechanism – Ensures index updates are “ACID” HBase BoF - June 201314
  • 15. Index Management HBase BoF - June 201315 • Lives within a RegionCoprocesorObesrver • Access to the local Hregion • Specifies the mutations to apply to the index tables public interface IndexBuilder { public void setup(RegionCoprocessorEnvironment env); public Map<Mutation, String> getIndexUpdate(Put put); public Map<Mutation, String> getIndexUpdate(Delete delete); }
  • 16. Index Management HBase BoF - June 201316
  • 17. Key Observation #1 “We shouldn’t need to provide stronger guarantees than HBase - that is just asking for a bad time.” - Jon Hsieh HBase BoF - June 201317 * Paraphrased *
  • 18. HBase ACID • Does NOT give you: – Cross-row consistency – Cross-table consistency • Does give you: – Durable data on success – Visibility on success without partial rows HBase BoF - June 201318
  • 19. Key Observation #2 “Secondary indexing is inherently an easier problem than full transactions… secondary index updates are idempotent.” - Lars Hofhansl HBase BoF - June 201319
  • 20. Idempotent Index Updates • Doesn’t need full transactions • Replay as many times as needed • Can tolerate a little lag – As long as we get the order right HBase BoF - June 201320
  • 21. Taking a little ACID… HBase BoF - June 201321
  • 22. HBase BoF - June 201322
  • 23. Durable Indexing: Standard Write Path HBase BoF - June 201323 Client HRegion RegionCoprocessorHost WAL RegionCoprocessorHost MemStore
  • 24. Durable Indexing: Standard Write Path HBase BoF - June 201324 Client HRegion RegionCoprocessorHost WAL RegionCoprocessorHost MemStore
  • 25. Durable Indexing HBase BoF - June 201325 Region Coprocessor Host WAL RegionCoprocessorHost Indexer Index Builder WAL Updater Durable! Indexer Index Table Index Table Index Table
  • 26. Failure Situations • Before writing the WAL – Nothing is durable, nothing is visible HBase BoF - June 201326
  • 27. Durable Indexing HBase BoF - June 201327 Client HRegion RegionCoprocessorHost WAL RegionCoprocessorHost MemStore Indexer Indexer Index TableIndex TableIndex Table
  • 28. Failure Situations • Before writing the WAL – Nothing is durable, nothing is visible HBase BoF - June 201328 ✔
  • 29. Failure Situations • Before writing the WAL – Nothing is durable, nothing is visible • After writing WAL, before index update – WAL Replay updates the index table and the primary table HBase BoF - June 201329 ✔
  • 30. Durable Indexing HBase BoF - June 201330 Client HRegion RegionCoprocessorHost WAL RegionCoprocessorHost MemStore Indexer Indexer Index TableIndex TableIndex Table
  • 31. Failure Situations • Before writing the WAL – Nothing is durable, nothing is visible • After writing WAL, before index update – WAL Replay updates the index table and the primary table HBase BoF - June 201331 ✔ ✔
  • 32. Failure Situations • Before writing the WAL – Nothing is durable, nothing is visible • After writing WAL, before index update – WAL Replay updates the index table and the primary table • Mid-index update – WAL Replay finishes index update, primary table update HBase BoF - June 201332 ✔ ✔
  • 33. Durable Indexing HBase BoF - June 201333 Client HRegion RegionCoprocessorHost WAL RegionCoprocessorHost MemStore Indexer Indexer Index TableIndex TableIndex Table
  • 34. Failure Situations • Before writing the WAL – Nothing is durable, nothing is visible • After writing WAL, before index update – WAL Replay updates the index table and the primary table • Mid-index update – WAL Replay finishes index update, primary table update HBase BoF - June 201334 ✔ ✔ ✔
  • 35. Failure Situations • Before writing the WAL – Nothing is durable, nothing is visible • After writing WAL, before index update – WAL Replay updates the index table and the primary table • Mid-index update – WAL Replay finishes index update, primary table update • After index updates, before primary – WAL Replay restores primary state, idempotently applies index updates HBase BoF - June 201335 ✔ ✔ ✔
  • 36. Durable Indexing HBase BoF - June 201336 Client HRegion RegionCoprocessorHost WAL RegionCoprocessorHost MemStore Indexer Indexer Index TableIndex TableIndex Table
  • 37. Failure Situations • Before writing the WAL – Nothing is durable, nothing is visible • After writing WAL, before index update – WAL Replay updates the index table and the primary table • Mid-index update – WAL Replay finishes index update, primary table update • After index updates, before primary – WAL Replay restores primary state, idempotently applies index updates HBase BoF - June 201337 ✔ ✔ ✔ ✔
  • 38. Special Note: Failed Index Updates • Index is corrupted – Index Table does not exist – Index table does not have write schema – Etc. • Fail-fast behavior – Kill the whole server – Forces WAL Replay to enforce correctness – Modular enough to support alternative schemes HBase BoF - June 201338
  • 39. Key Points • Custom KeyValues to enable index durability in primary table WAL • Custom WALEdit Codec for index update with WAL Replay • Will see index updates before primary – Only a little bit of lag and never ‘wrong’ – Matches HBase consistency • Fail-fast behavior to enforce correctness HBase BoF - June 201339
  • 40. Upcoming Work • Performance testing • Standard covered index managers • Index cleanup on compaction HBase BoF - June 201340
  • 41. Outline • Motivation • History • HBase Consistent Indexing – Index Management – Recovery Mechanism • Conclusion HBase BoF - June 201341
  • 42. Conclusion • Fully transparent to client • Easy to build custom index maintenance • Meets current HBase consistency guarantees • Supports HBase 0.94.9+ – Coming to 0.96/0.98 soon! HBase BoF - June 201342
  • 43. hbase-index HBase BoF - June 201343 https://github.com/forcedotcom/phoenix/tre e/master/contrib/hbase-index
  • 44. Detailed Blog Post HBase BoF - June 201344 http://jyates.github.io/2013/06/11/hbase- consistent-secondary-indexing.html
  • 45. Bonus! • Usable as a standalone module • Coming to phoenix* – Built-in support • Future: added to HBase core (?) HBase BoF - June 201345 * https://github.com/forcedotcom/phoenix
  • 46. Thanks! Questions! HBase BoF - June 201346 @jesse_yates jesse.k.yates@gmail.com