Share via


StreamingQueryManager Class

Definition

A class to manage all the StreamingQuery active in a SparkSession.

public sealed class StreamingQueryManager
type StreamingQueryManager = class
Public NotInheritable Class StreamingQueryManager
Inheritance
StreamingQueryManager

Methods

Active()

Returns a list of active queries associated with this SQLContext.

AwaitAnyTermination()

Wait until any of the queries on the associated SQLContext has terminated since the creation of the context, or since ResetTerminated() was called. If any query was terminated with an exception, then the exception will be thrown.

If a query has terminated, then subsequent calls to AwaitAnyTermination() will either return immediately (if the query was terminated by Stop()), or throw the exception immediately (if the query was terminated with exception). Use ResetTerminated() to clear past terminations and wait for new terminations.

In the case where multiple queries have terminated since ResetTerminated() was called, if any query has terminated with exception, then AwaitAnyTermination() will throw any of the exception. For correctly documenting exceptions across multiple queries, users need to stop all of them after any of them terminates with exception, and then check the Exception() for each query.

Throws StreamingQueryException on the JVM if any query has terminated with an exception.

AwaitAnyTermination(Int64)

Wait until any of the queries on the associated SQLContext has terminated since the creation of the context, or since ResetTerminated() was called. If any query was terminated with an exception, then the exception will be thrown.

If a query has terminated, then subsequent calls to AwaitAnyTermination() will either return immediately (if the query was terminated by Stop()), or throw the exception immediately (if the query was terminated with exception). Use ResetTerminated() to clear past terminations and wait for new terminations.

In the case where multiple queries have terminated since ResetTerminated() was called, if any query has terminated with exception, then AwaitAnyTermination() will throw any of the exception. For correctly documenting exceptions across multiple queries, users need to stop all of them after any of them terminates with exception, and then check the Exception() for each query.

Throws StreamingQueryException on the JVM if any query has terminated with an exception.

Get(String)

Returns an active query from this SQLContext or throws exception if an active query with this name doesn't exist.

ResetTerminated()

Forget about past terminated queries so that AwaitAnyTermination() can be used again to wait for new terminations

Applies to