Skip to content

Conversation

@ajothomas
Copy link

@ajothomas ajothomas commented Oct 12, 2021

Problem

This PR intends to add percentiles to beam distribution metric

Motivation

  • Percentile metrics is a commonly requested feature from Beam pipeline users
  • Distribution metrics in Samza runner are currently not wired to Samza's MetricsRegistry

Proposed Changes

  • DistributionData currently contains the logic for computing distributions. Datasketches library has been used for percentile computation which uses a sketch based approach under the hood. https://datasketches.apache.org/
  • DistributionResult will report a map of percentiles and percentile values.
  • Wire all distribution metrics as Gauges in Samza MetricsRegistry in Samza runner

API Changes

  • Removed method public void update(long sum, long count, long min, long max) from Distribution Metric code as it seems to be dead code.

Testing

  • Tests for MetricsContainer, DistributionCell, etc
  • ValidateRunner tests to validate MetricsTest for different runners

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

ValidatesRunner compliance status (on master branch)

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- Build Status Build Status Build Status Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status ---
XLang Build Status Build Status Build Status Build Status Build Status ---

Examples testing status on various runners

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- --- --- --- --- --- ---
Java --- Build Status
Build Status
Build Status
--- --- --- --- ---
Python --- --- --- --- --- --- ---
XLang --- --- --- --- --- --- ---

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status Build Status Build Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@ajothomas ajothomas force-pushed the AddingPercentilesUsingSketches branch from a05daa3 to fb32e60 Compare October 12, 2021 17:01
@ajothomas ajothomas force-pushed the AddingPercentilesUsingSketches branch from fb32e60 to cd0e692 Compare October 12, 2021 18:22
@ajothomas ajothomas force-pushed the AddingPercentilesUsingSketches branch 3 times, most recently from e0061de to c85fe00 Compare October 19, 2021 19:27
Copy link

@xinyuiscool xinyuiscool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks fore adding this metric!

@ajothomas ajothomas force-pushed the AddingPercentilesUsingSketches branch 5 times, most recently from 3ae64af to 6d8c00f Compare October 27, 2021 20:03
Copy link

@kw2542 kw2542 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ajothomas ajothomas force-pushed the AddingPercentilesUsingSketches branch from f4be093 to 3dcc7af Compare October 28, 2021 23:07

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the empty check here.

@ajothomas ajothomas force-pushed the AddingPercentilesUsingSketches branch 2 times, most recently from 028c162 to 21a34e6 Compare November 1, 2021 22:28
@xinyuiscool
Copy link

LGTM! Thanks for the update.

@ajothomas ajothomas force-pushed the AddingPercentilesUsingSketches branch from 21a34e6 to 0399a32 Compare November 1, 2021 23:01
@xinyuiscool xinyuiscool merged commit 9459eef into linkedin:li_trunk Nov 2, 2021
kw2542 pushed a commit that referenced this pull request Jun 22, 2022
…ypescript and add GitHub Action

Rename node-ts to typescript and add GitHub Action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants