n alternative approach to debugging
>> spark anonymous functions.
>>
>>
>> val count = spark.parallelize(1 to n, slices).map { i =>
>> val x = random * 2 - 1
>> val y = random * 2 - 1 (breakpoint-1 set in this line)
>> if (x*x + y*y < 1) 1 e
breakpont-1, right?
发件人: Dirceu Semighini Filho
发送时间: 2016年9月16日 0:39
收件人: chen yong
抄送: user@spark.apache.org
主题: Re: 答复: 答复: 答复: t it does not stop at breakpoints which is in an anonymous
function
Hi Felix,
Are sure your n is greater than 0?
Here it stop
; if (x*x + y*y < 1) 1 else 0
> }.reduce(_ + _)
> val test = x (breakpoint-2 set in this line)
>
>
>
> ------------------
> *发件人:* Dirceu Semighini Filho
> *发送时间:* 2016年9月14日 23:32
> *收件人:* chen yong
> *主题:* Re: 答复: 答复: t it does not stop a
}.reduce(_ + _)
val test = x (breakpoint-2 set in this line)
发件人: Dirceu Semighini Filho
发送时间: 2016年9月14日 23:32
收件人: chen yong
主题: Re: 答复: 答复: t it does not stop at breakpoints which is in an anonymous
function
I don't know which IDE do you use. I use In
lp badly needed!
发件人: Dirceu Semighini Filho
发送时间: 2016年9月14日 23:07
收件人: chen yong
主题: Re: 答复: t it does not stop at breakpoints which is in an anonymous function
You can call a count in the ide just to debug, or you can wait until it reaches
the code, so you can debug.
Some ides provide you a
送时间: 2016年9月14日 22:33
收件人: chen yong
抄送: user@spark.apache.org
主题: Re: t it does not stop at breakpoints which is in an anonymous function
Hello Felix,
Spark functions run lazy, and that's why it doesn't stop in those breakpoints.
They will be executed only when you call some metho
Hello Felix,
Spark functions run lazy, and that's why it doesn't stop in those
breakpoints.
They will be executed only when you call some methods of your
dataframe/rdd, like the count, collect, ...
Regards,
Dirceu
2016-09-14 11:26 GMT-03:00 chen yong :
> Hi all,
>
>
>
> I am newbie to spark. I a
Hi all,
I am newbie to spark. I am learning spark by debugging the spark code. It is
strange to me that it does not stop at breakpoints which is in an anonymous
function, it is normal in ordianry function, though. It that normal. How to
obverse variables in an anonymous function.
Please