SparkContext.
getLocalProperty
Get a local property set in this thread, or null if it is missing. See setLocalProperty().
setLocalProperty()