-1

I need to print some commands in spark yarn mode. Obviously println(message) doesn't work... I want to find a way to collect the message. Can someone point me to the current method for example using collect?

How to use collect?

Does the below code work?

val c=message.collect()
println (c)
Les
  • 3,150
  • 4
  • 29
  • 41
Mahdi
  • 787
  • 1
  • 8
  • 33
  • already answered here http://stackoverflow.com/a/23173811/2784721 – Amit Kumar Sep 14 '16 at 05:26
  • 1
    @amit_kumar that answer isn't not correct a highly over-voted. It's been downvoted 6 times for a reason. Nevertheless, for the OP, Please read on how to ask questions on SO. This question a very low quality ! – eliasah Sep 14 '16 at 06:19

1 Answers1

0

You can achieve this using the below command:

message.foreach(println)

You will find output of above call in executor logs.

Hokam
  • 924
  • 7
  • 19