This is does not seem like a good, intuitive solution to identify whether any RDD operation is being executed inside an executor. What if in future this is not transient?