public void setup(Context context) {
   Configuration conf = context.getConfiguration();
   String date = DayPartitioner.getDate(context);
   HDFSPath outdir = new HDFSPath(conf, conf.get("output"));
   Datafile dataFile = outdir.getFile(date);
   sentenceFile = new SentenceFile(dataFile);
   sentenceFile.openWrite();
 }
 @Override
 public void cleanup(Context context) {
   sentenceFile.closeWrite();
 }