Class ThreadRuntimeFactory

java.lang.Object
org.apache.pulsar.functions.runtime.thread.ThreadRuntimeFactory
All Implemented Interfaces:
AutoCloseable, RuntimeFactory

public class ThreadRuntimeFactory extends Object implements RuntimeFactory
Thread based function container factory implementation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String stateStorageImplClass, String storageServiceUrl, org.apache.pulsar.functions.instance.AuthenticationConfig authConfig, org.apache.pulsar.functions.secretsprovider.SecretsProvider secretsProvider, org.apache.pulsar.functions.instance.stats.FunctionCollectorRegistry collectorRegistry, String narExtractionDirectory, ClassLoader rootClassLoader, boolean exposePulsarAdminClientEnabled, String pulsarWebServiceUrl)
    This constructor is used by other runtimes (e.g.
    ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String stateStorageImplClass, String storageServiceUrl, org.apache.pulsar.functions.instance.AuthenticationConfig authConfig, org.apache.pulsar.functions.secretsprovider.SecretsProvider secretsProvider, org.apache.pulsar.functions.instance.stats.FunctionCollectorRegistry collectorRegistry, String narExtractionDirectory, ClassLoader rootClassLoader, boolean exposePulsarAdminClientEnabled, String pulsarWebServiceUrl, org.apache.pulsar.functions.utils.functioncache.FunctionCacheManager fnCache)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    createContainer(org.apache.pulsar.functions.instance.InstanceConfig instanceConfig, String jarFile, String originalCodeFileName, Long expectedHealthCheckInterval)
    Create a function container to execute a java instance.
    void
    initialize(WorkerConfig workerConfig, org.apache.pulsar.functions.instance.AuthenticationConfig authenticationConfig, org.apache.pulsar.functions.secretsproviderconfigurator.SecretsProviderConfigurator secretsProviderConfigurator, ConnectorsManager connectorsManager, FunctionsManager functionsManager, Optional<FunctionAuthProvider> functionAuthProvider, Optional<RuntimeCustomizer> runtimeCustomizer)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.apache.pulsar.functions.runtime.RuntimeFactory

    doAdmissionChecks, externallyManaged, getAuthProvider, getRuntimeCustomizer
  • Constructor Details

    • ThreadRuntimeFactory

      public ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String stateStorageImplClass, String storageServiceUrl, org.apache.pulsar.functions.instance.AuthenticationConfig authConfig, org.apache.pulsar.functions.secretsprovider.SecretsProvider secretsProvider, org.apache.pulsar.functions.instance.stats.FunctionCollectorRegistry collectorRegistry, String narExtractionDirectory, ClassLoader rootClassLoader, boolean exposePulsarAdminClientEnabled, String pulsarWebServiceUrl) throws Exception
      This constructor is used by other runtimes (e.g. ProcessRuntime and KubernetesRuntime) that rely on ThreadRuntime to actually run an instance of the function. When used by other runtimes, the arguments such as secretsProvider and rootClassLoader will be provided.
      Throws:
      Exception
    • ThreadRuntimeFactory

      public ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String stateStorageImplClass, String storageServiceUrl, org.apache.pulsar.functions.instance.AuthenticationConfig authConfig, org.apache.pulsar.functions.secretsprovider.SecretsProvider secretsProvider, org.apache.pulsar.functions.instance.stats.FunctionCollectorRegistry collectorRegistry, String narExtractionDirectory, ClassLoader rootClassLoader, boolean exposePulsarAdminClientEnabled, String pulsarWebServiceUrl, org.apache.pulsar.functions.utils.functioncache.FunctionCacheManager fnCache) throws Exception
      Throws:
      Exception
  • Method Details