Exhaustive Guide to Big Data Analytics, Hadoop, and Business Analytics Lifecycle

Conventional Systems and the Shift to Intelligent Computing

  • Conventional systems consist of one or more zones, each utilizing manually operated call points, automatic detection devices, or a combination of both.
  • Big data is defined as a massive volume of data that exceeds the processing capacity of traditional database systems, making it impossible to manage or analyze within specific time intervals.
  • Comparison between Conventional and Intelligent (Neural) Computing:
    • Conventional computing functions logically using a fixed set of rules and specific calculations.
    • Neural computing functions via images, pictures, and concepts, similar to the human brain.
    • Conventional systems often fail to manage the variability of real-world data.
    • Neural computing is suited for situations lacking clear algorithmic solutions and can manage noisy or imprecise data.
  • Comparison of Big Data and Conventional Data:
    • Data Set Size: Big data consists of huge datasets (petabytes/exabytespetabytes/exabytes), while conventional data size is controlled (megabytes/gigabytesmegabytes/gigabytes).
    • Structure: Big data is unstructured (text, video, audio); conventional data is normally structured (numbers, categories).
    • Query/Analysis: Big data queries are hard to perform; conventional data queries are relatively easy.
    • Methodology: Big data requires new methodologies (Hadoop, Hive, Hbase, Pig, Sqoop); conventional data uses tools like SQL, SAS, R, and Excel.
    • State of Data: Big data is often aggregated, sampled, or filtered; conventional data is raw transactional data.
    • Analytics Stage: Advanced analytics is in the starting stage for Big Data (used for basic analysis and text mining); conventional systems are mature in reporting, advanced analysis, and predictive modeling.
    • Skills Required: Big data necessitates both programming skills (Java) and analytical skills; conventional data requires primarily analytical skills.
    • Scale: Big data involves billions/trillions of transactions and millions/billions of accounts; conventional data involves millions of transactions and thousands/millions of accounts.
    • Origin: Big data is generated by major entities like Facebook, Google, Amazon, eBay, Walmart, and large financial institutions; conventional data is generated by small enterprises and banks.

Challenges of Conventional Systems and Big Data Management

  • Primary Challenges in Real-Time Scenarios:
    1. Uncertainty of the Data Management Landscape.
    2. The Big Data Talent Gap within the industry.
    3. Difficulty in getting data into big data platforms.
    4. Need for synchronization across disparate data sources.
    5. Deriving important insights through analytics.
  • The Three Broad Categories of Big Data Challenges:
    • Data Challenges: Volume of data is exploding. In the year 20002000, approximately 800,000 petabytes (PB)800,000\,petabytes\,(PB) were stored. By 20202020, this was expected to reach 35 zetta bytes (ZB)35\,zetta\,bytes\,(ZB). Social media is a primary driver; Twitter generates 7+ terabytes (TB)7+\,terabytes\,(TB) daily, and Facebook generates 10 TB10\,TB daily. There were an estimated 6 billion6\,billion mobile phones by 20112011.
    • Variety Challenges: More than 80%80\% of information is unstructured (documents, contracts, sensor data, health records, emails). Combining multiple datasets with complex structures is difficult.
    • Process Challenges: Difficulty in capturing, storing, searching, sharing, transferring, and analyzing mass scale information.
    • Management Challenges: Challenges include storage, analysis, and visualization. Analyzing a single large set of related data is preferred over separate smaller sets to find correlations for spotting business trends, determining research quality, preventing diseases, linking legal citations, and monitoring real-time traffic.

The Business Analytics Lifecycle and Methodology

  • Business Analytics (BA) involves using data analysis, statistical models, and quantitative methods to solve business problems through iterative exploration.
  • Foundational Processes of BA:
    • Determine the business goal of the analysis.
    • Select an appropriate analysis methodology.
    • Gather business data from various systems.
    • Cleanse and integrate data into a single repository (data warehouse or data mart).
  • Three Core Types of Business Analytics:
    1. Descriptive Analytics: Tracks Key Performance Indicators (KPIs) to understand the present state. It summarizes results or "nuggets" of information (e.g., assessing credit risk by comparing balance to credit limit; social media metrics like mentions, followers, and page views).
    2. Predictive Analytics: Uses gathered data to assess the likelihood of future outcomes on a granular level. Key techniques include forecasting, market trend prediction, and analyzing customer behaviors. Algorithms used include regression, classification, segmentation, clustering, and decision trees. Application example: Amazon’s recommendation engine.
    3. Prescriptive Analytics: Reveals why an action should be taken and suggests actions to maximize metrics. It uses simulation, optimization, and decision modeling. It builds on predictive analytics by exploring multiple future outcomes through feedback systems. Application example: Waymo (Google's self-driving car) and route optimization in transportation.

Core Components of the Business Analytics Process

  • Define Objective: Translating business goals into analytical objectives and mapping data requirements.
  • Data Aggregation: Creating a centralized location for data, extracting/loading with filters, and combining various sources into one dataset.
  • Data Cleaning: Essential for mathematical and statistical compatibility. Steps include:
    • Removing outliers (extreme values) for statistics.
    • Handling blank cells/missing values for math matrix operations.
    • Type casting (ensuring correct class/data type) for programming.
    • Addressing multicollinearity and the "curse of dimensionality" by removing duplicate or unnecessary columns.
    • Data resampling (under-sampling, oversampling, hybrid-sampling).
  • Analytical Methodology: Identifying specific procedures, methods, and algorithms (e.g., deciding between current state analysis vs. predictive modeling).
  • Evaluation and Validation: Using simulation techniques and predictive models to ensure results are stable across different situations.
  • Reporting and Data Visualization: Communicating complex insights through tables, bullet points, and storytelling to allow leadership to view organizational trends.

Business Intelligence (BI) vs. Business Analytics (BA)

  • BI focuses on strategies and technologies for analyzing existing business data to provide historical, current, and predictive events. BA is used for continuous exploration of past information to drive future business planning.
  • Key Distinctions:
    1. BI uses past and current data; BA uses past data to extract insights for future needs.
    2. BI concentrates on reporting; BA concentrates on operational tools and applications.
    3. BI is often considered a subset of BA.
    4. BI provides inputs; BA processes that information in sophisticated ways for visualization.
    5. BI uses dashboards; BA requires software expertise and multiple tools for transformation.
    6. BI is applicable to structured data (ERP, Financial systems); BA applies to structured, semi-structured, and unstructured data.
    7. BI is about running the business; BA is about changing the business to be more productive.

Defining the Properties of Big Data

  • Data vs. Information: Data are raw, unprocessed facts/statistics (plural of "datum"). Information is data that has been processed, structured, or presented in context to be useful.
  • Actions on Data: Capture, Transform, Store.
  • Historical Context: Online firms like Google, eBay, LinkedIn, and Facebook were built around big data from the start.
  • Massive Scale Examples:
    • Walmart: Handles >1 million>1\,million customer transactions every hour.
    • Facebook: Handles 40 billion40\,billion photos.
    • Human Genome: Processing time reduced from 10 years10\,years to 1 week1\,week.
    • New York Stock Exchange: Generates 1 terabyte1\,terabyte of trade data daily.
  • Characteristics (The 3 Vs):
    • Volume: Quantity of data (2.5 quintillion bytes2.5\,quintillion\,bytes created daily; 90%90\% of current data created in the last 2 years2\,years).
    • Velocity: The speed at which data is generated and moved.
    • Variety: Different types of data (Structured, Unstructured, Semi-structured).
  • Technological Classifications:
    • Structured: Fixed format data (e.g., RDBMS tables). 1 zettabyte=1021 bytes1\,zettabyte = 10^{21}\,bytes or 1 billion terabytes1\,billion\,terabytes.
    • Unstructured: Unknown form (e.g., text, images, video, Google search results).
    • Semi-structured: Forms lacking a table definition but containing tags (e.g., XML files).

Technical Challenges of Big Data Analysis

  • Meeting the Need for Speed: Utilizing hardware solutions like increased memory and powerful parallel processing to crunch data quickly.
  • Understanding Data Shape: Getting data into the right shape for visualization.
  • Data Quality: Ensuring data is accurate and timely for decision-making.
  • Displaying Results: Avoid overloading users with billions of data points by using "binning" (grouping data).
  • Dealing with Outliers: Visualizing the 1%1\% to 5%5\% of data that represents anomalies which may contain valuable unseen insights.
  • Data Conversion Constraints: Data can be transformed from Ratio → Interval → Ordinal → Nominal, but not in the reverse direction.
  • Types of Data Measurements:
    • Scaled Data: Measured in exact amounts with equal intervals (e.g., 60 degrees60\,degrees, 12.5 feet12.5\,feet, 80 MPH80\,MPH).
    • Ordinal/Ranked Data: Comparative amounts (1st1st, 2nd2nd, 3rd3rd) but without equal intervals (e.g., race finishing times where distances between ranks differ).

The Apache Hadoop Framework

  • Definition: An open-source software framework used for storing and processing large datasets in a distributed environment using commodity hardware.
  • Key Benefits:
    • Scalable: Distributes data across thousands of nodes.
    • Cost-Effective: Uses cluster scale-out architecture; computing/storage costs hundreds of pounds per terabyte compared to thousands for traditional RDBMS.
    • Flexible: Processes social media, email, and clickstreams without the need for pre-processing.
    • Fast: Maps data to its location on the cluster, processing terabytes in minutes.
    • Resilient: Fault-tolerant via data replication; if one node fails, copies are available elsewhere.
  • Hadoop Architecture Component Roles:
    • NameNode (Master): The "brain" of HDFS. It keeps the directory tree of all files and tracks where data blocks are located across the cluster. It holds all metadata in RAM. It is a single point of failure.
    • DataNode (Slave): Performs "grunt work" by reading and writing blocks to the local file system as directed by the NameNode.
    • JobTracker (Master): Liaison between the application and Hadoop; determines the execution plan and assigns tasks to nodes.
    • TaskTracker (Slave): Manages execution of individual tasks and communicates progress back to the JobTracker via heartbeats.
    • Secondary NameNode (SNN): Holds a backup of NameNode metadata.

Hadoop Distributed File System (HDFS) Specifics

  • Data Organization: Large files are split into blocks. The default block size is 64 MB64\,MB but can be extended to 128 MB128\,MB or 256 MB256\,MB.
  • Replication Management: HDFS replicates data content multiple times (default replication factor is 33).
  • Replication Placement Policy:
    1. One replica on the local machine.
    2. Second replica on a node in a different (remote) rack.
    3. Third replica on a different node in that same remote rack.
  • Communications: NameNode and DataNodes communicate via TCP protocols. DataNodes send "Heartbeats" periodically; if a heartbeat is missing, the NameNode detaches that node and redistributes its tasks.
  • Data Integrity: Managed via Transaction Logs (tracking operations) and Checksums (validating file content during requests).

The Hadoop Ecosystem and Tools

  • Hadoop Common: Utilities used by all modules.
  • Hadoop YARN: Yet Another Resource Navigator; manages processes running over Hadoop.
  • Apache Oozie: Scheduling system for Hadoop processes.
  • Apache Pig: Platform for running programs; often used instead of MapReduce for better performance.
  • Apache Hive: Data warehouse for summarization, querying, and analysis of data.
  • Apache HBase: Non-relational, column-oriented database.
  • Apache Phoenix: Relational database layer on top of HBase.
  • Apache Sqoop: Transfers data between Hadoop and structured data sources.
  • Apache Flume: Tool for moving data to HDFS.
  • Cloudera Impala: Processing database for Hadoop.
  • Cassandra: Scalable multi-database system.

Hadoop Streaming and Implementation

  • Hadoop Streaming: A utility allowing the creation of Map/Reduce jobs with any executable or script (Python, Perl, Ruby) as the mapper or reducer.
  • Technical Workflow:
    • Mapper: Reads input from standard input (STDIN) and emits key/value pairs to standard output (STDOUT).
    • Reducer: Reads key/value pairs from STDIN and produces final results to STDOUT.
  • Example Execution Syntax:     ./bin/hadoop jar contrib/streaming/hadoop-streaming-1.2.1.jar -input myinput -output myoutput -mapper mapper.py -reducer reducer.py

Hadoop Cluster Infrastructure

  • Rack Architecture: Large clusters (e.g., 4500 nodes4500\,nodes) are arranged in multiple racks (e.g., 110 racks110\,racks with 40 slave machines40\,slave\,machines each). Racks are connected by core switches and rack switches.
  • Cluster Modes:
    1. Standalone Mode: Default mode; uses local file system instead of HDFS. Used for debugging.
    2. Pseudo-Distributed Mode: All daemons run on a single node. Used for testing HDFS code. Replication factor is 11.
    3. Fully Distributed Mode: Production phase; code runs on a cluster of multiple servers (thousands).
  • Configuration Files:
    • core-site.xml: Core properties.
    • hdfs-site.xml: HDFS settings.
    • mapred-site.xml: MapReduce settings.

Application: Malicious Domain Detection via Machine Learning

  • Objective: Identifying URLs designed to deceive users for phishing, malware, or drive-by downloads.
  • Feature Groups for URL Analysis:
    • Lexical Features: URL length, domain length, token length, and path average length.
    • Host-based Features: Location and identity of malicious servers.
    • Content-based Features: Information extracted from HTML and JavaScript after a webpage is downloaded.
  • System Architecture:
    • Training Stage: Gathering labeled malicious and clean URLs, extracting attributes, and training supervised algorithms (Support Vector Machine (SVM) and Random Forest (RF)).
    • Detection Phase: Extracting attributes from input URLs and using the classifier to determine if they are clean or malicious.

Hadoop and Hive Data Types

  • Primitive Data Types:
    • Numeric Types:
      • Integral: TINYINT (1 BYTE1\,BYTE, −128-128 to 127127), SMALLINT (2 BYTES2\,BYTES, −32,768-32,768 to 32,76732,767), INT (4 BYTES4\,BYTES), BIGINT (8 BYTES8\,BYTES).
      • Floating: FLOAT (4 BYTES4\,BYTES), DOUBLE (8 BYTES8\,BYTES), DECIMAL (17 BYTES17\,BYTES).
    • Date/Time: TIMESTAMP (nanosecond precision, yyyy-mm-dd hh:mm:ss), DATE (YYYY-MM-DD), and INTERVAL.
    • Strings: STRING (unbounded), VARCHAR (max 65,355 bytes65,355\,bytes), CHAR (fixed length, max 255255).
    • Miscellaneous: BOOLEAN (True/False), BINARY (array of bytes).
  • Complex Data Types:
    • ARRAY: Ordered collection of similar fields (indexable zero-based).
    • MAP: Unordered key-value pairs.
    • STRUCT: Collection of named fields of various types.
    • UNION: Can hold any data type from a specified set.
  • Literals: Floating-point types are assumed as DOUBLE; Decimal types range between −10−308-10^{-308} to 1030810^{308}.
  • Null Values: Missing values are explicitly represented as NULL in the Hive system.