-
Notifications
You must be signed in to change notification settings - Fork 15
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
Rework query handling #184
Conversation
All prior functionality is now in the new QueryHandler. Next step is to update the documentations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. Looks very good. I've pointed out only some minor things and added some questions here and there.
As you wrote, todos left are:
- JavaDoc
- update the Documentation
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/config/elements/Task.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/handler/QueryHandler.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/set/QuerySet.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/source/impl/FolderQuerySource.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/source/AbstractQuerySource.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/tasks/impl/Stresstest.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/tasks/impl/Stresstest.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/utils/FileUtils.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/tasks/impl/Stresstest.java
Outdated
Show resolved
Hide resolved
Things left to do:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation looks very good and the code around query handling, also. In general, there still seems to be a long way to go.
-[ ] Besides the comments please review if we really need interfaces+abstract classes for various abstractions. It seems to me that there is no real value in the interface and that the interface could be merged into the abstract class.
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/config/IguanaConfig.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/handler/QueryHandler.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/handler/QueryHandler.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/handler/QueryHandler.java
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/pattern/PatternHandler.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/query/pattern/PatternHandler.java
Outdated
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/tasks/impl/Stresstest.java
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/worker/AbstractWorker.java
Show resolved
Hide resolved
iguana.corecontroller/src/main/java/org/aksw/iguana/cc/worker/impl/SPARQLWorker.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Was SPARQLWorker removed from the Documentation?
- Please double check that the removed abstractions are not referenced in the documentation.
- update documentation to reflect renaming QueryList and getQuery
Please check the boxes here when done.
Rework of the query handling
Each
Worker
gets their ownQueryHandler
.The updated config will have for example the following structure:
QueryHandler
Each
QueryHandler
has:location
of the query file or folder containing the query filesQuerySet
, containing all the queries from the file (or folder)QuerySelector
, which generates the index of the next querylangProcessor
to generate TripleStatspattern
to generate queries from pattern queriesQuerySet
The
QuerySet
is either in-memory or file-based.InMemoryQuerySet
loads all the queries into Strings in memory when initializing.FileBasedQuerySet
retrieves a query directly from the file when its requested.The config option
caching
can be set totrue
for in-memory orfalse
for file-based.Each QuerySet has a
QuerySource
from which the queries are read.QuerySource
A QuerySource is the wrapper for the handling of the query files.
3 different QuerySources are implemented:
FileLineQuerySource
expects a query file with one query per lineFileSeparatorQuerySource
expects a file with (multi-line) queries separated by a separator line. Default separator line is "###"FolderQuerySource
expects a directory with query files that each contain one (multi-line) queryQuerySelector
A QuerySelector is basically a number generator giving the next index of a query to load.
2 QuerySelectors are implemented:
LinearQuerySelector
which gives each index in ascending order, restarting at 0 when reaching the last one.RandomQuerySelector
usesjava.util.Random
to generate the next index. The seed is either provided in the config or theworkerID
is usedTODO