Docsity

Big data analytics - mumbai university, Study notes of Advanced Data Analysis

Toggle sidebar
bg1
1. Introduction to Big Data Analytics
Big data:
Big data is a collection of huge amount of data.
Big data is so large, complex and fast that it cannot be stored and processed using
traditional data management tools.
Characteristics of Big data:
Volume:
Volume refers to the huge amount of data generated every second from various sources
like social media, mobile phones, sensors, credit cards, images, video.
The volume of big data ranges from Petabytes to Zettabytes or Exabytes.
Distributed systems are used to store this data at several locations and brought
together by a software Framework like Hadoop.
This volume of the data determines whether that data can be considered as big data or
not.
Variety:
The Big Data which is generated from different sources can be of multiple varieties.
Big Data can be structured, unstructured, and semi-structured.
Structured data: The data which has a fixed structure are called structured data.
Unstructured data: The data which does not has a fixed structure are called
unstructured data.
oSemi- Structured data: it is a combination of Structured and Unstructureddata
Earlier, data which was collected was in the form of tables and spreadsheets, but now a
days the data is in the form of photos, videos, audios, PDFs and emails, which makes 80%
of the big data unstructured.
Velocity:
Velocity means the speed at which the data is generated.
velocity determine How fast the data is generated and processed to fullfill the demands.
The data flow is continuous and massive.
It deals with the speed at which data flows from sources like social media sites,
sensors, Mobile devices, etc.
Traditional Data VS Big data:
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
Discount

On special offer

Partial preview of the text

Download Big data analytics - mumbai university and more Study notes Advanced Data Analysis in PDF only on Docsity!

1. Introduction to Big Data Analytics

Big data:

 Big data is a collection of huge amount of data.  Big data is so large, complex and fast that it cannot be stored and processed using traditional data management tools.

Characteristics of Big data:

Volume:  Volume refers to the huge amount of data generated every second from various sources like social media, mobile phones, sensors, credit cards, images, video.  The volume of big data ranges from Petabytes to Zettabytes or Exabytes.  Distributed systems are used to store this data at several locations and brought together by a software Framework like Hadoop.  This volume of the data determines whether that data can be considered as big data or not. Variety:  The Big Data which is generated from different sources can be of multiple varieties.  Big Data can be structured, unstructured, and semi-structured.  Structured data : The data which has a fixed structure are called structured data.  Unstructured data : The data which does not has a fixed structure are called unstructured data. o Semi- Structured data : it is a combination of Structured and Unstructureddata  Earlier, data which was collected was in the form of tables and spreadsheets, but now a days the data is in the form of photos, videos, audios, PDFs and emails, which makes 80% of the big data unstructured. Velocity:  Velocity means the speed at which the data is generated.  velocity determine How fast the data is generated and processed to fullfill the demands.

 The data flow is continuous and massive.

 It deals with the speed at which data flows from sources like social media sites, sensors, Mobile devices, etc.

Traditional Data VS Big data:

Traditional data Big data

  1. Traditional data is structured data. Big data is combination of structured, unstructured & semi structured data.
  2. The size of the traditional data is very small. The size of big data is very large
  3. The volume of traditional data ranges from Gigabytes to Terabytes The volume of big data ranges from Petabytes to Zettabytes or Exabytes.
  4. Data integration is easy. Data integration is difficult.
  5. data model is static. data model is dynamic.
  6. It is easy to manage and manipulate the data. It is difficult to manage and manipulate the data.
  7. Data source is centralized. Data source is distributed.
  8. Data sources - financial data, organizational data, web transaction data. Data sources - social media, sensor data, video, images, audio.
  9. Normal functions can manipulate the data. Only Special functions can manipulate the data.
  10. Traditional database tools are used to perform operation. Special kind of database tools are used to perform operation.

Types of Big Data:

2. Structured data:  The data which has a fixed structure are called structured data.

Definition The data which is highly organized and has a fixed structure are called structured data. combination of structured & unstructured data is called Semi-structured data The data which is not organized and does not have any fixed structure are called unstructured data Data organization Highly organized Partially organized Unorganized Flexibility less flexible It is more flexible than structured data but less flexible than unstructured data. Very flexible Scalability Less scalable It is more scalable than structured data but less scalable than unstructured data. very scalable. Location data warehouse data lakehouse data lakes Example name, date, address & credit card numbers JSON and XML audio, video & images

2. Hadoop

Hadoop:

 Hadoop is an open source framework which is used for store and perform computation on huge amount of data.  Hadoop is written in Java.  Hadoop is designed to scale up from single server to thousands of machines, each offering storage & computation.  It is used by Facebook, Twitter, Yahoo, Google, & LinkedIn. Feature / Advantages:

  1. Large amount of storage is available.
  2. It uses distributed storage system.
  3. Highly flexible and scalable.
  4. Low Cost.
  5. High Computing Power
  6. Fault Tolerance.
  7. Tasks are independent. Disadvantages:
  8. It is not suitable for small data.
  9. It has stability issues.
  10. Security issues.
  11. It is vulnerable
  12. Since, it is written in JAVA, therefore it is more prone to malicious activities and data breach.
  13. It Supports Only Batch Processing

Hadoop Core Components: (Hadoop

Architecture)

1. Common Utilities: (Hadoop Common)  Common Utilities are the Java libraries which are used to start the Hadoop application.  It is also used by other Hadoop modules that is HDFS, YARN, and MapReduce.  It is also known as Hadoop Common. 2. YARN:  YARN stands for Yet another Resource Negotiator.  YARN is a framework performs 2 operations: job scheduling and resource management. 1. Job scheduler : the job scheduler divides a big task into small jobs so that each job can be assigned to the slaves in order to maximize the processing. It also keeps track on other information like job priority, job timing, job dependencies, etc. 2. Resource Manager : it manages all the resources that are used. 3. HDFS  HDFS stands for Hadoop distributed File System.  It is used to store large data set across various nodes.  HDFS breaks the data into blocks and stores it at different nodes over distributed architecture.  It contains a master/slave architecture which has a single Name Node and multiple Data Nodes. 1. Name Node –  Name Node is the master in the Hadoop system.  Every Hadoop system has only one name node.  It is mainly used for storing the Metadata.  It also guides the Data nodes (Slaves).  It instructs the Data Nodes to perform operations like delete, create & replicate blocks.  It contains Job Tracker, which tracks on the files which is distributed among different data nodes.  Failure of Name Node will lead to the failure of the whole Hadoop system. 2. Data Node:  Data Nodes are the slaves in the Hadoop system.  Data Nodes are used to store the data.  It performs various operations like delete, create, replicate blocks based on the instructions from the Name node.  The Data Node should have high storing capacity to store a huge amount of data.

 Hadoop physical architecture is based on Master-slave architecture. Components of Physical Architecture: I) Name Node:  Name Node works as a Master in the Hadoop system.  Every Hadoop system has only one name node.  It is mainly used for storing the Metadata.  It also guides the Data nodes (Slaves).  It instructs the Data Nodes to perform operations like delete, create & replicate blocks.  It contains a Job Tracker, which keeps track on the files which is distributed among different data nodes.  Failure of Name Node will lead to the failure of the whole Hadoop system. II) Data node:  Data Nodes are the Slave in the hadoop system.  Data Nodes are used for storing the data.  It performs various operations like delete, create, replicate blocks based on the instructions from the Name node.  The data nodes communicate with each other through the name node to avoid replication in the task provided.  The Data Node should have high storing capacity to store a huge amount of data. III) Job Tracker:  Job Tracker keeps track on the files which is distributed among different data nodes.  Every Hadoop system has only one job tracker.  Job Tracker runs on the name node. IV) Task Tracker:  Task Tracker performs tasks given by the job tracker.  It also continuously communicates with the job tracker.  Every data node will have only one task tracker. V) Secondary Name Node: (SNN)  Secondary name node monitors the whole process.

 Every Hadoop system has only one SNN. Working:

  1. When the client submits the job, it goes to the name node.
  2. The name node decides whether to accept or reject the job.
  3. After accepting the job, the name node sends that job to the job tracker.
  4. The job tracker divides the job into small tasks and assigns it to multiple data nodes.
  5. The data nodes further send that task to the task tracker.
  6. The execution of the task is done here.
  7. After completing the task, each task tracker submits the completed task to the job tracker via the data node.
  8. The secondary name node monitors the whole process.

Hadoop ecosystem:

 It provides libraries for collaborative filtering, clustering, classification & frequent item- set mining.

6. HIVE:

 Hive is a data warehouse system which is used to analyse large datasets.  It has its own query language called Hive Querying Language (HQL).  Programmers write MapReduce functions using HQL queries and HIVE converts these queries into MapReduce jobs.

7. Zookeeper:

 Zookeeper is a coordinator which coordinates with various nodes in the Hadoop Ecosystem.  Before Zookeeper, it was difficult to coordinate and synchronize the nodes.  Zookeeper solves all the problems by performing synchronization, configuration, maintenance, grouping and naming.

8. Oozie:

 Oozie is a Job Scheduler which schedules Hadoop jobs  There are 2 types of jobs:

  1. Oozie workflow – these jobs are executed sequentially.
  2. Oozie Coordinator - these jobs are executed when triggered by external stimulus.

9. Sqoop:

 Sqoop is a tool which is used to transfer data between Hadoop and external sources.  Sqoop supports both structured and unstructured data.  It works with RDBMS like MySQL & Oracle.

EXTRA:

HCatalog:

 HCatalog is a table storage management tool.  It is used to access the Hive metastore.  It is runs on top of the Hive metastore.  It allows users with different data processing tools (like Pig and MapReduce) to easily read and write data on the grid.

HDFS Architecture:

I) Name Node:  Name Node works as a Master in the Hadoop system.  Every Hadoop system has only one name node.  It is mainly used for storing the Metadata.  It also guides the Data nodes (Slaves).  It instructs the Data Nodes to perform operations like delete, create & replicate blocks.  It contains a Job Tracker, which keeps track on the files which is distributed among different data nodes.  Failure of Name Node will lead to the failure of the whole Hadoop system. II) Data node:  Data Nodes are the Slave in the hadoop system.  Data Nodes are used for storing the data.  It performs various operations like delete, create, replicate blocks based on the instructions from the Name node.  The data nodes communicate with each other through the name node to avoid replication in the task provided.  The Data Node should have high storing capacity to store a huge amount of data. II) Block:  Block is the minimum amount of data that HDFS can read and write.  The default block size is 64MB, but it can be increased as per the requirement.

3. NoSQL

NoSQL:

 NoSQL stands for “Not Only SQL”.  NoSQL is a non-relational Database which is used to store huge amount of unstructured data in a distributed architecture.  NoSQL generally avoids JOIN operations. Features / Advantages:

  1. NoSQL can manage huge amount of data.
  2. NoSQL has a flexible schema.
  3. NoSQL is horizontally scalable.
  4. NoSQL uses distributed architecture to achieve high performance.
  5. It supports structured, unstructured and Semi Structure Data.
  6. Low Cost.
  7. NoSQL uses simple APIs.
  8. Data can be easily replicated. Disadvantages:  There is no backup facility.  NoSQL is open-source database, so there is no reliable standard yet.  Limited query capabilities. Difference between RDBMS and NoSQL: RDBMS NoSQL
  9. It can store only structured data. It can store structured, unstructured and Semi Structure Data.
  10. It can store very less data. It can store huge amount of data.
  11. It has a fixed schema It has a flexible schema
  12. NoSQL is vertically scalable. NoSQL is horizontally scalable.
  13. It support ACID properties It does not support ACID properties.
  14. Data arrives from one locations. Data arrives from multiple locations.
  15. It supports complex transactions. It supports simple transactions.
  1. It has single point of failure. It has no single point of failure.
  2. It is difficult to change the properties of database once it is defined It is easy to change the properties of database once it is defined

NoSQL Business Driver:

1. Volume:  Organizations were looking for an alternative because the RBMS cannot store huge amount of data.  This forced the organizations to move from serial processing to distributed parallel processing. 2. Velocity:  Single-processor RDBMS is unable to read and write data rapidly.  Therefore, there was a need of a fast processing system.

  1. Variability:  RDBMS has a fixed schema, so it cannot store exceptional data.  To do so, we have to alter the whole database which could affect the system availability.
  2. Agility:  The most difficult part of building an applications using RDBMS is the process of inserting and fetching data from the database.  If the data has nested and repeated subgroups of data structures, we need to include an object-relational mapping layer.  But, this causes the database to slowdown in development and testing schedules.  This problem is solved by NOSQL database.

 In this type of database, the data is stored in documents.  It stores data in key/value pair but here, the value part is in the form of a document.  The unique key is used to retrieve the document.  The document is stored in JSON or XML formats.  Application : CMS systems, blogging platforms, and e-commerce. Example:  Amazon SimpleDB  CouchDB  MongoDB

4. Graph Database:

 Graph database focuses on the relationship between the data elements.  The data is stored in the form of nodes and the connections between those nodes are called links or relationships.  In this type of database, it is easy to identify the relationship between the data with the help of the links.  Application: social networks, logistics, fraud detection, knowledge graph and geographic data. Example:  Neo4J  Infinite Graph  OrientDB  FlockDB

Types of question based on types of NoSQL:

**1. Explain different ways by which big data problems are handled by NoSQL

  1. Explain 4 ways of NoSQL to operate Big Data Problems
  2. Write short notes on different architectural Patterns in NoSQL**
  1. MapReduce Map Reduce:  MapReduce is a technique in which a large program is subdivided into small tasks so that it can be run parallelly  It is done for faster computation and to save time.  It is mostly used in distributed systems.  It has 2 important parts:
  2. Mapper: It takes raw data input and converts it into key-value pairs.
  3. Reducer: It processes the data parallelly and produces the final output.  There are 2 types of MapReduce: a) 1 step MapReduce – here 1-time mapper and reducer is used b) 2 step MapReduce step - here 2-time mapper and reducer is used. Combiners:  Combiner is used between mapper phase & the reducer phase.  It is also known as semi-reducer.  Use of combiner is totally optional.  The output of Mapper is in the form of key-value pairs which has a massive size.  If we directly feed this output to the Reducer, then it will increase the Network Congestion.  In order to reduce the Network congestion, combiner is used between mapper & the reducer.  Combiner creates summary of large datasets.  Using Combiner becomes necessary when large dataset is processed in order to improve the overall performance.