dongjoon-hyun 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_r305454216
##########
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:
Is this the right place for this? HDFS can be used without `hive` module.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]