-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Job Scheduler logic (#103)
* Add PoC extending the Job-Scheduler plugin Not functional yet * Modify build.gradle to load job scheduler on gradlew run * Add PoC extending the Job-Scheduler plugin Not functional yet * Modify build.gradle to load job scheduler on gradlew run * Reformat code * Rebuild build.gradle * Move JobSchedulerExtension to the right resources directory * Fix logger class name * Expose a POST endpoint to schedule tasks. * Init jobScheduler * Check if runner interface is being called. * Try getting runjob() executed * Correct META-INF directory contents * Create Job on plugin startup * Move create() to its own JobDocument class. * Fix switch statement * Schedule job on cluster startup. * Make sure to schedule the job only on new clusters. * Split job indexing to a separate method * Create a job that logs the search results on the .commands index. * Make the command manager run searches on the commands index. * Check if index exists before running search. * Wrap searchResponse in CompletableFuture * Retrieve commands sorted by ascending timeout time. * Fix sort field * Adding scroll logic * Start implementing PIT search * Send the Search Response to a test REST endpoint * Change the command.status of submitted commands to DONE * Fix build.gradle after merging master * Remove old RestPostCommandAction class after master merge * Tidy up after master merge * Fix gradlew run error * Apply spotless * Switch to synchronous code * Adding pagination through PointInTime classes * Adding pagination through PointInTime classes * Only set sort fields for the first page. * Fix empty search response errors * Improve while loop * Make PointInTime a non-singleton class * Simplificar get instancia. Agregar cabecera de licencia faltante. * Fix linter warnings * Block until PointInTimeBuilder is obtained * Create one pit per search * Make SearchJob a non-singleton class * Indexing operation timeout should be set in ms * Indexing operation timeout should be set in ms * Remove mockito explicit dependency * Removing settings object * Removing unneeded CommandManagerJobRunner object * JavaDocs for scheduleCommandJob method * Use fqn for job index name constant * Add javadocs for parseInstantValue * Add javadocs for CommandManagerJobParameter * Add javadocs for CommandManagerJobRunner * Remove unneeded parameter * Add javadocs to JobDocument class * Add javadocs to JobDocument's create() method * Rename SearchJob to SearchThread and make it implement Runnable * Improve exception handling * Improve exception handling * Use URI and credentials in settings * Rename updateStatusField to setSentStatus and improve it * Make "command" a constant * Make queries constant * Refactor totalHits() * Remove unneeded getters * Improve buildPit() exception handling * Load settings from environment * Fix JavaDocs * Improve searchAfter logic * Fixing errors after merge * Fix build.gradle errors Applies Spotless * Fix settings related errors * Fix http client permission issues * Send orders array with proper authentication * Only set status to SENT when a non-error response has been received * Add missing import * Use https for the Management API mock --------- Signed-off-by: Álex Ruiz <[email protected]> Signed-off-by: Fede Galland <[email protected]> Co-authored-by: Álex Ruiz <[email protected]> Co-authored-by: Malena Casas <[email protected]>
- Loading branch information
1 parent
7f24209
commit 270e9b5
Showing
7 changed files
with
790 additions
and
19 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
Oops, something went wrong.