摘要:
A computer is programmed to accept a command to create a new aggregation defined by a user during execution of continuous queries on streams of data. The computer is further programmed to thereafter accept and process new continuous queries using the new aggregation, in a manner similar to built-in aggregations. The user typically writes a set of instructions to perform the new aggregation, and identifies in the command, a location of the set of instructions. In response to such a command, the computer creates metadata identifying the new aggregation. The metadata is used to instantiate one aggregation for each group of data in a current window, grouped by an attribute identified in a new query.
摘要:
A first continuous query is deleted from several continuous queries that are being executed, by performing different actions that depend on how resources are shared therebetween. As an example, a second continuous query is deleted if a view is referenced by the first continuous query, and if the view is built on the second continuous query, and if the view is not referenced by any query other than the first continuous query. Such deletion is followed by compiling the second continuous query, followed by updating the view to refer to a newly-compiled version of the second continuous query. As another example, if an operator in the first continuous query is not used by any other query, this operator is de-scheduled from execution, and any exclusively-owned resources are released. Also, data to be read by the operator and data generated by the operator, if present in shared resources, are deleted therefrom.
摘要:
A computer is programmed to process a continuous query that is known to perform a new aggregation on one or more stream(s) of data, using one or more other aggregations on the stream(s). The computer creates an operator to execute the continuous query, and schedules the operator for execution in a specific order. In several embodiments, the computer determines the order based on dependency of the new aggregation on other aggregation(s), and on the order of performance of the other aggregation(s). The new aggregation is scheduled for performance after performance of each of the other aggregations. The computer is further programmed to pass results of the other aggregations to the new aggregation, by execution of a predetermined function. Support for use of the other aggregations results within the new aggregation eliminates redundant computation of the other aggregations within the new aggregation. The new aggregation may be user defined or built-in.
摘要:
A new continuous query to a data stream management system (DSMS) may use a silent relation whose source does not provide any heartbeats. During execution of any given operator, the DSMS processes data from one input (“active input”) using its time stamp as if the same time stamp is received from another input whose relation has fallen silent (“empty input”), if one or more predetermined conditions are met. One predetermined condition is that the empty input's operator has all its own inputs silent. And another predetermined condition is that a maximum time stamp that is currently present among all the inputs of the empty input's operator is equal to a time stamp that was last received from these same inputs. When both conditions are met, previously received data from the empty input is time stamped with the same time stamp as the most recently received data from the active input.
摘要:
A computer is programmed to accept a command to create a new aggregation defined by a user during execution of continuous queries on streams of data. The computer is further programmed to thereafter accept and process new continuous queries using the new aggregation, in a manner similar to built-in aggregations. The user typically writes a set of instructions to perform the new aggregation, and identifies in the command, a location of the set of instructions. In response to such a command, the computer creates metadata identifying the new aggregation. The metadata is used to instantiate one aggregation for each group of data in a current window, grouped by an attribute identified in a new query.
摘要:
A computer is programmed to accept a command for creation of a new aggregation defined by a user to process data incrementally, one tuple at a time. One or more incremental function(s) in a set of instructions written by the user to implement the new aggregation maintain(s) locally any information that is to be passed between successive invocations, to support computing the aggregation for a given set of tuples as a whole. The user writes a set of instructions to perform the aggregation incrementally, including a plus function which is repeatedly invoked, only once, for each addition to a window of a message. The user also writes a minus function to be invoked with the message, to return the value of incremental aggregation over the window after removal of the message. In such embodiments, the computer does not maintain copies of messages in the window for use by aggregation function(s).
摘要:
A new continuous query to a data stream management system (DSMS) may use a stream or a relation which may or may not be used by continuous queries previously registered in the DSMS. The DSMS is programmed to modify an execution plan to accommodate execution of the new query while continuing to execute the previously registered continuous queries. The modified execution plan may include new operators and/or share existing operators. The DSMS is programmed to cause operators which output a relation to propagate a current state of the relation to each newly-coupled operator that uses the relation. The current state is propagated only to operators that have been newly coupled and have thus not yet received any state information previously. After propagation of current state to newly-coupled operators, results of processing any new data for the relation are supplied to all operators coupled thereto, including newly-coupled operators and existing operators.
摘要:
A new continuous query to a data stream management system (DSMS) may use several operators that are equivalent to operators currently being used by continuous queries that have been previously registered in the DSMS. To determine equivalence of operators, the DSMS checks at least the function and the data input to the operators. On finding equivalence, the DSMS modifies a global plan being executed, to use at least an existing subtree of operators during execution of the new continuous query, to generate a modified plan. The DSMS is also programmed to cause each relation source operator (which outputs a relation) to propagate a current state of the relation to each operator newly coupled to the relational operator. After propagation of current state to newly-coupled operators, each operator in the modified plan processes any new data and supplies the result to all operators coupled thereto, including newly-coupled operators and existing operators.
摘要:
A data stream management system (DSMS) is designed to support a new user-defined function, by creating and using at least two structures as follows. A first structure (“metadata entry”) is created in response to a command for creation of the new function, and maps a single instance of a class to the function's name. A second structure is created with creation of an operator on receipt of each new continuous query that uses the new function. The second structure (“operator specific data structure”) contains a path to the newly-created instance, which path is obtained by looking up the first structure. Additional second structures are created on receipt of additional continuous queries which use the new function, but all second structures contain the same path. All continuous queries use the same instance. Repeated use of a single instance to compile and execute multiple queries eliminates repeated instantiation of the same function.
摘要:
A computer is programmed to accept a command to create a new aggregation defined by a user during execution of continuous queries on streams of data. The computer is further programmed to thereafter accept and process new continuous queries using the new aggregation, in a manner similar to built-in aggregations. The user typically writes a set of instructions to perform the new aggregation, and identifies in the command, a location of the set of instructions. In response to such a command, the computer creates metadata identifying the new aggregation. The metadata is used to instantiate one aggregation for each group of data in a current window, grouped by an attribute identified in a new query.