Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeEclipse
languagejavascript
titleLine Protocol Handler
linenumberstrue
#COMMAND parameter1 parameter2

...

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#PARSER PQL
#TRANSCFG Standard
...

...

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
///this is ignored by the parser

...

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#DEFINE currentid 1234
#DEFINE path F:/odysseus/example/
#RUNQUERY
SELECT * FROM example WHERE id = ${currentid}
#RUNQUERY
CREATE STREAM source (id Double, data STRING)
    WRAPPER 'GenericPush'
    PROTOCOL 'CSV'
    TRANSPORT 'File'
    DATAHANDLER 'Tuple'
    OPTIONS ( 'filename' '${path}input.csv')

...

Code Block
themeEclipse
languagejavascript
titleLine Protocol Handler
linenumberstrue
#LOOP i 0 UPTO 10
    #RUNQUERY
    SELECT ${i} AS b, * FROM bid 
#ENDLOOP

...

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#DEFINE latencyOn
....
#IFDEF latencyOn
	#TRANSCFG StandardLatency	
#ELSE
	#TRANSCFG Standard
#ENDIF

...

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#BUFFERPLACEMENT None

...

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
#BUFFERPLACEMENT Standard Buffer Placement

...

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#BUFFERPLACEMENT Source Buffer Placement

...

Code Block
themeEclipse
languagejavascript
titleLine Protocol Handler
linenumberstrue
#BUFFERPLACEMENT Query Buffer Placement

...

Code Block
themeEclipse
languagejavascript
titleLine Protocol Handler
linenumberslinenumberstrue
#DEFINE one
#DEFINE two 1234

...

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
/// query sharing off
#DOQUERYSHARING false
/// query sharing on
#DOQUERYSHARING true

...

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
/// query rewrite off
#DOREWRITE false
/// query rewrite on
#DOREWRITE true

...

This command drops all installed queries (. It does not sources or sinks)remove andy sources or sinks, but you can use #DROPALLSINKS or #DROPALLSOURCES for this.

Parameters

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#DROPALLQUERIES

#DROPALLSINKS

This command drops all installed sinks. It does not remove andy queries or sources, but you can use #DROPALLQUERIES or #DROPALLSOURCES

Parameters

Example

Code Block
themeEclipse
languagejavascript
linenumberstrue
#DROPALLSINKS

#DROPALLSOURCES

This command drops all installed sources. It does not remove andy queries or sinks, but you can use #DROPALLQUERIES or #DROPALLSINKS

Parameters

Example

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#DROPALLQUERIES#DROPALLSOURCES

 

#LOGIN

Changes the login that is used by other commands like #QUERY

Parameters

Example

This example changes the user to "System" with password "manager"

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#LOGIN System manager

...

Logs the current used user out

Parameters

Example

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
#LOGOUT

 

#ODYSSEUS_PARAM

Can be used to set internal Odysseus configuration params. This should be only

Parameters

Example

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
#ODYSSEUS_PARAM scheduler_TimeSlicePerStrategy 10

...

This command sets the current parser for following commands, e.g. by #QUERY or #ADDQUERY. The according parser is used until another parser is set.

Parameters

The parser: Which parsers are available strongly depends on the current system setting and installed features. Normally in the default product, there is "PQL" for Procedural Query Language (PQL) and "CQL" for Continuous Query Language (CQL).

Example

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#PARSER PQL

...

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#QNAME Query1

...

This command executes a query in a certain language. This might be, for example Procedural Query Language (PQL) or Continuous Query Language (CQL). There are three different commands to execute such a query: #QUERY, #ADDQUERY and #RUNQUERY. While #QUERY and #ADDQUERY (they are one and the same) only passes the definied query to Odysseus, the #RUNQUERY additionally starts the query. This means, a query that was added with #QUERY or #ADDQUERY is inactive and not started until it is explicetely started. The #RUNQUERY in contrast immediatly starts a query after it is added, e.g. by using #STARTQUERIES .

Parameters

The query command is dependent on the current parser (which is set by #PARSER) and the current transformation configuration (which is set by #TRANSCFG). Therefore, it is necessary to run these two commands before. Furthermore, you can switch to other parsers / transformation within one script by using #PARSER or #TRANSCFG again. Thus, if you want to run a query in CQL that last #PARSER command before should set the parser to "CQL".

If #QName is defined before, the query will get this name.

Example

The example shows four queries after the parser is set to CQL and the transformation configuration is set to Standard. The first one uses #QUERY and it is executed as a CQL-Query, but not started. The second query is equal to the first one (it still uses CQL and is not started). The third query also uses CQL and the Standard transformation configuration, but is (in contrast to the first and second) started (it is directly running). Then, the parser is switched to PQL, so that the fourth query is parsed by the PQL-Parser and not  by the CQL-Parser anymore.

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#PARSER CQL
#TRANSCFG Standard

#QUERY
SELECT * FROM bid

#ADDQUERY
SELECT * FROM bid

#RUNQUERY
SELECT * FROM bid

#PARSER PQL

#QUERY
result =  PROJECT({ATTRIBUTES=['id','name']}, person)

...

The reload log is a file that logs all queries that were sucessfully installed into the system. This command can be used to run these logged queries from the log, e.g. to recreat an old ystem state.

Parameters

Example

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
#RELOADFROMLOG

...

Sets the used scheduler and its scheduling strategy.

Parameters

Example

Uses the "Single Thread Scheduler" with a "Round Robin" scheduling strategy

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
#SCHEDULER "Single Thread Scheduler RR" "Round Robin"

...

Code Block
themeEclipse
languagejavascripttitlejavascriptLine Protocol Handler
linenumberstrue
#SCHEDULER "Single Thread Scheduler RR" "Aurora Min Cost"

...

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#SCHEDULER "Single Thread Scheduler RR" "Aurora Min Latency"

...

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#SCHEDULER "Single Thread Scheduler RR" "Chain"

...

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
#SCHEDULER "Single Thread Scheduler RR" "Biggest Queue"

...

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
#SCHEDULER "Simple Dynamic Priority  Scheduler" "Round Robin"

...

This command can be used to wait a certain time before executing the next command

Parameters

Example

Waiting 2 seconds (2000 milliseconds) until the next command is invoked.

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#SLEEP 2000

...

This command starts all installed queries that are not running at the moment.

Parameters

Example

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#STARTQUERIES

...

This command starts the scheduling.Notice that the scheduling strongly influences the processing and should be carefully used. The scheduler is running by default. You can stop it by using #STOPSCHEDULER

Parameters

Example

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#STARTSCHEDULER

...

This command stops the scheduling.Notice that the scheduling strongly influences the processing and should be carefully used. The scheduler is running by default. You can start it by using #STARTSCHEDULER

Parameters

Example

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
#STOPSCHEDULER

...

This command sets the transformation configuration for following commands. The transformation configuration defines how a query is transformed into an executable plan. The transformation configuration that was set is used until another configuration is explicitly set.

Parameters

Example

Code Block
title
themeEclipse
languagejavascript
Line Protocol Handlerlinenumberstrue
#TRANSCFG Standard

...

This command sets the transformation configuration for following commands. The transformation configuration defines how a query is transformed into an executable plan. The transformation configuration that was set is used until another configuration is explicitly set.

Parameters

Example

Code Block
themeEclipse
languagejavascripttitleLine Protocol Handler
linenumberstrue
#TRANSCFG Standard

...