falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srik...@apache.org
Subject [24/47] git commit: Further fixes to client module for checkstyle
Date Fri, 26 Apr 2013 15:50:40 GMT
Further fixes to client module for checkstyle


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

Branch: refs/heads/master
Commit: b1fcaacccdc2574704c0631c8ab625ec590c04f2
Parents: 74a1c65
Author: srikanth.sundarrajan <srikanth.sundarrajan@inmobi.com>
Authored: Wed Apr 17 14:48:52 2013 +0530
Committer: srikanth.sundarrajan <srikanth.sundarrajan@inmobi.com>
Committed: Wed Apr 17 14:48:52 2013 +0530

----------------------------------------------------------------------
 .../src/main/resources/falcon/checkstyle.xml       |    7 ++++++-
 client/src/main/java/org/apache/falcon/Pair.java   |    3 +++
 .../org/apache/falcon/client/FalconClient.java     |    9 +++++++--
 .../java/org/apache/falcon/entity/v0/Entity.java   |    3 +--
 .../org/apache/falcon/resource/EntityList.java     |    2 ++
 .../apache/falcon/resource/InstancesResult.java    |    2 ++
 .../falcon/workflow/OozieFeedWorkflowBuilder.java  |    2 +-
 .../workflow/OozieProcessWorkflowBuilder.java      |    2 +-
 webapp/src/main/java/org/apache/falcon/Debug.java  |    2 +-
 9 files changed, 24 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b1fcaacc/build-tools/src/main/resources/falcon/checkstyle.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/falcon/checkstyle.xml b/build-tools/src/main/resources/falcon/checkstyle.xml
index 9854d6c..641c5ff 100644
--- a/build-tools/src/main/resources/falcon/checkstyle.xml
+++ b/build-tools/src/main/resources/falcon/checkstyle.xml
@@ -222,5 +222,10 @@
     </module>
 
     <!-- allow warnings to be suppressed -->
-    <module name="SuppressionCommentFilter"/>
+    <module name="SuppressionCommentFilter">
+        <property name="offCommentFormat" value="SUSPEND CHECKSTYLE CHECK"/>
+        <property name="onCommentFormat" value="RESUME CHECKSTYLE CHECK"/>
+        <property name="checkFormat" value="ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck|EmptyBlockCheck"/>
+    </module>
+
 </module>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b1fcaacc/client/src/main/java/org/apache/falcon/Pair.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/Pair.java b/client/src/main/java/org/apache/falcon/Pair.java
index 4c60feb..e6b44e9 100644
--- a/client/src/main/java/org/apache/falcon/Pair.java
+++ b/client/src/main/java/org/apache/falcon/Pair.java
@@ -24,8 +24,11 @@ package org.apache.falcon;
  * @param <B> - Second element in pair
  */
 public class Pair<A, B> {
+
+    //SUSPEND CHECKSTYLE CHECK
     public final A first;
     public final B second;
+    //RESUME CHECKSTYLE CHECK
 
     public Pair(A fst, B snd) {
         this.first = fst;

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b1fcaacc/client/src/main/java/org/apache/falcon/client/FalconClient.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/client/FalconClient.java b/client/src/main/java/org/apache/falcon/client/FalconClient.java
index 44e9ccd..30c0ec6 100644
--- a/client/src/main/java/org/apache/falcon/client/FalconClient.java
+++ b/client/src/main/java/org/apache/falcon/client/FalconClient.java
@@ -308,6 +308,7 @@ public class FalconClient {
                 getServletInputStream(clusters, sourceClusters, null), null, colo);
     }
 
+    //SUSPEND CHECKSTYLE CHECK
     public String rerunInstances(String type, String entity, String start,
                                  String end, String filePath, String colo,
                                  String clusters, String sourceClusters)
@@ -326,6 +327,7 @@ public class FalconClient {
         return sendInstanceRequest(Instances.RERUN, type, entity, start, end,
                 getServletInputStream(clusters, sourceClusters, temp), null, colo);
     }
+    //RESUME CHECKSTYLE CHECK
 
     public String rerunInstances(String type, String entity, String start,
                                  String end, String colo, String clusters, String sourceClusters)
@@ -446,7 +448,7 @@ public class FalconClient {
     }
 
     private String sendListRequest(Entities entities, String entityType)
-            throws FalconCLIException {
+        throws FalconCLIException {
 
         ClientResponse clientResponse = service.path(entities.path)
                 .path(entityType).header(REMOTE_USER, USER)
@@ -501,6 +503,7 @@ public class FalconClient {
                 .method(instances.method, InstancesResult.class);
     }
 
+    //SUSPEND CHECKSTYLE CHECK
     private String sendInstanceRequest(Instances instances, String type,
                                        String entity, String start, String end, InputStream
props,
                                        String runid, String colo) throws FalconCLIException
{
@@ -538,6 +541,7 @@ public class FalconClient {
         }
 
     }
+    //RESUME CHECKSTYLE CHECK
 
     private String sendAdminRequest(AdminOperations job)
         throws FalconCLIException {
@@ -669,7 +673,8 @@ public class FalconClient {
     }
 
     private void checkIfSuccessfull(ClientResponse clientResponse)
-            throws FalconCLIException {
+        throws FalconCLIException {
+
         if (clientResponse.getStatus() == Response.Status.BAD_REQUEST
                 .getStatusCode()) {
             throw FalconCLIException.fromReponse(clientResponse);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b1fcaacc/client/src/main/java/org/apache/falcon/entity/v0/Entity.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/entity/v0/Entity.java b/client/src/main/java/org/apache/falcon/entity/v0/Entity.java
index 1929429..252e860 100644
--- a/client/src/main/java/org/apache/falcon/entity/v0/Entity.java
+++ b/client/src/main/java/org/apache/falcon/entity/v0/Entity.java
@@ -88,8 +88,7 @@ public abstract class Entity {
         return "(" + getEntityType().name().toLowerCase() + ") " + getName();
     }
 
-    @Override
-    public Entity clone() {
+    public Entity copy() {
         return fromString(getEntityType(), toString());
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b1fcaacc/client/src/main/java/org/apache/falcon/resource/EntityList.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/resource/EntityList.java b/client/src/main/java/org/apache/falcon/resource/EntityList.java
index 61110b2..933a737 100644
--- a/client/src/main/java/org/apache/falcon/resource/EntityList.java
+++ b/client/src/main/java/org/apache/falcon/resource/EntityList.java
@@ -39,10 +39,12 @@ public class EntityList {
      * Element within an entity.
      */
     public static class EntityElement {
+        //SUSPEND CHECKSTYLE CHECK
         @XmlElement
         public String type;
         @XmlElement
         public String name;
+        //RESUME CHECKSTYLE CHECK
 
         public EntityElement() {
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b1fcaacc/client/src/main/java/org/apache/falcon/resource/InstancesResult.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/resource/InstancesResult.java b/client/src/main/java/org/apache/falcon/resource/InstancesResult.java
index cc737a5..65a8b65 100644
--- a/client/src/main/java/org/apache/falcon/resource/InstancesResult.java
+++ b/client/src/main/java/org/apache/falcon/resource/InstancesResult.java
@@ -25,6 +25,7 @@ import java.util.Date;
 /**
  * Pojo for JAXB marshalling / unmarshalling.
  */
+//SUSPEND CHECKSTYLE CHECK
 @XmlRootElement
 public class InstancesResult extends APIResult {
 
@@ -198,3 +199,4 @@ public class InstancesResult extends APIResult {
         }
     }
 }
+//RESUME CHECKSTYLE CHECK

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b1fcaacc/feed/src/main/java/org/apache/falcon/workflow/OozieFeedWorkflowBuilder.java
----------------------------------------------------------------------
diff --git a/feed/src/main/java/org/apache/falcon/workflow/OozieFeedWorkflowBuilder.java b/feed/src/main/java/org/apache/falcon/workflow/OozieFeedWorkflowBuilder.java
index 02cb740..14f39e9 100644
--- a/feed/src/main/java/org/apache/falcon/workflow/OozieFeedWorkflowBuilder.java
+++ b/feed/src/main/java/org/apache/falcon/workflow/OozieFeedWorkflowBuilder.java
@@ -63,7 +63,7 @@ public class OozieFeedWorkflowBuilder extends OozieWorkflowBuilder<Feed>
{
 
         Cluster cluster = configStore.get(EntityType.CLUSTER, feedCluster.getName());
         Path bundlePath = new Path(ClusterHelper.getLocation(cluster, "staging"), EntityUtil.getStagingPath(feed));
-        Feed feedClone = (Feed) feed.clone();
+        Feed feedClone = (Feed) feed.copy();
         EntityUtil.setStartDate(feedClone, clusterName, startDate);
 
         AbstractOozieEntityMapper<Feed> mapper = new OozieFeedMapper(feedClone);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b1fcaacc/process/src/main/java/org/apache/falcon/workflow/OozieProcessWorkflowBuilder.java
----------------------------------------------------------------------
diff --git a/process/src/main/java/org/apache/falcon/workflow/OozieProcessWorkflowBuilder.java
b/process/src/main/java/org/apache/falcon/workflow/OozieProcessWorkflowBuilder.java
index d5d097a..76b5cb4 100644
--- a/process/src/main/java/org/apache/falcon/workflow/OozieProcessWorkflowBuilder.java
+++ b/process/src/main/java/org/apache/falcon/workflow/OozieProcessWorkflowBuilder.java
@@ -107,7 +107,7 @@ public class OozieProcessWorkflowBuilder extends OozieWorkflowBuilder<Process>
{
 
         Cluster cluster = configStore.get(EntityType.CLUSTER, processCluster.getName());
         Path bundlePath = new Path(ClusterHelper.getLocation(cluster, "staging"), EntityUtil.getStagingPath(process));
-        Process processClone = (Process) process.clone();
+        Process processClone = (Process) process.copy();
         EntityUtil.setStartDate(processClone, clusterName, startDate);
 
         OozieProcessMapper mapper = new OozieProcessMapper(processClone);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b1fcaacc/webapp/src/main/java/org/apache/falcon/Debug.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/falcon/Debug.java b/webapp/src/main/java/org/apache/falcon/Debug.java
index 73c99ed..70aaa40 100644
--- a/webapp/src/main/java/org/apache/falcon/Debug.java
+++ b/webapp/src/main/java/org/apache/falcon/Debug.java
@@ -71,7 +71,7 @@ public class Debug {
 
         entity = args[2];
         Entity obj = EntityUtil.getEntity(type, entity);
-        Process newEntity = (Process) obj.clone();
+        Process newEntity = (Process) obj.copy();
         newEntity.setFrequency(Frequency.fromString("minutes(5)"));
         System.out.println("##############OLD ENTITY " + EntityUtil.md5(obj));
         System.out.println("##############NEW ENTITY " + EntityUtil.md5(newEntity));


Mime
View raw message