Reducer doesn't have the ((FileSplit) context.getInputSplit()). Just the mapper.

I would like to know from java which files a reducer is reading, and to where it is writing. Can I do this?

Thanks,

On 09-03-2015 15:44, Kai Voigt wrote:
Hi,

the context object (passed to map(), reduce() and setup()) contains information about the input split, such as the file name.

From the top of my head: String fileName = ((FileSplit) context.getInputSplit()).getPath().getName();

Kai

Am 09.03.2015 um 16:39 schrieb xeonmailinglist-gmail <xeonmailingl...@gmail.com <mailto:xeonmailingl...@gmail.com>>:

Hi,

I am looking to YARN MapReduce internals, and I would like know if it possible to know which file a map/reduce function is reading or writing from inside a map or reduce function defined by the user, or simply by the client?


Thanks,

--
--



------------------------------------------------------------------------
*Kai Voigt*Am Germaniahafen 1...@123.org <mailto:k...@123.org>
24143 Kiel+49 160 96683050
Germany@KaiVoigt


--
--

Reply via email to