I think the sort is not relatived to the output format.

I previously have try this class ,but has a little different compared to
your code. I extend the MultipleTextOutputFormat class and override
its generateFileNameForKeyValue()
method, and everything seems working fine.

2009/3/9 Rasit OZDAS <rasitoz...@gmail.com>

> Hi, all!
>
> I'm using multiple output format to write out 4 different files, each one
> has the same type.
> But it seems that outputs aren't being sorted.
>
> Should they be sorted? Or isn't it implemented for multiple output format?
>
> Here is some code:
>
> // in main function
> MultipleOutputs.addMultiNamedOutput(conf, "text", TextOutputFormat.class,
> DoubleWritable.class, Text.class);
>
> // in Reducer.configure()
> mos = new MultipleOutputs(conf);
>
> // in Reducer.reduce()
> if (keystr.equalsIgnoreCase("BreachFace"))
>                mos.getCollector("text", "BreachFace", reporter).collect(new
> Text(key), dbl);
>            else if (keystr.equalsIgnoreCase("Ejector"))
>                mos.getCollector("text", "Ejector", reporter).collect(new
> Text(key), dbl);
>            else if (keystr.equalsIgnoreCase("FiringPin"))
>                mos.getCollector("text", "FiringPin", reporter).collect(new
> Text(key), dbl);
>            else if (keystr.equalsIgnoreCase("WeightedSum"))
>                mos.getCollector("text", "WeightedSum",
> reporter).collect(new Text(key), dbl);
>            else
>                mos.getCollector("text", "Diger", reporter).collect(new
> Text(key), dbl);
>
>
> --
> M. Raşit ÖZDAŞ
>



-- 
http://daily.appspot.com/food/

Reply via email to