Class MlComponent

java.lang.Object
org.gridgain.internal.ml.MlComponent
All Implemented Interfaces:
org.apache.ignite.internal.lang.Debuggable, org.apache.ignite.internal.manager.IgniteComponent

public class MlComponent extends Object implements org.apache.ignite.internal.manager.IgniteComponent
Component that manages the ML inference executor lifecycle.

This component provides a dedicated thread pool for CPU-intensive ML inference operations, ensuring they don't block the common ForkJoinPool or other system thread pools.

The executor is created lazily on first use and uses a cached thread pool pattern: threads are created on-demand and will be released after being idle for 60 seconds.

  • Field Summary

    Fields inherited from interface org.apache.ignite.internal.lang.Debuggable

    INDENTATION
  • Constructor Summary

    Constructors
    Constructor
    Description
    MlComponent(String nodeName, org.gridgain.internal.ml.configuration.MlConfiguration mlConfiguration)
    Creates a new ML component.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the executor for ML inference operations.
    startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
     
    stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.ignite.internal.lang.Debuggable

    dumpState

    Methods inherited from interface org.apache.ignite.internal.manager.IgniteComponent

    beforeNodeStop, stopAsync
  • Constructor Details

    • MlComponent

      public MlComponent(String nodeName, org.gridgain.internal.ml.configuration.MlConfiguration mlConfiguration)
      Creates a new ML component.
      Parameters:
      nodeName - Node name for thread naming
      mlConfiguration - ML configuration
  • Method Details

    • executor

      public Executor executor()
      Returns the executor for ML inference operations.

      The executor is created lazily on first call. Subsequent calls return the same executor.

      Returns:
      Executor for ML inference operations
    • startAsync

      public CompletableFuture<Void> startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
      Specified by:
      startAsync in interface org.apache.ignite.internal.manager.IgniteComponent
    • stopAsync

      public CompletableFuture<Void> stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
      Specified by:
      stopAsync in interface org.apache.ignite.internal.manager.IgniteComponent