You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by yuliya Feldman <yu...@yahoo.com.INVALID> on 2016/01/08 07:36:44 UTC

Newbie question

Hello,
I am new to Spark and have a most likely basic question - can I override a method from SparkContext?
Thanks

Re: Newbie question

Posted by censj <ce...@lotuseed.com>.
You can try it.  
> 在 2016年1月8日,14:44,yuliya Feldman <yu...@yahoo.com> 写道:
> 
> invoked


Re: Newbie question

Posted by yuliya Feldman <yu...@yahoo.com.INVALID>.
For example to add some functionality there.
I understand I can have extended SparkContext as an implicit class to add new methods that can be invoked on SparkContext, but I want to see if I can override existing one.

 

      From: censj <ce...@lotuseed.com>
 To: yuliya Feldman <yu...@yahoo.com> 
Cc: "user@spark.apache.org" <us...@spark.apache.org>
 Sent: Thursday, January 7, 2016 10:38 PM
 Subject: Re: Newbie question
   
why to override a method from SparkContext?
在 2016年1月8日,14:36,yuliya Feldman <yu...@yahoo.com.INVALID> 写道:
Hello,
I am new to Spark and have a most likely basic question - can I override a method from SparkContext?
Thanks



  

Re: Newbie question

Posted by censj <ce...@lotuseed.com>.
why to override a method from SparkContext?
> 在 2016年1月8日,14:36,yuliya Feldman <yu...@yahoo.com.INVALID> 写道:
> 
> Hello,
> 
> I am new to Spark and have a most likely basic question - can I override a method from SparkContext?
> 
> Thanks


Re: Newbie question

Posted by yuliya Feldman <yu...@yahoo.com.INVALID>.
Thank you
 

      From: Deepak Sharma <de...@gmail.com>
 To: yuliya Feldman <yu...@yahoo.com> 
Cc: "user@spark.apache.org" <us...@spark.apache.org>
 Sent: Thursday, January 7, 2016 10:41 PM
 Subject: Re: Newbie question
   
Yes , you can do it unless the method is marked static/final.Most of the methods in SparkContext are marked static so you can't over ride them definitely , else over ride would work usually.
ThanksDeepak
On Fri, Jan 8, 2016 at 12:06 PM, yuliya Feldman <yu...@yahoo.com.invalid> wrote:

Hello,
I am new to Spark and have a most likely basic question - can I override a method from SparkContext?
Thanks



-- 
Thanks
Deepak
www.bigdatabig.com
www.keosha.net

   

Re: Newbie question

Posted by Deepak Sharma <de...@gmail.com>.
Yes , you can do it unless the method is marked static/final.
Most of the methods in SparkContext are marked static so you can't over
ride them definitely , else over ride would work usually.

Thanks
Deepak

On Fri, Jan 8, 2016 at 12:06 PM, yuliya Feldman <yufeldman@yahoo.com.invalid
> wrote:

> Hello,
>
> I am new to Spark and have a most likely basic question - can I override a
> method from SparkContext?
>
> Thanks
>



-- 
Thanks
Deepak
www.bigdatabig.com
www.keosha.net