Hi, I think what you need is to have a long running Spark cluster to which you can submit jobs dynamically. For SQL, you can start Spark's HiveServer2: https://spark.apache.org/docs/latest/sql-programming-guide.html#distributed-sql-engine This will start a long running Spark cluster with a fixed configuration (executors, cores etc) and allows Spark to act more like a regular database. Then you can create jdbc:hive2:// JDBC connections from your app and run SQL queries/DDLs. For other components (or even SQL), you can start a Spark jobserver: https://github.com/spark-jobserver/spark-jobserver This will again start a long running Spark cluster. It also allows you create new SparkContexts on-the-fly though that should not be done from a web app rather configured separately by admin if required. It will require you to implement your job as a SparkJob/SparkSessionJob that will be provided pre-created SparkContext/SparkSession, and these take parameters that can be read dynamically in your implementation. You register your classes in jars separately before-hand. Then you can call those methods using REST API from your application providing it the required parameters like a remote procedure call. Or you can try SnappyData that provides both of these (and much more) out of the box. Regards, Sumedh Wale SnappyData (http://www.snappydata.io) Documentation Download On 02/11/18 11:22, 崔苗(数据与人工智能产品开发部)
wrote:
--------------------------------------------------------------------- To unsubscribe e-mail: user-unsubscr...@spark.apache.org |
- how to use cluster sparkSession like ... 数据与人工智能产品开发部
- Re: how to use cluster sparkSess... Daniel de Oliveira Mantovani
- Re: how to use cluster spark... 数据与人工智能产品开发部
- Re: how to use cluster s... Arbab Khalil
- Re: how to use clust... 数据与人工智能产品开发部
- Re: how to use cluster s... Sumedh Wale
- Re: how to use cluster sparkSess... 张万新
- Re: how to use cluster spark... Gabriel Wang
- RE: how to use cluster spark... Sun, Keith