public void coordinator(String projN, String cycle){
        ArrayList<String> coor=rfa.readInputStream(GenerateInitScripts.class.getResourceAsStream("config/common/coordinator.xml"),"UTF-8");
        StringBuffer content=new StringBuffer();
        String cycleTag="${coord:days(1)}";
        if(cycle.equalsIgnoreCase("months"))
            cycleTag="${coord:months(1)}";
        for(int i=0; i<coor.size(); ++i){
            if(coor.get(i).contains("{project-name-config-generate}")){
                content.append("<coordinator-app name=\""+projN+"-cd\"\n");
                content.append("  frequency=\""+cycleTag+"\" ");
            }else if(coor.get(i).contains("{dataset-config-generate}")){
                content.append("    <dataset name=\""+projN+"_dataset\" frequency=\""+cycleTag+"\"\n");
                content.append("      initial-instance=\"${job_start}\" timezone=\"GMT+08:00\">\n");
                content.append("      <uri-template>${hdfs_address_prefix}/Pad-dbw/"+projN+"/${YEAR}${MONTH}${DAY}/\n");
                content.append("      </uri-template>\n");
                content.append("    </dataset>\n");
            }else if(coor.get(i).contains("{input-output-config-generate}")){
                content.append("  <output-events>\n");
                content.append("    <data-out name=\"output\" dataset=\""+projN+"_dataset\">\n");
                content.append("      <instance>${coord:current(0)}</instance>\n");
                content.append("    </data-out>\n");
                content.append("  </output-events>\n");
            }
            else
                content.append(coor.get(i)+"\n");
        }

        String initPath=System.getProperty("user.dir")+ File.separator+projN;
        wfa.mkdirs(initPath);
        wfa.writeFromStringBuffer(initPath+File.separator+"coordinator.xml","UTF-8",content);
    }