@Test public void testCalvalusJobNameIsUsedForProductionId() throws Exception { String nameForProduction = "my own name"; ProductionRequest productionRequest = new ProductionRequest("L2", "marcop", "inputPath", "MER_RR__1P/r03", "productionName", nameForProduction, ProcessorProductionRequest.PROCESSOR_BUNDLE_NAME, "beam", ProcessorProductionRequest.PROCESSOR_BUNDLE_VERSION, "4.9-SNAPSHOT", ProcessorProductionRequest.PROCESSOR_BUNDLE_LOCATION, "/calvalus/test/bundles", ProcessorProductionRequest.PROCESSOR_NAME, "BandMaths"); Production production = productionType.createProduction(productionRequest); assertNotNull(production); assertEquals(nameForProduction, production.getName()); }
@Override public Production createProduction(ProductionRequest productionRequest) throws ProductionException { final String productionId = Production.createId(productionRequest.getProductionType()); final String productionName = productionRequest.getProductionName( createProductionName("Level 2 ", productionRequest)); L2WorkflowItem workflowItem = createWorkflowItem(productionId, productionName, productionRequest); String stagingDir = productionRequest.getStagingDirectory(productionId); boolean autoStaging = productionRequest.isAutoStaging(); return new Production(productionId, productionName, workflowItem.getOutputDir(), stagingDir, autoStaging, productionRequest, workflowItem); }
L2ProductionType extends HadoopProductionType { @Override public Production createProduction(ProductionRequest productionRequest) throws ProductionException { final String productionId = Production.createId(productionRequest.getProductionType()); final String productionName = productionRequest.getProductionName( createProductionName("Level 2 ", productionRequest)); L2WorkflowItem workflowItem = createWorkflowItem(productionId, productionName, productionRequest); String stagingDir = productionRequest.getStagingDirectory(productionId); boolean autoStaging = productionRequest.isAutoStaging(); return new Production(productionId, productionName, workflowItem.getOutputDir(), stagingDir, autoStaging, productionRequest, workflowItem); } }
L2ProductionType extends HadoopProductionType { @Override public Production createProduction(ProductionRequest productionRequest) throws ProductionException { final String productionId = Production.createId(productionRequest.getProductionType()); final String productionName = productionRequest.getProductionName( createProductionName("Level 2 ", productionRequest)); L2WorkflowItem workflowItem = createWorkflowItem(productionId, productionName, productionRequest); String stagingDir = productionRequest.getStagingDirectory(productionId); boolean autoStaging = productionRequest.isAutoStaging(); return new Production(productionId, productionName, workflowItem.getOutputDir(), stagingDir, autoStaging, productionRequest, workflowItem); } L2ProductionType(FileSystemService fileSystemService, HadoopProcessingService processingService,
                     StagingService stagingService); }
L2ProductionType extends HadoopProductionType { @Override public Production createProduction(ProductionRequest productionRequest) throws ProductionException { final String productionId = Production.createId(productionRequest.getProductionType()); final String productionName = productionRequest.getProductionName( createProductionName("Level 2 ", productionRequest)); L2WorkflowItem workflowItem = createWorkflowItem(productionId, productionName, productionRequest); String stagingDir = productionRequest.getStagingDirectory(productionId); boolean autoStaging = productionRequest.isAutoStaging(); return new Production(productionId, productionName, workflowItem.getOutputDir(), stagingDir, autoStaging, productionRequest, workflowItem); } L2ProductionType(FileSystemService fileSystemService, HadoopProcessingService processingService,
                     StagingService stagingService); @Override Production createProduction(ProductionRequest productionRequest); }
L2ProductionType extends HadoopProductionType { @Override public Production createProduction(ProductionRequest productionRequest) throws ProductionException { final String productionId = Production.createId(productionRequest.getProductionType()); final String productionName = productionRequest.getProductionName( createProductionName("Level 2 ", productionRequest)); L2WorkflowItem workflowItem = createWorkflowItem(productionId, productionName, productionRequest); String stagingDir = productionRequest.getStagingDirectory(productionId); boolean autoStaging = productionRequest.isAutoStaging(); return new Production(productionId, productionName, workflowItem.getOutputDir(), stagingDir, autoStaging, productionRequest, workflowItem); } L2ProductionType(FileSystemService fileSystemService, HadoopProcessingService processingService,
                     StagingService stagingService); @Override Production createProduction(ProductionRequest productionRequest);  }