You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by manoop <su...@umalkar.com> on 2016/07/01 08:12:58 UTC

JavaStreamingContext.stop() hangs

I have a Spark job and I just want to stop it on some condition. Once the
condition is met, I am calling JavaStreamingContext.stop(), but it just
hangs. Does not move on to the next line, which is just a debug line. I
expect it to come out.

I already tried different variants of stop, that is, passing true to stop
the spark context, etc. but nothing is working out.

Here's the sample code:

            LOGGER.debug("Stop? {}", stop);
            if (stop) {
                jssc.stop(false, true);
                LOGGER.debug("STOPPED!");
            }

I am using Spark 1.5.2. Any help / pointers would be appreciated.

Thanks.



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/JavaStreamingContext-stop-hangs-tp27257.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org


Re: JavaStreamingContext.stop() hangs

Posted by chandan prakash <ch...@gmail.com>.
http://why-not-learn-something.blogspot.in/2016/05/apache-spark-streaming-how-to-do.html

On Fri, Jul 1, 2016 at 1:42 PM, manoop <su...@umalkar.com> wrote:

> I have a Spark job and I just want to stop it on some condition. Once the
> condition is met, I am calling JavaStreamingContext.stop(), but it just
> hangs. Does not move on to the next line, which is just a debug line. I
> expect it to come out.
>
> I already tried different variants of stop, that is, passing true to stop
> the spark context, etc. but nothing is working out.
>
> Here's the sample code:
>
>             LOGGER.debug("Stop? {}", stop);
>             if (stop) {
>                 jssc.stop(false, true);
>                 LOGGER.debug("STOPPED!");
>             }
>
> I am using Spark 1.5.2. Any help / pointers would be appreciated.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/JavaStreamingContext-stop-hangs-tp27257.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: user-unsubscribe@spark.apache.org
>
>


-- 
Chandan Prakash