File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
core/src/main/scala/org/apache/spark/deploy Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -175,8 +175,13 @@ class SparkHadoopUtil extends Logging {
175175 private def getFileSystemThreadStatistics (path : Path , conf : Configuration ): Seq [AnyRef ] = {
176176 val qualifiedPath = path.getFileSystem(conf).makeQualified(path)
177177 val scheme = qualifiedPath.toUri().getScheme()
178- val stats = FileSystem .getAllStatistics().filter(_.getScheme().equals(scheme))
179- stats.map(Utils .invoke(classOf [Statistics ], _, " getThreadStatistics" ))
178+ if (scheme == null ) {
179+ Seq .empty
180+ } else {
181+ FileSystem .getAllStatistics
182+ .filter { stats => scheme.equals(stats.getScheme) }
183+ .map(Utils .invoke(classOf [Statistics ], _, " getThreadStatistics" ))
184+ }
180185 }
181186
182187 private def getFileSystemThreadStatisticsMethod (methodName : String ): Method = {
You can’t perform that action at this time.
0 commit comments