I tried giving the complete local path as input in a map-reduce java program. It is running successfully in the eclipse,but not running in the cluster. So how can i directly give a local file as input inside a map-reduce java program,so that i can run it in the hdfs cluster.

asked 11 Apr '12, 23:08

sailaja's gravatar image

sailaja
16889
accept rate: 0%

edited 17 Sep '12, 01:46

Nabeel's gravatar image

Nabeel ♦♦
2.2k147


Is this Apache Hadoop or MapR that you are asking about?

link

answered 12 Apr '12, 06:56

TedDunning's gravatar image

TedDunning ♦♦
2.4k315
accept rate: 28%

Using local input usually only makes sense when you run a job in a standalone mode, e.g:

hadoop jar /opt/mapr/hadoop/hadoop-0.20.2/hadoop-0.20.2-dev-examples.jar wordcount -Dmapred.job.tracker=local -Dmapreduce.jobtracker.staging.root.dir=/tmp -Dfs.default.name=file:/// /abs/path/in /abs/path/out

for basic debugging. Which is maybe what you are doing in your IDE.

When you run a job in a Hadoop cluster all task tracker nodes need to be able to access the input path. That is why you would and should normally use MapR-FS. An alternative that in a way defeats Hadoop's purpose of pushing computation to the data includes having the same mount point to your NAS/SAN on every node.

link

answered 12 Apr '12, 12:43

gera's gravatar image

gera
1.3k16
accept rate: 21%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×85
×59
×25

Asked: 11 Apr '12, 23:08

Seen: 1,011 times

Last updated: 17 Sep '12, 01:46

powered by OSQA