You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Fei Hu <hu...@gmail.com> on 2016/03/29 06:26:22 UTC
run spark job
Hi,
I am wondering how to run the spark job by java command, such as: java -cp spark.jar mainclass. When running/debugging the spark program in IntelliJ IDEA, it uses java command to run spark main class, so I think it should be able to run the spark job by java command besides the spark-submit command.
Thanks in advance,
Fei
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org
Re: run spark job
Posted by Fei Hu <hu...@gmail.com>.
Thanks for your link. It will be helpful for me.
Best,
Fei
> On Mar 29, 2016, at 11:14 AM, Steve Loughran <st...@hortonworks.com> wrote:
>
>
>> On 29 Mar 2016, at 14:30, Fei Hu <hufei68@gmail.com <ma...@gmail.com>> wrote:
>>
>> Hi Jeff,
>>
>> Thanks for your info! I am developing a workflow system based on Oozie, but it only supports java and mapreduce now, so I want to run spark job as in local mode by the workflow system first, then extend the workflow system to run spark job on Yarn.
>>
>
> You can run spark code on oozie today; I'm just finishing up documenting how to do it on a secure cluster
>
>
> https://github.com/steveloughran/spark/blob/stevel/feature/SPARK-13148-oozie/docs/running-on-yarn.md <https://github.com/steveloughran/spark/blob/stevel/feature/SPARK-13148-oozie/docs/running-on-yarn.md>
>
> On that topic: do start testing early if you are planning to run against a secure cluster, otherwise you don't find the problems until it's (nearly) too late to fix
Re: run spark job
Posted by Steve Loughran <st...@hortonworks.com>.
On 29 Mar 2016, at 14:30, Fei Hu <hu...@gmail.com>> wrote:
Hi Jeff,
Thanks for your info! I am developing a workflow system based on Oozie, but it only supports java and mapreduce now, so I want to run spark job as in local mode by the workflow system first, then extend the workflow system to run spark job on Yarn.
You can run spark code on oozie today; I'm just finishing up documenting how to do it on a secure cluster
https://github.com/steveloughran/spark/blob/stevel/feature/SPARK-13148-oozie/docs/running-on-yarn.md
On that topic: do start testing early if you are planning to run against a secure cluster, otherwise you don't find the problems until it's (nearly) too late to fix
Re: run spark job
Posted by Fei Hu <hu...@gmail.com>.
Hi Jeff,
Thanks for your info! I am developing a workflow system based on Oozie, but it only supports java and mapreduce now, so I want to run spark job as in local mode by the workflow system first, then extend the workflow system to run spark job on Yarn.
Best wishes,
Fei
> On Mar 29, 2016, at 3:47 AM, Jeff Zhang <zj...@gmail.com> wrote:
>
> Yes you can. But this is actually what spark-submit does for you. Actually spark-submit do more than that.
> You can refer here
> https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala <https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala>
>
> What's your purpose for using "java -cp", for local development, IDE should be sufficient.
>
>
>
>
>
> On Tue, Mar 29, 2016 at 12:26 PM, Fei Hu <hufei68@gmail.com <ma...@gmail.com>> wrote:
> Hi,
>
> I am wondering how to run the spark job by java command, such as: java -cp spark.jar mainclass. When running/debugging the spark program in IntelliJ IDEA, it uses java command to run spark main class, so I think it should be able to run the spark job by java command besides the spark-submit command.
>
> Thanks in advance,
> Fei
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org <ma...@spark.apache.org>
> For additional commands, e-mail: user-help@spark.apache.org <ma...@spark.apache.org>
>
>
>
>
> --
> Best Regards
>
> Jeff Zhang
Re: run spark job
Posted by Jeff Zhang <zj...@gmail.com>.
Yes you can. But this is actually what spark-submit does for you. Actually
spark-submit do more than that.
You can refer here
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
What's your purpose for using "java -cp", for local development, IDE should
be sufficient.
On Tue, Mar 29, 2016 at 12:26 PM, Fei Hu <hu...@gmail.com> wrote:
> Hi,
>
> I am wondering how to run the spark job by java command, such as: java -cp
> spark.jar mainclass. When running/debugging the spark program in IntelliJ
> IDEA, it uses java command to run spark main class, so I think it should be
> able to run the spark job by java command besides the spark-submit command.
>
> Thanks in advance,
> Fei
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>
>
--
Best Regards
Jeff Zhang