spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinayak <vinayak.si...@tcs.com>
Subject Re: spark-submit hive connection through spark Initial job has not accepted any resources
Date Fri, 09 Oct 2015 10:52:16 GMT
Java code which I am trying to invoke.

import org.apache.spark.SparkContext;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.sql.DataFrame;
import org.apache.spark.sql.hive.HiveContext;

public class SparkHiveInsertor {
	
	public static void main(String[] args) {
		
		SparkContext sctx=new SparkContext();
		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
starting  
"+sctx.isLocal());
		JavaSparkContext ctx=new JavaSparkContext(sctx);
		HiveContext hiveCtx=new HiveContext(ctx.sc());
		DataFrame df= hiveCtx.sql("show tables");
		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  count is     
"+df.count());
	}
}

command to submit job ./spark-submit --master spark://masterIp:7077
--deploy-mode client --class com.ceg.spark.hive.sparkhive.SparkHiveInsertor
--executor-cores  2 --executor-memory 1gb
/home/someuser/Desktop/30sep2015/hivespark.jar



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/spark-submit-hive-connection-through-spark-Initial-job-has-not-accepted-any-resources-tp24993p24994.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
Mime
View raw message