hadoop - How to output a sequence file in mapreduce program -
i have map-reduce job takes avro file input, mapper extends avromapper
class. here driver program
public static void main(string[] args) throws exception { //job configuration jobconf conf = new jobconf(seqfilegenerator.class); conf.setjobname("sequence file generator"); fileinputformat.setinputpaths(conf, new path("in")); fileoutputformat.setoutputpath(conf, new path("out")); avrojob.setmapperclass(conf, avroreadermapper.class); avrojob.setinputschema(conf, contentpackage.schema$); avrojob.setoutputschema(conf, pair.getpairschema(schema.create(type.string),schema.create(type.int))); jobclient.runjob(conf); }
as shown in code, have use avrojob
class define job. i'd program output sequence file looks have define schema output otherwise doesn't run. in other words, output has avro!! how can output sequence file in program?