Sunday, April 16, 2017

What is Data science and analytics?

What is data and analytics?
Data analytics refers to qualitative and quantitative techniques and processes used to enhance productivity and business gain. Data is extracted and categorized to identify and analyze behavioral data and patterns, and techniques vary according to organizational requirements.
What is Big Data Hadoop wiki?
The core of Apache Hadoop consists of a storage part, known as Hadoop Distributed File System (HDFS), and a processing part which is a MapReduce programming model. Hadoop splits files into large blocks and distributes them across nodes in a cluster.

What is Hadoop training?
Become Big Data expert by learning Hadoop Architecture, HDFS, MapReduce, Yarn, Pig, Hive, HBase, Oozie, Flume and Sqoop. Get industry-ready by working on Big Data projects using Apache Hadoop distribution.
Who made Hadoop?
Hadoop was created by Doug Cutting and Mike Cafarella in 2005. It was originally developed to support distribution for the Nutch search engine project. Doug, who was working at Yahoo! at the time and is now Chief Architect of Cloudera, named the project after his son's toy elephant.Aug 26, 2014


Saturday, April 15, 2017

Three lessons from a summer of data wrangling

Data is the new black.
And not without reason—it's keeping companies in the black. It helps them understand consumer interaction with their products, make tailored recommendations, improve their services, and optimize everything from supply chains to talent acquisition. Simply put, we can use data to identify problems and engineer solutions. Statistics enable businesses to create data-driven systems like Red Hat's Access Insights and many others.
As more and more people go online, an increasing number of businesses are utilizing cloud computing, mobility, social networking, and big data to become smarter, more immediate, and more relevant. The digital universe is doubling in size every two years, and by 2020 will contain 44 zettabytes—nearly as many digital bits as there are stars in the universe. So the ability to take raw data, process it, and extract insight from it is becoming an extremely valuable skill. Red Hat is pioneering several new forays into the world of data science, and I've had the chance to use big data technology and work on exciting projects ranging from customer engagement analysis to cross-sell prediction. Here are a few things I've learned as an intern at Red Hat.

Clean your data

As a data scientist, you'll spend, on average, 80 percent of your time on "data wrangling"—extracting, cleaning, aggregating, and merging your data. At some point a slight change in the scope of your project may require you to repeat the entire process. Although this can be frustrating at times, it's best to be meticulous here. Clean data will make your life much simpler down the line. It's a crucial step before you can get to the good stuff.

Understand the problem

Take time to understand the nature of the underlying problem you're trying to solve before jumping into an algorithmic implementation. What are you optimizing? What characteristics would a good solution have? This prevents you from zoning in on one solution when better options may be available.
In my cross-sell project, for example, I'm focusing on predicting which customers will buy an emerging product using their online behavior and previous assets. I quickly discovered that only 2 percent of customer accounts actually bought such a product. This means that if I had simply predicted that no customers would buy such a product, I'd get an outstanding 98 percent accuracy! However, such a solution gives us no information whatsoever.
Understanding that 2 percent was the purpose behind this project, so I needed to reframe the question to account for the inherent imbalance in the data. If I examined all the customers a model predicted to be emerging buyers, I'd want as many as possible to actually become emerging buyers. In other words, I wanted to measure precision, the fraction of correctly-identified emerging purchasers divided by the total number of emerging purchasers identified. So an optimal solution would give me high precision, while still being able to detect a large percentage of emerging product customers.
This example refers to a classic rule in machine learning, but the general lesson applies to any statistical problem. Take the case of predicting a numerical feature. What's the best way to handle the noise in my data? Are my features linearly related to the response, or should I use something like a generalized additive model to describe more complex relationships? Is a more computationally intensive model like boosting necessary? Do I need to worry about extraneous features? If so, how should I regularize my model to penalize unnecessary complexity? No matter the question you're answering, defining the parameters of the problem and knowing the strengths of each algorithm helps immensely when you're deciding how to improve your model.

Find the right tools

Use the tools and algorithms that best fit the problem. Don't limit yourself to the ones with which you're most familiar. And don't be afraid to add new skills to your toolbox. In fact, you should go out of your way to do so. Luckily, Red Hat is a great environment full of people willing to help me, a place at which I've been able to dive headfirst into tools ranging from Linux to Pig, Python to Spark.
In addition to learning new technologies, I tried several methods to deal with the imbalanced cross-sell data I mentioned above, including balanced random forests and oversampling (generating synthetic observations derived from the 2 percent minority class). Next, I will be working on using a long short-term memory recurrent neural network to consider each customer's entire history. It’s all about learning!
Despite all the hype, data science isn't as glamorous as it's often made out to be. Even retrieving data can be a hassle, and the work requires so much data cleaning you begin to wonder whether "data janitor" would be a more accurate job title. You'll have to dig deep to interpret your results and unearth insight. But after all is said and done, finding value within the data and sharing that narrative with others will have an immense impact. Remember: your goal is to reveal the story behind the data. Your variables are the characters, and your role lies in capturing the complex interactions between them.
Happy data science-ing!

Teaching big data processing with open source software

The continuing growth of massive and diverse data volumes, and the growth of data intensive applications, has presented a need to find effective means of data management across all sectors. According to a recent report, businesses face a huge skill gap in the management of big data, with the gap growing from 400 in 2007 to 4,000 in 2012 in the United Kingdom alone. In addition to this, there is a general lack of understanding among students of current data analytics processes, which are becoming extremely important for future challenges with the growth of the Internet of Things (IoT) and real-time data.

As a computer scientist, studying and building modeling and simulation applications, I was initially perplexed as to the attraction towards the term big data. Business seems to focus on Hadoop-related software for data analytics, and having Hadoop-related projects on your resume can be a bonus. As a teacher of cloud computing and software engineering, I decided to assign two students Hadoop-related projects for big data management with a "smart cities" focus, and interviewed them about their learning objectives to see what they thought about the technologies.

As a prerequisite, the students were given full freedom to examine the topic of Hadoop big data processing, and asked to explore whichever tools they wanted to in this area. Hadoop is a set of tool that supports the running of big data applications with multiple job executions to allow massive amounts of data to be processed quickly. It is an environment to run MapReduce jobs that are usually sorted in batch. Hadoop has become one of the most important tools in science projects which require analyzing data. Some of the Hadoop-related tools my students investigated included:
  • Apache Ambari: A framework for managing and monitoring Hadoop clusters
  • Apache Pig: A platform for running code for analyzing large data set of data.
  • Apache Sqoop: A tool used for moving data between Hadoop and other data stores
  • Apache ZooKeeper: A tool used for providing synchronization and maintaining the set up of information.
  • Apache Spark: A newer tool used to run analysis faster on some types of data.
  • Apache Flume: A system that gathers information that is later stored in HDFS.
  • Apache Hive: A tool which allows users to use a SQL-like language to analyze data.
  • Apache Oozie: A tool to start analysis jobs that have been broken into different parts in the correct sequence.
  • Hadoop Distributed File System (HDFS): A framework for dividing data between nodes.
  • HCatalog: A tool which is used to upload tables and is used to manage data, which enables users to analyze data using different processing tools like Pig, Hive, and MapReduce.
After the students successfully finished their final year dissertations, I asked them some questions to understand what they learned from the experience. Here are the responses from both of my students, Saudamini Sonalker and Rafiat Olubodun Kadiri, who were doing independent experiments with Hadoop.

Why did you want to learn Hadoop? Just to learn something new, or were you influenced by industry interest in the project?

Saudamini: I was primarily motivated to work on this topic after having read a book about big data by Victor Mayer-Schonberger and Kenneth Cukier: Big Data: A Revolution That Will Transform How We Live, Work, and Think. The predictive nature of tools that assist big data processing is what drew me to learning more about it. Concentrating on smart city data was also an interesting element of this project. I want to learn and understand more about how city data can be utilized to make cities efficient, green, and smart.
Rafiat: I chose the topic of Hadoop because it is a new area; it is a buzz word, and recently has been dominating the market. Different businesses make use of it, including social media websites such as Twitter and Facebook using Hadoop to mine data for different purposes, enabling them to make reasonable business decisions.

What do companies use big data for? What kind of questions are they using it to ask?

Saudamini: Companies use big data for numerous purposes. Amazon utilizes it for recommendations, Skyscanner and Kayak for adjusting flight prices by monitoring an individual's past searches, and Google uses it to determine the order of search results. An interesting use of big data was Amsterdam's Energy Atlas project. It used energy consumption data from within the city to promote renewable energy by making its citizens aware of their own usage.
Rafiat: Different companies have different use of big data. The usage of big data for a company depends on what type of service they provide to the public. Businesses like eBay and Amazon use big data to make predictions of what customers may desire according to their previous purchase history and similar purchase by other customers

What problems did you have when installing Hadoop while setting up the sandbox environment? What led you to choose Hortonworks Sandbox for your experiments?

Saudamini: I explored a couple of options before deciding on Hortonworks Data Platform. The major reason for choosing it was because it is open source and free. Other competitors like MapR, Amazon Web Services and Cloudera, however good the platforms, were expensive. However, there were strict memory requirements to set up the sandbox. A 64-bit processor was necessary to access the sandbox via virtual machine, and it required at least 4GB RAM. This slowed the process down for me and the platform has no flexibility in terms of requirements.
Rafiat: There are quite a number of public Hadoop clusters that have been designed for storing and analyzing large amounts of unstructured data in a computing environment. They are available on cloud infrastructures such as Heroku, Hortonworks Sandbox, Azure, and others.
After a few searches, I decided to use Hortonworks Data Platform, an open source apache Hadoop data platform. The system requirements included using Windows or Mac operating system, at least 4GB of RAM, a virtual machine environment, and a 64-bit chip that supports virtualization.
The first step was to download a virtual machine, then download the sandbox from the Hortonworks website. After this I connected to the sandbox with the given IP address.
There were some negative aspects to using the Hortonworks sandbox for research, which I still face. I was unable to access the sandbox with the given IP address for a while, but after multiple trials, it worked. Second, the virtual machine slowed down my computer the moment it is switched on, and it took a long time for a query to load.
Further, I face issues like when my machine goes off itself without allowing me to shut down the virtual machine down myself, the next time I switch it on, the virtual machine comes up with configuration errors which restricts me from accessing the sandbox. Another issue that I face is not being able to access some of the tools sometimes, which slows down my research.

How does the Hortonworks Data Platform work?

Saudamini: The platform can be divided into three layers: the data access layer, cluster resource management, and HDFS. The data access layer is where the user uploads, catalogues, and manages data; one uses this layer to enter their Hive/Pig jobs for the system to perform. Cluster resource management (YARN) is an architectural hub for data processing engines so multiple applications can be run on the HDFS. This layer essentially works as a translator for the other two. Finally, HDFS is where the MapReduce jobs are run in parallel between the master and slave nodes.
Ambari is a web-based GUI that can speak to the underlying machinery and allows user to set up and manage a Hadoop cluster.
Rafiat: When accessing the sandbox, I was directed to a page where I had access to different tools like Hive, File browser, Pig, Job browser, and others. I could upload different type of files (zip file, csv, xml), then create tables from tools like Hive, Pig and HCatalog with the file that has been uploaded through the file browser icon. I could then create queries to provide different type of tables with different criteria to fit a requirement.
Ambari can be used to monitor and manage Hadoop clusters. Monitoring the outcome of the queries that have been carried out, and showing the effect of the queries on the CPU usage, memory usage, network usage, etc.

What tools did you explore, and what were the new things you learned in the process?

Saudamini: Initially, I planned on exploring Pig and Hive, but I had issues running the Pig script on Hortonworks Sandbox and hence stuck with Hive. Hive Query Language is very similar to SQL, therefore if someone is proficient in the latter, then they shouldn't have an issue working with the tool. On Hortonworks Sandbox, Hive has a graphical user interface called Beeswax. Hive converts queries you write into MapReduce jobs. Whether or not one needs multiple options to process data depends on the skill sets of the users working on a large project. Hive diminishes the need to train or hire external resources in order to fill in the gap. The flexibility is useful in scenarios like those.
Rafiat: I used Hive, which uses an SQL-like scripting language which is known as HiveQL. It is suitable for users that are familiar with structured query language. Additionally, Pig was used as a language for data analysis and it is also a high level processing layer on Hadoop. It consist of a language called Pig Latin.

What kind of files did you process? Smart city datasets?

Saudamini: I concentrated on smart city data, specifically London traffic and social data.
Rafiat: Smart city data were used for this experiments most of the data was retrieved from ITU data statistics website and London data store website.

What were the goals of the experiments? What did you achieve?

Saudamini: The goal was to observe performance of the underlying machinery and cluster loads. After processing different big data files I compared results of CPU performance, cluster loads, memory usage, and network usage.
Transport and social data was processed on the platform to check the feasibility of implementing smart offices within London to reduce traffic and save people's time. The hypothesis was that there would be a correlation between high traffic boroughs and boroughs with most work destinations. Although that held up in most cases, these boroughs were not in central London like initially imagined.
Rafiat: The goal of the experiment was to analyze set of data that will be retrieved from different sources like ITU (International Telecommunication Union) website, London data store, public data sets on Amazon Web Services, etc. The aim was to use volume as one the criteria to consider while analyzing the data. By doing this, the experiment will be able to show how long it will take for the data to be processed.

If you were given a project now for big data processing, how would you approach it?

Saudamini: If time is not a concern and price is an issue then I would recommend using Hortonworks Sandbox as its flexibility towards type of data source, data processing tool options and Ambari environment give a wholesome data management experience. However, if time is of the essence and money not a factor then it would be beneficial to look at other options which provide a similar user experience in the cloud.
Rafiat: I would use of Hortonworks Data Platform on a separate machine dedicated to the platform, as my own machine was not very high spec.

As a computer science student, do you think for data management we should always use tools like these?

Saudamini: If the dataset you are working with it large, then I think it is advisable to use big data tools like these. Their flexibility and quick processing make them ideal to be deployed as solutions to smart city issues. However, I am not convinced that we should always use them. We could actually try and avoid using these tools if the dataset doesn't demand it. A lot of the analytical functions can be done by other BI tools. Big data tools can have a steep learning curve, and training users should be factored in while deploying systems that utilize them.
Rafiat: Data management is a very important topic There are different advantages to managing data effectively as a student, individual or organization. This includes preventing data duplication, which will allow memory space to be saved. It allows validation of results if need be. Data management allows proper understanding of data, the use of queries to provide specific information needed, so data can be understood easily.
In conclusion, we got mixed results on the use of tools to process ig data applications. An open Hadoop data platform seemed like the obvious choice at the time. As previously described, MapReduce is at the core of a Hadoop Distributed File System. Hortonworks Sandbox is equipped with YARN, the second generation of MapReduce. It divides the two important tasks and makes the process more efficient. YARN supports batch as well as real-time processing projects. The Hortonworks Data Platform has the capability to adapt to the user’s existing data architecture which is a huge plus. In addition to the platform being cost-free, efficient and adaptable, it also has an extensive list of tutorials and user based guides on using the services it provides.
There are a lot of big data processing platforms available as a result of it being the current buzzword. Most services; Amazon Web Services, Cloudera, MapR etc. to name a few, charge the user depending upon the traffic and amount of data they process. Cloudera’s website claims, "The company’s enterprise data hub (EDH) software platform empowers organizations to store, process and analyze all enterprise data, of whatever type, in any volume—creating remarkable cost-efficiencies as well as enabling business transformation."
The current move towards open data generating massive amounts of data, needs real-time processing needing intelligent solutions to process it. Having more tools which are open source can fuel further open data research impacting not only computing, but social sciences, where economists and governments can make use of big data as well.

Introduction: Apache Ambari

Introduction

The Apache Ambari project is aimed at making Hadoop management simpler by developing software for provisioning, managing, and monitoring Apache Hadoop clusters. Ambari provides an intuitive, easy-to-use Hadoop management web UI backed by its RESTful APIs.
Ambari enables System Administrators to:
  • Provision a Hadoop Cluster
    • Ambari provides a step-by-step wizard for installing Hadoop services across any number of hosts.
    • Ambari handles configuration of Hadoop services for the cluster.
  • Manage a Hadoop Cluster
    • Ambari provides central management for starting, stopping, and reconfiguring Hadoop services across the entire cluster.
  • Monitor a Hadoop Cluster
    • Ambari provides a dashboard for monitoring health and status of the Hadoop cluster.
    • Ambari leverages Ambari Metrics System for metrics collection.
    • Ambari leverages Ambari Alert Framework for system alerting and will notify you when your attention is needed (e.g., a node goes down, remaining disk space is low, etc).
Ambari enables Application Developers and System Integrators to:
  • Easily integrate Hadoop provisioning, management, and monitoring capabilities to their own applications with the Ambari REST APIs.

Getting Started with Ambari

Follow the installation guide for Ambari 2.5.0.
Note: Ambari currently supports the 64-bit version of the following Operating Systems:
  • RHEL (Redhat Enterprise Linux) 6 and 7
  • CentOS 6 and 7
  • OEL (Oracle Enterprise Linux) 6 and 7
  • SLES (SuSE Linux Enterprise Server) 11
  • Ubuntu 12 and 14
  • Debian 7

Get Involved

Visit the Ambari Wiki for design documents, roadmap, development guidelines, etc.

What's New?

What's New with Ambari?

  • The latest release of Ambari is Ambari 2.5.0.
  • Ambari 2.5.0 added the following features:
    • LLAP GA support via Ambari (AMBARI-18901)
    • Ambari authentication with Kerberos token (AMBARI-18364)
    • Support Offline Stack Upgrades In a Cluster (AMBARI-18634)
    • Ambari Metrics System Distributed mode - multiple Collectors (Tech Preview) (AMBARI-15901)
    • Service Auto Start support in Ambari (AMBARI-2330)
    • Ambari scale testing on 2500 Agents (AMBARI-18731)
    • Single API to download all client configs (AMBARI-19275)
    • Support topN user and operations visualization for HDFS in AMS-Grafana (AMBARI-19320)

What is Apache Zeppelin ?

Multi-purpose Notebook

The Notebook is the place for all your needs
  • Data Ingestion
  • Data Discovery
  • Data Analytics
  • Data Visualization & Collaboration

Multiple Language Backend

Apache Zeppelin interpreter concept allows any language/data-processing-backend to be plugged into Zeppelin. Currently Apache Zeppelin supports many interpreters such as Apache Spark, Python, JDBC, Markdown and Shell.

Adding new language-backend is really simple. Learn how to create a new interpreter.

Apache Spark integration

Especially, Apache Zeppelin provides built-in Apache Spark integration. You don't need to build a separate module, plugin or library for it.

Apache Zeppelin with Spark integration provides
  • Automatic SparkContext and SQLContext injection
  • Runtime jar dependency loading from local filesystem or maven repository. Learn more about dependency loader.
  • Canceling job and displaying its progress
For the further information about Apache Spark in Apache Zeppelin, please see Spark interpreter for Apache Zeppelin.

Data visualization

Some basic charts are already included in Apache Zeppelin. Visualizations are not limited to SparkSQL query, any output from any language backend can be recognized and visualized.

Pivot chart

Apache Zeppelin aggregates values and displays them in pivot chart with simple drag and drop. You can easily create chart with multiple aggregated values including sum, count, average, min, max.
Learn more about basic display systems and Angular API(frontend , backend) in Apache Zeppelin.

Dynamic forms

Apache Zeppelin can dynamically create some input forms in your notebook.
Learn more about Dynamic Forms.

Collaborate by sharing your Notebook & Paragraph

Your notebook URL can be shared among collaborators. Then Apache Zeppelin will broadcast any changes in realtime, just like the collaboration in Google docs.
Apache Zeppelin provides an URL to display the result only, that page does not include any menus and buttons inside of notebooks. You can easily embed it as an iframe inside of your website in this way. If you want to learn more about this feature, please visit this page.

100% Opensource


Apache Zeppelin is Apache2 Licensed software. Please check out the source repository and how to contribute. Apache Zeppelin has a very active development community. Join to our Mailing list and report issues on Jira Issue tracker.

3 open source data visualization tools for Hadoop

three open source tools that help Hadoop users do just that:

An introduction to Apache Hadoop for big data

Apache Hadoop is an open source software framework for storage and large scale processing of data-sets on clusters of commodity hardware. Hadoop is an Apache top-level project being built and used by a global community of contributors and users. It is licensed under the Apache License 2.0.


Hadoop was created by Doug Cutting and Mike Cafarella in 2005. It was originally developed to support distribution for the Nutch search engine project. Doug, who was working at Yahoo! at the time and is now Chief Architect of Cloudera, named the project after his son's toy elephant. Cutting's son was 2 years old at the time and just beginning to talk. He called his beloved stuffed yellow elephant "Hadoop" (with the stress on the first syllable). Now 12, Doug's son often exclaims, "Why don't you say my name, and why don't I get royalties? I deserve to be famous for this!"

The Apache Hadoop framework is composed of the following modules

  1. Hadoop Common: contains libraries and utilities needed by other Hadoop modules
  2. Hadoop Distributed File System (HDFS): a distributed file-system that stores data on the commodity machines, providing very high aggregate bandwidth across the cluster
  3. Hadoop YARN: a resource-management platform responsible for managing compute resources in clusters and using them for scheduling of users' applications
  4. Hadoop MapReduce: a programming model for large scale data processing
All the modules in Hadoop are designed with a fundamental assumption that hardware failures (of individual machines, or racks of machines) are common and thus should be automatically handled in software by the framework. Apache Hadoop's MapReduce and HDFS components originally derived respectively from Google's MapReduce and Google File System (GFS) papers.
Beyond HDFS, YARN and MapReduce, the entire Apache Hadoop "platform" is now commonly considered to consist of a number of related projects as well: Apache Pig, Apache Hive, Apache HBase, and others.
An illustration of the Apache Hadoop ecosystem
For the end-users, though MapReduce Java code is common, any programming language can be used with "Hadoop Streaming" to implement the "map" and "reduce" parts of the user's program. Apache Pig and Apache Hive, among other related projects, expose higher level user interfaces like Pig latin and a SQL variant respectively. The Hadoop framework itself is mostly written in the Java programming language, with some native code in C and command line utilities written as shell-scripts.

HDFS and MapReduce

There are two primary components at the core of Apache Hadoop 1.x: the Hadoop Distributed File System (HDFS) and the MapReduce parallel processing framework. These are both open source projects, inspired by technologies created inside Google.

Hadoop distributed file system

The Hadoop distributed file system (HDFS) is a distributed, scalable, and portable file-system written in Java for the Hadoop framework. Each node in a Hadoop instance typically has a single namenode, and a cluster of datanodes form the HDFS cluster. The situation is typical because each node does not require a datanode to be present. Each datanode serves up blocks of data over the network using a block protocol specific to HDFS. The file system uses the TCP/IP layer for communication. Clients use Remote procedure call (RPC) to communicate between each other.
HDFS stores large files (typically in the range of gigabytes to terabytes) across multiple machines. It achieves reliability by replicating the data across multiple hosts, and hence does not require RAID storage on hosts. With the default replication value, 3, data is stored on three nodes: two on the same rack, and one on a different rack. Data nodes can talk to each other to rebalance data, to move copies around, and to keep the replication of data high. HDFS is not fully POSIX-compliant, because the requirements for a POSIX file-system differ from the target goals for a Hadoop application. The tradeoff of not having a fully POSIX-compliant file-system is increased performance for data throughput and support for non-POSIX operations such as Append.
HDFS added the high-availability capabilities for release 2.x, allowing the main metadata server (the NameNode) to be failed over manually to a backup in the event of failure, automatic fail-over.
The HDFS file system includes a so-called secondary namenode, which misleads some people into thinking that when the primary namenode goes offline, the secondary namenode takes over. In fact, the secondary namenode regularly connects with the primary namenode and builds snapshots of the primary namenode's directory information, which the system then saves to local or remote directories. These checkpointed images can be used to restart a failed primary namenode without having to replay the entire journal of file-system actions, then to edit the log to create an up-to-date directory structure. Because the namenode is the single point for storage and management of metadata, it can become a bottleneck for supporting a huge number of files, especially a large number of small files. HDFS Federation, a new addition, aims to tackle this problem to a certain extent by allowing multiple name-spaces served by separate namenodes.
An advantage of using HDFS is data awareness between the job tracker and task tracker. The job tracker schedules map or reduce jobs to task trackers with an awareness of the data location. For example, if node A contains data (x, y, z) and node B contains data (a, b, c), the job tracker schedules node B to perform map or reduce tasks on (a,b,c) and node A would be scheduled to perform map or reduce tasks on (x,y,z). This reduces the amount of traffic that goes over the network and prevents unnecessary data transfer. When Hadoop is used with other file systems, this advantage is not always available. This can have a significant impact on job-completion times, which has been demonstrated when running data-intensive jobs. HDFS was designed for mostly immutable files and may not be suitable for systems requiring concurrent write-operations.
Another limitation of HDFS is that it cannot be mounted directly by an existing operating system. Getting data into and out of the HDFS file system, an action that often needs to be performed before and after executing a job, can be inconvenient. A filesystem in Userspace (FUSE) virtual file system has been developed to address this problem, at least for Linux and some other Unix systems.
File access can be achieved through the native Java API, the Thrift API, to generate a client in the language of the users' choosing (C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, or OCaml), the command-line interface, or browsed through the HDFS-UI web app over HTTP.

JobTracker and TaskTracker: The MapReduce engine

Jobs and tasks in Hadoop
Above the file systems comes the MapReduce engine, which consists of one JobTracker, to which client applications submit MapReduce jobs. The JobTracker pushes work out to available TaskTracker nodes in the cluster, striving to keep the work as close to the data as possible.
With a rack-aware file system, the JobTracker knows which node contains the data, and which other machines are nearby. If the work cannot be hosted on the actual node where the data resides, priority is given to nodes in the same rack. This reduces network traffic on the main backbone network.
If a TaskTracker fails or times out, that part of the job is rescheduled. The TaskTracker on each node spawns off a separate Java Virtual Machine process to prevent the TaskTracker itself from failing if the running job crashes the JVM. A heartbeat is sent from the TaskTracker to the JobTracker every few minutes to check its status. The Job Tracker and TaskTracker status and information is exposed by Jetty and can be viewed from a web browser.
JobTracker and Tracker flowchart: Hadoop 1.x MapReduce System is composed of the JobTracker, which is the master, and the per-node slaves, TaskTrackers
If the JobTracker failed on Hadoop 0.20 or earlier, all ongoing work was lost. Hadoop version 0.21 added some checkpointing to this process. The JobTracker records what it is up to in the file system. When a JobTracker starts up, it looks for any such data, so that it can restart work from where it left off.

Known limitations of this approach in Hadoop 1.x

The allocation of work to TaskTrackers is very simple. Every TaskTracker has a number of available slots (such as "4 slots"). Every active map or reduce task takes up one slot. The Job Tracker allocates work to the tracker nearest to the data with an available slot. There is no consideration of the current system load of the allocated machine, and hence its actual availability. If one TaskTracker is very slow, it can delay the entire MapReduce job—especially towards the end of a job, where everything can end up waiting for the slowest task. With speculative execution enabled, however, a single task can be executed on multiple slave nodes.

Apache Hadoop NextGen MapReduce (YARN)

MapReduce has undergone a complete overhaul in hadoop-0.23 and we now have, what we call, MapReduce 2.0 (MRv2) or YARN.
Apache™ Hadoop® YARN is a sub-project of Hadoop at the Apache Software Foundation introduced in Hadoop 2.0 that separates the resource management and processing components. YARN was born of a need to enable a broader array of interaction patterns for data stored in HDFS beyond MapReduce. The YARN-based architecture of Hadoop 2.0 provides a more general processing platform that is not constrained to MapReduce.
Architectural view of YARN
The fundamental idea of MRv2 is to split up the two major functionalities of the JobTracker, resource management and job scheduling/monitoring, into separate daemons. The idea is to have a global ResourceManager (RM) and per-application ApplicationMaster (AM). An application is either a single job in the classical sense of Map-Reduce jobs or a DAG of jobs.
The ResourceManager and per-node slave, the NodeManager (NM), form the data-computation framework. The ResourceManager is the ultimate authority that arbitrates resources among all the applications in the system.
The per-application ApplicationMaster is, in effect, a framework specific library and is tasked with negotiating resources from the ResourceManager and working with the NodeManager(s) to execute and monitor the tasks.
Overview of Hadoop1.0 and Hadopp2.0
As part of Hadoop 2.0, YARN takes the resource management capabilities that were in MapReduce and packages them so they can be used by new engines. This also streamlines MapReduce to do what it does best, process data. With YARN, you can now run multiple applications in Hadoop, all sharing a common resource management. Many organizations are already building applications on YARN in order to bring them IN to Hadoop.
A next-generation framework for Hadoop data processing
As part of Hadoop 2.0, YARN takes the resource management capabilities that were in MapReduce and packages them so they can be used by new engines. This also streamlines MapReduce to do what it does best, process data. With YARN, you can now run multiple applications in Hadoop, all sharing a common resource management. Many organizations are already building applications on YARN in order to bring them IN to Hadoop. When enterprise data is made available in HDFS, it is important to have multiple ways to process that data. With Hadoop 2.0 and YARN organizations can use Hadoop for streaming, interactive and a world of other Hadoop based applications.

What YARN does

YARN enhances the power of a Hadoop compute cluster in the following ways:
  • Scalability: The processing power in data centers continues to grow quickly. Because YARN ResourceManager focuses exclusively on scheduling, it can manage those larger clusters much more easily.
  • Compatibility with MapReduce: Existing MapReduce applications and users can run on top of YARN without disruption to their existing processes.
  • Improved cluster utilization: The ResourceManager is a pure scheduler that optimizes cluster utilization according to criteria such as capacity guarantees, fairness, and SLAs. Also, unlike before, there are no named map and reduce slots, which helps to better utilize cluster resources.
  • Support for workloads other than MapReduce: Additional programming models such as graph processing and iterative modeling are now possible for data processing. These added models allow enterprises to realize near real-time processing and increased ROI on their Hadoop investments.
  • Agility: With MapReduce becoming a user-land library, it can evolve independently of the underlying resource manager layer and in a much more agile manner.

How YARN works

The fundamental idea of YARN is to split up the two major responsibilities of the JobTracker/TaskTracker into separate entities:
  • a global ResourceManager
  • a per-application ApplicationMaster
  • a per-node slave NodeManager and
  • a per-application container running on a NodeManager
The ResourceManager and the NodeManager form the new, and generic, system for managing applications in a distributed manner. The ResourceManager is the ultimate authority that arbitrates resources among all the applications in the system. The per-application ApplicationMaster is a framework-specific entity and is tasked with negotiating resources from the ResourceManager and working with the NodeManager(s) to execute and monitor the component tasks. The ResourceManager has a scheduler, which is responsible for allocating resources to the various running applications, according to constraints such as queue capacities, user-limits etc. The scheduler performs its scheduling function based on the resource requirements of the applications. The NodeManager is the per-machine slave, which is responsible for launching the applications' containers, monitoring their resource usage (cpu, memory, disk, network) and reporting the same to the ResourceManager. Each ApplicationMaster has the responsibility of negotiating appropriate resource containers from the scheduler, tracking their status, and monitoring their progress. From the system perspective, the ApplicationMaster runs as a normal container.

lEARNING: SQL | WHERE Clause

SQL | WHERE Clause WHERE keyword is used for fetching filtered data in a result set. It is used to fetch data accord...