Github user sryza commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6618#discussion_r31677734
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala 
---
    @@ -175,8 +175,13 @@ class SparkHadoopUtil extends Logging {
       private def getFileSystemThreadStatistics(path: Path, conf: 
Configuration): Seq[AnyRef] = {
         val qualifiedPath = path.getFileSystem(conf).makeQualified(path)
         val scheme = qualifiedPath.toUri().getScheme()
    -    val stats = 
FileSystem.getAllStatistics().filter(_.getScheme().equals(scheme))
    -    stats.map(Utils.invoke(classOf[Statistics], _, "getThreadStatistics"))
    +    if (scheme == null) {
    +      Seq.empty
    +    } else {
    +      FileSystem.getAllStatistics
    +        .filter { stats => scheme.equals(stats.getScheme()) }
    --- End diff --
    
    Tiny nit: be consistent with parentheses for methods with empty args 
(getAllStatistics missing them, getScheme and toUri have them)
    Tiny nit: do you think `(scheme.equals(_.getScheme()))` would be less clear?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to