Github user dasahcc commented on a diff in the pull request:

    https://github.com/apache/helix/pull/47#discussion_r75918144
  
    --- Diff: helix-core/src/main/java/org/apache/helix/task/TaskUtil.java ---
    @@ -220,6 +221,85 @@ protected static void setWorkflowContext(HelixManager 
manager, String workflowRe
       }
     
       /**
    +   * Intialize the user content store znode setup
    +   * @param manager          a connection to Helix
    +   * @param workflowResource the name of workflow
    +   * @param jobResource      the name of job
    +   * @param record           the initial data
    +   */
    +  protected static void setUserContent(HelixManager manager, String 
workflowResource,
    +      String jobResource, ZNRecord record) {
    +    manager.getHelixPropertyStore().create(Joiner.on("/")
    +            .join(TaskConstants.REBALANCER_CONTEXT_ROOT, workflowResource, 
TaskUtil.USER_CONTENT_NODE),
    +        record, AccessOption.PERSISTENT);
    +    manager.getHelixPropertyStore().create(Joiner.on("/")
    +            .join(TaskConstants.REBALANCER_CONTEXT_ROOT, jobResource, 
TaskUtil.USER_CONTENT_NODE),
    +        record, AccessOption.PERSISTENT);
    +  }
    +
    +  /**
    +   * Get user defined workflow level key-value pair data
    +   *
    +   * @param manager          a connection to Helix
    +   * @param workflowResource the name of workflow
    +   * @param key              the key of key-value pair
    +   * @return null if there is no such pair, otherwise return a String
    +   */
    +  protected static String getWorkflowUserContent(HelixManager manager, 
String workflowResource,
    --- End diff --
    
    Will merge that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to