Commit Graph

83 Commits

Author SHA1 Message Date
Spring Operator
cea08ac1e7 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 176 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 13:29:32 -05:00
mrbq
2ca9a38fa9 Obtain the TaskRepositoryInitializer from the Default Configurer
Added tests during merge

Updated to set proper version
2018-11-12 16:40:19 -05:00
Ilayaperumal Gopinathan
04393bca17 Exit code is nullable
- Make exit code nullable and only update of execution status can make it a valid integer
 - Update JDBC create/start task execution queries to have exitCode as `null` values
 - Update tests to validate/verify the appropirate exit code values for create/start/complete task executions

On merge had to add a pause to the TaskLauncherSinkTests to wait for the task to complete successfully   Before we assumed that 0 was a satisfactory result meaning it was either running or completed.    Now with the null being returned it could be zero or null.  So we have to wait for the task to complete.
2018-10-31 11:05:33 -04:00
David Turanski
ba05720499 Implement getRunningTaskCount
Expose functionality via TaskExplorer

Polishing on merge
2018-07-11 16:46:24 -04:00
Gunnar Hillert
b9a6d3e53c gh-424 Add the ability to retrieve the last TaskExecution for Tasks
- Add the ability to retrieve the last TaskExecution to:
  - MapTaskExecutionDao
  - JdbcTaskExecutionDao
- Refactor `JdbcTaskExecutionDao` and use `NamedParameterJdbcTemplate` for all persistence store calls
- Add the following TaskExecution methods to TaskExplorer:
  - getLatestTaskExecutionsByTaskNames
  - getLatestTaskExecutionForTaskName
- Add Tests
- Ensure that code is JDK7 compatible due to backporting needs
- Ensure commit backports to 1.2.x

Polishing on tests during merge
2018-06-15 16:58:18 -04:00
Glenn Renfro
6c47223859 Repository is not initialized if tablePrefix is set.
resolves #311
2017-06-26 16:04:22 -05:00
Glenn Renfro
b03f8398a7 Task identifies if JPA is in use and uses JPTransactionManager
resolves #309
2017-06-26 15:49:20 -05:00
Glenn Renfro
6fad14ead7 Support DB2 on Mainframe as DB2ZOS
resolves #303

Added support for DB2ZOS DatabaseType.
Added DB2AS400, DB2VSE, based on how Spring Batch implemeted DB2 identification via metadata.
All DB2 database types will use the DB2 repository initialize sql script

Tested this against a local DB2.
2017-05-19 10:44:08 -04:00
David Turanski
a1cffe8bd4 Change closecontextEnable to closeContextEnabled
Added test

Updated to use the standard log library

resolves #217
2017-04-12 11:06:26 -04:00
Michael Minella
ac41b8c26d Refactor to clense task name
When using Spring Boot, the id of the application context can be a colon
delimited string of values.  By default, Spring Cloud Task uses this
value as the task name.  However, when using JMX, this can cause issues.
This commit updates the SimpleTaskNameResolver to clense the colons and
replace them with underscores.

Resolves #280
2017-03-29 17:45:28 -04:00
Thomas Risberg
fec40fd3f8 Adding a method to pass in taskName for new empty TaskExecution
Resolves #298

Added test and add param to javadoc
2017-03-29 14:17:02 -04:00
Glenn Renfro
80812beee8 Updated the migration scripts to use all caps for table names (#288)
* Updated the migration scripts to use all caps for table names

In the original migration scripts the table names were all lower case.  However the original table definitions were capitalized, and on file systems that are case sensitive,
mysql fails to update the table.  Because of the 2 different cases.

resolves #287

* Updated the 1.1.x branch migration scripts

In the original migration scripts the table names were all lower case.  However the original table definitions were capitalized, and on file systems that are case sensitive,
mysql fails to update the table.  Because of the 2 different cases.

* Added migration script for db2.
2017-03-02 16:07:06 -05:00
Thomas Risberg
929117b365 Changing PARENT_EXECUTION_ID to NUMBER
Resolves #283
2017-02-23 18:59:07 -05:00
Michael Minella
48af5e5b32 Added TaskExecutionListenerSupport
This commit adds the TaskExecutionListenerSupport, a no-op
implementation of the TaskExecutionListner. This allows a user to extend
the TaskExecutionListenerSupport and simply override what they need
instead of implementing all of the methods.
2017-02-10 14:16:11 -06:00
Glenn Renfro
a7fe76c7d6 Do not update the externalExecutionId if null when starting TaskExecution
resolves #271
2017-02-09 09:07:22 -06:00
Glenn Renfro
acaaad89f3 Adds support for Task Execution Parent Ids
resolves #261
2017-01-20 14:47:12 -06:00
Glenn Renfro
91aaf0022c Change Engine for sequence to InnoDB
resolves #262
2017-01-06 13:15:12 -06:00
Michael Minella
3d1ee18db3 Minor polish 2017-01-06 12:54:38 -06:00
Glenn Renfro
10bb457a5a Allows user to set table prefix via properties.
resolves #244
2017-01-06 12:54:30 -06:00
Glenn Renfro
2eb1c49e12 Added ability to update externalExecutionId
resolves #259
2017-01-06 16:47:29 +01:00
Glenn Renfro
1185421803 TaskBatchAutoConfiguration now uses datasource from TaskConfigurer
resovles #252
2016-12-20 19:25:26 -06:00
Michael Minella
91485769d5 Fixed release versions 2016-11-22 10:22:13 -06:00
Glenn Renfro
9074926736 Updated RC1 to GA for migration comments, tests and docs. 2016-11-22 09:39:42 -06:00
Glenn Renfro
fa5cb4f242 Update docs and static maven artifacts to RC1 2016-11-03 22:47:07 -04:00
Glenn Renfro
d6e224f2ef Updated based on Code Review 2016-11-01 17:32:22 -04:00
Glenn Renfro
eff83a1897 Added More tests. 2016-11-01 17:32:22 -04:00
Glenn Renfro
1611c28768 Adding a few more tests.
Added unit tests to classes that had no coverage.
Added unit tests to classes bump up coverage.
2016-11-01 17:32:22 -04:00
Glenn Renfro
02a8c3368b Updates the TaskRepository createTaskExecution to support TaskExecution param
resolves #223

Updated to use TaskExecution when creating new executions for test.
2016-11-01 13:12:32 -04:00
Gunnar Hillert
7298bdd485 gh-235 Fix Sort Properties are ignored in JdbcTaskExecutionDao
- Add support for sorting similar to SCDF Core's `AbstractRdbmsKeyValueRepository`

Added tests on merge
2016-11-01 09:05:05 -04:00
Thomas Risberg
2444b8055e Adding the new ERROR_MESSAGE and EXTERNAL_EXECUTION_ID columns for DB2 2016-10-27 15:27:24 -04:00
Thomas Schuettel
c61a6e9c35 Adds DB2 support
Provides the files and enum constants for Spring Cloud Task
to work with a DB2 database.
2016-10-27 15:26:50 -04:00
Glenn Renfro
81f34d118a Adding comment for those upgrading from .m1.
Removed column keyword from some of the definitions
2016-10-14 17:34:35 -04:00
Michael Minella
17e4250586 Checks for invalid ExecutionId in the TaskLifeCycleListener
resolves #115
* Fixes bug where if the user set the environment variable and commandline args a unique constraint would fire.
* Updated docs
* Removed deprecation
* Fixed version number for integration test.

Added integration tests for externally generated task executions

Add externalExecutionId

resolves #80
2016-10-12 12:45:29 -05:00
Michael Minella
441bbfe492 Checks for invalid ExecutionId in the TaskLifeCycleListener
resolves #115
* Fixes bug where if the user set the environment variable and commandline args a unique constraint would fire.
* Updated docs
* Removed deprecation
* Fixed version number for integration test.

Added integration tests for externally generated task executions
2016-10-10 17:45:35 -05:00
Glenn Renfro
9dada07944 1.0.x - 1.1.x DB Migration scripts
resolves #205
2016-09-09 16:28:27 -04:00
Miguel Gomes
9ccbe60cba Fix NPE when return an eventExitCode before ApplicationFailedEvent 2016-09-08 13:47:23 -05:00
Glenn Renfro
4e7e75cc82 Moved the Error size trimming from DAO to repository.
* We had a discussion on this sometime back and it was decided at that time to keep these type of trims and verification in the Repository.
* Fixed bug where trimming was taking 1 character too many
* Updated ExitMessage maxSize test to verify size
* Added ErrorMessage maxSize Test
* While adding taskExplorer to the test noticed it was missing 2 basic tests and added those as well
2016-09-06 11:00:42 -05:00
Michael Minella
db0565b7cf Introduced Error Message to Task Execution
To provide the ability to control task orchestration via the exit
message, we moved the stack trace storage to a new field.  This means
that exit message is now a field we can use similar to how exit code is
in batch, and still have the stack trace of an unsuccessful task
execution stored.

Resolves spring-cloud/spring-cloud-task#186

Disabled integration tests by default

Just some cleanup on merge
2016-08-15 18:30:15 -04:00
Michael Minella
172f4b957a Added code to record task completion when process is terminated gracefully
Updated per code review

Updates for merge
2016-07-25 16:51:44 -04:00
Glenn Renfro
de3d09664e Updated to use DelegatedResourceLoader that can use an empty loaders map 2016-07-07 10:42:52 -05:00
Michael Minella
7f1ece96e6 Removed unused default 2016-07-06 15:52:21 -05:00
Michael Minella
57e9d4dcae Refactored dependency management
Created a Spring Boot starter that can be used to configure Spring Cloud
Task and it's related functionality.

Updates per code review

Removed autowiring of app context

Refactored DeployerPartitionHandler to correctly use environment variables

Exposed deployment properties of TaskLauncher

Exposed deployment properties via the TaskLaunchRequest

Updated based on code review
2016-07-06 16:15:13 -04:00
Michael Minella
77fdfbdbc0 Refactored the use of the name parameters to be arguments
This PR refactors the use of the term parameters to arguments to be
consistent with how the component is utilized within Spring Cloud Data
Flow.
2016-06-09 09:39:14 -05:00
didiez
a55970fe77 Fixed explicit cast exception while using oracle 10g 2016-05-20 10:07:30 -05:00
Glenn Renfro
df14546a7f SCT-139 Exception info and error codes will be recorded for the task
resolves spring-cloud/spring-cloud-task#139
2016-05-20 09:57:23 -05:00
Michael Minella
619bc567a1 Documentation additions around batch events and formatting fixes 2016-04-26 11:03:33 -05:00
Michael Minella
43d869f726 Add Job Event Messaging to tasks.
* Added test for sample and cleanup

* Added skipEventsListener

* Added new message format.

* Added integration tests.

* Updated application.properties to add json content type

resolves spring-cloud/spring-cloud-task#119
2016-04-25 23:05:07 -05:00
Michael Minella
bdd73632eb Added context active check 2016-04-11 08:39:15 -05:00
Michael Minella
0a56672171 Refactored task end event to be Spring Boot's ApplicationReadyEvent
In testing and other use cases, the ability to keep a context open
beyond the end of a task can be useful.  This change provides the
ability to keep the context alive once a task has completed while also
explicitly shutting the context down (by default) once a task has ended.

Resolves spring-cloud/spring-cloud-task#102
2016-04-06 12:24:52 -05:00
Michael Minella
726441dda3 Increase paraemter size to 2500
Some parameters provided to tasks can be quite large (classpath
definitions for hadoop based jobs for example).  This commit increases
the size of the parameter field in the task repository from 250 to 2500.

Resolves spring-cloud/spring-cloud-task#112
2016-03-29 11:56:51 -05:00