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

    https://github.com/apache/spark/pull/1256#discussion_r15597585
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -1298,6 +1298,48 @@ private[spark] object Utils extends Logging {
         }
       }
     
    +  /** Load properties present in the given file. */
    +  def getPropertiesFromFile(filename: String): Seq[(String, String)] = {
    +    val file = new File(filename)
    +    require(file.exists(), s"Properties file $file does not exist")
    +    require(file.isFile(), s"Properties file $file is not a normal file")
    +    val inputStream = new FileInputStream(file)
    +    getPropertiesFromInputStream(inputStream)
    +  }
    +
    +  /** Load properties present in the given inputStream.
    +    *
    +    * @param inputStream  The given input stream will be closed.
    --- End diff --
    
    nit: wording is weird; I'd say:
    
    InputStream from where to load properties. Expected to contain UTF-8 data. 
Will be closed by this method.


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

Reply via email to