HadoopProductionType implements ProductionType { protected String getOutputPath(ProductionRequest productionRequest, String productionId, String dirSuffix) throws ProductionException { String relDir = productionRequest.getString("outputDir", productionId); String defaultDir = String.format("home/%s/%s", productionRequest.getUserName(), relDir); String outputPath = productionRequest.getString("outputPath", defaultDir); String outputDir = productionRequest.getString(JobConfigNames.CALVALUS_OUTPUT_DIR, outputPath); if (outputDir.endsWith("/")) { outputDir = outputDir.substring(0, outputDir.length() - 1); } try { return getFileSystemService().getQualifiedPath(productionRequest.getUserName(), outputDir + dirSuffix); } catch (IOException e) { throw new ProductionException(e); } } protected  HadoopProductionType(String name,
                                   FileSystemService fileSystemService,
                                   HadoopProcessingService processingService,
                                   StagingService stagingService); FileSystemService getFileSystemService(); HadoopProcessingService getProcessingService(); StagingService getStagingService(); @Override String getName(); @Override boolean accepts(ProductionRequest productionRequest); @Override Staging createStaging(Production production); static void setJobConfig(Map<String, String> parameters, Configuration jobConfig);  }
@Test public void testGetOutputPath() throws Exception { ProductionRequest productionRequest = new ProductionRequest("X", "eva"); assertEquals("hdfs: assertEquals("hdfs: productionRequest = new ProductionRequest("X", "eva", "outputPath", "blob"); assertEquals("hdfs: assertEquals("hdfs: productionRequest = new ProductionRequest("X", "eva", "outputPath", "blob", "calvalus.output.dir", "hop"); assertEquals("hdfs: assertEquals("hdfs: productionRequest = new ProductionRequest("X", "eva", "outputPath", "blob", "calvalus.output.dir", "hop/"); assertEquals("hdfs: assertEquals("hdfs: }