STREAM Online Help > Menu Command Reference | <<Previous | Next>> |
This section provides information on the commands available from the menu bar and context menus:
1. Load Registry
Load a previously saved registry file (by using "Save Registry" option below). This can be handy if you are going to repeat part of the registration process again and again.
2. Save Registry
You can save all the registered streams, relations and queries, together with any text file bindings for the streams and relations, into a registry file (which is in xml format). Later on you can reload it by choosing "Load Registry" option above. If there is a registry file already loaded, it will save to that file (overwrite it).
3. Save Registry As
Similar to "Save Registy", except that you can specify a file name different from that of the current loaded registry file.
4. Exit
Exit from the demo program.
1. Register Stream
This command is used to register a stream schema with the system and to associate it with a given name. Streams are append-only sequences of tuples, and can be populated with either inputs to the system or by CQL views in the system. When selected, a window will be displayed that allows the user to enter in the stream name and stream attributes. Valid stream and attribute names consist of one or more alphanumeric characters and must start with a letter. Reserved words like "select" and "count" are not allowed as stream or relation names or as attribute names.
2. Register Relation
This command is used to register a relation schema with the system and to associate it with a given name. (Relations differ from streams in that they support deletions as well as the insertions supported by streams.) When selected, a window will be displayed that allows the user to enter in the relation name and relation attributes. These must follow the same rules as in the Register Stream command.
3. Register Query
Selecting this command will bring up a window that will allow the user to enter a query in CQL that will be executed by the system. The user can also decide whether to display the output at client side, and whether assign a name to it (this effectively turns a query into a view). More information about CQL and its semantics can be found here.
4. Generate Plan
Selecting this command will notify the server that the registration process is done, and the STREAM system will in turn generates execution plans for all registered queries. After this command is executed, the user can see the query plans either by clicking the "Plan" button in the query list of the main display area, or by selecting appropriate options in the "View" menu.
5. Run
Selecting this command will tell the server to start running registered queries.
6. Reset
Selecting this command will stop the running of any registered queries (if they are running), and drop all registered queries. However, registered streams and relations will remain.
7. Complete Reset
Selecting this command will stop the running of any registered queries (if they are running), and drop all registered streams, relations and queries. Basically, the user can start from fresh again.
1. Registered Streams and Relations
Clicking this option will show all registered streams and relations in the main display area.
2. Registered Queries
Clicking this option will show all registered queries in the main display area. You can click "Plan" button to show its corresponding plan (if plan has been generated) in the Plan Display pane, or click "Show Output"/"Hide Output" button to show/hide its results (if the query is running).
3. Query Plans
For each registered query, there will be a corresponding item in the "View" menu after "Generate Plan" is clicked. Selecting if will bring its plan up to the "Plan Display" pane.
This menu is for all registered stream sources. We can specify which text file to use when sending tuples from the client to the server. User can create his or her own stream source files containing comma-separated values such as the following example:
Hamburger, 2.49, 35 Cheeseburger, 2.99, 43 French Fries, 1.19, 20 ...One line stands for a data tuple. Note that the whitespace between items is not necessary and is ignored.After successfully binding a input, the controls for that input are enabled, allowing the user to start/pause sending tuples and to specify the sending rate. Clicking on the "Start" button will begin sending tuples to the server. If you checked the option "Loop over file contents", tuples will continue to be sent until the "Pause" button is pressed, looping around the stream source file as many times as necessary; otherwise, tuples in the file will be sent only once.
A Note on Application-Defined Time
By default, the client program adds a timestamp to each tuple, using the current system time at the machine where the client is running. A timestamp contains a seconds field. If your data comes with timestamps, then you might want to make the stream server use these timestamps instead of the default local system time. To make the stream server use specified tuple timestamps all you have to do is to specify "file contains timestamps" when binding, and add a seconds (non-negative integer) field before each tuple in the data file, as shown below:
10, Hamburger, 2.49, 35 11, Cheeseburger, 2.99, 43 20, French Fries, 1.19, 20 ...
There are three pre-defined demos for you to give the STREAM system a quick try.
1. One Query
This a simplest demo only consists one query on one stream.
2. Simple Aggregation
A simple aggregation query on one stream.
3. Simple Join
A simple join query on two streams.
Right clicking on an plan component in the plan display will bring up the plan component context menu. Currently, this menu only has one option depending on different components:
1. For Queue: Monitor Rate of Tuple Flow
Adds a monitor to a queue to see the rate of tuple flow through it.
After a monitor is registered, the user is presented with a graph next to the component. The graph will track the value of the statistics over time. The number in the upper left corner of the graph is the maximum value on the y-axis (not the current value).
Essentially, a monitor is an internal CQL query with the system to continuously retrieve the values of this statistic and display the results to the user. This query is a windowed aggregate query on the SysStream stream and will show up immediately in the View menu. That means, you can also see the execution plan for this monitor query by selecting it in the View menu. Alternatively, you can choose to show all queries and click its corresponding "Plan" button; or you can select "Show Plan" in the monitor context menu.
2. For Operators: Monitor CPU Usage
Adds a monitor to a operator to see its CPU usage.
3. For Store: Monitor Size (pages)
Adds a monitor to a store to see its memory usage.
4. For Synopsis: Monitor Cardinality
Adds a monitor to a Synopsis to see its cardinality.
5. For Monitor graph: Show Plan
Shows the query execution plan for this monitor. You can even add monitors for the components in the monitor query execution plan.
STREAM Online Help > Menu Command Reference | <<Previous | Next>> |