Skip to content
Snippets Groups Projects
  • hyukjinkwon's avatar
    d5b1d5fc
    [SPARK-18445][BUILD][DOCS] Fix the markdown for `Note:`/`NOTE:`/`Note... · d5b1d5fc
    hyukjinkwon authored
    [SPARK-18445][BUILD][DOCS] Fix the markdown for `Note:`/`NOTE:`/`Note that`/`'''Note:'''` across Scala/Java API documentation
    
    ## What changes were proposed in this pull request?
    
    It seems in Scala/Java,
    
    - `Note:`
    - `NOTE:`
    - `Note that`
    - `'''Note:'''`
    - `note`
    
    This PR proposes to fix those to `note` to be consistent.
    
    **Before**
    
    - Scala
      ![2016-11-17 6 16 39](https://cloud.githubusercontent.com/assets/6477701/20383180/1a7aed8c-acf2-11e6-9611-5eaf6d52c2e0.png)
    
    - Java
      ![2016-11-17 6 14 41](https://cloud.githubusercontent.com/assets/6477701/20383096/c8ffc680-acf1-11e6-914a-33460bf1401d.png)
    
    **After**
    
    - Scala
      ![2016-11-17 6 16 44](https://cloud.githubusercontent.com/assets/6477701/20383167/09940490-acf2-11e6-937a-0d5e1dc2cadf.png)
    
    - Java
      ![2016-11-17 6 13 39](https://cloud.githubusercontent.com/assets/6477701/20383132/e7c2a57e-acf1-11e6-9c47-b849674d4d88.png)
    
    ## How was this patch tested?
    
    The notes were found via
    
    ```bash
    grep -r "NOTE: " . | \ # Note:|NOTE:|Note that|'''Note:'''
    grep -v "// NOTE: " | \  # starting with // does not appear in API documentation.
    grep -E '.scala|.java' | \ # java/scala files
    grep -v Suite | \ # exclude tests
    grep -v Test | \ # exclude tests
    grep -e 'org.apache.spark.api.java' \ # packages appear in API documenation
    -e 'org.apache.spark.api.java.function' \ # note that this is a regular expression. So actual matches were mostly `org/apache/spark/api/java/functions ...`
    -e 'org.apache.spark.api.r' \
    ...
    ```
    
    ```bash
    grep -r "Note that " . | \ # Note:|NOTE:|Note that|'''Note:'''
    grep -v "// Note that " | \  # starting with // does not appear in API documentation.
    grep -E '.scala|.java' | \ # java/scala files
    grep -v Suite | \ # exclude tests
    grep -v Test | \ # exclude tests
    grep -e 'org.apache.spark.api.java' \ # packages appear in API documenation
    -e 'org.apache.spark.api.java.function' \
    -e 'org.apache.spark.api.r' \
    ...
    ```
    
    ```bash
    grep -r "Note: " . | \ # Note:|NOTE:|Note that|'''Note:'''
    grep -v "// Note: " | \  # starting with // does not appear in API documentation.
    grep -E '.scala|.java' | \ # java/scala files
    grep -v Suite | \ # exclude tests
    grep -v Test | \ # exclude tests
    grep -e 'org.apache.spark.api.java' \ # packages appear in API documenation
    -e 'org.apache.spark.api.java.function' \
    -e 'org.apache.spark.api.r' \
    ...
    ```
    
    ```bash
    grep -r "'''Note:'''" . | \ # Note:|NOTE:|Note that|'''Note:'''
    grep -v "// '''Note:''' " | \  # starting with // does not appear in API documentation.
    grep -E '.scala|.java' | \ # java/scala files
    grep -v Suite | \ # exclude tests
    grep -v Test | \ # exclude tests
    grep -e 'org.apache.spark.api.java' \ # packages appear in API documenation
    -e 'org.apache.spark.api.java.function' \
    -e 'org.apache.spark.api.r' \
    ...
    ```
    
    And then fixed one by one comparing with API documentation/access modifiers.
    
    After that, manually tested via `jekyll build`.
    
    Author: hyukjinkwon <gurwls223@gmail.com>
    
    Closes #15889 from HyukjinKwon/SPARK-18437.
    [SPARK-18445][BUILD][DOCS] Fix the markdown for `Note:`/`NOTE:`/`Note...
    hyukjinkwon authored
    [SPARK-18445][BUILD][DOCS] Fix the markdown for `Note:`/`NOTE:`/`Note that`/`'''Note:'''` across Scala/Java API documentation
    
    ## What changes were proposed in this pull request?
    
    It seems in Scala/Java,
    
    - `Note:`
    - `NOTE:`
    - `Note that`
    - `'''Note:'''`
    - `note`
    
    This PR proposes to fix those to `note` to be consistent.
    
    **Before**
    
    - Scala
      ![2016-11-17 6 16 39](https://cloud.githubusercontent.com/assets/6477701/20383180/1a7aed8c-acf2-11e6-9611-5eaf6d52c2e0.png)
    
    - Java
      ![2016-11-17 6 14 41](https://cloud.githubusercontent.com/assets/6477701/20383096/c8ffc680-acf1-11e6-914a-33460bf1401d.png)
    
    **After**
    
    - Scala
      ![2016-11-17 6 16 44](https://cloud.githubusercontent.com/assets/6477701/20383167/09940490-acf2-11e6-937a-0d5e1dc2cadf.png)
    
    - Java
      ![2016-11-17 6 13 39](https://cloud.githubusercontent.com/assets/6477701/20383132/e7c2a57e-acf1-11e6-9c47-b849674d4d88.png)
    
    ## How was this patch tested?
    
    The notes were found via
    
    ```bash
    grep -r "NOTE: " . | \ # Note:|NOTE:|Note that|'''Note:'''
    grep -v "// NOTE: " | \  # starting with // does not appear in API documentation.
    grep -E '.scala|.java' | \ # java/scala files
    grep -v Suite | \ # exclude tests
    grep -v Test | \ # exclude tests
    grep -e 'org.apache.spark.api.java' \ # packages appear in API documenation
    -e 'org.apache.spark.api.java.function' \ # note that this is a regular expression. So actual matches were mostly `org/apache/spark/api/java/functions ...`
    -e 'org.apache.spark.api.r' \
    ...
    ```
    
    ```bash
    grep -r "Note that " . | \ # Note:|NOTE:|Note that|'''Note:'''
    grep -v "// Note that " | \  # starting with // does not appear in API documentation.
    grep -E '.scala|.java' | \ # java/scala files
    grep -v Suite | \ # exclude tests
    grep -v Test | \ # exclude tests
    grep -e 'org.apache.spark.api.java' \ # packages appear in API documenation
    -e 'org.apache.spark.api.java.function' \
    -e 'org.apache.spark.api.r' \
    ...
    ```
    
    ```bash
    grep -r "Note: " . | \ # Note:|NOTE:|Note that|'''Note:'''
    grep -v "// Note: " | \  # starting with // does not appear in API documentation.
    grep -E '.scala|.java' | \ # java/scala files
    grep -v Suite | \ # exclude tests
    grep -v Test | \ # exclude tests
    grep -e 'org.apache.spark.api.java' \ # packages appear in API documenation
    -e 'org.apache.spark.api.java.function' \
    -e 'org.apache.spark.api.r' \
    ...
    ```
    
    ```bash
    grep -r "'''Note:'''" . | \ # Note:|NOTE:|Note that|'''Note:'''
    grep -v "// '''Note:''' " | \  # starting with // does not appear in API documentation.
    grep -E '.scala|.java' | \ # java/scala files
    grep -v Suite | \ # exclude tests
    grep -v Test | \ # exclude tests
    grep -e 'org.apache.spark.api.java' \ # packages appear in API documenation
    -e 'org.apache.spark.api.java.function' \
    -e 'org.apache.spark.api.r' \
    ...
    ```
    
    And then fixed one by one comparing with API documentation/access modifiers.
    
    After that, manually tested via `jekyll build`.
    
    Author: hyukjinkwon <gurwls223@gmail.com>
    
    Closes #15889 from HyukjinKwon/SPARK-18437.