[ 
https://issues.apache.org/jira/browse/SPARK-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581982#comment-15581982
 ] 

Sean Owen commented on SPARK-650:
---------------------------------

Yep, if you must pass some configuration, it generally can't happen magically 
at class-loading time. You can provide a "initIfNeeded(conf)" method that must 
be explicitly called in key places, but, that's simple and canonical Java 
practice.

In your example, there's no need to do anything. Just use the info in the 
function the executor runs. It's passed in the closure. This is entirely normal 
Spark.

> Add a "setup hook" API for running initialization code on each executor
> -----------------------------------------------------------------------
>
>                 Key: SPARK-650
>                 URL: https://issues.apache.org/jira/browse/SPARK-650
>             Project: Spark
>          Issue Type: New Feature
>          Components: Spark Core
>            Reporter: Matei Zaharia
>            Priority: Minor
>
> Would be useful to configure things like reporting libraries



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to