You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/01 09:18:08 UTC

[GitHub] [spark] xianyinxin commented on a change in pull request #25197: [SPARK-21067][SQL] Initialize the HdfsEncryptionShim and the underlying FileSystem(FS) e…

xianyinxin commented on a change in pull request #25197: [SPARK-21067][SQL] Initialize the HdfsEncryptionShim and the underlying FileSystem(FS) e…
URL: https://github.com/apache/spark/pull/25197#discussion_r309601132
 
 

 ##########
 File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
 ##########
 @@ -190,6 +190,13 @@ private[hive] class HiveClientImpl(
       Hive.set(clientLoader.cachedHive.asInstanceOf[Hive])
     }
     SessionState.start(state)
+    // SPARK-21067: Initialize the HdfsEncryptionShim and the underlying FileSystem(FS) eagerly.
+    // The underlying FS is cached and shared among sessions if the sessions request for FS with
+    // the same schema, authority and ugi. If we don't do this, the initialization of the FS will
+    // be delayed to when one session call `getHdfsEncryptionShim` explicitly. However the FS is
+    // auto-closable, which would be closed when the session is closed. The subsequent sessions use
+    // the same FS will throw "Filesystem closed Exception".
+    state.getHdfsEncryptionShim
 
 Review comment:
   @Deegue , if `fs.hdfs.impl.disable.cache=true`, this issue(SPARK-21067) would never happen, and this code has nothing effect.
   Pls correct me if i'm wrong.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org