You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ra...@apache.org on 2014/12/02 19:49:00 UTC

[3/3] incubator-falcon git commit: FALCON-928 Use falcon's checkstyle for falcon regression code. Contributed by Raghav Kumar Gautam

FALCON-928 Use falcon's checkstyle for falcon regression code. Contributed by Raghav Kumar Gautam


Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/4f2b524d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/4f2b524d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/4f2b524d

Branch: refs/heads/master
Commit: 4f2b524d9bde075968e33b0be611d3e7152ee1b6
Parents: 9f1efe0
Author: Raghav Kumar Gautam <ra...@apache.org>
Authored: Tue Dec 2 10:48:25 2014 -0800
Committer: Raghav Kumar Gautam <ra...@apache.org>
Committed: Tue Dec 2 10:48:25 2014 -0800

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                   |   2 +
 falcon-regression/checkstyle/pom.xml            |  28 --
 .../resources/falcon/checkstyle-java-header.txt |  17 -
 .../resources/falcon/checkstyle-noframes.xsl    | 221 ---------
 .../src/main/resources/falcon/checkstyle.xml    | 235 ---------
 .../main/resources/falcon/findbugs-exclude.xml  |  34 --
 .../core/interfaces/IEntityManagerHelper.java   |   5 +-
 .../regression/core/response/lineage/Edge.java  |  14 +-
 .../core/response/lineage/EdgesResult.java      |   4 +-
 .../core/response/lineage/Vertex.java           |   4 +-
 .../core/supportClasses/HadoopFileEditor.java   |  25 +-
 .../regression/core/util/GraphAssert.java       |   2 +-
 .../regression/core/util/InstanceUtil.java      | 126 +----
 .../falcon/regression/core/util/OozieUtil.java  |   8 +-
 .../falcon/regression/core/util/XmlUtil.java    |  30 --
 .../falcon/regression/ExternalFSTest.java       |  30 +-
 .../regression/FeedClusterUpdateTest.java       | 468 ++++++++++--------
 .../regression/FeedInstanceStatusTest.java      | 127 +++--
 .../falcon/regression/FeedReplicationTest.java  |  97 ++--
 .../falcon/regression/InstanceSummaryTest.java  |  46 +-
 .../falcon/regression/TestngListener.java       |   7 +-
 .../regression/hcat/HCatFeedOperationsTest.java |  25 +-
 .../regression/hcat/HCatReplicationTest.java    |  38 +-
 .../regression/lineage/EntitySummaryTest.java   |  27 +-
 .../regression/lineage/LineageApiTest.java      |  22 +-
 .../lineage/ListFeedInstancesTest.java          |  28 +-
 .../prism/FeedDelayParallelTimeoutTest.java     |  11 +-
 .../regression/prism/PrismFeedDeleteTest.java   | 111 +++--
 .../PrismFeedReplicationPartitionExpTest.java   | 480 ++++++++++---------
 .../prism/PrismFeedReplicationUpdateTest.java   | 163 ++++---
 .../regression/prism/PrismFeedSnSTest.java      |  37 +-
 .../regression/prism/PrismFeedUpdateTest.java   |  73 +--
 .../regression/prism/PrismSubmitTest.java       |  26 +-
 .../prism/RescheduleKilledProcessTest.java      |  13 +-
 .../falcon/regression/ui/LineageGraphTest.java  |  12 +-
 falcon-regression/pom.xml                       |   6 +-
 36 files changed, 1040 insertions(+), 1562 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index 51fca02..ffcb6b5 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -33,6 +33,8 @@ Trunk (Unreleased)
    via Samarth Gupta)
 
   IMPROVEMENTS
+   FALCON-928 Use falcon's checkstyle for falcon regression code (Raghav Kumar Gautam)
+
    FALCON-909 Remove names of the contributors from xmls and code (Ruslan Ostafiychuk)
 
    FALCON-926 Fix problems found by findbugs in merlin and merlin-core (Ruslan Ostafiychuk and

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/checkstyle/pom.xml
----------------------------------------------------------------------
diff --git a/falcon-regression/checkstyle/pom.xml b/falcon-regression/checkstyle/pom.xml
deleted file mode 100644
index 89f785f..0000000
--- a/falcon-regression/checkstyle/pom.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.falcon</groupId>
-    <artifactId>checkstyle</artifactId>
-    <version>0.5.1-incubating-SNAPSHOT</version>
-    <name>Checkstyle</name>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle-java-header.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle-java-header.txt b/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle-java-header.txt
deleted file mode 100644
index 5d5f1e3..0000000
--- a/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle-java-header.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle-noframes.xsl
----------------------------------------------------------------------
diff --git a/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle-noframes.xsl b/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle-noframes.xsl
deleted file mode 100644
index 4d10dd7..0000000
--- a/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle-noframes.xsl
+++ /dev/null
@@ -1,221 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-    <xsl:output method="html" indent="yes"/>
-    <xsl:decimal-format decimal-separator="." grouping-separator=","/>
-
-    <xsl:key name="files" match="file" use="@name"/>
-
-    <!-- Checkstyle XML Style Sheet by Stephane Bailliez <sb...@apache.org>         -->
-    <!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
-    <!-- Usage (generates checkstyle_report.html):                                      -->
-    <!--    <checkstyle failonviolation="false" config="${check.config}">               -->
-    <!--      <fileset dir="${src.dir}" includes="**/*.java"/>                          -->
-    <!--      <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/>         -->
-    <!--    </checkstyle>                                                               -->
-    <!--    <style basedir="${doc.dir}" destdir="${doc.dir}"                            -->
-    <!--            includes="checkstyle_report.xml"                                    -->
-    <!--            style="${doc.dir}/checkstyle-noframes-sorted.xsl"/>                 -->
-
-    <xsl:template match="checkstyle">
-        <html>
-            <head>
-                <style type="text/css">
-                    .bannercell {
-                    border: 0px;
-                    padding: 0px;
-                    }
-                    body {
-                    margin-left: 10;
-                    margin-right: 10;
-                    font:normal 80% arial,helvetica,sanserif;
-                    background-color:#FFFFFF;
-                    color:#000000;
-                    }
-                    .a td {
-                    background: #efefef;
-                    }
-                    .b td {
-                    background: #fff;
-                    }
-                    th, td {
-                    text-align: left;
-                    vertical-align: top;
-                    }
-                    th {
-                    font-weight:bold;
-                    background: #ccc;
-                    color: black;
-                    }
-                    table, th, td {
-                    font-size:100%;
-                    border: none
-                    }
-                    table.log tr td, tr th {
-
-                    }
-                    h2 {
-                    font-weight:bold;
-                    font-size:140%;
-                    margin-bottom: 5;
-                    }
-                    h3 {
-                    font-size:100%;
-                    font-weight:bold;
-                    background: #525D76;
-                    color: white;
-                    text-decoration: none;
-                    padding: 5px;
-                    margin-right: 2px;
-                    margin-left: 2px;
-                    margin-bottom: 0;
-                    }
-                </style>
-            </head>
-            <body>
-                <a name="top"></a>
-                <!-- jakarta logo -->
-                <table border="0" cellpadding="0" cellspacing="0" width="100%">
-                    <tr>
-                        <td class="bannercell" rowspan="2">
-                            <!--a href="http://jakarta.apache.org/">
-                            <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
-                            </a-->
-                        </td>
-                        <td class="text-align:right">
-                            <h2>CheckStyle Audit</h2>
-                        </td>
-                    </tr>
-                    <tr>
-                        <td class="text-align:right">Designed for use with
-                            <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a>
-                            and<a href='http://jakarta.apache.org'>Ant</a>.
-                        </td>
-                    </tr>
-                </table>
-                <hr size="1"/>
-
-                <!-- Summary part -->
-                <xsl:apply-templates select="." mode="summary"/>
-                <hr size="1" width="100%" align="left"/>
-
-                <!-- Package List part -->
-                <xsl:apply-templates select="." mode="filelist"/>
-                <hr size="1" width="100%" align="left"/>
-
-                <!-- For each package create its part -->
-                <xsl:apply-templates
-                        select="file[@name and generate-id(.) = generate-id(key('files', @name))]"/>
-
-                <hr size="1" width="100%" align="left"/>
-
-
-            </body>
-        </html>
-    </xsl:template>
-
-
-    <xsl:template match="checkstyle" mode="filelist">
-        <h3>Files</h3>
-        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
-            <tr>
-                <th>Name</th>
-                <th>Errors</th>
-            </tr>
-            <xsl:for-each
-                    select="file[@name and generate-id(.) = generate-id(key('files', @name))]">
-                <xsl:sort data-type="number" order="descending"
-                          select="count(key('files', @name)/error)"/>
-                <xsl:variable name="errorCount" select="count(error)"/>
-                <tr>
-                    <xsl:call-template name="alternated-row"/>
-                    <td>
-                        <a href="#f-{@name}">
-                            <xsl:value-of select="@name"/>
-                        </a>
-                    </td>
-                    <td>
-                        <xsl:value-of select="$errorCount"/>
-                    </td>
-                </tr>
-            </xsl:for-each>
-        </table>
-    </xsl:template>
-
-
-    <xsl:template match="file">
-        <a name="f-{@name}"></a>
-        <h3>File
-            <xsl:value-of select="@name"/>
-        </h3>
-
-        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
-            <tr>
-                <th>Error Description</th>
-                <th>Line</th>
-            </tr>
-            <xsl:for-each select="key('files', @name)/error">
-                <xsl:sort data-type="number" order="ascending" select="@line"/>
-                <tr>
-                    <xsl:call-template name="alternated-row"/>
-                    <td>
-                        <xsl:value-of select="@message"/>
-                    </td>
-                    <td>
-                        <xsl:value-of select="@line"/>
-                    </td>
-                </tr>
-            </xsl:for-each>
-        </table>
-        <a href="#top">Back to top</a>
-    </xsl:template>
-
-
-    <xsl:template match="checkstyle" mode="summary">
-        <h3>Summary</h3>
-        <xsl:variable name="fileCount"
-                      select="count(file[@name and generate-id(.) = generate-id(key('files', @name))])"/>
-        <xsl:variable name="errorCount" select="count(file/error)"/>
-        <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
-            <tr>
-                <th>Files</th>
-                <th>Errors</th>
-            </tr>
-            <tr>
-                <xsl:call-template name="alternated-row"/>
-                <td>
-                    <xsl:value-of select="$fileCount"/>
-                </td>
-                <td>
-                    <xsl:value-of select="$errorCount"/>
-                </td>
-            </tr>
-        </table>
-    </xsl:template>
-
-    <xsl:template name="alternated-row">
-        <xsl:attribute name="class">
-            <xsl:if test="position() mod 2 = 1">a</xsl:if>
-            <xsl:if test="position() mod 2 = 0">b</xsl:if>
-        </xsl:attribute>
-    </xsl:template>
-</xsl:stylesheet>
-
-

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle.xml
----------------------------------------------------------------------
diff --git a/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle.xml b/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle.xml
deleted file mode 100644
index 37e01b4..0000000
--- a/falcon-regression/checkstyle/src/main/resources/falcon/checkstyle.xml
+++ /dev/null
@@ -1,235 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-
-<!DOCTYPE module PUBLIC
-        "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
-        "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
-
-<!--
-
-  Checkstyle configuration for Falcon that is based on the sun_checks.xml file
-  that is bundled with Checkstyle and includes checks for:
-
-    - the Java Language Specification at
-      http://java.sun.com/docs/books/jls/second_edition/html/index.html
-
-    - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
-
-    - the Javadoc guidelines at
-      http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
-
-    - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
-
-    - some best practices
-
-  Checkstyle is very configurable. Be sure to read the documentation at
-  http://checkstyle.sf.net (or in your downloaded distribution).
-
-  Most Checks are configurable, be sure to consult the documentation.
-
-  To completely disable a check, just comment it out or delete it from the file.
-
-  Finally, it is worth reading the documentation.
-
--->
-
-<module name="Checker">
-
-    <!-- Checks that a package.html file exists for each package.     -->
-    <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
-    <!-- module name="PackageHtml"/ -->
-
-    <!-- Checks whether files end with a new line.                        -->
-    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
-    <module name="NewlineAtEndOfFile"/>
-
-    <!-- Checks for Headers                                -->
-    <!-- See http://checkstyle.sf.net/config_header.html   -->
-    <module name="Header">
-        <property name="headerFile" value="${checkstyle.header.file}"/>
-    </module>
-
-    <module name="FileLength"/>
-    <module name="FileTabCharacter"/>
-
-    <module name="TreeWalker">
-        <!-- Checks for Javadoc comments.                     -->
-        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
-        <module name="JavadocType">
-            <property name="scope" value="public"/>
-            <property name="allowMissingParamTags" value="true"/>
-        </module>
-        <module name="JavadocStyle"/>
-
-        <module name="SuperClone"/>
-        <module name="SuperFinalize"/>
-
-        <!-- Checks for Naming Conventions.                  -->
-        <!-- See http://checkstyle.sf.net/config_naming.html -->
-        <module name="ConstantName"/>
-        <module name="ClassTypeParameterName">
-            <property name="format" value="^[A-Z]+$"/>
-        </module>
-        <module name="LocalFinalVariableName">
-            <!--<property name="format" value="^[A-Z][_A-Z0-9]*$"/>-->
-        </module>
-        <module name="LocalVariableName"/>
-        <module name="MemberName"/>
-        <module name="MethodName"/>
-        <module name="MethodTypeParameterName">
-            <property name="format" value="^[A-Z]+$"/>
-        </module>
-        <module name="PackageName"/>
-        <module name="ParameterName"/>
-        <module name="StaticVariableName"/>
-        <module name="TypeName"/>
-
-        <!-- Checks for imports                              -->
-        <!-- See http://checkstyle.sf.net/config_import.html -->
-        <module name="IllegalImport"/>
-        <!-- defaults to sun.* packages -->
-        <module name="RedundantImport"/>
-        <module name="UnusedImports"/>
-
-
-        <!-- Checks for Size Violations.                    -->
-        <!-- See http://checkstyle.sf.net/config_sizes.html -->
-        <module name="LineLength">
-            <property name="max" value="120"/>
-        </module>
-        <module name="MethodLength"/>
-        <module name="ParameterNumber"/>
-        <module name="OuterTypeNumber"/>
-
-        <!-- Checks for whitespace                               -->
-        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
-        <module name="GenericWhitespace"/>
-        <module name="EmptyForIteratorPad"/>
-        <module name="MethodParamPad"/>
-        <module name="WhitespaceAround">
-            <property name="tokens" value="LITERAL_IF"/>
-        </module>
-        <module name="NoWhitespaceAfter">
-            <property name="tokens"
-                      value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
-        </module>
-        <module name="NoWhitespaceBefore"/>
-        <module name="OperatorWrap"/>
-        <module name="ParenPad"/>
-        <module name="TypecastParenPad"/>
-        <module name="WhitespaceAfter">
-            <property name="tokens" value="COMMA, SEMI"/>
-        </module>
-
-        <module name="Regexp">
-            <property name="format" value="[ \t]+$"/>
-            <property name="illegalPattern" value="true"/>
-            <property name="message" value="Trailing whitespace"/>
-        </module>
-
-        <!-- Modifier Checks                                    -->
-        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
-        <module name="ModifierOrder"/>
-        <module name="RedundantModifier"/>
-
-
-        <!-- Checks for blocks. You know, those {}'s         -->
-        <!-- See http://checkstyle.sf.net/config_blocks.html -->
-        <module name="AvoidNestedBlocks"/>
-        <module name="EmptyBlock">
-            <!-- catch blocks need a statement or a comment. -->
-            <property name="option" value="text"/>
-            <property name="tokens" value="LITERAL_CATCH"/>
-        </module>
-        <module name="EmptyBlock">
-            <!-- all other blocks need a real statement. -->
-            <property name="option" value="stmt"/>
-            <property name="tokens" value="LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY,
-          LITERAL_IF, LITERAL_FOR, LITERAL_TRY, LITERAL_WHILE, INSTANCE_INIT,
-          STATIC_INIT"/>
-        </module>
-        <module name="LeftCurly"/>
-        <module name="NeedBraces"/>
-        <module name="RightCurly"/>
-
-
-        <!-- Checks for common coding problems               -->
-        <!-- See http://checkstyle.sf.net/config_coding.html -->
-        <!-- module name="AvoidInlineConditionals"/-->
-        <module name="EmptyStatement"/>
-        <module name="EqualsHashCode"/>
-        <module name="StringLiteralEquality"/>
-        <module name="HiddenField">
-            <property name="ignoreConstructorParameter" value="true"/>
-            <property name="ignoreAbstractMethods" value="true"/>
-            <property name="ignoreSetter" value="true"/>
-        </module>
-        <module name="IllegalInstantiation"/>
-        <module name="InnerAssignment"/>
-        <module name="MissingSwitchDefault"/>
-        <module name="RedundantThrows"/>
-        <module name="SimplifyBooleanExpression"/>
-        <module name="SimplifyBooleanReturn"/>
-        <module name="DefaultComesLast"/>
-
-        <!-- Checks for class design                         -->
-        <!-- See http://checkstyle.sf.net/config_design.html -->
-        <module name="FinalClass"/>
-        <module name="HideUtilityClassConstructor"/>
-        <module name="InterfaceIsType"/>
-        <module name="VisibilityModifier">
-            <property name="protectedAllowed" value="true"/>
-        </module>
-        <module name="MissingOverride"/>
-
-
-        <!-- Miscellaneous other checks.                   -->
-        <!-- See http://checkstyle.sf.net/config_misc.html -->
-        <module name="ArrayTypeStyle"/>
-        <module name="ArrayTrailingComma"/>
-        <!--
-          This generates too many false-positives on wrapped 'throws' clauses
-          to be really useful. Disabled for now.
-
-          Falcon style is:
-          * Spaces, not tabs.
-          * Indent by four spaces.
-          * Indent by four spaces when wrapping a line.
-        -->
-        <module name="Indentation">
-            <property name="basicOffset" value="4"/>
-            <property name="caseIndent" value="0"/>
-        </module>
-        <module name="TodoComment"/>
-        <module name="UpperEll"/>
-
-        <module name="FileContentsHolder"/>
-    </module>
-
-    <!-- allow warnings to be suppressed -->
-    <module name="SuppressionCommentFilter">
-        <property name="offCommentFormat"
-                  value="SUSPEND CHECKSTYLE CHECK ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck|MethodName"/>
-        <property name="onCommentFormat"
-                  value="RESUME CHECKSTYLE CHECK ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck|MethodName"/>
-        <property name="checkFormat"
-                  value="ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck|MethodName"/>
-    </module>
-
-</module>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/checkstyle/src/main/resources/falcon/findbugs-exclude.xml
----------------------------------------------------------------------
diff --git a/falcon-regression/checkstyle/src/main/resources/falcon/findbugs-exclude.xml b/falcon-regression/checkstyle/src/main/resources/falcon/findbugs-exclude.xml
deleted file mode 100644
index 4de6b23..0000000
--- a/falcon-regression/checkstyle/src/main/resources/falcon/findbugs-exclude.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
- -->
-<FindBugsFilter>
-    <!-- These are generated by xjc compiler and hence excluded. -->
-    <Match>
-        <Or>
-            <Class name="~org.apache.falcon.entity.v0.feed.Validity"/>
-            <Class name="~org.apache.falcon.entity.v0.process.Validity"/>
-        </Or>
-    </Match>
-
-    <!--
-    Disable encoding as this might give an impression that Falcon code base is
-    "Internationalization" ready, but we haven't done anything consciously to guarantee that.
-    -->
-    <Match>
-        <Bug pattern="DM_DEFAULT_ENCODING"/>
-    </Match>
-</FindBugsFilter>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java
index e4ab0ee..7eab15c 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java
@@ -489,9 +489,8 @@ public abstract class IEntityManagerHelper {
             .createAndSendRequestProcessInstance(url, params, allColo, user);
     }
 
-    public InstancesSummaryResult getInstanceSummary(String entityName,
-                                                     String params
-    ) throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
+    public InstancesSummaryResult getInstanceSummary(String entityName, String params)
+        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
         String url = createUrl(this.hostname + URLS.INSTANCE_SUMMARY.getValue(), getEntityType(),
             entityName, "");
         return (InstancesSummaryResult) InstanceUtil

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Edge.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Edge.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Edge.java
index a42416a..a230db0 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Edge.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Edge.java
@@ -24,7 +24,7 @@ import com.google.gson.annotations.SerializedName;
 public class Edge extends GraphEntity {
 
     /** Class for representing different labels of edge. */
-    public static enum LEBEL_TYPE {
+    public static enum LabelType {
         @SerializedName("stored-in")STORED_IN,
         @SerializedName("runs-on")RUNS_ON,
         @SerializedName("input")INPUT,
@@ -62,7 +62,7 @@ public class Edge extends GraphEntity {
     private int inV;
 
     @SerializedName("_label")
-    private LEBEL_TYPE label;
+    private LabelType label;
 
     public String getId() {
         return id;
@@ -76,17 +76,17 @@ public class Edge extends GraphEntity {
         return inV;
     }
 
-    public LEBEL_TYPE getLabel() {
+    public LabelType getLabel() {
         return label;
     }
 
     @Override
     public String toString() {
         return "Edge{"
-                + "_id='" + id + '\''
-                + ", _outV=" + outV
-                + ", _inV=" + inV
-                + ", _label=" + label
+                + "id='" + id + '\''
+                + ", outV=" + outV
+                + ", inV=" + inV
+                + ", label=" + label
                 + '}';
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgesResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgesResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgesResult.java
index 357e340..7bce1e4 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgesResult.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgesResult.java
@@ -34,11 +34,11 @@ public class EdgesResult extends GraphResult {
         return String.format("EdgesResult{totalSize=%d, results=%s}", totalSize, results);
     }
 
-    public List<Edge> filterByType(Edge.LEBEL_TYPE edgeLabel) {
+    public List<Edge> filterByType(Edge.LabelType edgeLabel) {
         return filterEdgesByType(results, edgeLabel);
     }
 
-    public List<Edge> filterEdgesByType(List<Edge> edges, Edge.LEBEL_TYPE edgeLabel) {
+    public List<Edge> filterEdgesByType(List<Edge> edges, Edge.LabelType edgeLabel) {
         final List<Edge> result = new ArrayList<Edge>();
         for (Edge edge : edges) {
             if (edge.getLabel() == edgeLabel) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Vertex.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Vertex.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Vertex.java
index 5bbe72f..c947dac 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Vertex.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Vertex.java
@@ -96,8 +96,8 @@ public class Vertex extends GraphEntity {
     @Override
     public String toString() {
         return "Vertex{"
-                + "_id=" + id
-                + ", _type=" + nodeType
+                + "id=" + id
+                + ", nodeType=" + nodeType
                 + ", name='" + name + '\''
                 + ", type=" + type
                 + ", timestamp='" + timestamp + '\''

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java
index 32f50dc..5a8d0a0 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java
@@ -46,10 +46,12 @@ public class HadoopFileEditor {
         files = new ArrayList<String>();
     }
 
-    /*
-    method to edit a file present on HDFS. Path is the location on HDFS,
-    2nd param is the first instance of string after u want ur tesxt to be
-    inserted, 3rd param is the text u want to insert
+    /**
+     * Method to edit a file present on HDFS. Path is the location on HDFS,
+     * @param path path of the file to be edited
+     * @param putAfterString first instance of string after which the text is to be
+     * @param toBeInserted the text to be inserted
+     * @throws IOException
      */
     public void edit(String path, String putAfterString, String toBeInserted) throws IOException {
         paths.add(path);
@@ -65,20 +67,20 @@ public class HadoopFileEditor {
         if (fs.exists(file)) {
             fs.copyToLocalFile(file, new Path(currentFile));
             FileUtils.copyFile(new File(currentFile), new File(currentFile + ".bck"));
-            BufferedWriter bufwriter = new BufferedWriter(new FileWriter("tmp"));
+            BufferedWriter bufWriter = new BufferedWriter(new FileWriter("tmp"));
             BufferedReader br = new BufferedReader(new FileReader(currentFile));
             String line;
             boolean isInserted = false;
             while ((line = br.readLine()) != null) {
-                bufwriter.write(line);
-                bufwriter.write('\n');
+                bufWriter.write(line);
+                bufWriter.write('\n');
                 if (line.contains(putAfterString) && !isInserted) {
-                    bufwriter.write(toBeInserted);
+                    bufWriter.write(toBeInserted);
                     isInserted = true;
                 }
             }
             br.close();
-            bufwriter.close();
+            bufWriter.close();
             FileUtils.deleteQuietly(new File(currentFile));
             FileUtils.copyFile(new File("tmp"), new File(currentFile));
             FileUtils.deleteQuietly(new File("tmp"));
@@ -94,8 +96,9 @@ public class HadoopFileEditor {
         }
     }
 
-    /*
-    puts back the original file to HDFS that was editied by edit function
+    /**
+     * Restore back the original file to HDFS that was edited by edit function.
+     * @throws IOException
      */
     public void restore() throws IOException {
         for (int i = 0; i < paths.size(); i++) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/GraphAssert.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/GraphAssert.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/GraphAssert.java
index b87dd4e..499cab9 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/GraphAssert.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/GraphAssert.java
@@ -155,7 +155,7 @@ public final class GraphAssert {
      * @param minOccurrence required number of edges
      */
     public static void assertEdgePresenceMinOccur(final EdgesResult edgesResult,
-                                                  final Edge.LEBEL_TYPE edgeLabel,
+                                                  final Edge.LabelType edgeLabel,
                                                   final int minOccurrence) {
         int occurrence = 0;
         for(Edge edge : edgesResult.getResults()) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
index ede5cee..fcef570 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
@@ -24,19 +24,10 @@ import com.google.gson.JsonDeserializer;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonSyntaxException;
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.entity.v0.Frequency;
 import org.apache.falcon.entity.v0.feed.ACL;
-import org.apache.falcon.entity.v0.feed.CatalogTable;
-import org.apache.falcon.entity.v0.feed.Cluster;
-import org.apache.falcon.entity.v0.feed.ClusterType;
-import org.apache.falcon.entity.v0.feed.Location;
-import org.apache.falcon.entity.v0.feed.LocationType;
-import org.apache.falcon.entity.v0.feed.Locations;
-import org.apache.falcon.entity.v0.feed.Retention;
-import org.apache.falcon.entity.v0.feed.Validity;
 import org.apache.falcon.entity.v0.process.Input;
 import org.apache.falcon.regression.Entities.FeedMerlin;
 import org.apache.falcon.regression.Entities.ProcessMerlin;
@@ -90,8 +81,7 @@ public final class InstanceUtil {
     private static final EnumSet<Status> RUNNING_PREP_SUCCEEDED = EnumSet.of(Status.RUNNING,
         Status.PREP, Status.SUCCEEDED);
 
-    public static APIResult sendRequestProcessInstance(String
-            url, String user)
+    public static APIResult sendRequestProcessInstance(String url, String user)
         throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
         return hitUrl(url, Util.getMethodType(url), user);
     }
@@ -594,96 +584,6 @@ public final class InstanceUtil {
     }
 
     /**
-     * Sets one more cluster to feed.
-     *
-     * @param feed          feed which is to be modified
-     * @param feedValidity  validity of the feed on the cluster
-     * @param feedRetention set retention of the feed on the cluster
-     * @param clusterName   cluster name, if null would erase all the cluster details from the feed
-     * @param clusterType   cluster type
-     * @param partition     - partition where data is available for feed
-     * @param locations     - location where data is picked
-     * @return - string representation of the modified feed
-     */
-    public static String setFeedCluster(String feed, Validity feedValidity, Retention feedRetention,
-            String clusterName,
-            ClusterType clusterType, String partition,
-            String... locations) {
-        Cluster feedCluster = createFeedCluster(feedValidity, feedRetention, clusterName,
-                clusterType, partition, null, locations);
-        return setFeedCluster(feed, clusterName, feedCluster);
-    }
-
-    public static String setFeedClusterWithTable(String feed, Validity feedValidity,
-                                                 Retention feedRetention, String clusterName,
-                                                 ClusterType clusterType, String partition,
-                                                 String tableUri) {
-        Cluster feedCluster = createFeedCluster(feedValidity, feedRetention, clusterName,
-                    clusterType, partition, tableUri, null);
-        return setFeedCluster(feed, clusterName, feedCluster);
-    }
-
-    private static String setFeedCluster(String feed, String clusterName, Cluster feedCluster) {
-        FeedMerlin f = new FeedMerlin(feed);
-        if (clusterName == null) {
-            f.getClusters().getClusters().clear();
-        } else {
-            f.getClusters().getClusters().add(feedCluster);
-        }
-        return f.toString();
-    }
-
-    private static CatalogTable getCatalogTable(String tableUri) {
-        CatalogTable catalogTable = new CatalogTable();
-        catalogTable.setUri(tableUri);
-        return catalogTable;
-    }
-
-    private static Cluster createFeedCluster(
-            Validity feedValidity, Retention feedRetention, String clusterName, ClusterType clusterType,
-            String partition, String tableUri, String[] locations) {
-        if (clusterName == null) {
-            return null;
-        }
-        Cluster cluster = new Cluster();
-        cluster.setName(clusterName);
-        cluster.setRetention(feedRetention);
-        if (clusterType != null) {
-            cluster.setType(clusterType);
-        }
-        cluster.setValidity(feedValidity);
-        if (partition != null) {
-            cluster.setPartition(partition);
-        }
-
-        // if table uri is not empty or null then set it.
-        if (StringUtils.isNotEmpty(tableUri)) {
-            cluster.setTable(getCatalogTable(tableUri));
-        }
-        Locations feedLocations = new Locations();
-        if (ArrayUtils.isNotEmpty(locations)) {
-            for (int i = 0; i < locations.length; i++) {
-                Location oneLocation = new Location();
-                oneLocation.setPath(locations[i]);
-                if (i == 0) {
-                    oneLocation.setType(LocationType.DATA);
-                } else if (i == 1) {
-                    oneLocation.setType(LocationType.STATS);
-                } else if (i == 2) {
-                    oneLocation.setType(LocationType.META);
-                } else if (i == 3) {
-                    oneLocation.setType(LocationType.TMP);
-                } else {
-                    Assert.fail("unexpected value of locations: " + Arrays.toString(locations));
-                }
-                feedLocations.getLocations().add(oneLocation);
-            }
-            cluster.setLocations(feedLocations);
-        }
-        return cluster;
-    }
-
-    /**
      * Retrieves replication coordinatorID from bundle of coordinators.
      */
     public static List<String> getReplicationCoordID(String bundlID,
@@ -731,30 +631,6 @@ public final class InstanceUtil {
     }
 
     /**
-     * Sets one more cluster to process definition.
-     *
-     * @param process     - process definition string representation
-     * @param clusterName - name of cluster
-     * @param validity    - cluster validity
-     * @return - string representation of modified process
-     */
-    public static String setProcessCluster(String process, String clusterName,
-            org.apache.falcon.entity.v0.process.Validity validity) {
-        org.apache.falcon.entity.v0.process.Cluster c =
-                new org.apache.falcon.entity.v0.process.Cluster();
-        c.setName(clusterName);
-        c.setValidity(validity);
-        ProcessMerlin p = new ProcessMerlin(process);
-
-        if (clusterName == null) {
-            p.getClusters().getClusters().set(0, null);
-        } else {
-            p.getClusters().getClusters().add(c);
-        }
-        return p.toString();
-    }
-
-    /**
      * Adds one input into process.
      *
      * @param process - where input should be inserted

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java
index b061700..95919ee 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/OozieUtil.java
@@ -256,9 +256,11 @@ public final class OozieUtil {
 
             for (CoordinatorJob coord : bundleJob.getCoordinators()) {
                 LOGGER.info("Appname is : " + coord.getAppName());
-                if ((coord.getAppName().contains("DEFAULT") && coord.getAppName().contains("PROCESS"))
-                        || (coord.getAppName().contains("REPLICATION") && coord.getAppName()
-                            .contains("FEED"))) {
+                if ((coord.getAppName().contains("DEFAULT")
+                        && coord.getAppName().contains("PROCESS"))
+                    ||
+                    (coord.getAppName().contains("REPLICATION")
+                        && coord.getAppName().contains("FEED"))) {
                     jobInfo = oozieClient.getCoordJobInfo(coord.getId());
                 } else {
                     LOGGER.info("Desired coord does not exists on " + oozieClient.getOozieUrl());

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/XmlUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/XmlUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/XmlUtil.java
index f0ea328..1041910 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/XmlUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/XmlUtil.java
@@ -18,10 +18,6 @@
 
 package org.apache.falcon.regression.core.util;
 
-import org.apache.falcon.entity.v0.Frequency;
-import org.apache.falcon.entity.v0.feed.ActionType;
-import org.apache.falcon.entity.v0.feed.Retention;
-import org.apache.falcon.entity.v0.feed.Validity;
 import org.custommonkey.xmlunit.Diff;
 import org.custommonkey.xmlunit.XMLUnit;
 import org.apache.log4j.Logger;
@@ -39,32 +35,6 @@ public final class XmlUtil {
     }
     private static final Logger LOGGER = Logger.getLogger(XmlUtil.class);
 
-    public static Validity createValidity(String start, String end) {
-        Validity v = new Validity();
-        v.setStart(TimeUtil.oozieDateToDate(start).toDate());
-        v.setEnd(TimeUtil.oozieDateToDate(end).toDate());
-        return v;
-    }
-
-    public static Retention createRetention(String limit, ActionType action) {
-        Retention r = new Retention();
-        r.setLimit(new Frequency(limit));
-        r.setAction(action);
-        return r;
-    }
-
-    public static org.apache.falcon.entity.v0.process.Validity
-    createProcessValidity(
-        String startTime, String endTime) {
-        org.apache.falcon.entity.v0.process.Validity v =
-            new org.apache.falcon.entity.v0.process.Validity();
-        LOGGER.info("instanceUtil.oozieDateToDate(endTime).toDate(): "
-            + TimeUtil.oozieDateToDate(endTime).toDate());
-        v.setEnd(TimeUtil.oozieDateToDate(endTime).toDate());
-        v.setStart(TimeUtil.oozieDateToDate(startTime).toDate());
-        return v;
-    }
-
     public static boolean isIdentical(String expected, String actual)
         throws IOException, SAXException {
         XMLUnit.setIgnoreWhitespace(true);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ExternalFSTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ExternalFSTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ExternalFSTest.java
index 4359b16..0cd3284 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ExternalFSTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ExternalFSTest.java
@@ -23,6 +23,7 @@ import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.entity.v0.cluster.Interfacetype;
 import org.apache.falcon.entity.v0.feed.ActionType;
 import org.apache.falcon.entity.v0.feed.ClusterType;
+import org.apache.falcon.regression.Entities.FeedMerlin;
 import org.apache.falcon.regression.core.bundle.Bundle;
 import org.apache.falcon.regression.core.enumsAndConstants.MerlinConstants;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
@@ -34,7 +35,6 @@ import org.apache.falcon.regression.core.util.MatrixUtil;
 import org.apache.falcon.regression.core.util.OSUtil;
 import org.apache.falcon.regression.core.util.TimeUtil;
 import org.apache.falcon.regression.core.util.Util;
-import org.apache.falcon.regression.core.util.XmlUtil;
 import org.apache.falcon.regression.testHelper.BaseTestClass;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.ContentSummary;
@@ -148,22 +148,22 @@ public class ExternalFSTest extends BaseTestClass{
         String targetDataLocation = endpoint + testWasbTargetDir + datePattern;
         feed = InstanceUtil.setFeedFilePath(feed, sourcePath + '/' + datePattern);
         //erase all clusters from feed definition
-        feed = InstanceUtil.setFeedCluster(feed,
-            XmlUtil.createValidity("2012-10-01T12:00Z", "2010-01-01T00:00Z"),
-            XmlUtil.createRetention("days(1000000)", ActionType.DELETE), null,
-            ClusterType.SOURCE, null);
+        feed = FeedMerlin.fromString(feed).clearFeedClusters().toString();
         //set local cluster as source
-        feed = InstanceUtil.setFeedCluster(feed,
-            XmlUtil.createValidity(startTime, endTime),
-            XmlUtil.createRetention("days(1000000)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)),
-            ClusterType.SOURCE, null);
+        feed = FeedMerlin.fromString(feed).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("days(1000000)", ActionType.DELETE)
+                .withValidity(startTime, endTime)
+                .withClusterType(ClusterType.SOURCE)
+                .build()).toString();
         //set externalFS cluster as target
-        feed = InstanceUtil.setFeedCluster(feed,
-            XmlUtil.createValidity(startTime, endTime),
-            XmlUtil.createRetention("days(1000000)", ActionType.DELETE),
-            Util.readEntityName(bundles[1].getClusters().get(0)),
-            ClusterType.TARGET, null, targetDataLocation);
+        feed = FeedMerlin.fromString(feed).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("days(1000000)", ActionType.DELETE)
+                .withValidity(startTime, endTime)
+                .withClusterType(ClusterType.TARGET)
+                .withDataLocation(targetDataLocation)
+                .build()).toString();
 
         //submit and schedule feed
         LOGGER.info("Feed : " + Util.prettyPrintXml(feed));

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4f2b524d/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java
index c2ae1f9..97048b8 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java
@@ -18,6 +18,7 @@
 
 package org.apache.falcon.regression;
 
+import org.apache.falcon.regression.Entities.FeedMerlin;
 import org.apache.falcon.regression.core.bundle.Bundle;
 import org.apache.falcon.entity.v0.feed.ActionType;
 import org.apache.falcon.entity.v0.feed.ClusterType;
@@ -97,10 +98,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         }
         BundleUtil.submitAllClusters(prism, bundles[0], bundles[1], bundles[2]);
         feed = bundles[0].getDataSets().get(0);
-        feed = InstanceUtil.setFeedCluster(feed,
-            XmlUtil.createValidity("2009-02-01T00:00Z", "2012-01-01T00:00Z"),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE), null,
-            ClusterType.SOURCE, null);
+        feed = FeedMerlin.fromString(feed).clearFeedClusters().toString();
         startTime = TimeUtil.getTimeWrtSystemTime(-50);
     }
 
@@ -112,16 +110,23 @@ public class FeedClusterUpdateTest extends BaseTestClass {
     @Test(enabled = false, groups = {"multiCluster"})
     public void addSourceCluster() throws Exception {
         //add one source and one target , schedule only on source
-        feedOriginalSubmit = InstanceUtil.setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                TimeUtil.addMinsToTime(startTime, 65)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-            null);
-        feedOriginalSubmit = InstanceUtil.setFeedCluster(feedOriginalSubmit,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 20),
-                TimeUtil.addMinsToTime(startTime, 85)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)), ClusterType.TARGET, null);
+        feedOriginalSubmit = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime,
+                    TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .build())
+            .toString();
+        feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 20),
+                    TimeUtil.addMinsToTime(startTime, 85))
+                .withClusterType(ClusterType.TARGET)
+                .build())
+            .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
 
@@ -158,23 +163,32 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 "RETENTION"), 0);
 
         //prepare updated Feed
-        feedUpdated = InstanceUtil.setFeedCluster(
-            feed, XmlUtil.createValidity(startTime,
-                TimeUtil.addMinsToTime(startTime, 65)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-            "US/${cluster.colo}");
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 20),
-                TimeUtil.addMinsToTime(startTime, 85)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)), ClusterType.TARGET, null);
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 40),
-                TimeUtil.addMinsToTime(startTime, 110)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[2].getClusters().get(0)), ClusterType.SOURCE,
-            "UK/${cluster.colo}");
+        feedUpdated = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime,
+                    TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 20),
+                    TimeUtil.addMinsToTime(startTime, 85))
+                .withClusterType(ClusterType.TARGET)
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 40),
+                    TimeUtil.addMinsToTime(startTime, 110))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("UK/${cluster.colo}")
+                .build())
+            .toString();
 
         response = prism.getFeedHelper().update(feedUpdated, feedUpdated);
         TimeUtil.sleepSeconds(20);
@@ -204,18 +218,24 @@ public class FeedClusterUpdateTest extends BaseTestClass {
     @Test(enabled = false, groups = {"multiCluster"})
     public void addTargetCluster() throws Exception {
         //add one source and one target , schedule only on source
-        feedOriginalSubmit = InstanceUtil
-            .setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-                null);
-        feedOriginalSubmit = InstanceUtil.setFeedCluster(feedOriginalSubmit,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 40),
-                TimeUtil.addMinsToTime(startTime, 110)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[2].getClusters().get(0)), ClusterType.SOURCE,
-            "UK/${cluster.colo}");
+        feedOriginalSubmit = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime,
+                    TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .build())
+            .toString();
+        feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 40),
+                    TimeUtil.addMinsToTime(startTime, 110))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("UK/${cluster.colo}")
+                .build())
+            .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
 
@@ -254,23 +274,33 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             0);
 
         //prepare updated Feed
-        feedUpdated = InstanceUtil
-            .setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-                "US/${cluster.colo}");
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 20),
-                TimeUtil.addMinsToTime(startTime, 85)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)), ClusterType.TARGET, null);
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 40),
-                TimeUtil.addMinsToTime(startTime, 110)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[2].getClusters().get(0)), ClusterType.SOURCE,
-            "UK/${cluster.colo}");
+        feedUpdated = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime,
+                    TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("US/${cluster.colo}")
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 20),
+                    TimeUtil.addMinsToTime(startTime, 85))
+                .withClusterType(ClusterType.TARGET)
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 40),
+                    TimeUtil.addMinsToTime(startTime, 110))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("UK/${cluster.colo}")
+                .build())
+            .toString();
 
         LOGGER.info("Updated Feed: " + Util.prettyPrintXml(feedUpdated));
 
@@ -303,12 +333,15 @@ public class FeedClusterUpdateTest extends BaseTestClass {
     @Test(enabled = false, groups = {"multiCluster"})
     public void add2SourceCluster() throws Exception {
         //add one source and one target , schedule only on source
-        feedOriginalSubmit = InstanceUtil
-            .setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-                null);
+        feedOriginalSubmit = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime,
+                    TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .build())
+            .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
 
@@ -347,23 +380,33 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             0);
 
         //prepare updated Feed
-        feedUpdated = InstanceUtil
-            .setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-                "US/${cluster.colo}");
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 20),
-                TimeUtil.addMinsToTime(startTime, 85)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)), ClusterType.SOURCE, null);
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 40),
-                TimeUtil.addMinsToTime(startTime, 110)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[2].getClusters().get(0)), ClusterType.SOURCE,
-            "UK/${cluster.colo}");
+        feedUpdated = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime,
+                    TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("US/${cluster.colo}")
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 20),
+                    TimeUtil.addMinsToTime(startTime, 85))
+                .withClusterType(ClusterType.SOURCE)
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 40),
+                    TimeUtil.addMinsToTime(startTime, 110))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("UK/${cluster.colo}")
+                .build())
+            .toString();
 
         LOGGER.info("Updated Feed: " + Util.prettyPrintXml(feedUpdated));
 
@@ -396,12 +439,14 @@ public class FeedClusterUpdateTest extends BaseTestClass {
     @Test(enabled = false, groups = {"multiCluster"})
     public void add2TargetCluster() throws Exception {
         //add one source and one target , schedule only on source
-        feedOriginalSubmit = InstanceUtil
-            .setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-                null);
+        feedOriginalSubmit = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .build())
+            .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
 
@@ -441,21 +486,30 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             0);
 
         //prepare updated Feed
-        feedUpdated = InstanceUtil.setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                TimeUtil.addMinsToTime(startTime, 65)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-            null);
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 20),
-                TimeUtil.addMinsToTime(startTime, 85)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)), ClusterType.TARGET, null);
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 40),
-                TimeUtil.addMinsToTime(startTime, 110)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[2].getClusters().get(0)), ClusterType.TARGET, null);
+        feedUpdated = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 20),
+                    TimeUtil.addMinsToTime(startTime, 85))
+                .withClusterType(ClusterType.TARGET)
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 40),
+                    TimeUtil.addMinsToTime(startTime, 110))
+                .withClusterType(ClusterType.TARGET)
+                .build())
+            .toString();
 
         LOGGER.info("Updated Feed: " + Util.prettyPrintXml(feedUpdated));
 
@@ -488,12 +542,15 @@ public class FeedClusterUpdateTest extends BaseTestClass {
     @Test(enabled = false, groups = {"multiCluster"})
     public void add1Source1TargetCluster() throws Exception {
         //add one source and one target , schedule only on source
-        feedOriginalSubmit = InstanceUtil
-            .setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-                null);
+        feedOriginalSubmit = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime,
+                    TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .build())
+            .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
 
@@ -532,23 +589,33 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 "RETENTION"), 0);
 
         //prepare updated Feed
-        feedUpdated = InstanceUtil
-            .setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-                "US/${cluster.colo}");
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 20),
-                TimeUtil.addMinsToTime(startTime, 85)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)), ClusterType.TARGET, null);
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 40),
-                TimeUtil.addMinsToTime(startTime, 110)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[2].getClusters().get(0)), ClusterType.SOURCE,
-            "UK/${cluster.colo}");
+        feedUpdated = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime,
+                    TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("US/${cluster.colo}")
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 20),
+                    TimeUtil.addMinsToTime(startTime, 85))
+                .withClusterType(ClusterType.TARGET)
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 40),
+                    TimeUtil.addMinsToTime(startTime, 110))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("UK/${cluster.colo}")
+                .build())
+            .toString();
 
         LOGGER.info("Updated Feed: " + Util.prettyPrintXml(feedUpdated));
 
@@ -581,23 +648,32 @@ public class FeedClusterUpdateTest extends BaseTestClass {
     @Test(enabled = false, groups = {"multiCluster"})
     public void deleteSourceCluster() throws Exception {
         //add one source and one target , schedule only on source
-        feedOriginalSubmit = InstanceUtil
-            .setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-                "US/${cluster.colo}");
-        feedOriginalSubmit = InstanceUtil.setFeedCluster(feedOriginalSubmit,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 20),
-                TimeUtil.addMinsToTime(startTime, 85)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)), ClusterType.TARGET, null);
-        feedOriginalSubmit = InstanceUtil.setFeedCluster(feedOriginalSubmit,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 40),
-                TimeUtil.addMinsToTime(startTime, 110)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[2].getClusters().get(0)), ClusterType.SOURCE,
-            "UK/${cluster.colo}");
+        feedOriginalSubmit = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("US/${cluster.colo}")
+                .build())
+            .toString();
+        feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 20),
+                    TimeUtil.addMinsToTime(startTime, 85))
+                .withClusterType(ClusterType.TARGET)
+                .build())
+            .toString();
+        feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 40),
+                    TimeUtil.addMinsToTime(startTime, 110))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("UK/${cluster.colo}")
+                .build())
+            .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
 
@@ -636,17 +712,23 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 "RETENTION"), 1);
 
         //prepare updated Feed
-        feedUpdated = InstanceUtil
-            .setFeedCluster(feed, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)), ClusterType.SOURCE,
-                null);
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 20),
-                TimeUtil.addMinsToTime(startTime, 85)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)), ClusterType.TARGET, null);
+        feedUpdated = FeedMerlin.fromString(feed)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime,
+                    TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .build())
+            .toString();
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 20),
+                    TimeUtil.addMinsToTime(startTime, 85))
+                .withClusterType(ClusterType.TARGET)
+                .build())
+            .toString();
 
         response = prism.getFeedHelper().update(feedUpdated, feedUpdated);
         TimeUtil.sleepSeconds(20);
@@ -701,31 +783,34 @@ public class FeedClusterUpdateTest extends BaseTestClass {
 
         //add two source and one target
 
-        feedOriginalSubmit = InstanceUtil.setFeedCluster(feed,
-            XmlUtil.createValidity("2012-10-01T12:00Z", "2010-01-01T00:00Z"),
-            XmlUtil.createRetention("days(1000000)", ActionType.DELETE), null,
-            ClusterType.SOURCE, null);
-
-        feedOriginalSubmit = InstanceUtil
-            .setFeedCluster(feedOriginalSubmit, XmlUtil.createValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65)),
-                XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-                Util.readEntityName(bundles[1].getClusters().get(0)),
-                ClusterType.SOURCE,
-                "US/${cluster.colo}");
-        feedOriginalSubmit = InstanceUtil.setFeedCluster(feedOriginalSubmit,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 20),
-                TimeUtil.addMinsToTime(startTime, 85)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[0].getClusters().get(0)),
-            ClusterType.TARGET, null);
-        feedOriginalSubmit = InstanceUtil.setFeedCluster(feedOriginalSubmit,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 40),
-                TimeUtil.addMinsToTime(startTime, 110)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[2].getClusters().get(0)),
-            ClusterType.SOURCE,
-            "UK/${cluster.colo}");
+        feedOriginalSubmit = FeedMerlin.fromString(feed).clearFeedClusters().toString();
+
+        feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit)
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
+                Util.readEntityName(bundles[1].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("US/${cluster.colo}")
+                .build())
+            .toString();
+        feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 20),
+                    TimeUtil.addMinsToTime(startTime, 85))
+                .withClusterType(ClusterType.TARGET)
+                .build())
+            .toString();
+        feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 40),
+                    TimeUtil.addMinsToTime(startTime, 110))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("UK/${cluster.colo}")
+                .build())
+            .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
 
@@ -765,18 +850,17 @@ public class FeedClusterUpdateTest extends BaseTestClass {
 
         //prepare updated Feed
 
-        feedUpdated = InstanceUtil.setFeedCluster(feed,
-            XmlUtil.createValidity("2012-10-01T12:00Z", "2010-01-01T00:00Z"),
-            XmlUtil.createRetention("days(1000000)", ActionType.DELETE), null,
-            ClusterType.SOURCE, null);
-
-        feedUpdated = InstanceUtil.setFeedCluster(feedUpdated,
-            XmlUtil.createValidity(TimeUtil.addMinsToTime(startTime, 40),
-                TimeUtil.addMinsToTime(startTime, 110)),
-            XmlUtil.createRetention("hours(10)", ActionType.DELETE),
-            Util.readEntityName(bundles[2].getClusters().get(0)),
-            ClusterType.SOURCE,
-            "UK/${cluster.colo}");
+        feedUpdated = FeedMerlin.fromString(feed).clearFeedClusters().toString();
+
+        feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
+            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+                .withRetention("hours(10)", ActionType.DELETE)
+                .withValidity(TimeUtil.addMinsToTime(startTime, 40),
+                    TimeUtil.addMinsToTime(startTime, 110))
+                .withClusterType(ClusterType.SOURCE)
+                .withPartition("UK/${cluster.colo}")
+                .build())
+            .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedUpdated));