Github user sryza commented on a diff in the pull request:
https://github.com/apache/spark/pull/621#discussion_r12253872
--- Diff: core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala
---
@@ -24,25 +24,30 @@ import org.apache.hadoop.mapred.JobConf
import org.apache.hadoop.security.Credentials
import org.apache.hadoop.security.UserGroupInformation
-import org.apache.spark.{SparkContext, SparkException}
+import org.apache.spark.{Logging, SparkContext, SparkException}
import scala.collection.JavaConversions._
/**
* Contains util methods to interact with Hadoop from Spark.
*/
-class SparkHadoopUtil {
+class SparkHadoopUtil extends Logging {
val conf: Configuration = newConfiguration()
UserGroupInformation.setConfiguration(conf)
+ // IMPORTANT NOTE: If this function is going to be called repeated in
the same process
+ // you need to look https://issues.apache.org/jira/browse/HDFS-3545 and
possibly
+ // do a FileSystem.closeAllForUGI in order to avoid leaking Filesystems
def runAsUser(user: String)(func: () => Unit) {
--- End diff --
Nit: "repeated" should be "repeatedly"
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---