Skip to content
Advertisement

Spark UDF function fail on Standalone Spark

I have spring boot java application myapp.jar with something udf function.

SparkConfuration.java

JavaScript

ToIntegerUdf.java

JavaScript

sparkJars contains path to myJar.jar.

Application build with Maven. Spark library version is 3.02 and scala version is 2.12.10.

When I running application on Spark Standalone 3.0.2 I have an error:

JavaScript

In spark worker log I see, worker fetch myJar:

21/03/23 19:33:24 INFO Executor: Fetching spark://demo.phoenixit.ru:39597/jars/myJar.jar with timestamp 1616517199949

I think problem with either dependency, or submitting, but I have no idea how to fix it.

Advertisement

Answer

I’ve fixed it.

The problem was with the spring-boot-maven-plugin. Spark standalone can’t get info about UDF’s if I use this plugin.

When I replaced plugin with maven-shade-plugin, everythinh worked correct

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement