Skip to content

SAMZA-2284: Remove redundant getStreamMetadata calls in SamzaContainer startup sequence. - #1119

Merged
shanthoosh merged 1 commit into
apache:masterfrom
shanthoosh:master
Jul 31, 2019
Merged

shanthoosh merged 1 commit into
apache:masterfrom
shanthoosh:master

Conversation

@shanthoosh

@shanthoosh shanthoosh commented Jul 30, 2019 •

Copy link
Copy Markdown
Contributor

Problem:

SamzaContainer startup sequence fetches the metadata of same input streams multiple times. Fetching the metadata of a stream entails making a expensive remote call to underlying messaging broker. This redundant fetch-input-stream-metadata API invocations incurred significant delays in the start of actual message processing in the samza job.

Impact:

  1. With some samza jobs at LinkedIn, we observed that this fetch-input-stream-metadata loop took around 1.5 hrs to complete.
  2. The redundant fetch-input-stream-metadata remote API calls will significantly increase the load on the underlying messaging broker.

Fix:

This patch fixes the unnecessary delay by fetching the metadata of the input streams only once in SamzaContainer(rather than once per SystemStreamPartition per task).

Validation:

  1. Fix the existing unit-tests.
  2. Verified this change with a sample samza-yarn job in LinkedIn and with a hello-samza job from samza-hello-world examples in OSS.

@shanthoosh

Copy link
Copy Markdown
Contributor Author

@prateekm
Please take a look when you get a chance.

@shanthoosh shanthoosh closed this Jul 30, 2019
@shanthoosh shanthoosh reopened this Jul 30, 2019
@shanthoosh
shanthoosh requested a review from prateekm July 30, 2019 05:13

@dnishimura dnishimura left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good overall. Just a minor question.

@shanthoosh
shanthoosh merged commit ef077cc into apache:master Jul 31, 2019
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