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
363 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 26, 2018 in Apache Spark by zombie
• 3,770 points
1,335 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,030 points
82 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 3 days ago in Apache Spark by MD
• 79,530 points
11 views
0 votes
0 answers

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

6)What allows spark streaming to provide fault ...READ MORE

4 days ago in Apache Spark by ritu
• 700 points
22 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
• 10,950 points
6,348 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
• 10,950 points
982 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
41,857 views
0 votes
7 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
36,395 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,770 points
193 views