There is a C-HDFS API + library (called libhdfs) available @
http://hadoop.apache.org/common/docs/r0.20.2/libhdfs.html. Perhaps you
can make your C++ mapper program use that?

On Thu, Mar 24, 2011 at 10:56 AM, Keith Wiley <[email protected]> wrote:
> This webpage:
>
> http://hadoop.apache.org/common/docs/r0.18.3/streaming.html
>
> contains this passage:
>
> [BEGIN]
> How do I process files, one per map?
>
> As an example, consider the problem of zipping (compressing) a set of files 
> across the hadoop cluster. You can achieve this using either of these methods:
>
>        • Hadoop Streaming and custom mapper script:
>                • Generate a file containing the full HDFS path of the input 
> files. Each map task would get one file name as input.
>                • Create a mapper script which, given a filename, will get the 
> file to local disk, gzip the file and put it back in the desired output 
> directory
> [END]
>
> I'm not trying to gzip files as in the example, but I would like to read 
> files directly from HDFS into C++ streaming code, as opposed to passing those 
> files as input through the streaming input interface (stdin).
>
> I'm not sure how to reference HDFS from C++ though.  I mean, how would one 
> open an ifstream to such a file?
>
> ________________________________________________________________________________
> Keith Wiley     [email protected]     keithwiley.com    
> music.keithwiley.com
>
> "Luminous beings are we, not this crude matter."
>                                           --  Yoda
> ________________________________________________________________________________
>
>



-- 
Harsh J
http://harshj.com

Reply via email to