Wiki

Clone wiki

cassandra-esper / NamedWindow

Step 2: Creating a Named Virtual Window

In order to select data from the Cassandra virtual data window, you have to add a statement to the Esper engine. We follow the example from the integration tests:

create window CassandraWindow.cassandra:cassandradw('
{
    "host":"127.0.0.1", 
    "keyspace":"testks",
    "table":"testtable",
    "username-property": "cassandra-username",
    "password-property": "cassandra-password"
    "root-username-property": "cassandra-root-username",
    "root-password-property": "cassandra-root-password"
}') 
as CassandraEvent

The name CassandraEvent is just an example. You may, of course, give the event type a window holds any name you like---as long as you declare it to the Esper engine. Please refer to the Esper documentation on declaring types for further information.

You might have noticed that we here refer to the name and namespace we used in Step 1.

Parameters:

  • host: the host of the Cassandra cluster.
  • keyspace: the keyspace to use; optional, by default the Esper namespace for the named window is used.
  • table: the table which is being queried; optional, be default the Esper named window's name is used.
  • username-property: the system property from which to obtain the username for cassandra; optional, default value 'cassandra-username'.
  • password-property: the system property from which to obtain the password for cassandra; optional, default value 'cassandra-password'.
  • username-property: the system property from which to obtain the root username for cassandra; optional, default value 'cassandra-root-username'.
  • password-property: the system property from which to obtain the root password for cassandra; optional, default value 'cassandra-root-password'.

<< Prev (Esper configuration) Next (Statements) >>


Cassandra-Esper

(C) 2013 University of Zurich, Department of Informatics

This software comes with no warranty.

Updated