Package org.aksw.iguana.cc.worker.impl
Class CLIWorker
- java.lang.Object
-
- org.aksw.iguana.cc.worker.AbstractWorker
-
- org.aksw.iguana.cc.worker.AbstractRandomQueryChooserWorker
-
- org.aksw.iguana.cc.worker.impl.CLIWorker
-
- All Implemented Interfaces:
java.lang.Runnable
,Worker
@Shorthand("CLIWorker") public class CLIWorker extends AbstractRandomQueryChooserWorker
Worker to execute a query again a CLI process, the connection.service will be the command to execute the query against. command may look like the following
cliprocess.sh $QUERY$ $USER$ $PASSWORD$ whereas $QUERY$ will be exchanged with the actual query as well as user and password. Further on it is possible to encode the query using $ENCODEDQUERY$ instead of $QUERY$
-
-
Constructor Summary
Constructors Constructor Description CLIWorker(java.lang.String taskID, Connection connection, java.lang.String queriesFile, java.lang.Integer timeOut, java.lang.Integer timeLimit, java.lang.Integer fixedLatency, java.lang.Integer gaussianLatency, java.lang.Integer workerID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
executeQuery(java.lang.String query, java.lang.String queryID)
This method executes a query and adds the results to the Result Processor for proper result and metric calculations.-
Methods inherited from class org.aksw.iguana.cc.worker.AbstractRandomQueryChooserWorker
getNextQuery, setQueriesList
-
Methods inherited from class org.aksw.iguana.cc.worker.AbstractWorker
addResults, getExecutedQueries, getNoOfQueries, getQueriesFileName, hasExecutedNoOfQueryMixes, isTerminated, popQueryResults, run, startWorker, stopSending, waitTimeMs
-
-
-
-
Constructor Detail
-
CLIWorker
public CLIWorker(java.lang.String taskID, Connection connection, java.lang.String queriesFile, @Nullable java.lang.Integer timeOut, @Nullable java.lang.Integer timeLimit, @Nullable java.lang.Integer fixedLatency, @Nullable java.lang.Integer gaussianLatency, java.lang.Integer workerID)
-
-
Method Detail
-
executeQuery
public void executeQuery(java.lang.String query, java.lang.String queryID)
Description copied from interface:Worker
This method executes a query and adds the results to the Result Processor for proper result and metric calculations. Note: Some of the Worker implementations employ background threads to process the result of the query. Due to this, this method does not return anything and each implementation of this method must also add the results to Result Processor within this method. This can be done by calling AbstractWorker.addResults(QueryExecutionStats)- Parameters:
query
- The query which should be executedqueryID
- the ID of the query which should be executed
-
-