You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by sr...@apache.org on 2013/04/26 17:51:02 UTC

[46/47] git commit: checkstyle related fixes for test-util module.

checkstyle related fixes for test-util module.


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

Branch: refs/heads/master
Commit: e9979317f2a7ecddd7079baf3f1a7cfa9b7d29f5
Parents: 4e39c7a
Author: venkatesh <ve...@hortonworks.com>
Authored: Tue Apr 23 13:27:55 2013 -0700
Committer: venkatesh <ve...@hortonworks.com>
Committed: Tue Apr 23 13:27:55 2013 -0700

----------------------------------------------------------------------
 .../falcon/cluster/util/EmbeddedCluster.java       |   16 ++++++--------
 .../falcon/cluster/util/StandAloneCluster.java     |    7 +++--
 2 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/e9979317/test-util/src/main/java/org/apache/falcon/cluster/util/EmbeddedCluster.java
----------------------------------------------------------------------
diff --git a/test-util/src/main/java/org/apache/falcon/cluster/util/EmbeddedCluster.java b/test-util/src/main/java/org/apache/falcon/cluster/util/EmbeddedCluster.java
index 41f2d95..22a3191 100644
--- a/test-util/src/main/java/org/apache/falcon/cluster/util/EmbeddedCluster.java
+++ b/test-util/src/main/java/org/apache/falcon/cluster/util/EmbeddedCluster.java
@@ -33,9 +33,12 @@ import java.io.File;
 import java.io.IOException;
 import java.security.PrivilegedExceptionAction;
 
+/**
+ * A utility class that doles out an embedded Hadoop cluster with DFS and/or MR.
+ */
 public class EmbeddedCluster {
 
-    private static Logger LOG = Logger.getLogger(EmbeddedCluster.class);
+    private static final Logger LOG = Logger.getLogger(EmbeddedCluster.class);
 
     protected EmbeddedCluster() {
     }
@@ -49,16 +52,13 @@ public class EmbeddedCluster {
         return conf;
     }
 
-    public static EmbeddedCluster newCluster(final String name, final boolean withMR)
-            throws Exception {
+    public static EmbeddedCluster newCluster(final String name, final boolean withMR) throws Exception {
         return createClusterAsUser(name, withMR);
     }
 
     public static EmbeddedCluster newCluster(final String name,
                                              final boolean withMR,
-                                             final String user)
-            throws Exception {
-
+                                             final String user) throws Exception {
         UserGroupInformation hdfsUser = UserGroupInformation.createRemoteUser(user);
         return hdfsUser.doAs(new PrivilegedExceptionAction<EmbeddedCluster>() {
             @Override
@@ -69,9 +69,7 @@ public class EmbeddedCluster {
     }
 
     private static EmbeddedCluster createClusterAsUser(String name,
-                                                       boolean withMR)
-            throws IOException {
-
+                                                       boolean withMR) throws IOException {
         EmbeddedCluster cluster = new EmbeddedCluster();
         File target = new File("webapp/target");
         if (!target.exists()) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/e9979317/test-util/src/main/java/org/apache/falcon/cluster/util/StandAloneCluster.java
----------------------------------------------------------------------
diff --git a/test-util/src/main/java/org/apache/falcon/cluster/util/StandAloneCluster.java b/test-util/src/main/java/org/apache/falcon/cluster/util/StandAloneCluster.java
index baf6347..6864651 100644
--- a/test-util/src/main/java/org/apache/falcon/cluster/util/StandAloneCluster.java
+++ b/test-util/src/main/java/org/apache/falcon/cluster/util/StandAloneCluster.java
@@ -26,8 +26,10 @@ import org.apache.log4j.Logger;
 
 import java.io.File;
 
-
-public class StandAloneCluster extends EmbeddedCluster {
+/**
+ * A standalone cluster.
+ */
+public final class StandAloneCluster extends EmbeddedCluster {
     private static final Logger LOG = Logger.getLogger(StandAloneCluster.class);
 
     private StandAloneCluster() {
@@ -50,6 +52,5 @@ public class StandAloneCluster extends EmbeddedCluster {
 
     @Override
     public void shutdown() {
-
     }
 }