Skip to content

Make the Throughput based assignment and task estimation based on partition assignment configurable.#841

Merged
vmaheshw merged 10 commits intolinkedin:masterfrom
vmaheshw:configStrategy
Jun 29, 2021
Merged

Make the Throughput based assignment and task estimation based on partition assignment configurable.#841
vmaheshw merged 10 commits intolinkedin:masterfrom
vmaheshw:configStrategy

Conversation

@vmaheshw
Copy link
Copy Markdown
Collaborator

It is important to be able to enable/disable task estimation based on partition count or throughput based assignment to ensure that we can rollback or disable a feature if we have any issue in production.

Along with this, fixing an issue where if the task estimated is same as minTask, it does not get saved in the zookeeper and needs extra iteration after it throws exception, which we can easily skip.

DEFAULT_ENABLE_THROUGHPUT_BASED_PARTITION_ASSIGNMENT);
_enablePartitionNumBasedTaskCountEstimation = props.getBoolean(CFG_ENABLE_PARTITION_NUM_BASED_TASK_COUNT_ESTIMATION,
DEFAULT_ENABLE_PARTITION_NUM_BASED_TASK_COUNT_ESTIMATION);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: empty line

}

private void testValidThroughputBasedPartitionAssignmentPath(boolean enablePartitionCountBasedEstimation) {
PartitionThroughputProvider mockProvider = mock(PartitionThroughputProvider.class);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I created a test case like this one to verify metrics in #840. We need to leave just one by merging them.


@Test
public void elasticTaskCountEnabledPathTest() {
testValidThroughputBasedPartitionAssignmentPath(true);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feel free to ignore this. I don't see this making code more readable. It's a preference, but I'd rather have duplicate code in tests that's easy to follow. Nested calls add structural complexity.

@vmaheshw vmaheshw merged commit 8f8974a into linkedin:master Jun 29, 2021
vmaheshw added a commit to vmaheshw/brooklin that referenced this pull request Mar 1, 2022
…ation configurable in Strategy (linkedin#841)

It is important to be able to enable/disable task estimation based on partition count or throughput based assignment to ensure that we can rollback or disable a feature if we have any issue in production.

Along with this, fixing an issue where if the task estimated is same as minTask, it does not get saved in the zookeeper and needs extra iteration after it throws exception, which we can easily skip.
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