-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from EBIvariation/feature/job-parameters
Architecture improvements - More Spring Batch compliant, independent tests
- Loading branch information
Showing
197 changed files
with
5,150 additions
and
2,899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
src/main/java/uk/ac/ebi/eva/pipeline/IntegrationTestJobLauncherCommandLineRunner.java
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
...ain/java/uk/ac/ebi/eva/pipeline/configuration/ChunkSizeCompletionPolicyConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright 2017 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package uk.ac.ebi.eva.pipeline.configuration; | ||
|
||
import org.springframework.batch.core.configuration.annotation.StepScope; | ||
import org.springframework.batch.repeat.policy.SimpleCompletionPolicy; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import uk.ac.ebi.eva.pipeline.parameters.ChunkSizeParameters; | ||
|
||
/** | ||
* Spring configuration to inject a SimplecompletionPolicy that modifies the chunk size with the configured | ||
* JobParameters chunk size. | ||
*/ | ||
@Configuration | ||
public class ChunkSizeCompletionPolicyConfiguration { | ||
|
||
@Bean | ||
@StepScope | ||
public SimpleCompletionPolicy chunkSizecompletionPolicy(ChunkSizeParameters chunkSizeParameters) { | ||
return new SimpleCompletionPolicy(chunkSizeParameters.getChunkSize()); | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
...va/uk/ac/ebi/eva/pipeline/configuration/JobExecutionApplicationListenerConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2015-2017 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package uk.ac.ebi.eva.pipeline.configuration; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import uk.ac.ebi.eva.pipeline.runner.JobExecutionApplicationListener; | ||
|
||
/** | ||
* This configuration adds to the application context a JobExecutionApplicationListener that holds the state of the | ||
* last job execution. This is used from the runner to decide the return code of the application. | ||
*/ | ||
@Configuration | ||
public class JobExecutionApplicationListenerConfiguration { | ||
|
||
@Bean | ||
public JobExecutionApplicationListener applicationJobInstanceListener() { | ||
return new JobExecutionApplicationListener(); | ||
} | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/uk/ac/ebi/eva/pipeline/configuration/JobExecutionDeciderConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2017 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package uk.ac.ebi.eva.pipeline.configuration; | ||
|
||
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; | ||
import org.springframework.batch.core.job.flow.JobExecutionDecider; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import uk.ac.ebi.eva.pipeline.jobs.deciders.SkipStepDecider; | ||
import uk.ac.ebi.eva.pipeline.parameters.JobParametersNames; | ||
|
||
import static uk.ac.ebi.eva.pipeline.configuration.BeanNames.ANNOTATION_SKIP_STEP_DECIDER; | ||
import static uk.ac.ebi.eva.pipeline.configuration.BeanNames.STATISTICS_SKIP_STEP_DECIDER; | ||
|
||
/** | ||
* This class defines the beans for the deciders to skip annotation and statistics step. | ||
*/ | ||
@Configuration | ||
@EnableBatchProcessing | ||
public class JobExecutionDeciderConfiguration { | ||
|
||
@Bean(ANNOTATION_SKIP_STEP_DECIDER) | ||
public JobExecutionDecider annotationSkipStepDecider() { | ||
return new SkipStepDecider(JobParametersNames.ANNOTATION_SKIP); | ||
} | ||
|
||
@Bean(STATISTICS_SKIP_STEP_DECIDER) | ||
public JobExecutionDecider statisticsSkipStepDecider() { | ||
return new SkipStepDecider(JobParametersNames.STATISTICS_SKIP); | ||
} | ||
|
||
} |
Oops, something went wrong.