Class JavaUdfLoader


  • public class JavaUdfLoader
    extends java.lang.Object
    Loads UdfProvider implementations from user-provided jars.

    All UDFs are loaded and cached for each jar to mitigate IO costs.

    • Constructor Summary

      Constructors 
      Constructor Description
      JavaUdfLoader()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.ClassLoader createClassLoader​(java.util.List<java.lang.String> inputJarPaths)  
      org.apache.beam.sdk.extensions.sql.udf.AggregateFn loadAggregateFunction​(java.util.List<java.lang.String> functionPath, java.lang.String jarPath)
      Load a user-defined aggregate function from the specified jar.
      org.apache.beam.sdk.extensions.sql.udf.ScalarFn loadScalarFunction​(java.util.List<java.lang.String> functionPath, java.lang.String jarPath)
      Load a user-defined scalar function from the specified jar.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaUdfLoader

        public JavaUdfLoader()
    • Method Detail

      • loadScalarFunction

        public org.apache.beam.sdk.extensions.sql.udf.ScalarFn loadScalarFunction​(java.util.List<java.lang.String> functionPath,
                                                                                  java.lang.String jarPath)
        Load a user-defined scalar function from the specified jar.
      • loadAggregateFunction

        public org.apache.beam.sdk.extensions.sql.udf.AggregateFn loadAggregateFunction​(java.util.List<java.lang.String> functionPath,
                                                                                        java.lang.String jarPath)
        Load a user-defined aggregate function from the specified jar.
      • createClassLoader

        public java.lang.ClassLoader createClassLoader​(java.util.List<java.lang.String> inputJarPaths)
                                                throws java.io.IOException
        Throws:
        java.io.IOException