Ejemplo n.º 1
0
 @Override
 protected void setup(Context context) throws IOException, InterruptedException {
   super.setup(context);
   isFirstAttempt = taskId.endsWith("_0");
   isRNA = HalvadeConf.getIsRNA(context.getConfiguration());
   scc = HalvadeConf.getSCC(context.getConfiguration(), isRNA);
   sec = HalvadeConf.getSEC(context.getConfiguration(), isRNA);
   try {
     gff = HalvadeFileUtils.downloadGFF(context, taskId);
   } catch (URISyntaxException ex) {
     Logger.EXCEPTION(ex);
     throw new InterruptedException("Error when downloading GFF file");
   }
   filterBedFile = HalvadeConf.getFilterBed(context.getConfiguration());
   filterDBsnp = HalvadeConf.getFilterDBSnp(context.getConfiguration());
   useUnifiedGenotyper = HalvadeConf.getUseUnifiedGenotyper(context.getConfiguration());
   redistribute = HalvadeConf.getRedistribute(context.getConfiguration());
   containers = HalvadeConf.getMapContainerCount(context.getConfiguration());
   tasksLeft = Integer.parseInt(context.getConfiguration().get("mapred.map.tasks")) - taskNr;
   // get task number:
   if (redistribute && tasksLeft < containers) {
     threads = 6;
   }
 }