Github user lei-xia commented on a diff in the pull request:

    https://github.com/apache/helix/pull/47#discussion_r75894351
  
    --- 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("/")
    --- End diff --
    
    This creates both workflow content node and job content node everytime, 
which is not needed.  Since the workflow and job directory structure in 
propertyStore are same /WorkflowOrJobName/usercontent, this method can be 
generic for both workflow and job, such as
    SetUserContent(HelixManager manager,  String workflowJobResource, ...):
               manager.getHelixPropertyStore().create(Joiner.on("/")            
.join(TaskConstants.REBALANCER_CONTEXT_ROOT, workflowJobResource, 
TaskUtil.USER_CONTENT_NODE),
           record, AccessOption.PERSISTENT);


---
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