Re: API for SparkContext ?

2019-06-30 Thread Wenchen Fan
You can call `SparkContext#addSparkListener` with a listener that implements `onApplicationEnd`. On Tue, May 14, 2019 at 1:51 AM Nasrulla Khan Haris wrote: > HI All, > > > > Is there a API for sparkContext where we can add our custom code before > stopping sparkcontext ? &

API for SparkContext ?

2019-05-13 Thread 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

Re: Why there's no api for SparkContext#textFiles to support multiple inputs ?

2015-11-12 Thread Jeff Zhang
Didn't notice that I can pass comma separated path in the existing API (SparkContext#textFile). So no necessary for new api. Thanks all. On Thu, Nov 12, 2015 at 10:24 AM, Jeff Zhang <zjf...@gmail.com> wrote: > Hi Pradeep > > ≥≥≥ Looks like what I was suggesting doesn't work. :

Re: Why there's no api for SparkContext#textFiles to support multiple inputs ?

2015-11-11 Thread Shixiong Zhu
ob > > On 11 November 2015 at 01:20, Jeff Zhang <zjf...@gmail.com> wrote: > >> Although user can use the hdfs glob syntax to support multiple inputs. >> But sometimes, it is not convenient to do that. Not sure why there's no api >> of SparkContext#textFiles. It should be easy to

Re: Why there's no api for SparkContext#textFiles to support multiple inputs ?

2015-11-11 Thread Jakob Odersky
ards, --Jakob On 11 November 2015 at 01:20, Jeff Zhang <zjf...@gmail.com> wrote: > Although user can use the hdfs glob syntax to support multiple inputs. But > sometimes, it is not convenient to do that. Not sure why there's no api > of SparkContext#textFiles. It should be easy to i

Why there's no api for SparkContext#textFiles to support multiple inputs ?

2015-11-11 Thread Jeff Zhang
Although user can use the hdfs glob syntax to support multiple inputs. But sometimes, it is not convenient to do that. Not sure why there's no api of SparkContext#textFiles. It should be easy to implement that. I'd love to create a ticket and contribute for that if there's no other consideration

Re: Why there's no api for SparkContext#textFiles to support multiple inputs ?

2015-11-11 Thread Jeff Zhang
Hi Pradeep ≥≥≥ Looks like what I was suggesting doesn't work. :/ I guess you mean put comma separated path into one string and pass it to existing API (SparkContext#textFile). It should not work. I suggest to create new api SparkContext#textFiles to accept an array of string. I have already

Re: Why there's no api for SparkContext#textFiles to support multiple inputs ?

2015-11-11 Thread Jeff Zhang
>> On 11 November 2015 at 01:20, Jeff Zhang <zjf...@gmail.com> wrote: >> >>> Although user can use the hdfs glob syntax to support multiple inputs. >>> But sometimes, it is not convenient to do that. Not sure why there's no api >>> of SparkContext#text

Re: Why there's no api for SparkContext#textFiles to support multiple inputs ?

2015-11-11 Thread Mark Hamstra
> --Jakob > > On 11 November 2015 at 01:20, Jeff Zhang <zjf...@gmail.com> wrote: > >> Although user can use the hdfs glob syntax to support multiple inputs. >> But sometimes, it is not convenient to do that. Not sure why there's no api >> of SparkContex

Re: Why there's no api for SparkContext#textFiles to support multiple inputs ?

2015-11-11 Thread Jeff Zhang
t;>> val rdd = lines1 union lines2 >>>> >>>> regards, >>>> --Jakob >>>> >>>> On 11 November 2015 at 01:20, Jeff Zhang <zjf...@gmail.com> wrote: >>>> >>>>> Although user can use the hdfs glob sy