What is use of method addJar() in Spark?
问题 In spark job, I don't know how to import and use the jars that is shared by method SparkContext.addJar() . It seems that this method is able to move jars into some place that are accessible by other nodes in the cluster, but I do not know how to import them. This is an example: package utils; public class addNumber { public int addOne(int i){ return i + 1; } public int addTwo(int i){ return i + 2; } } I create a class called addNumber and make it into a jar file utils.jar . Then I create a