spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewor14 <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-1132] Persisting Web UI through refacto...
Date Thu, 13 Mar 2014 19:15:33 GMT
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/42#discussion_r10581141
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -895,4 +894,42 @@ private[spark] object Utils extends Logging {
         }
         count
       }
    +
    +  /** Return the class name of the given object, removing all dollar signs */
    +  def getFormattedClassName(obj: AnyRef) = {
    +    obj.getClass.getSimpleName.replace("$", "")
    +  }
    +
    +  def jsonOption(json: JValue): Option[JValue] = {
    +    json match {
    +      case JNothing => None
    +      case value: JValue => Some(value)
    +    }
    +  }
    +
    +  def emptyJson = JObject(List[JField]())
    +
    +  /**
    +   * Return a Hadoop FileSystem with the scheme encoded in the given path.
    +   * File systems currently supported include HDFS, S3, and the local file system.
    +   */
    +  def getHadoopFileSystem(path: URI): FileSystem = {
    --- End diff --
    
    In that case I don't think we even need a helper method. I guess it is sufficiently clear
if the user gets a HDFS exception (so we don't actually need to come up with our own).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message