CAP Theorem in Hadoop

What is CAP Theorem?

CAP theorem is designed for distributed file systems(collection of interconnected nodes).CAP Theorem also known as Brewer’s theorem and used to distributed consistency.It contains follwing three technical terms for distributed systems.

C – Consistency

A – Availability

P – Partition Tolerance

cap

Consistency:

When you read data it will give same data how many times read and server send response each and every request but systems always consistent when read data.(all node having same data)

Availability:

It means all requests give response and no error accured in this systems.

Partition Tolerance:

All functions run all time when more nodes not responsive and commnication break between two nodes

Distributed systems statisfy any two terms only and not satisfy three terms

Selecting Two options in CAP Theorem:

CP – Consistency/Partition Tolerance:

It wait for response form partioned nodes and that data are timeout error.system give data and it distributed across the hadoop cluster.System return error that based on you desire.It is good for marketing because which system does not work partition data will tagged to user.

AP – Availability/Partition Tolerance:

It returns the recent data from the systems and it allows write options that processed when partion resolved.Availability compeling the data when come external error come from system functions.Final decision is software trade off in that systems.In this process any network problem occurs control options are there in your hand only because network problem is only temporary.

CA – Consistency/Availability:

All realational database are CA.In CA all nodes are always in contact.Partion occurs in system that system will be blocked.

Spaces Defined by CAP:

NoSpace:

It is called empty set because there is no any database engines.It not satisty any theorem properties

CD Space:

Space between consistency and availability.In CD Space distribution does not exist and find NoSql database.Relational database are postioned in this space

CT Space:

It don’t have any consistency and it will favor of availability.This is a relative database and cannot guarntee between nodes

DT Space:

It offers some consistency and leaving certain levels of availability.In this space database not response the client enquires.