Class SetWorkersNumberHandler
- java.lang.Object
-
- com.snowflake.connectors.taskreactor.api.SetWorkersNumberHandler
-
public class SetWorkersNumberHandler extends Object
Handler for the Task Reactor worker number update.
-
-
Constructor Summary
Constructors Constructor Description SetWorkersNumberHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
setWorkersNumber(Session session, int workersNumber, String instanceSchema)
Default handler method for theTASK_REACTOR.SET_WORKERS_NUMBER
procedure.
-
-
-
Method Detail
-
setWorkersNumber
public static String setWorkersNumber(Session session, int workersNumber, String instanceSchema)
Default handler method for theTASK_REACTOR.SET_WORKERS_NUMBER
procedure.Sets the desired number of workers in the for a Task Reactor instance. Statuses of each worker can be queried from the
WORKER_REGISTRY
table in the Task Reactor schema.Note: This procedure only manages the values in the
WORKER_REGISTRY
table. It does not create, nor delete, worker tables, streams or tasks. This is a job of a dispatcher procedure. In the next run the dispatcher will create requested workers and remove workers marked for deletion, updating their status in theWORKER_REGISTRY
table.- Parameters:
session
- Snowpark session objectworkersNumber
- desired number of workers, greater or equal to 0instanceSchema
- task reactor instance name- Returns:
- message about how many workers were scheduled for adding or deletion
-
-