Hello Christian,

Hadoop Streaming executable does not matter if it is in C++/C or any other 
language.
You just have to make sure you are reading from STDIN and writing to STDOUT. 
Take for example the cat command in UNIX. 
This reads and writes as we need (shown below)

[hadoop-trunk]$ cat < README.txt
For the latest information about Hadoop, please visit our website at:

   http://lucene.apache.org/hadoop/

and our wiki, at:

   http://wiki.apache.org/lucene-hadoop/


Now you could use this as your mapper to cat your input files like this
hadoop jar hadoop-streaming.jar -mapper "cat" -reducer NONE -input <your input> 
-output <your output>

Alternatively you might want to take a look at the logs to see if anything went 
wrong. $HADOOP_LOG_DIR

Thanks,
Lohit

----- Original Message ----
From: Christian Kremnitzer <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, October 30, 2007 12:54:36 AM
Subject: Hadoop-Streaming with C


Hello @all!

 

I am using Hadoop (version 0.14.3) and I tried to execute
 Hadoop-Streaming
with C.

Firstly, I compiled and linked my C-Files, then specified it as mapper
 and
reducer to hadoop-streaming.

 

The code seems to work, as no error message occurred on the
 web-interface.
The mapper receives input data correctly, but does no output of data.

Consequently, also the resulting output file is empty. 

 

Do I make any failures with stdin or stdout?

Could anyone give me a small example of a simple mapper and a simple
 reducer
in C (not C++)?

 

Thanks a lot in advance.

 

Christian

 

 

------------------------------------------------------ 

University of Economics and Business Administration

Research Institute for Computational Methods

UZA 2 

Augasse 2-6

A-1090 Wien

 

Tel: +43-1-31336-5251

E-Mail:  <mailto:[EMAIL PROTECTED]>
 [EMAIL PROTECTED]

Web:  <http://www.wu-wien.ac.at/firm> http://www.wu-wien.ac.at/firm

------------------------------------------------------

 

 

 





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

Reply via email to