Skip to content

Add configurable prefix to Consumer Group in IngestionJob's Kafka reader - #969

Merged
feast-ci-bot merged 3 commits into
feast-dev:masterfrom
terryyylim:add-job-id-prefix
Sep 2, 2020
Merged

Add configurable prefix to Consumer Group in IngestionJob's Kafka reader#969
feast-ci-bot merged 3 commits into
feast-dev:masterfrom
terryyylim:add-job-id-prefix

Conversation

@terryyylim

Copy link
Copy Markdown
Member

What this PR does / why we need it:
To allow multiple deployments with jobs running in parallel, we should separate their Kafka consumer groups which is based on the JobId. This would prevent overwriting each other's offsets.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@terryyylim

Copy link
Copy Markdown
Member Author

/retest

@terryyylim

Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@terryyylim

Copy link
Copy Markdown
Member Author

/retest

# Enabling JobManagement
enabled: true

# Prefix for JobId

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This comment says absolutely nothing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated comment.

source.getKafkaSourceConfig().getBootstrapServers(),
source.getKafkaSourceConfig().getTopic()),
dateSuffix);
if (!this.jobProperties.getJobIdPrefix().isEmpty()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What happens when jobProperties is null?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed case.

feastProperties.getJobs().getController().getConsolidateJobsPerSource();
if (shouldConsolidateJobs) {
return new ConsolidatedJobStrategy(jobRepository);
return new ConsolidatedJobStrategy(jobRepository, feastProperties.getJobs());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we extract the jobProperties before passing it? It's a convention that I am trying to get us to follow, even if it takes more lines of code

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Extracted before passing jobProperties.

@feast-ci-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pyalex, terryyylim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pyalex

pyalex commented Sep 2, 2020

Copy link
Copy Markdown
Collaborator

/lgtm

@pyalex pyalex changed the title Add job id prefix Add configurable prefix to Consumer Group in IngestionJob's Kafka reader Sep 2, 2020
@pyalex pyalex added the kind/feature New feature or request label Sep 2, 2020
@feast-ci-bot
feast-ci-bot merged commit da812c2 into feast-dev:master Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants