Re: Side effects of using var inside a class object in a Rdd

2016-02-16 Thread Ted Yu
RDD is immutable. How about making class with a, b and c populated a base class ? Class with e and f populated would be a subclass. On Mon, Feb 15, 2016 at 11:55 PM, Hemalatha A < hemalatha.amru...@googlemail.com> wrote: > Hello, > > Yes Age was just for a illustration. Actual scenario is as bel

Re: Side effects of using var inside a class object in a Rdd

2016-02-15 Thread Ted Yu
Age can be computed from the birthdate. Looks like it doesn't need to be a member of Animal class. If age is just for illustration, can you give an example which better mimics the scenario you work on ? Cheers On Mon, Feb 15, 2016 at 8:53 PM, Hemalatha A < hemalatha.amru...@googlemail.com> wrote

Side effects of using var inside a class object in a Rdd

2016-02-15 Thread Hemalatha A
Hello, I want to know what are the cons and performance impacts of using a var inside class object in a Rdd. Here is a example: Animal is a huge class with n number of val type variables (approx >600 variables), but frequently, we will have to update Age(just 1 variable) after some computation.