Hadoop(and Java) neophyte here. I needed some help with using MultipleTextOutputFormat
to control the output filename in MapReduce.
Currently I am using it this way. And it seems to work fine. However what I am trying to change is the usage of the fields that get picked to determine the filename.
Instead of hardcoding them to field[0]
or field[3]
(as is the case in the sample), I would like to pick this up(in some dynamic fashion) from say, JobConf
as field[jobConf.get("id.offset")]
or field[jobConf[get("date.offset")]
. Does anyone here know how I could go about doing this (or something to this effect i.e. it doesn't have to be JobConf
per se)?
Any pointers/suggestions/tips et al. would be most appreciated. Thanks.