runJobconf Would you like to work on hands on Hadoop Projects CLICK HERE Step 8

Runjobconf would you like to work on hands on hadoop

This preview shows page 72 - 82 out of 328 pages.

JobClient.runJob(conf); } } Would you like to work on hands-on Hadoop Projects - CLICK HERE. Step 8 – Create the JAR file for the wordcount class –
Image of page 72
Image of page 73
Image of page 74
Image of page 75
How to execute the Hadoop MapReduce WordCount program ? >> hadoop jar (jar file name) (className_along_with_packageName) (input file) (output folderpath) hadoop jar dezyre_wordcount.jar com.code.dezyre.WordCount /user/cloudera/Input/war_and_peace /user/cloudera/Output
Image of page 76
Important Note: war_and_peace (Download link) must be available in HDFS at /user/cloudera/Input/war_and_peace. If not, upload the file on HDFS using the following commands - hadoop fs –mkdir /user/cloudera/Input hadoop fs –put war_and_peace /user/cloudera/Input/war_and_peace Output of Executing Hadoop WordCount Example –
Image of page 77
The program is run with the war and peace input file. To get the War and Peace Dataset along with the Hadoop Example Code for the Wordcount program delivered to your inbox, send an email to [email protected]! Send us an email at [email protected], if you have any specific questions related to big data and hadoop careers.
Image of page 78
What will you learn from this hive tutorial? This hadoop hive tutorial shows how to use various Hive commands in HQL to perform various operations like creating a table in hive, deleting a table in hive, altering a table in hive, etc. Pre-requisites to follow this Hive Tutorial Hive Installation must be completed successfully. Basic knowledge of SQL is required to follow this hadoop hive tutorial. Learn the Basics of Hive Hadoop Hive makes data processing on Hadoop easier by providing a database query interface to hadoop. Hive is a friendlier data warehouse tool for users from ETL or database background who are accustomed to using SQL for querying data. Read More on – What is Hive? Hive Architecture Commonly Used Hive Commands
Image of page 79
Learn Hadoop by working on interesting Big Data and Hadoop Projects for just $9 DDL Commands in Hive SQL users might already be familiar with what DDL commands are but for readers who are new to SQL, DDL refers to Data Definition Language. DDL commands are the statements that are responsible for defining and changing the structure of a database or table in Hive. CREATE Database,Table DROP Database,Table TRUNCATE Table ALTER Database,Table SHOW Databases,Tables,Table Properties,Partitions,Functions,Index DESCRIBE Database, Table ,View DDL Commands in Hive
Image of page 80
Let’s look at the usage of the top hive commands in HQL on both databases and tables – DDL Commands on Databases in Hive Create Database in Hive As the name implies, this DDL command in Hive is used for creating databases. CREATE (DATABASE) [IF NOT EXISTS] database_name [COMMENT database_comment] [LOCATION hdfs_path] [WITH DBPROPERTIES (property_name=property_value, ...)]; In the above syntax for create database command, the values mentioned in square brackets [] are optional.
Image of page 81
Image of page 82

You've reached the end of your free preview.

Want to read all 328 pages?

  • Fall '19
  • Hadoop

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture