You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by MEETHU MATHEW <me...@yahoo.co.in> on 2014/06/04 06:54:57 UTC

How to stop a running SparkContext in the proper way?

Hi,

I want to know how I can stop a running SparkContext in a proper way so that next time when I start a new SparkContext, the web UI can be launched on the same port 4040.Now when i quit the job using ctrl+z the new sc are launched in new ports.

I have the same problem with ipython notebook.It is launched on a different port when I start the notebook second time after closing the first one.I am starting ipython using the command

	IPYTHON_OPTS="notebook --ip xxxx --pylab inline" ./bin/pyspark

Thanks & Regards, 
Meethu M

Re: How to stop a running SparkContext in the proper way?

Posted by Akhil Das <ak...@sigmoidanalytics.com>.
ctrl + z will stop the job from being executed ( If you do a *fg/bg *you
can resume the job). You need to press ctrl + c to terminate the job!

Thanks
Best Regards


On Wed, Jun 4, 2014 at 10:24 AM, MEETHU MATHEW <me...@yahoo.co.in>
wrote:

> Hi,
>
> I want to know how I can stop a running SparkContext in a proper way so
> that next time when I start a new SparkContext, the web UI can be launched
> on the same port 4040.Now when i quit the job using ctrl+z the new sc are
> launched in new ports.
>
> I have the same problem with ipython notebook.It is launched on a
> different port when I start the notebook second time after closing the
> first one.I am starting ipython using the command
>
> IPYTHON_OPTS="notebook --ip xxxx --pylab inline" ./bin/pyspark
>
> Thanks & Regards,
> Meethu M
>

Re: How to stop a running SparkContext in the proper way?

Posted by Xiangrui Meng <me...@gmail.com>.
Did you try sc.stop()?

On Tue, Jun 3, 2014 at 9:54 PM, MEETHU MATHEW <me...@yahoo.co.in> wrote:
> Hi,
>
> I want to know how I can stop a running SparkContext in a proper way so that
> next time when I start a new SparkContext, the web UI can be launched on the
> same port 4040.Now when i quit the job using ctrl+z the new sc are launched
> in new ports.
>
> I have the same problem with ipython notebook.It is launched on a different
> port when I start the notebook second time after closing the first one.I am
> starting ipython using the command
>
> IPYTHON_OPTS="notebook --ip xxxx --pylab inline" ./bin/pyspark
>
> Thanks & Regards,
> Meethu M