Prevent immediate shutdown of Streaming context after JVM shutdown

0 votes
I have a spark application running and am facing some issue. Whenever the JVM shuts down, the Streaming context immediately shuts down. I want the context to shut down properly. So how to disable the immediate shut down function?
Mar 19, 2019 in Apache Spark by Dinesh
1,070 views

1 answer to this question.

0 votes

In technical terms, you want to gracefully shut down the Streaming Context. Use the below command to do this:

val sc = new SparkContext(new SparkConf())
./bin/spark-submit <all your existing options> --spark.streaming.stopGracefullyOnShutdown=true
answered Mar 19, 2019 by Jai

Related Questions In Apache Spark

0 votes
1 answer

What are the levels of parallelism in spark streaming ?

> In order to reduce the processing ...READ MORE

answered Jul 27, 2018 in Apache Spark by zombie
• 3,790 points
4,889 views
–1 vote
1 answer

Deciding number of spark context objects

How many spark context objects you should ...READ MORE

answered Jan 16, 2019 in Apache Spark by Omkar
• 69,220 points
776 views
0 votes
1 answer

4)Spark streaming converts streaming data into DStreams. which one of the given statements about DStreams is True?

Hi@ritu, Spark DStream (Discretized Stream) is the basic ...READ MORE

answered Nov 23, 2020 in Apache Spark by MD
• 95,460 points
2,776 views
0 votes
1 answer

6)What allows spark streaming to provide fault tolerance for network sources of data?

Hi@ritu, Fault tolerance is the property that enables ...READ MORE

answered Dec 1, 2020 in Apache Spark by MD
• 95,460 points
2,440 views
+1 vote
2 answers
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,035 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,543 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,864 views
+1 vote
8 answers

How to print the contents of RDD in Apache Spark?

Save it to a text file: line.saveAsTextFile("alicia.txt") Print contains ...READ MORE

answered Dec 10, 2018 in Apache Spark by Akshay
61,807 views
0 votes
1 answer

In what kind of use cases has Spark outperformed Hadoop in processing?

I can list some but there can ...READ MORE

answered Sep 19, 2018 in Apache Spark by zombie
• 3,790 points
1,132 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP