Add DynamicTaskConfig to store task configs in ZK#1208
Merged
narendly merged 4 commits intoapache:dynamically-loaded-taskfrom Aug 4, 2020
Merged
Add DynamicTaskConfig to store task configs in ZK#1208narendly merged 4 commits intoapache:dynamically-loaded-taskfrom
narendly merged 4 commits intoapache:dynamically-loaded-taskfrom
Conversation
Adds DynamicTaskConfig class, which is a wrapper for ZNRecord, to store and access the configs for dynamically loaded tasks in ZK. Also adds the appropriate constants to TaskConstants.
narendly
reviewed
Aug 3, 2020
helix-core/src/main/java/org/apache/helix/task/DynamicTaskConfig.java
Outdated
Show resolved
Hide resolved
narendly
reviewed
Aug 3, 2020
narendly
reviewed
Aug 3, 2020
helix-core/src/main/java/org/apache/helix/task/DynamicTaskConfig.java
Outdated
Show resolved
Hide resolved
narendly
reviewed
Aug 3, 2020
helix-core/src/main/java/org/apache/helix/task/DynamicTaskConfig.java
Outdated
Show resolved
Hide resolved
narendly
reviewed
Aug 3, 2020
| /** | ||
| * A wrapper class for ZNRecord, used to store configs for tasks that are to be dynamically loaded | ||
| */ | ||
| public class DynamicTaskConfig { |
Contributor
There was a problem hiding this comment.
Overall, let's go over this class and make sure we do not have methods (Getters and setters) that we don't/shouldn't need. Think about which fields should be immutable?
Also, let's put a focus on descriptive variable/method names as well.
Removes unnecessary setter methods and renames some methods and variables to be more descriptive.
narendly
reviewed
Aug 4, 2020
helix-core/src/main/java/org/apache/helix/task/DynamicTaskConfig.java
Outdated
Show resolved
Hide resolved
narendly
reviewed
Aug 4, 2020
helix-core/src/main/java/org/apache/helix/task/DynamicTaskConfig.java
Outdated
Show resolved
Hide resolved
narendly
reviewed
Aug 4, 2020
helix-core/src/main/java/org/apache/helix/task/TaskConstants.java
Outdated
Show resolved
Hide resolved
narendly
reviewed
Aug 4, 2020
helix-core/src/main/java/org/apache/helix/task/TaskConstants.java
Outdated
Show resolved
Hide resolved
narendly
approved these changes
Aug 4, 2020
Contributor
Author
|
This PR is ready to be merged, approved by @narendly Add DynamicTaskConfig to store task configs in ZK Adds DynamicTaskConfig class, which is a wrapper for ZNRecord, to store Also adds the appropriate constants to TaskConstants. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
Fixes #1207
Description
This PR adds DynamicTaskConfig class, which is a wrapper for ZNRecord, to store and access the configs for dynamically loaded tasks in ZK. It also adds the appropriate constants that refer to the config fields to TaskConstants.
Tests
No tests were written, as this PR only adds a class to the project.
Since the PR doesn't modify any existing code, it's not going to cause any test failures. The following is the build result:
Commits
Documentation (Optional)
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)