Thanks Ameya.

From: ameya [via Apache Spark User List] 
[mailto:ml-node+s1001560n24650...@n3.nabble.com]
Sent: Friday, September 11, 2015 4:12 AM
To: Samya MAITI <samya.ma...@amadeus.com>
Subject: Re: Maintaining Kafka Direct API Offsets

So I added something like this:


Runtime.getRuntime().addShutdownHook(new Thread() {
    @Override
    public void run() {
        ssc.stop(true, true);
    }
});

And also:

finally {
    if (ssc != null) {
        ssc.stop(true, true);
    }
}



This ensured more graceful shutdown of the streaming app.



On Wed, Sep 9, 2015 at 11:21 PM, Samya [via Apache Spark User List] <[hidden 
email]</user/SendEmail.jtp?type=node&node=24650&i=0>> wrote:
Hi Ameya,

Plz suggest, when you say graceful shut-down, what exactly did you handle?

Thanks.

Thanks,
Sam
________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-spark-user-list.1001560.n3.nabble.com/Maintaining-Kafka-Direct-API-Offsets-tp24246p24636.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__apache-2Dspark-2Duser-2Dlist.1001560.n3.nabble.com_Maintaining-2DKafka-2DDirect-2DAPI-2DOffsets-2Dtp24246p24636.html&d=BQMCAg&c=LNdz7nrxyGFUIUTz2qIULQ&r=AEEuYC3up_JtQjd1Ngcz-BUozD7ibRNtmAuCtViR-Bg&m=htEiOGTrjkcu9b4Fxl9OovbqJ008TkvnzBPOlneoxJI&s=UuLtLNjYH1ebtySenULiQPwKvcMKTr3A-QAceh2fjb8&e=>
To unsubscribe from Maintaining Kafka Direct API Offsets, click 
here<https://urldefense.proofpoint.com/v2/url?u=http-3A__apache-2Dspark-2Duser-2Dlist.1001560.n3.nabble.com_template_NamlServlet.jtp-3Fmacro-3Dunsubscribe-5Fby-5Fcode-26node-3D24246-26code-3DYW1leWFAZ3JvdXBvbi5jb218MjQyNDZ8LTEzNDQ2MzQ3NDI-3D&d=BQMCAg&c=LNdz7nrxyGFUIUTz2qIULQ&r=AEEuYC3up_JtQjd1Ngcz-BUozD7ibRNtmAuCtViR-Bg&m=htEiOGTrjkcu9b4Fxl9OovbqJ008TkvnzBPOlneoxJI&s=O6yMg1FLyq4B0WOy0WneZXL6n2a7ZQYa9iiAFhO2yqo&e=>.
NAML<https://urldefense.proofpoint.com/v2/url?u=http-3A__apache-2Dspark-2Duser-2Dlist.1001560.n3.nabble.com_template_NamlServlet.jtp-3Fmacro-3Dmacro-5Fviewer-26id-3Dinstant-5Fhtml-2521nabble-253Aemail.naml-26base-3Dnabble.naml.namespaces.BasicNamespace-2Dnabble.view.web.template.NabbleNamespace-2Dnabble.view.web.template.NodeNamespace-26breadcrumbs-3Dnotify-5Fsubscribers-2521nabble-253Aemail.naml-2Dinstant-5Femails-2521nabble-253Aemail.naml-2Dsend-5Finstant-5Femail-2521nabble-253Aemail.naml&d=BQMCAg&c=LNdz7nrxyGFUIUTz2qIULQ&r=AEEuYC3up_JtQjd1Ngcz-BUozD7ibRNtmAuCtViR-Bg&m=htEiOGTrjkcu9b4Fxl9OovbqJ008TkvnzBPOlneoxJI&s=ujJK2EqVYhBrJS8Yl6j4MCOm2Y-53hjxGVidjypC_SM&e=>


________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-spark-user-list.1001560.n3.nabble.com/Maintaining-Kafka-Direct-API-Offsets-tp24246p24650.html
To unsubscribe from Maintaining Kafka Direct API Offsets, click 
here<http://apache-spark-user-list.1001560.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=24246&code=c2FteWEubWFpdGlAYW1hZGV1cy5jb218MjQyNDZ8LTc0MTIxNjg3OA==>.
NAML<http://apache-spark-user-list.1001560.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Maintaining-Kafka-Direct-API-Offsets-tp24246p24652.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Reply via email to