Re: How do I get the executor ID from running Java code

2015-11-02 Thread Gideon
Looking at the post date I can only assume you've got your answer.
since I just encountered your post while trying to do the same thing I
decided it's worth answering for other people. In order to get the executor
ID you can use: SparkEnv.get().executorId() 
I hope this helps anyone 



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/How-do-I-get-the-executor-ID-from-running-Java-code-tp19092p25258.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



How do I get the executor ID from running Java code

2014-11-17 Thread Steve Lewis
 The spark UI lists a number of Executor IDS on the cluster. I would like
to access both executor ID and Task/Attempt IDs from the code inside a
function running on a slave machine.
Currently my motivation is to  examine parallelism and locality but in
Hadoop this aids in allowing code to write non-overlapping temporary files