Sie sind auf Seite 1von 4

IBM Sign in | Register

Technical topics Evaluation software Community Events Search developerWorks Submit

Profiles Communities Apps English

Blogs This Blog Search


My Blogs Public Blogs My Updates

College Projects Log in to participate

College Projects
Archive
College Projects July 2017

View All Entries March 2017

February 2017
HADOOP WORDMEAN PROGRAM IN
January 2017
MAPREDUCE(without IDE)
Rajjo16 | July 13July 13 | 1,573 Views

We assume we have all our Prerequisites. That is Blog Authors


suppose we have java, openssh server and hadoop.
Overview
Also hdfs is working fit and fine. Now suppose we Rajjo16
Recent Updates want to perform some mapreduce jobs like
wordmean, calculating Pi value etc.Hadoop
Status Updates
installation delivers example MapReduce jar file.This amri94
Members jar file contains the implementation of wordmean and
other some basic programs. To perform this we need
Activities
to follow some steps: SohiniAcharya
Files
Step-1:Creating an input file
Forums
In this step we create the data file that is to be analyzed.We 1 - 3 of 7 authors
Bookmarks create it in a ".txt" format.
Blog In my test case,I have created a text file under the name of
"wordmean.txt" at my Desktop and added some random letters.

Tags

Find a Tag

analysis configuration configure


count(grep) data eclipse
environment frequency

hadoop ide linux map

mapreduce on
programming reduce search
terminal ubuntu using without
word wordcount youtube

Cloud List
Step-2:Starting the Hadoop
daemons
Start all Hadoop daemons using the following command:

$ start-all.sh

Step-3:Creating a input directory


in HDFS
Then Create a input directory input in your hdfs.To creat a input
directory use the following command:

$ hadoop fs -mkdir /input


(Remember this directory is in your hdfs not in your linux file
system.)

In the following example(screen shot),I have created a directory


with the name of 'rajashree' and then created another directory
'input' in it,you can just creat one.
Step-4:Putting the input file in
the input directory
To put the input file(saved in ubuntu) to the input directory(HDFS
server) we have to use the following syntax:
$ hadoop fs -put <path of the text file>/<nameofthetextfile.txt>
<input directory>
In my case,I have used the following command:
$ hadoop fs -put /home/rajashree/Desktop/wordmean.txt
/rajashree/input

You can check it from your browser that is worked properly or not
using Web UI.

STEP-5:Executing Wordmean
Program
To execute wordmean program we need to associate the hadoop-
mapreduce-examples***.jar.

syntax of the executing command will be like this :

$ hadoop jar <location of hadoop mapreduce examples jar file>


wordmean <input directory of hdfs> <output directory of hdfs>

I will execute this command :

$ hadoop jar /usr/local/hadoop/hadoop-


2.7.0/share/hadoop/mapreduce/hadoop-mapreduce-examples-
2.7.0.jar wordcount /rajashree/input /rajashree/output

After successful execution output file will be generated.


N.B:you don't have to create the output directory separately,it
will automatically be created during the execution time.

STEP-6: OUTPUT OF THE


EXECUTION :

The mean value will be showed immediately on the terminal.


To get the further details,we have to go to the output
directory through the browser(http://localhost:50070 and go
to the utilities)
Then download the output file 'part-r-00000' and open it.It will
contain the word count and the total length.

THANK YOU

Modified on July 13July 13 by Rajjo16

Comments (0)

There are no comments to display

Previous Entry Main Next Entry

Feed for Blog Entries | Feed for Blog Comments |


Feed for Comments for this Entry

About Feeds Report abuse Faculty Select a language:

Help Newsletters Terms of use Students English

Contact us Follow Third party notice Business Partners

Submit content Like IBM privacy

IBM accessibility

Portugus (Brasil)

Espaol

Vit Clear ReCSS Console


DOM Object is notClose
[ Error: undefined an object
(evaluating
'window.__CONTAINER_URI.getQP') ]

Das könnte Ihnen auch gefallen