Skip to content
Snippets Groups Projects
  • aokolnychyi's avatar
    f045d9da
    [MINOR][DOCS] Updates to the Accumulator example in the programming guide.... · f045d9da
    aokolnychyi authored
    [MINOR][DOCS] Updates to the Accumulator example in the programming guide. Fixed typos, AccumulatorV2 in Java
    
    ## What changes were proposed in this pull request?
    
    This pull request contains updates to Scala and Java Accumulator code snippets in the programming guide.
    
    - For Scala, the pull request fixes the signature of the 'add()' method in the custom Accumulator, which contained two params (as the old AccumulatorParam) instead of one (as in AccumulatorV2).
    
    - The Java example was updated to use the AccumulatorV2 class since AccumulatorParam is marked as deprecated.
    
    - Scala and Java examples are more consistent now.
    
    ## How was this patch tested?
    
    This patch was tested manually by building the docs locally.
    
    ![image](https://cloud.githubusercontent.com/assets/6235869/20652099/77d98d18-b4f3-11e6-8565-a995fe8cf8e5.png)
    
    Author: aokolnychyi <okolnychyyanton@gmail.com>
    
    Closes #16024 from aokolnychyi/fixed_accumulator_example.
    [MINOR][DOCS] Updates to the Accumulator example in the programming guide....
    aokolnychyi authored
    [MINOR][DOCS] Updates to the Accumulator example in the programming guide. Fixed typos, AccumulatorV2 in Java
    
    ## What changes were proposed in this pull request?
    
    This pull request contains updates to Scala and Java Accumulator code snippets in the programming guide.
    
    - For Scala, the pull request fixes the signature of the 'add()' method in the custom Accumulator, which contained two params (as the old AccumulatorParam) instead of one (as in AccumulatorV2).
    
    - The Java example was updated to use the AccumulatorV2 class since AccumulatorParam is marked as deprecated.
    
    - Scala and Java examples are more consistent now.
    
    ## How was this patch tested?
    
    This patch was tested manually by building the docs locally.
    
    ![image](https://cloud.githubusercontent.com/assets/6235869/20652099/77d98d18-b4f3-11e6-8565-a995fe8cf8e5.png)
    
    Author: aokolnychyi <okolnychyyanton@gmail.com>
    
    Closes #16024 from aokolnychyi/fixed_accumulator_example.