You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Deep Pradhan <pr...@gmail.com> on 2014/09/11 11:56:42 UTC

Unpersist

I want to create a temporary variables in a spark code.
Can I do this?

for (i <- num)
{
val temp = ......
   {
   do something
   }
temp.unpersist()
}

Thank You

Re: Unpersist

Posted by Deep Pradhan <pr...@gmail.com>.
After every loop I want the temp variable to cease to exist

On Thu, Sep 11, 2014 at 4:33 PM, Akhil Das <ak...@sigmoidanalytics.com>
wrote:

> like this?
>
> var temp = ...
> for (i <- num)
> {
>  temp = ......
>    {
>    do something
>    }
> temp.unpersist()
> }
>
> Thanks
> Best Regards
>
> On Thu, Sep 11, 2014 at 3:26 PM, Deep Pradhan <pr...@gmail.com>
> wrote:
>
>> I want to create a temporary variables in a spark code.
>> Can I do this?
>>
>> for (i <- num)
>> {
>> val temp = ......
>>    {
>>    do something
>>    }
>> temp.unpersist()
>> }
>>
>> Thank You
>>
>
>

Re: Unpersist

Posted by Akhil Das <ak...@sigmoidanalytics.com>.
like this?

var temp = ...
for (i <- num)
{
 temp = ......
   {
   do something
   }
temp.unpersist()
}

Thanks
Best Regards

On Thu, Sep 11, 2014 at 3:26 PM, Deep Pradhan <pr...@gmail.com>
wrote:

> I want to create a temporary variables in a spark code.
> Can I do this?
>
> for (i <- num)
> {
> val temp = ......
>    {
>    do something
>    }
> temp.unpersist()
> }
>
> Thank You
>