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Ş

Reply via email to