{"id":988,"date":"2011-07-26T12:50:39","date_gmt":"2011-07-26T17:50:39","guid":{"rendered":"http:\/\/www.migrate2cloud.com\/blog\/?p=988"},"modified":"2016-03-21T02:48:54","modified_gmt":"2016-03-21T07:48:54","slug":"mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster","status":"publish","type":"post","link":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/","title":{"rendered":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster"},"content":{"rendered":"<p>This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\/S3.\u00a0 We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline using tools like s3cmd. HDFS is a failover cluster filesystem which provides enough protection to your data over instance failures.<\/p>\n<p>Mapreduce<\/p>\n<p>MapReduce is a programming model and an associated implementation for processing and generating large data sets. We can specify a map function that processes a key\/value pair to generate a set of intermediate key\/value pairs, and a reduce function that merges all intermediate values associated with the same intermediate key.<\/p>\n<p>The main steps hadoop takes to run a job are<\/p>\n<ol>\n<li>The client, which submits the MapReduce job.<\/li>\n<li>The jobtracker, which coordinates the job run. The jobtracker is a Java application whose main class is JobTracker.<\/li>\n<li>The tasktrackers, which run the tasks that the job has been split into. Tasktrackers are Java applications whose main class is TaskTracker.<\/li>\n<li>The distributed filesystem (normally HDFS), which is used for sharing job files between the other entities.<\/li>\n<\/ol>\n<p>Hadoop Map\/Reduce is very powerful, but<\/p>\n<p>o\u00a0\u00a0 Requires a Java Programmer.<\/p>\n<p>o\u00a0\u00a0 Harder to write and also time consuming.<\/p>\n<p>o\u00a0\u00a0 Difficult to update frequently.<\/p>\n<p>A solution is to Run jobs using pig(Piglatin)\/hive(HiveQL).<\/p>\n<p><strong>Pig<\/strong><\/p>\n<p>\u2022 An engine for executing programs on top of Hadoop<\/p>\n<p>\u2022 It provides a language, Pig Latin, to specify these programs<\/p>\n<p>Pig has Two main parts:<\/p>\n<p>\u2013 A high level language to express data analysis<\/p>\n<p>\u2013 Compiler to generate mapreduce programs (which can run on top of Hadoop)<\/p>\n<p>Pig Latin is the name of the language with which Pig scripts are written. Pig also provides an interactive shell for executing simple commands, called Grunt. Pig Latin is a high level language. Pig runs on top of Hadoop. It collect the data for processing from Hadoop HDFS filesystem and Submit the jobs to the Hadoop mapreduce system.<\/p>\n<p>A sample mapreduce job (like a Hello World program) using pig is given below<\/p>\n<p>It is assumed that you are on one of the machines which is a part of a hadoop cluster having NameNode\/DataNode as well as JobTracker\/TaskTracker setup.<\/p>\n<p>We will be executing piglatin commands using grunt shell. Switch to hadoop user first .<\/p>\n<p>Consider we have a file \u2018users\u2019 on our local filesystem which contain data to be processed.First we have to upload it to hdfs. Then<\/p>\n<p># pig -x mapreduce<\/p>\n<p>this command will take you to grunt shell. Pig Latin statements are generally<\/p>\n<p>organized in the following manner:<\/p>\n<p>A LOAD statement reads data from the file system.Then we process the data.And writes output to the file system using STORE statement. A DUMP statement displays output to the screen.<\/p>\n<p>grunt&gt; Users = load &#8216;users&#8217; as (name, age);<\/p>\n<p>grunt&gt; Fltrd = filter Users by age &gt;= 18 and age &lt;= 25;<\/p>\n<p>grunt&gt; Pages = load &#8216;pages&#8217; as (user, url);<\/p>\n<p>grunt&gt; Jnd = join Fltrd by name, Pages by user;<\/p>\n<p>grunt&gt; Grpd = group Jnd by url;<\/p>\n<p>grunt&gt; Smmd = foreach Grpd generate group, COUNT(Jnd) as clicks;<\/p>\n<p>grunt&gt; Srtd = order Smmd by clicks desc;<\/p>\n<p>grunt&gt; Top5 = limit Srtd 5;<\/p>\n<p>grunt&gt; store Top5 into &#8216;top5sites&#8217;;<\/p>\n<p>We can also view the progress of the job through the web interface http:\/\/&lt;ipaddress of jobtracker machine&gt;:50030.<\/p>\n<p>Tools like PigPen (an eclipse plugin) are available\u00a0 that helps us create pig-scripts, test them using the example generator and then submit them to a hadoop cluster.<\/p>\n<p>There is another tool called oozie &#8211; Oozie is a server based <em>Workflow Engine <\/em>specialized in running workflow jobs with actions that run Hadoop Map\/Reduce and Pig jobs.<\/p>\n<p>Pig tasks can be modeled as a workflow in oozie. These are deployed to the Oozie server using a command line utility. Once deployed, the workflows can be started and manipulated as necessary using the same utility. Once the workflow is started Oozie will run through each flow.. The web console for Oozie server can be used to monitor the progress of various workflow jobs being managed by the server.<\/p>\n<p><strong>Hive<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Pig, was causing some slowdowns at Facebook company as it needed training to bring business intelligence users up to speed. So the development team decided to write Hive which has an SQL like syntax.<\/p>\n<p>Apache Hive is a data warehouse infrastructure built on top of Apache Hadoop. It provides tools for querying and analysis of large data sets stored in Hadoop files. Hive defines a simple SQL-like query language, called HiveQL, that enables users familiar with SQL to query the data. Also it allows custom mappers and reducers to perform more sophisticated analysis that may not be supported by the built-in capabilities of the language.<\/p>\n<p>Some of the queries in HiveQL are given below, which is very similar to the SQL.<\/p>\n<p># show tables;<\/p>\n<p># describe &lt;tablename&gt;;<\/p>\n<p># SELECT * FROM &lt;tablename&gt; LIMIT 10;<\/p>\n<p>#\u00a0 CREATE TABLE table_name<\/p>\n<p>#\u00a0 ALTER TABLE table_name RENAME TO new_table_name<\/p>\n<p>#\u00a0 DROP TABLE table_name<\/p>\n<p>NoSQL databases like Cassandra provide support for hadoop. Cassandra supports running Hadoop MapReduce jobs against the Cassandra cluster. With proper cluster configuration, MapReduce jobs can retrieve data from Cassandra and then output results either back into Cassandra, or into a file system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\/S3.\u00a0 We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[34,51,3],"tags":[434,435,442,88,446,87,443,212,447,440,437,441,89,90,94,93,97,444,448,438,436,95,92,96,197,433,136,445,439],"class_list":["post-988","post","type-post","status-publish","format-standard","hentry","category-amazon-ec2","category-amazon-web-services","category-cloud-computing","tag-apache-hadoop","tag-apache-hive","tag-apache-tools","tag-aws-ec2","tag-business-intelligence","tag-cassandra","tag-commandline-using-tools","tag-company-facebook","tag-data-warehouse","tag-data-warehouse-infrastructure","tag-data-intensive-computing","tag-grunt-store-top5","tag-hadoop","tag-hadoop-cluster","tag-hdfs","tag-hive","tag-hiveql","tag-java","tag-java-programmer","tag-jumbune","tag-mapr","tag-mapreduce","tag-pig","tag-piglatin","tag-social-media-networking","tag-sql","tag-technologyinternet","tag-web-console","tag-web-interface"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\/S3. We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Migrate to Cloud - we make the clouds rain\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster - Migrate to Cloud\" \/>\n\t\t<meta property=\"og:description\" content=\"This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\/S3. We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-07-26T17:50:39+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2016-03-21T07:48:54+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster - Migrate to Cloud\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\/S3. We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/#blogposting\",\"name\":\"Mapreduce using Hadoop + pig\\\/hive on AWS EC2 hadoop cluster - Migrate to Cloud\",\"headline\":\"Mapreduce using Hadoop + pig\\\/hive on AWS EC2 hadoop cluster\",\"author\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin-2\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#organization\"},\"datePublished\":\"2011-07-26T12:50:39-05:00\",\"dateModified\":\"2016-03-21T02:48:54-05:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/#webpage\"},\"articleSection\":\"Amazon EC2, Amazon Web Services, Cloud computing, Apache Hadoop, Apache Hive, apache tools, AWS EC2, business intelligence, cassandra, commandline using tools, Company: Facebook, data warehouse, data warehouse infrastructure, Data-intensive computing, grunt&gt; store Top5, Hadoop, Hadoop Cluster, HDFS, hive, HiveQL, Java, Java Programmer, Jumbune, MapR, MapReduce, pig, PigLatin, Social Media &amp; Networking, SQL, Technology\\\/Internet, web console, web interface\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/cloud-computing\\\/#listItem\",\"name\":\"Cloud computing\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/cloud-computing\\\/#listItem\",\"position\":2,\"name\":\"Cloud computing\",\"item\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/cloud-computing\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/#listItem\",\"name\":\"Mapreduce using Hadoop + pig\\\/hive on AWS EC2 hadoop cluster\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/#listItem\",\"position\":3,\"name\":\"Mapreduce using Hadoop + pig\\\/hive on AWS EC2 hadoop cluster\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/cloud-computing\\\/#listItem\",\"name\":\"Cloud computing\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#organization\",\"name\":\"Migrate to Cloud\",\"description\":\"we make the clouds rain\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin-2\\\/#author\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin-2\\\/\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d370c5f82d8ed54ea2a14d7d135705e3add3103f5fa9b7670bd9dc6335a92e9e?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/#webpage\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/\",\"name\":\"Mapreduce using Hadoop + pig\\\/hive on AWS EC2 hadoop cluster - Migrate to Cloud\",\"description\":\"This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\\\/S3. We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin-2\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/admin-2\\\/#author\"},\"datePublished\":\"2011-07-26T12:50:39-05:00\",\"dateModified\":\"2016-03-21T02:48:54-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/\",\"name\":\"Migrate to Cloud\",\"description\":\"we make the clouds rain\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster - Migrate to Cloud","description":"This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\/S3. We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline","canonical_url":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/#blogposting","name":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster - Migrate to Cloud","headline":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster","author":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin-2\/#author"},"publisher":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/#organization"},"datePublished":"2011-07-26T12:50:39-05:00","dateModified":"2016-03-21T02:48:54-05:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/#webpage"},"isPartOf":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/#webpage"},"articleSection":"Amazon EC2, Amazon Web Services, Cloud computing, Apache Hadoop, Apache Hive, apache tools, AWS EC2, business intelligence, cassandra, commandline using tools, Company: Facebook, data warehouse, data warehouse infrastructure, Data-intensive computing, grunt&gt; store Top5, Hadoop, Hadoop Cluster, HDFS, hive, HiveQL, Java, Java Programmer, Jumbune, MapR, MapReduce, pig, PigLatin, Social Media &amp; Networking, SQL, Technology\/Internet, web console, web interface"},{"@type":"BreadcrumbList","@id":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.migrate2cloud.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/#listItem","name":"Cloud computing"}},{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/#listItem","position":2,"name":"Cloud computing","item":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/#listItem","name":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/#listItem","position":3,"name":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster","previousItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/#listItem","name":"Cloud computing"}}]},{"@type":"Organization","@id":"https:\/\/www.migrate2cloud.com\/blog\/#organization","name":"Migrate to Cloud","description":"we make the clouds rain","url":"https:\/\/www.migrate2cloud.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin-2\/#author","url":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin-2\/","name":"admin","image":{"@type":"ImageObject","@id":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d370c5f82d8ed54ea2a14d7d135705e3add3103f5fa9b7670bd9dc6335a92e9e?s=96&d=mm&r=g","width":96,"height":96,"caption":"admin"}},{"@type":"WebPage","@id":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/#webpage","url":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/","name":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster - Migrate to Cloud","description":"This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\/S3. We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/#breadcrumblist"},"author":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin-2\/#author"},"creator":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/admin-2\/#author"},"datePublished":"2011-07-26T12:50:39-05:00","dateModified":"2016-03-21T02:48:54-05:00"},{"@type":"WebSite","@id":"https:\/\/www.migrate2cloud.com\/blog\/#website","url":"https:\/\/www.migrate2cloud.com\/blog\/","name":"Migrate to Cloud","description":"we make the clouds rain","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Migrate to Cloud - we make the clouds rain","og:type":"article","og:title":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster - Migrate to Cloud","og:description":"This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\/S3. We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline","og:url":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/","article:published_time":"2011-07-26T17:50:39+00:00","article:modified_time":"2016-03-21T07:48:54+00:00","twitter:card":"summary_large_image","twitter:title":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster - Migrate to Cloud","twitter:description":"This article discuss about running mapreduce jobs using the apache tools called pig and hive.Before we can process the data we need to upload the files to be processed to HDFS\/S3. We recommend uploading to hdfs and keeping the important files in s3 for backup is a better practice. s3 is easily accessible from commandline"},"aioseo_meta_data":{"post_id":"988","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2022-12-27 09:17:48","updated":"2026-07-21 15:30:24","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.migrate2cloud.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/\" title=\"Cloud computing\">Cloud computing<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.migrate2cloud.com\/blog"},{"label":"Cloud computing","link":"https:\/\/www.migrate2cloud.com\/blog\/category\/cloud-computing\/"},{"label":"Mapreduce using Hadoop + pig\/hive on AWS EC2 hadoop cluster","link":"https:\/\/www.migrate2cloud.com\/blog\/mapreduce-using-hadoop-pighive-on-aws-ec2-hadoop-cluster\/"}],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts\/988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/comments?post=988"}],"version-history":[{"count":7,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts\/988\/revisions"}],"predecessor-version":[{"id":2148,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts\/988\/revisions\/2148"}],"wp:attachment":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/media?parent=988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/categories?post=988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/tags?post=988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}