ClassicPhoto hero with four cards — portfolio default
StudioCentered brand, split hero, side-by-side home rows
MinimalCompact header, title hero, flat cards
EditorialTop-aligned hero, wide headline, magazine home rhythm
SpotlightCentered cinematic hero, glass header, narrow home column
DefaultRefined portfolio blue — ships with the site
SlateSteel blue-grey for professional services
OceanRefined teal for SaaS and cloud brands
ForestGrounded green for health and sustainability
SageMuted sage for wellness and calm brands
PlumDusty plum for creative and advisory brands
Warm StudioSoft amber for founder-led creative brands
CopperRose copper for boutique and luxury SMB brands
Big Data
Big Data Integration with Cassandra Using Spark
Why Cassandra: Before we discuss Cassandara, we have to also discuss about something called as CAP Theorem – As per CAP(Consistency, Availability and Partition tolerance) theorem – “you […]
Before we discuss Cassandara, we have to also discuss about something called as CAP Theorem – As per CAP(Consistency, Availability and Partition tolerance) theorem – “you can achieve max 2 of the 3 at max for a system” …
Consistency – means if you write some data, the system should be consistent to get that data back asap. Consistency can be ‘read after write’ or ‘eventual’
read after write : you can read the data as soon as you write
eventual : there is a lag and although the data is guaranteed to be read but may be after a second or two.
Availability – means the system should be always available no matter what using master-slave, live-backup, primary-secondary mechanisms. Even if one or few nodes in a fleet go down, still is available through other nodes.
Partition tolerance – means that the system should be highly distributed, scalable and partitionable.
It is a NoSQL /non-relational database with syntax like SQL.
Lets draw a CAP model and see how different data access technologies fare:
Cassandra – has tunable consistency(more of eventual, but can be tuned), highly distributed and high availability
Cassandra Architecture:
It is a NoSQL distributed database with SQL-like commands called as CQL.
CQL is similar in syntax like SQL but has limitations like
No Joins are supported so all data but me denormalized
Each table must have a primary key
Databases in Cassandra are called Keyspace
the command like interface is called CQLSH
DataStax is a connector for Cassandra + Spark
alllows Sparks to use data-frames to write and read data to/fro from Cassandra tables.
can be used in following use cases:
data transformed in Spark is saved in Cassandra to be viewed by various presentation tools
Data stored in Cassandra can be pulled by Spark to analyse.
Cassandra Simplified Architecture
How to install Cassandra:
Its not part of Hortonworks Ambari or Cloudera clusters
Need to installed by either a docker or manually
Login to Ambari Sandox box using ‘maria_dev’ credentials and elevate to root user.
First update the sandbox – yum -y update
In case you get update issues – move the sandbox.repo file from /etc/yum.repos.d folder to /tmp folder like this:
mv /etc/yum.repos.d/sandbox.repo /tmp
Install tools to install multiple versions of Python and use them without breaking each other –
yum -y install scl-utils – to install scl utilities
yum -y install centos-release-scl-rh – to install centos related scl utilities
yum -y install python27 – to install python 2.7
scl enable python27 bash – to enable python 2.7
Create a repository for datastax as : nano /etc/yum.repos.d/datastax.repo