Skip to content

Add DynamicTaskConfig to store task configs in ZK#1208

Merged
narendly merged 4 commits intoapache:dynamically-loaded-taskfrom
rabashizade:DynamicTaskConfig
Aug 4, 2020
Merged

Add DynamicTaskConfig to store task configs in ZK#1208
narendly merged 4 commits intoapache:dynamically-loaded-taskfrom
rabashizade:DynamicTaskConfig

Conversation

@rabashizade
Copy link
Contributor

@rabashizade rabashizade commented Aug 3, 2020

Issues

  • My PR addresses the following Helix issues and references them in the PR description:

Fixes #1207

Description

  • Here are some details about my PR, including screenshots of any UI changes:

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

  • The following tests are written for this issue:

No tests were written, as this PR only adds a class to the project.

  • The following is the result of the "mvn test" command on the appropriate module:

Since the PR doesn't modify any existing code, it's not going to cause any test failures. The following is the build result:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache Helix 1.0.2-SNAPSHOT:
[INFO] 
[INFO] Apache Helix ....................................... SUCCESS [  2.163 s]
[INFO] Apache Helix :: Metrics Common ..................... SUCCESS [  4.236 s]
[INFO] Apache Helix :: Metadata Store Directory Common .... SUCCESS [  2.850 s]
[INFO] Apache Helix :: ZooKeeper API ...................... SUCCESS [  5.996 s]
[INFO] Apache Helix :: Helix Common ....................... SUCCESS [  3.138 s]
[INFO] Apache Helix :: Core ............................... SUCCESS [ 38.853 s]
[INFO] Apache Helix :: Admin Webapp ....................... SUCCESS [  5.833 s]
[INFO] Apache Helix :: Restful Interface .................. SUCCESS [ 10.435 s]
[INFO] Apache Helix :: Distributed Lock ................... SUCCESS [  1.894 s]
[INFO] Apache Helix :: HelixAgent ......................... SUCCESS [  2.897 s]
[INFO] Apache Helix :: Recipes ............................ SUCCESS [  0.044 s]
[INFO] Apache Helix :: Recipes :: Rabbitmq Consumer Group . SUCCESS [  1.426 s]
[INFO] Apache Helix :: Recipes :: Rsync Replicated File Store SUCCESS [  1.463 s]
[INFO] Apache Helix :: Recipes :: distributed lock manager  SUCCESS [  1.043 s]
[INFO] Apache Helix :: Recipes :: distributed task execution SUCCESS [  1.171 s]
[INFO] Apache Helix :: Recipes :: service discovery ....... SUCCESS [  1.046 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:25 min
[INFO] Finished at: 2020-08-04T09:50:49-07:00
[INFO] ------------------------------------------------------------------------

Commits

  • My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation (Optional)

  • In case of new functionality, my PR adds documentation in the following wiki page:

Code Quality

  • My diff has been formatted using helix-style.xml
    (helix-style-intellij.xml if IntelliJ IDE is used)

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.
/**
* A wrapper class for ZNRecord, used to store configs for tasks that are to be dynamically loaded
*/
public class DynamicTaskConfig {
Copy link
Contributor

Choose a reason for hiding this comment

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

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.
@rabashizade rabashizade marked this pull request as ready for review August 4, 2020 12:41
@rabashizade
Copy link
Contributor Author

This PR is ready to be merged, approved by @narendly
Final commit message:

Add DynamicTaskConfig to store task configs in ZK

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 narendly changed the base branch from master to dynamically-loaded-task August 4, 2020 17:23
@narendly narendly merged commit 4524028 into apache:dynamically-loaded-task Aug 4, 2020
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.

Extend ZNRecord to store configs for dynamically loading tasks in ZK

2 participants