API for SparkContext ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

API for SparkContext ?

Nasrulla Khan Haris

HI All,

 

Is there a API for sparkContext where we can add our custom code before stopping sparkcontext ?

Appreciate your help.

Thanks,

Nasrulla

 

Reply | Threaded
Open this post in threaded view
|

Re: API for SparkContext ?

cloud0fan
You can call `SparkContext#addSparkListener` with a listener that implements `onApplicationEnd`.

On Tue, May 14, 2019 at 1:51 AM Nasrulla Khan Haris <[hidden email]> wrote:

HI All,

 

Is there a API for sparkContext where we can add our custom code before stopping sparkcontext ?

Appreciate your help.

Thanks,

Nasrulla