Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/20377#discussion_r163774842 --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala --- @@ -251,10 +251,8 @@ private[hive] class IsolatedClientLoader( /** The isolated client interface to Hive. */ private[hive] def createClient(): HiveClient = synchronized { - val warehouseDir = Option(hadoopConf.get(ConfVars.METASTOREWAREHOUSE.varname)) if (!isolationOn) { - return new HiveClientImpl(version, warehouseDir, sparkConf, hadoopConf, config, - baseClassLoader, this) + return new HiveClientImpl(version, sparkConf, hadoopConf, config, baseClassLoader, this) --- End diff -- so the major concern is to hide the `Configuration` class through the code path. How about we create a wrapper? ``` trait HadoopConfWrapper { def get(key: String): String def toIterator: Iterator[(String, String)] } ``` and here ``` val wrapper = new HadoopConfWrapper { def get(key: String) = hadoopConf.get(key) def toIterator = hadoopConf.iterator().asScala } ```
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org