-
Notifications
You must be signed in to change notification settings - Fork 16
4472 - Reduce duplication code for compactions and bulk export #5335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
patchwork01
merged 44 commits into
develop
from
4472-reduce-duplication-between-starting-bulk-export-and-compaction-tasks
Sep 25, 2025
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
acebe91
4472 - Adding first attempt to reduce duplication code for compaction…
ab295382 3e60d3e
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 133bcd2
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 120be71
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 1aed375
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 7cead62
4472 - Refactor to remove static methods
ab295382 dfb9fb7
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 2a2a0a4
4472 - Renamed RunCompactionTask to RunDataProcessingTask
ab295382 fa10d2b
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 3f58ea8
4472 - Refactor RunDataProcessingTask to include creation static methods
ab295382 24b6723
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 2a6d0a8
4472 - Removing enum no longer used
ab295382 017e623
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 b20a5fd
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 8cbc078
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 0e80ced
4472 - Adding static properties that are set at creation of RunDataPr…
ab295382 918dbbe
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 06d4e4e
4472 - Fixing compile error
ab295382 4440974
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 f89f193
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 55f3cda
4472 - PR typo comments
ab295382 1073d3c
4472 - Fixing code so it compiles
ab295382 511807e
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 be09301
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 b9fad73
4472 - Added TaskHostScaler interface fo compactions and bulk export
ab295382 9c5ef7c
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 9e64de7
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 add94bd
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 8411a6b
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 cde2141
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 21c3d8d
Merge branch 'develop' of github.com:gchq/sleeper into 4472-reduce-du…
ab295382 019cb6b
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 4d5e201
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 0ab42fd
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 f66585f
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 dac8d53
Merge branch 'develop' into 4472-reduce-duplication-between-starting-…
ab295382 a783332
4472: Refactor to remove duplicate boolean checks
ca61688 a1726f0
4472: Remove static variables
ca61688 e919608
4472: Split into Compaction and Bulk Export from a users perspective
ca61688 6912c4b
4472: Fix build issue
ca61688 70067f8
4472: Fix build issue
ca61688 7355b83
4472: Split launch methods out into compaction and bulk export
ca61688 be32680
4472: Move compaction and bulk export specific code out of run data p…
ca61688 bd64bbb
4472: Clear up purpose of args
ca61688 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
248 changes: 0 additions & 248 deletions
248
...creator/src/main/java/sleeper/bulkexport/taskcreator/RunLeafPartitionBulkExportTasks.java
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
25 changes: 25 additions & 0 deletions
25
java/common/common-task/src/main/java/sleeper/common/task/BulkExportTaskHostScaler.java
This file contains hidden or 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,25 @@ | ||
| /* | ||
| * Copyright 2022-2025 Crown Copyright | ||
| * | ||
| * 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 sleeper.common.task; | ||
|
|
||
| public class BulkExportTaskHostScaler implements TaskHostScaler { | ||
|
|
||
| @Override | ||
| public void scaleTo(int numberOfTasks) { | ||
| // Bulk Export doesn't currently scale so do nothing | ||
| } | ||
|
|
||
| } |
This file contains hidden or 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
50 changes: 50 additions & 0 deletions
50
java/common/common-task/src/main/java/sleeper/common/task/RunBulkExportTasks.java
This file contains hidden or 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,50 @@ | ||
| /* | ||
| * Copyright 2022-2025 Crown Copyright | ||
| * | ||
| * 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 sleeper.common.task; | ||
|
|
||
| import software.amazon.awssdk.services.ecs.EcsClient; | ||
| import software.amazon.awssdk.services.s3.S3Client; | ||
|
|
||
| import sleeper.configuration.properties.S3InstanceProperties; | ||
| import sleeper.core.properties.instance.InstanceProperties; | ||
|
|
||
| /** | ||
| * Finds the number of messages on a queue, and starts up one EC2 or Fargate task for each, up to a | ||
| * configurable maximum. | ||
| */ | ||
| public class RunBulkExportTasks { | ||
|
|
||
| public static void main(String[] args) { | ||
| if (args.length != 2) { | ||
| System.out.println("Usage: <instance-id> <number-of-tasks>"); | ||
| return; | ||
| } | ||
|
|
||
| try (S3Client s3Client = S3Client.create(); | ||
| EcsClient ecsClient = EcsClient.create()) { | ||
| String instanceId = args[0]; | ||
| int numberOfTasks = Integer.parseInt(args[1]); | ||
|
|
||
| InstanceProperties instanceProperties = S3InstanceProperties.loadGivenInstanceId(s3Client, instanceId); | ||
|
|
||
patchwork01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| RunDataProcessingTasks.createForBulkExport(instanceProperties, ecsClient) | ||
| .runToMeetTargetTasks(numberOfTasks); | ||
| } | ||
| } | ||
|
|
||
| private RunBulkExportTasks() { | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.