private static void bindTagsProperties(
     final org.apache.falcon.entity.v0.process.Process process,
     final Properties extensionProperties) {
   String falconSystemTags = process.getTags();
   String tags = extensionProperties.getProperty(ExtensionProperties.JOB_TAGS.getName());
   if (StringUtils.isNotEmpty(tags)) {
     if (StringUtils.isNotEmpty(falconSystemTags)) {
       tags += ", " + falconSystemTags;
     }
     process.setTags(tags);
   }
 }
Example #2
0
  private Entity buildProcess(String name, String username, String tags, String pipelines) {
    ACL acl = new ACL();
    acl.setOwner(username);
    acl.setGroup("hdfs");
    acl.setPermission("*");

    Process process = new Process();
    process.setName(name);
    process.setACL(acl);
    if (!StringUtils.isEmpty(pipelines)) {
      process.setPipelines(pipelines);
    }
    if (!StringUtils.isEmpty(tags)) {
      process.setTags(tags);
    }
    process.setClusters(buildClusters("cluster" + name));
    return process;
  }