Make linearly executing workers start at different positions #286
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.
This pull request makes changes so that multiple workers that execute the same queries linearly, start at different positions.
The starting positions are equally distanced from each other.
Query Handling Enhancements:
src/main/java/org/aksw/iguana/cc/query/handler/QueryHandler.java
: Added atotalWorkerCount
field and a method to set this value. Updated thegetQuerySelectorInstance
method to use this field for theLinearQuerySelector
initialization. [1] [2] [3]Query Selector Improvements:
src/main/java/org/aksw/iguana/cc/query/selector/impl/LinearQuerySelector.java
: Modified theLinearQuerySelector
to support an optional starting index and adjusted thegetNextIndex
andgetCurrentIndex
methods accordingly.Worker Initialization Fixes:
src/main/java/org/aksw/iguana/cc/tasks/impl/Stresstest.java
: Updated theStresstest
class to initialize query handlers and count the number of workers for each query handler during both warmup and main execution phases. [1] [2] [3] [4]Bug Fixes:
src/main/java/org/aksw/iguana/cc/worker/impl/SPARQLProtocolWorker.java
: Fixed a bug in theexecuteHttpRequest
method to correctly use thequerySelector
's current index.Testing Enhancements:
src/test/java/org/aksw/iguana/cc/query/selector/impl/LinearQuerySelectorTest.java
: Added a test case to verify the functionality of theLinearQuerySelector
with a starting index.