Showing posts with label Apache Pig. Show all posts
Showing posts with label Apache Pig. Show all posts

Tuesday, March 27, 2012

Starting apache pig

We can start pig in two ways:

1. Local mode : 
pig will operate in stand alone local mode and all files will be loaded and
created on local drive folder.
To start: move to your pig folder and type :

bin/pig -x local       //for local mode


2. Distributed mode : 
pig will operate in distributed mode and all files will be loaded and created on hdfs drive folder.

bin/pig -x mapreduce      //for distributed mode

So if you start pig in this mode all the files you are dealing with or giving refrence of should be there on the hdfs file system, which you can create or copy using hadoop shell commands.
if files are not present the pig will yield file not found error.

Friday, November 11, 2011

Hadoop : PigTutorial


Introduction

The Pig tutorial shows you how to run two Pig scripts in Local mode and Hadoop mode.
  • Local Mode: To run the scripts in local mode, no Hadoop or HDFS installation is required. All files are installed and run from your local host and file system.
  • Hadoop Mode: To run the scripts in hadoop (mapreduce) mode, you need access to a Hadoop cluster and HDFS installation available through Hadoop Virtual Machine provided with this tutorial.
The Pig tutorial files are installed on the Hadoop Virtual Machine under "/home/hadoop-user/pig" directory. It includes the Pig JAR file (pig.jar) and the tutorial files (tutorial.jar, Pigs scripts, log files). These files work with Hadoop 0.18.0 and provide everything you need to run the Pig scripts. This Pig Tutorial is also available on the apache Pig website.


Hadoop: Apache Pig


Apache Pig is a platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs. The salient property of Pig programs is that their structure is amenable to substantial parallelization, which in turns enables them to handle very large data sets.
At the present time, Pig's infrastructure layer consists of a compiler that produces sequences of Map-Reduce programs, for which large-scale parallel implementations already exist (e.g., the Hadoop subproject). Pig's language layer currently consists of a textual language called Pig Latin, which has the following key properties:
  • Ease of programming. It is trivial to achieve parallel execution of simple, "embarrassingly parallel" data analysis tasks. Complex tasks comprised of multiple interrelated data transformations are explicitly encoded as data flow sequences, making them easy to write, understand, and maintain.
  • Optimization opportunities. The way in which tasks are encoded permits the system to optimize their execution automatically, allowing the user to focus on semantics rather than efficiency.
  • Extensibility. Users can create their own functions to do special-purpose processing.

Installation Method

Featured Posts

Kali Linux Remote Desktop: Access GNOME from Windows Using Native RDP

  Kali Linux + GNOME 50 + GNOME Remote Desktop + Windows Remote Desktop (MSTSC) Getting a full GNOME desktop remotely on Kali Linux can be ...