File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -216,18 +216,17 @@ object InMemoryFileIndex extends Logging {
216216 ))
217217
218218 val validTableLocation : Option [URI ] = if (tableLocation != null && tableLocation.isDefined) {
219- val tl = new Path (tableLocation.get.getPath.trim)
220- val fs = SparkHadoopWriterUtils .getNewFileSystem(tl, hadoopConf)
221- val tlp = fs.makeQualified(tl).toString.toLowerCase(Locale .ROOT )
219+ val tl = new Path (tableLocation.get).toString.trim
220+ val tll = tl.toLowerCase(Locale .ROOT )
222221 val readLockCluster = sparkSession.sessionState.conf.concurrentReadLockCluster
223222 logInfo(s " Configured cluster that enables read lock for empty directory: $readLockCluster" )
224223 if (readLockCluster.trim.equalsIgnoreCase(" all" )) {
225224 tableLocation
226225 } else {
227226 val readLockClusters : Seq [String ] =
228227 readLockCluster.split(" ," ).toSeq.map(_.trim.toLowerCase(Locale .ROOT ))
229- val enforced : Boolean = readLockClusters.exists(cluster => tlp .contains(cluster))
230- logInfo(s " Table location is: $tlp , read lock enforced = $enforced" )
228+ val enforced : Boolean = readLockClusters.exists(cluster => tll .contains(cluster))
229+ logInfo(s " Table location is: $tl , read lock enforced = $enforced" )
231230 if (enforced) tableLocation else null
232231 }
233232 } else {
You can’t perform that action at this time.
0 commit comments