SlideShare a Scribd company logo
Noe	Detore
Automated data center selection for a client
Accumulo Client Failover
Copyright 2016 Bloomberg Finance L.P. All rights reserved.
Abstract
Most	large	organizations	using	Accumulo,	such	as	Bloomberg,	have	two	or	more	data	centers	distributed	
geographically.	Replication	was	recently	added	to	Accumulo providing	automated	eventual	consistency	
between	these	data	centers.	On	the	other	hand	clients	are	still	left	with	a	need	for	an	automated	way	to	
handle	a	failover	from	one	Accumulo cluster	to	another.	A	client	application	needs	the	ability	to	continue	
processing	and	operating	regardless	of	data	center	outages	or	failovers.
An	operations	manager	of	an	Accumulo data	center	needs	the	capability	to	control	which	Accumulo data	
center	should	be	used	by	clients.	At	any	given	point	in	time	a	data	center	failover	could	be	triggered	by	routine	
maintenance,	system	upgrade,	or	any	other	unforeseen	event.
To	solve	these	use	cases,	the	Accumulo Client	Failover	(ACF)	API	was	developed.	This	presentation	will	cover	
the	motivation,	design,	and	use	of	ACF.	We	will	show	how	ACF	is	used	by	an	Accumulo client,	and	how	it	can	be	
used	alongside	an	existing	third-party	Accumulo client	library.
Outline
•Accumulo	and	multiple	data	centers
•What	about	clients?
•Accumulo	Client	Failover	(ACF)
•How	is	ACF	used
•ACF	used	with	3rd	party	library
Multi	Data	Center	Support
• Accumulo	1.7	supports	eventually	consistent	replication	
– Write-ahead-log	(WAL)	files	are	sent	when	closed
– Multiple	configurations	 supported
• Clients	write	to	multiple	clusters
• Use	NiFi	to	deliver	the	same	ingestion	to	multiple	DCs
Alternative	Architectures
Accumulo	Users	&	Multiple	DCs
• No	automated	way	to	know	active	DC
• Not	able	to	failover	from	one	DC	to	other
• Maintenance	outages	require	coordination	with	
all	clients
• No	automated	failover	for	catastrophic	event
Accumulo	Client	Failover	(ACF)	
Goals
• A	client	library	that	can	handle	arbitrary	failover	of	Accumulo clusters
• Provide	failover	capable	implementations	of	Accumulo interfaces
– Connector,	Instance,	Scanner,	BatchScanner,	BatchWriter
– Use	an	eventingmodel	to	notify	clients	of	an	active/preferred	
Accumulo cluster
• Upon	receiving	a	failover	event,	client	code	will	be	interrupted	so	that	it	
can	do	cleanup	before	continuing	on	with	the	new	Accumulo cluster
Replication	with	Failover
ACF	Initial	Release
• Failover	is	controlled	and	triggered	by	ZooKeeper
• Current	Accumulo	instance	information	from	znode
• Update	of	znode	triggers	failover	
• Watcher	on	znode	creates	FailoverEvent	when	changed
• Ultimately	results	in	reader	or	writer	throwing	a	
FailoverException	for	a	client	to	handle
• FailoverController	triggers	FailoverEvent
• FailoverHandler	and	FailoverFlag
• FailFailoverInstance	like	ZooKeeperInstance	with	a	handle
• FailoverConnector	type	behaves	in	a	similar	fashion
– Once	notified	will	notify	all	readers/writers	it	created
• FailoverScanner,	FailoverBatchScanner,	
FailoverBatchWriter…
– Will	throw	a	FailoverException	on	the	next	method	call
ACF	Design
ACF	Code	Example
Connector con = new ZooKeeperFailoverController(znode,zookeepers)
.getInstance().getConnector(principal,token);
while(true) {
try {
Scanner s = con.createScanner(table, auths);
s.setRange(range);
for(Entry<Key, Value> e : s) System.out.println(e);
break;
}catch(FailoverException e) {
System.println(“failover, going to try again”);
}
}
Retryable
• An	API	to	abstract	away	the	while	loop
• Retry	any	actions	in	case	they	fail
• Allows	users	to	focus	solely	on	user	code
retry(() -> {
Scanner s = con.createScanner(table, auths);
s.setRange(range);
for(Entry<Key, Value> e : s) System.out.println(e);
})
Third	Party	APIs
GeoWave
dataStore	=	new	AccumuloDataStore(new	 BasicAccumuloOperations(connector));
retry(()	->	{		IndexWriter	indexWriter	=	dataStore.createWriter(adapter,	index));
for	(SimpleFeature	 sf	:	features)	{indexWriter.write(sf);}
retry(()	->	{	TripleFileWriter	tripleFileWriter	=	new	TripleFileWriter(connector));
File	rowFile	=	getDataFile(String.valueOf(SCALE)+version+"r.txt");
File	colFile	=	getDataFile(String.valueOf(SCALE)+version+"c.txt");}
Questions
?

More Related Content

PDF
White Paper on Subreports ActiveReports
PDF
10 Reasons to Upgrade to OnCommand Unified Manager 7.3
PDF
PatchManager saas
PDF
Accumulo Summit 2016: Accumulo in the Enterprise
PDF
Accumulo Summit 2016: Embedding Authenticated Data Structures in Accumulo
PDF
Accumulo Summit 2016: Cryptographically Enforcing Visibility Fields
PDF
Accumulo Summit 2016: An Accumulo Connector for Presto
PDF
Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...
White Paper on Subreports ActiveReports
10 Reasons to Upgrade to OnCommand Unified Manager 7.3
PatchManager saas
Accumulo Summit 2016: Accumulo in the Enterprise
Accumulo Summit 2016: Embedding Authenticated Data Structures in Accumulo
Accumulo Summit 2016: Cryptographically Enforcing Visibility Fields
Accumulo Summit 2016: An Accumulo Connector for Presto
Accumulo Summit 2016: Introducing Accumulo Collections: A Practical Accumulo ...

Recently uploaded (20)

PDF
Introduction to the R Programming Language
PPTX
Leprosy and NLEP programme community medicine
PDF
Votre score augmente si vous choisissez une catégorie et que vous rédigez une...
PDF
Transcultural that can help you someday.
PDF
[EN] Industrial Machine Downtime Prediction
PDF
Microsoft Core Cloud Services powerpoint
PPTX
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
PDF
Business Analytics and business intelligence.pdf
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PDF
Global Data and Analytics Market Outlook Report
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PPTX
Business_Capability_Map_Collection__pptx
PDF
annual-report-2024-2025 original latest.
PDF
Introduction to Data Science and Data Analysis
PPT
DU, AIS, Big Data and Data Analytics.ppt
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
PPTX
Pilar Kemerdekaan dan Identi Bangsa.pptx
PPTX
STERILIZATION AND DISINFECTION-1.ppthhhbx
Introduction to the R Programming Language
Leprosy and NLEP programme community medicine
Votre score augmente si vous choisissez une catégorie et que vous rédigez une...
Transcultural that can help you someday.
[EN] Industrial Machine Downtime Prediction
Microsoft Core Cloud Services powerpoint
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
Business Analytics and business intelligence.pdf
Qualitative Qantitative and Mixed Methods.pptx
ISS -ESG Data flows What is ESG and HowHow
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
Global Data and Analytics Market Outlook Report
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Business_Capability_Map_Collection__pptx
annual-report-2024-2025 original latest.
Introduction to Data Science and Data Analysis
DU, AIS, Big Data and Data Analytics.ppt
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
Pilar Kemerdekaan dan Identi Bangsa.pptx
STERILIZATION AND DISINFECTION-1.ppthhhbx
Ad
Ad

Accumulo Summit 2016: Accumulo Client Failover