I have the following problem: my main method:
static public void main(String args[]){
SparkConf conf = new SparkConf().setAppName("TestHive");
SparkContext sc = new org.apache.spark.SparkContext(conf);
HiveContext hiveContext = new org.apache.spark.sql.hive.HiveContext(sc);
}
And I will build it using mvn package
Then I submit my code, but get the following exception. I do not know what happened:
sh spark-submit --class "TestHive" --master local[4] ~/target/test-1.0-SNAPSHOT-jar-with-dependencies.jar
Exception in thread "main" java.lang.NoSuchMethodException: org.apache.hadoop.hive.conf.HiveConf.getTimeVar(org.apache.hadoop.hive.conf.HiveConf$ConfVars, java.util.concurrent.TimeUnit)
Please tell me where I am wrong.
PS I built my spark with a hive and a lean server.
Spark 1.5.2 built for Hadoop 2.4.0
Build flags: -Psparkr -Phadoop-2.4 -Phive -Phive-thriftserver -Pyarn
user6023611
source
share