Class Scheduler
- java.lang.Object
-
- net.snowflake.hivemetastoreconnector.core.Scheduler
-
public class Scheduler extends Object
Utility class that allows messages to be queued and processed in the background. Messages are accumulated in a queue, and processed whenever possible by a thread pool Internally, there is a queue for each table and a thread pool to process messages in each queue. When a new queue is created, a task is submitted to the thread pool to do a unit of work. If there are still items in the queue after the unit of work, the task will submit a continuation task to repeat this process. If there are errors in processing the queue, the we will skip that item and continue with the rest of the queue.- Author:
- wwong
-
-
Constructor Summary
Constructors Constructor Description Scheduler(int threadPoolCount, SnowflakeConf snowflakeConf)Constructor for the scheduler
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenqueueMessage(Command message)Enqueues a message to be collected and batched
-
-
-
Constructor Detail
-
Scheduler
public Scheduler(int threadPoolCount, SnowflakeConf snowflakeConf)Constructor for the scheduler- Parameters:
threadPoolCount- Number of worker threads to usesnowflakeConf- The configuration for Snowflake Hive metastore listener
-
-
Method Detail
-
enqueueMessage
public void enqueueMessage(Command message)
Enqueues a message to be collected and batched- Parameters:
message- the message
-
-