You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/07/24 20:57:03 UTC

[GitHub] [helix] rabashizade commented on a change in pull request #1169: [HELIX-1168] Dynamically Load Tasks in Task Framework

rabashizade commented on a change in pull request #1169:
URL: https://github.com/apache/helix/pull/1169#discussion_r460284544



##########
File path: helix-core/src/main/java/org/apache/helix/task/TaskStateModel.java
##########
@@ -283,6 +289,36 @@ public void reset() {
     }
   }
 
+  /**
+   * Loads Task and TaskFactory classes for command input
+   */
+  private boolean loadNewTask(String command) {
+    try {
+      // Read ZNRecord containing task definition information.
+      ZNRecord taskConfig = _manager.getHelixDataAccessor().getBaseDataAccessor()

Review comment:
       Thank you, Molly. Good catch! I think I should add the appropriate option to throw exception and then handle it.
   ```suggestion
         ZNRecord taskConfig = _manager.getHelixDataAccessor().getBaseDataAccessor()
             .get("/" + _manager.getClusterName() + "/TASK_DEFINITION",
                 null, AccessOption.THROW_EXCEPTION_IFNOTEXIST);
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org