resumeTimerEngine

Syntax

resumeTimerEngine(engine)

Details

This function can only be called via useOrcaStreamEngine and resumes execution of jobs submitted by DStream::timerEngine.

Parameters

engine A STRING scalar representing the engine name. You can provide either the fully qualified name (e.g., "catalog_name.orca_engine.engine_name"), or just the engine name (e.g., "engine_name") when the system will automatically complete it to the corresponding fully qualified name based on the current catalog setting.

Examples

Submit the job:

if (!existsCatalog("test")) {
	createCatalog("test")	
}
go
use catalog test

// Define the job
def myFunc(x,y,z){
    writeLog(x,y,z)
}

// Define the parameter
a = "aaa"
b = "bbb"
c = "ccc"

// Submit the steam graph
g = createStreamGraph("timerEngineDemo")
g.source("trade", `id`price, [INT, DOUBLE])
 .timerEngine(3, myFunc, a, b, c)
 .setEngineName("myJob")
 .sink("result")
g.submit()

Stop job execution:

useOrcaStreamEngine("myJob", stopTimerEngine)

Resume job execution:

useOrcaStreamEngine("myJob", resumeTimerEngine)
Related functions: DStream::timerEngine, stopTimerEngine