You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ik...@apache.org on 2015/06/05 19:56:30 UTC

git commit: updated refs/heads/trunk to 27661ba

Repository: giraph
Updated Branches:
  refs/heads/trunk 905acc960 -> 27661ba3b


[GIRAPH-1011] Update checkstyle to newest version

Summary:
Checkstyle has updated/fixed/added bunch of checks.

For identation, style we are using is different from default, so
changes to Indentation rule are needed, to match current style.

New line after left curly brace wasn't used always, so I removed that check.

RedundantThrows check has been removed.

Test Plan:
mvn clean install -Phadoop_facebook

It is still complaining about:
[ERROR] src/main/resources/org/apache/giraph/versions.properties[1] (header) Header: Line does not match expected header line of '/*'.

should we remove non .java files from checking?

Reviewers: dionysis.logothetis, sergey.edunov, maja.kabiljo

Reviewed By: maja.kabiljo

Differential Revision: https://reviews.facebook.net/D39483


Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/27661ba3
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/27661ba3
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/27661ba3

Branch: refs/heads/trunk
Commit: 27661ba3b79d76d962126ba10b402db861e3813d
Parents: 905acc9
Author: Igor Kabiljo <ik...@fb.com>
Authored: Wed Jun 3 11:29:56 2015 -0700
Committer: Igor Kabiljo <ik...@fb.com>
Committed: Fri Jun 5 10:55:27 2015 -0700

----------------------------------------------------------------------
 checkstyle.xml                                  | 11 ++++---
 .../java/org/apache/giraph/GiraphRunner.java    |  6 ++--
 .../giraph/bsp/ImmutableOutputCommitter.java    |  8 ++++--
 .../apache/giraph/comm/netty/NettyClient.java   |  6 +++-
 .../apache/giraph/comm/netty/NettyServer.java   |  8 ++++--
 .../giraph/comm/netty/SaslNettyClient.java      |  6 ++--
 .../giraph/comm/netty/SaslNettyServer.java      |  6 ++--
 .../comm/netty/handler/ResponseEncoder.java     |  3 ++
 .../giraph/comm/requests/RequestType.java       |  6 ++--
 .../apache/giraph/graph/GraphTaskManager.java   | 30 ++++++++++----------
 .../io/internal/WrappedEdgeOutputFormat.java    |  4 +--
 .../io/internal/WrappedVertexOutputFormat.java  |  4 +--
 .../java/org/apache/giraph/job/HadoopUtils.java | 18 ++++++------
 .../apache/giraph/utils/ConfigurationUtils.java |  8 +++---
 .../utils/ExtendedByteArrayOutputBuffer.java    | 17 +++++------
 .../org/apache/giraph/utils/WritableUtils.java  |  6 ++--
 .../apache/giraph/worker/BspServiceWorker.java  | 10 +++----
 pom.xml                                         |  2 +-
 18 files changed, 85 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/checkstyle.xml
----------------------------------------------------------------------
diff --git a/checkstyle.xml b/checkstyle.xml
index 66fd1ad..e0e604c 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -41,6 +41,7 @@
     <!-- Verify that EVERY source file has the appropriate license -->
   <module name="Header">
     <property name="headerFile" value="${checkstyle.header.file}"/>
+    <property name="fileExtensions" value="java"/>	  
   </module>
 
   <!-- Checks for Javadoc comments (checker).           -->
@@ -66,7 +67,6 @@
       <!-- No empty blocks (i.e. catch) -->
     <module name="EmptyBlock"/>
     <module name="AvoidNestedBlocks"/>
-    <module name="LeftCurly"/>
       <!-- No if/else/do/for/while without braces -->
     <module name="NeedBraces"/>
     <module name="RightCurly"/>
@@ -104,10 +104,6 @@
       <!-- Switch statements should be complete and with independent cases -->
     <module name="FallThrough" />
     <module name="MissingSwitchDefault" />
-    <!-- For hadoop_yarn profile, some YARN exceptions aren't loading in checkstyle -->
-    <module name="RedundantThrows">
-        <property name="suppressLoadErrors" value="true" />
-    </module>
     <module name="SimplifyBooleanExpression"/>
     <module name="SimplifyBooleanReturn"/>
       <!-- Only one statment per line allowed -->
@@ -167,9 +163,12 @@
     <module name="ArrayTypeStyle"/>
       <!-- Indentation -->
     <module name="Indentation">
-      <property name="caseIndent" value="0"/>
       <property name="basicOffset" value="2"/>
       <property name="braceAdjustment" value="0"/>
+      <property name="caseIndent" value="0"/>
+      <property name="throwsIndent" value="2"/>
+      <property name="lineWrappingIndentation" value="0"/>
+      <property name="arrayInitIndent" value="2"/>     
     </module>
       <!-- Turn this on to see what needs to be done
     <module name="TodoComment"/>

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/GiraphRunner.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/GiraphRunner.java b/giraph-core/src/main/java/org/apache/giraph/GiraphRunner.java
index 9af50e1..dc9384c 100644
--- a/giraph-core/src/main/java/org/apache/giraph/GiraphRunner.java
+++ b/giraph-core/src/main/java/org/apache/giraph/GiraphRunner.java
@@ -79,12 +79,12 @@ public class GiraphRunner implements Tool {
     // set up job for various platforms
     final String vertexClassName = args[0];
     final String jobName = "Giraph: " + vertexClassName;
-    /*if[PURE_YARN]
+/*if[PURE_YARN]
     GiraphYarnClient job = new GiraphYarnClient(giraphConf, jobName);
-    else[PURE_YARN]*/
+else[PURE_YARN]*/
     GiraphJob job = new GiraphJob(giraphConf, jobName);
     prepareHadoopMRJob(job, cmd);
-    /*end[PURE_YARN]*/
+/*end[PURE_YARN]*/
 
     // run the job, collect results
     if (LOG.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/bsp/ImmutableOutputCommitter.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/bsp/ImmutableOutputCommitter.java b/giraph-core/src/main/java/org/apache/giraph/bsp/ImmutableOutputCommitter.java
index feb4041..bb79936 100644
--- a/giraph-core/src/main/java/org/apache/giraph/bsp/ImmutableOutputCommitter.java
+++ b/giraph-core/src/main/java/org/apache/giraph/bsp/ImmutableOutputCommitter.java
@@ -52,12 +52,14 @@ public class ImmutableOutputCommitter extends OutputCommitter {
   public void setupTask(TaskAttemptContext context) throws IOException {
   }
 
+/*if[HADOOP_NON_SECURE]
   @Override
-  /*if[HADOOP_NON_SECURE]
   public void cleanupJob(JobContext jobContext) throws IOException {
   }
-  else[HADOOP_NON_SECURE]*/
-  /*end[HADOOP_NON_SECURE]*/
+
+else[HADOOP_NON_SECURE]*/
+/*end[HADOOP_NON_SECURE]*/
+  @Override
   public void commitJob(JobContext jobContext) throws IOException {
   }
 }

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyClient.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyClient.java b/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyClient.java
index 40c6ab9..c85250d 100644
--- a/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyClient.java
+++ b/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyClient.java
@@ -52,7 +52,9 @@ import com.google.common.collect.MapMaker;
 import com.google.common.collect.Maps;
 import com.yammer.metrics.core.Counter;
 
+/*if_not[HADOOP_NON_SECURE]*/
 import java.io.IOException;
+/*end[HADOOP_NON_SECURE]*/
 import java.net.InetSocketAddress;
 import java.util.Collection;
 import java.util.Collections;
@@ -74,8 +76,10 @@ import io.netty.channel.nio.NioEventLoopGroup;
 import io.netty.channel.socket.SocketChannel;
 import io.netty.channel.socket.nio.NioSocketChannel;
 import io.netty.handler.codec.FixedLengthFrameDecoder;
+/*if_not[HADOOP_NON_SECURE]*/
 import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
 import io.netty.util.AttributeKey;
+/*end[HADOOP_NON_SECURE]*/
 import io.netty.util.concurrent.DefaultEventExecutorGroup;
 import io.netty.util.concurrent.EventExecutorGroup;
 
@@ -286,7 +290,7 @@ public class NettyClient implements ResetSuperstepMetricsObserver {
         .handler(new ChannelInitializer<SocketChannel>() {
           @Override
           protected void initChannel(SocketChannel ch) throws Exception {
-      /*if_not[HADOOP_NON_SECURE]*/
+/*if_not[HADOOP_NON_SECURE]*/
             if (conf.authenticate()) {
               LOG.info("Using Netty with authentication.");
 

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyServer.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyServer.java b/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyServer.java
index 454232a..d798a5e 100644
--- a/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyServer.java
+++ b/giraph-core/src/main/java/org/apache/giraph/comm/netty/NettyServer.java
@@ -23,8 +23,8 @@ import org.apache.giraph.comm.netty.handler.AuthorizeServerHandler;
 /*end[HADOOP_NON_SECURE]*/
 import org.apache.giraph.comm.netty.handler.RequestDecoder;
 import org.apache.giraph.comm.netty.handler.RequestServerHandler;
-import org.apache.giraph.comm.netty.handler.ResponseEncoder;
 /*if_not[HADOOP_NON_SECURE]*/
+import org.apache.giraph.comm.netty.handler.ResponseEncoder;
 import org.apache.giraph.comm.netty.handler.SaslServerHandler;
 /*end[HADOOP_NON_SECURE]*/
 import org.apache.giraph.comm.netty.handler.WorkerRequestReservedMap;
@@ -49,7 +49,9 @@ import io.netty.channel.ChannelInboundHandlerAdapter;
 import io.netty.channel.ChannelFuture;
 import io.netty.channel.socket.nio.NioServerSocketChannel;
 import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
+/*if_not[HADOOP_NON_SECURE]*/
 import io.netty.util.AttributeKey;
+/*end[HADOOP_NON_SECURE]*/
 import io.netty.util.concurrent.DefaultEventExecutorGroup;
 import io.netty.util.concurrent.EventExecutorGroup;
 import io.netty.util.concurrent.ImmediateEventExecutor;
@@ -140,9 +142,9 @@ public class NettyServer {
     this.conf = conf;
     this.progressable = progressable;
     this.requestServerHandlerFactory = requestServerHandlerFactory;
-    /*if_not[HADOOP_NON_SECURE]*/
+/*if_not[HADOOP_NON_SECURE]*/
     this.saslServerHandlerFactory = new SaslServerHandler.Factory();
-    /*end[HADOOP_NON_SECURE]*/
+/*end[HADOOP_NON_SECURE]*/
     this.myTaskInfo = myTaskInfo;
     this.exceptionHandler = exceptionHandler;
     sendBufferSize = GiraphConstants.SERVER_SEND_BUFFER_SIZE.get(conf);

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyClient.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyClient.java b/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyClient.java
index 431691a..00566ba 100644
--- a/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyClient.java
+++ b/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyClient.java
@@ -77,13 +77,13 @@ public class SaslNettyClient {
             AuthMethod.DIGEST.getMechanismName() +
             " client to authenticate to service at " + token.getService());
       }
-      /*if[STATIC_SASL_SYMBOL]
+/*if[STATIC_SASL_SYMBOL]
       saslClient =
           Sasl.createSaslClient(
               new String[] { AuthMethod.DIGEST.getMechanismName() }, null,
               null, SaslRpcServer.SASL_DEFAULT_REALM, SaslRpcServer.SASL_PROPS,
               new SaslClientCallbackHandler(token));
-      else[STATIC_SASL_SYMBOL]*/
+else[STATIC_SASL_SYMBOL]*/
       SaslPropertiesResolver saslPropsResolver =
           SaslPropertiesResolver.getInstance(new Configuration());
       saslClient =
@@ -92,7 +92,7 @@ public class SaslNettyClient {
               null, SaslRpcServer.SASL_DEFAULT_REALM,
               saslPropsResolver.getDefaultProperties(),
               new SaslClientCallbackHandler(token));
-      /*end[STATIC_SASL_SYMBOL]*/
+/*end[STATIC_SASL_SYMBOL]*/
     } catch (IOException e) {
       LOG.error("SaslNettyClient: Could not obtain job token for Netty " +
           "Client to use to authenticate with a Netty Server.");

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyServer.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyServer.java b/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyServer.java
index a1d410f..bff0a9b 100644
--- a/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyServer.java
+++ b/giraph-core/src/main/java/org/apache/giraph/comm/netty/SaslNettyServer.java
@@ -98,12 +98,12 @@ else[HADOOP_1_SECRET_MANAGER]*/
     try {
       SaslDigestCallbackHandler ch =
           new SaslNettyServer.SaslDigestCallbackHandler(secretManager);
-      /*if[STATIC_SASL_SYMBOL]
+/*if[STATIC_SASL_SYMBOL]
       saslServer =
           Sasl.createSaslServer(
               SaslNettyServer.AuthMethod.DIGEST.getMechanismName(), null,
               SaslRpcServer.SASL_DEFAULT_REALM, SaslRpcServer.SASL_PROPS, ch);
-      else[STATIC_SASL_SYMBOL]*/
+else[STATIC_SASL_SYMBOL]*/
       SaslPropertiesResolver saslPropsResolver =
           SaslPropertiesResolver.getInstance(new Configuration());
       saslServer =
@@ -111,7 +111,7 @@ else[HADOOP_1_SECRET_MANAGER]*/
               SaslNettyServer.AuthMethod.DIGEST.getMechanismName(), null,
               SaslRpcServer.SASL_DEFAULT_REALM,
               saslPropsResolver.getDefaultProperties(), ch);
-      /*end[STATIC_SASL_SYMBOL]*/
+/*end[STATIC_SASL_SYMBOL]*/
     } catch (SaslException e) {
       LOG.error("SaslNettyServer: Could not create SaslServer: " + e);
     }

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/comm/netty/handler/ResponseEncoder.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/comm/netty/handler/ResponseEncoder.java b/giraph-core/src/main/java/org/apache/giraph/comm/netty/handler/ResponseEncoder.java
index 4664fbe..90453cd 100644
--- a/giraph-core/src/main/java/org/apache/giraph/comm/netty/handler/ResponseEncoder.java
+++ b/giraph-core/src/main/java/org/apache/giraph/comm/netty/handler/ResponseEncoder.java
@@ -19,7 +19,10 @@
 package org.apache.giraph.comm.netty.handler;
 
 import io.netty.buffer.ByteBufOutputStream;
+/*if[HADOOP_NON_SECURE]
+else[HADOOP_NON_SECURE]*/
 import org.apache.giraph.comm.requests.RequestType;
+/*end[HADOOP_NON_SECURE]*/
 import org.apache.giraph.comm.requests.WritableRequest;
 import org.apache.log4j.Logger;
 import io.netty.buffer.ByteBuf;

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/comm/requests/RequestType.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/comm/requests/RequestType.java b/giraph-core/src/main/java/org/apache/giraph/comm/requests/RequestType.java
index 26eaa8c..343a2de 100644
--- a/giraph-core/src/main/java/org/apache/giraph/comm/requests/RequestType.java
+++ b/giraph-core/src/main/java/org/apache/giraph/comm/requests/RequestType.java
@@ -22,8 +22,8 @@ package org.apache.giraph.comm.requests;
  * Type of the request
  */
 public enum RequestType {
-  /*if[HADOOP_NON_SECURE]
-  else[HADOOP_NON_SECURE]*/
+/*if[HADOOP_NON_SECURE]
+else[HADOOP_NON_SECURE]*/
   /** Exchange authentication information between clients and servers */
   SASL_TOKEN_MESSAGE_REQUEST(SaslTokenMessageRequest.class),
   /**
@@ -31,7 +31,7 @@ public enum RequestType {
    * client, so client can modify its pipeline afterwards.
    */
   SASL_COMPLETE_REQUEST(SaslCompleteRequest.class),
-  /*end[HADOOP_NON_SECURE]*/
+/*end[HADOOP_NON_SECURE]*/
   /** Sending vertices request */
   SEND_VERTEX_REQUEST(SendVertexRequest.class),
   /** Sending vertices request */

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java b/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java
index ff9b028..161e363 100644
--- a/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java
+++ b/giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java
@@ -88,11 +88,11 @@ import org.apache.log4j.PatternLayout;
 public class GraphTaskManager<I extends WritableComparable, V extends Writable,
   E extends Writable> implements
   ResetSuperstepMetricsObserver {
-  /*if_not[PURE_YARN]
+/*if_not[PURE_YARN]
   static { // Eliminate this? Even MRv1 tasks should not need it here.
     Configuration.addDefaultResource("giraph-site.xml");
   }
-  end[PURE_YARN]*/
+end[PURE_YARN]*/
   /**
    * Class which checks if an exception on some thread should cause worker
    * to fail
@@ -752,19 +752,19 @@ public class GraphTaskManager<I extends WritableComparable, V extends Writable,
     timeToFirstMessageTimerContext = timeToFirstMessage.time();
 
     CallableFactory<Collection<PartitionStats>> callableFactory =
-        new CallableFactory<Collection<PartitionStats>>() {
-          @Override
-          public Callable<Collection<PartitionStats>> newCallable(
-              int callableId) {
-            return new ComputeCallable<I, V, E, Writable, Writable>(
-                context,
-                graphState,
-                messageStore,
-                computePartitionIdQueue,
-                conf,
-                serviceWorker);
-          }
-        };
+      new CallableFactory<Collection<PartitionStats>>() {
+        @Override
+        public Callable<Collection<PartitionStats>> newCallable(
+            int callableId) {
+          return new ComputeCallable<I, V, E, Writable, Writable>(
+              context,
+              graphState,
+              messageStore,
+              computePartitionIdQueue,
+              conf,
+              serviceWorker);
+        }
+      };
     List<Collection<PartitionStats>> results =
         ProgressableUtils.getResultsWithNCallables(callableFactory,
             numThreads, "compute-%d", context);

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedEdgeOutputFormat.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedEdgeOutputFormat.java b/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedEdgeOutputFormat.java
index 2222255..d257254 100644
--- a/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedEdgeOutputFormat.java
+++ b/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedEdgeOutputFormat.java
@@ -150,7 +150,7 @@ public class WrappedEdgeOutputFormat<I extends WritableComparable,
             HadoopUtils.makeJobContext(getConf(), context));
       }
 
-      /*if_not[HADOOP_NON_COMMIT_JOB]*/
+/*if_not[HADOOP_NON_COMMIT_JOB]*/
       @Override
       public void commitJob(JobContext context) throws IOException {
         outputCommitter.commitJob(
@@ -163,7 +163,7 @@ public class WrappedEdgeOutputFormat<I extends WritableComparable,
         outputCommitter.abortJob(
             HadoopUtils.makeJobContext(getConf(), context), state);
       }
-      /*end[HADOOP_NON_COMMIT_JOB]*/
+/*end[HADOOP_NON_COMMIT_JOB]*/
     };
   }
 }

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedVertexOutputFormat.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedVertexOutputFormat.java b/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedVertexOutputFormat.java
index 669bbe1..efdc061 100644
--- a/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedVertexOutputFormat.java
+++ b/giraph-core/src/main/java/org/apache/giraph/io/internal/WrappedVertexOutputFormat.java
@@ -149,7 +149,7 @@ public class WrappedVertexOutputFormat<I extends WritableComparable,
             HadoopUtils.makeJobContext(getConf(), context));
       }
 
-      /*if_not[HADOOP_NON_COMMIT_JOB]*/
+/*if_not[HADOOP_NON_COMMIT_JOB]*/
       @Override
       public void commitJob(JobContext context) throws IOException {
         outputCommitter.commitJob(
@@ -162,7 +162,7 @@ public class WrappedVertexOutputFormat<I extends WritableComparable,
         outputCommitter.abortJob(
             HadoopUtils.makeJobContext(getConf(), context), state);
       }
-      /*end[HADOOP_NON_COMMIT_JOB]*/
+/*end[HADOOP_NON_COMMIT_JOB]*/
     };
   }
 }

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/job/HadoopUtils.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/job/HadoopUtils.java b/giraph-core/src/main/java/org/apache/giraph/job/HadoopUtils.java
index f2c673b..23f5e6f 100644
--- a/giraph-core/src/main/java/org/apache/giraph/job/HadoopUtils.java
+++ b/giraph-core/src/main/java/org/apache/giraph/job/HadoopUtils.java
@@ -46,11 +46,11 @@ public class HadoopUtils {
   public static TaskAttemptContext makeTaskAttemptContext(Configuration conf,
       TaskAttemptID taskAttemptID) {
     TaskAttemptContext context;
-    /*if[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]
+/*if[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]
     context = new TaskAttemptContext(conf, taskAttemptID);
-    else[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]*/
+else[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]*/
     context = new TaskAttemptContextImpl(conf, taskAttemptID);
-    /*end[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]*/
+/*end[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]*/
     return context;
   }
 
@@ -94,11 +94,11 @@ public class HadoopUtils {
    */
   public static JobContext makeJobContext(Configuration conf, JobID jobID) {
     JobContext context;
-    /*if[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]
+/*if[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]
     context = new JobContext(conf, jobID);
-    else[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]*/
+else[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]*/
     context = new JobContextImpl(conf, jobID);
-    /*end[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]*/
+/*end[HADOOP_NON_JOBCONTEXT_IS_INTERFACE]*/
     return context;
   }
 
@@ -109,11 +109,11 @@ public class HadoopUtils {
    * @return JobId for submitted job.
    */
   public static JobID getJobID(Job job) {
-    /*if[HADOOP_JOB_ID_AVAILABLE]
+/*if[HADOOP_JOB_ID_AVAILABLE]
     return job.getID();
-    else[HADOOP_JOB_ID_AVAILABLE]*/
+else[HADOOP_JOB_ID_AVAILABLE]*/
     return job.getJobID();
-    /*end[HADOOP_JOB_ID_AVAILABLE]*/
+/*end[HADOOP_JOB_ID_AVAILABLE]*/
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/utils/ConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/utils/ConfigurationUtils.java b/giraph-core/src/main/java/org/apache/giraph/utils/ConfigurationUtils.java
index 3d654b4..ea238d5 100644
--- a/giraph-core/src/main/java/org/apache/giraph/utils/ConfigurationUtils.java
+++ b/giraph-core/src/main/java/org/apache/giraph/utils/ConfigurationUtils.java
@@ -72,7 +72,7 @@ public final class ConfigurationUtils {
   /** Class logger */
   private static final Logger LOG =
     Logger.getLogger(ConfigurationUtils.class);
-  /*if[PURE_YARN]
+/*if[PURE_YARN]
   // The base path for output dirs as saved in GiraphConfiguration
   private static final Path BASE_OUTPUT_PATH;
   static {
@@ -83,7 +83,7 @@ public final class ConfigurationUtils {
       throw new IllegalStateException("Error locating default base path!", ioe);
     }
   }
-  end[PURE_YARN]*/
+end[PURE_YARN]*/
   /** Maintains our accepted options in case the caller wants to add some */
   private static Options OPTIONS;
 
@@ -450,7 +450,7 @@ public final class ConfigurationUtils {
       conf.setYarnTaskHeapMb(
           Integer.parseInt(cmd.getOptionValue("yh")));
     }
-    /*if[PURE_YARN]
+/*if[PURE_YARN]
     if (cmd.hasOption("vof") || cmd.hasOption("eof")) {
       if (cmd.hasOption("op")) {
         // For YARN conf to get the out dir we need w/o a Job obj
@@ -469,7 +469,7 @@ public final class ConfigurationUtils {
         }
       }
     }
-    end[PURE_YARN]*/
+end[PURE_YARN]*/
     // END YARN-ONLY OPTIONS
     handleComputationClass(conf, cmd, computationClassName);
   }

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/utils/ExtendedByteArrayOutputBuffer.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/utils/ExtendedByteArrayOutputBuffer.java b/giraph-core/src/main/java/org/apache/giraph/utils/ExtendedByteArrayOutputBuffer.java
index 80c3aee..3103f30 100644
--- a/giraph-core/src/main/java/org/apache/giraph/utils/ExtendedByteArrayOutputBuffer.java
+++ b/giraph-core/src/main/java/org/apache/giraph/utils/ExtendedByteArrayOutputBuffer.java
@@ -19,13 +19,14 @@
 package org.apache.giraph.utils;
 
 import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
 import org.apache.giraph.conf.FloatConfOption;
 import org.apache.giraph.conf.GiraphConstants;
 import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
 import org.apache.giraph.conf.IntConfOption;
 
-import java.util.concurrent.atomic.AtomicInteger;
-
 /**
  * Wraps a list of byte array outputs and provides convenient
  * utilities on top of it
@@ -65,12 +66,12 @@ public class ExtendedByteArrayOutputBuffer {
   private final AtomicInteger mapSize = new AtomicInteger(0);
   /** Thread local variable to get hold of a byte array output stream */
   private final ThreadLocal<IndexAndDataOut> threadLocal =
-      new ThreadLocal<IndexAndDataOut>() {
-        @Override
-        protected IndexAndDataOut initialValue() {
-          return newIndexAndDataOutput();
-        }
-      };
+    new ThreadLocal<IndexAndDataOut>() {
+      @Override
+      protected IndexAndDataOut initialValue() {
+        return newIndexAndDataOutput();
+      }
+    };
 
   /**
    * Constructor

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/utils/WritableUtils.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/utils/WritableUtils.java b/giraph-core/src/main/java/org/apache/giraph/utils/WritableUtils.java
index 592ef7e..be2ef9d 100644
--- a/giraph-core/src/main/java/org/apache/giraph/utils/WritableUtils.java
+++ b/giraph-core/src/main/java/org/apache/giraph/utils/WritableUtils.java
@@ -887,9 +887,9 @@ public class WritableUtils {
       try {
         T[] values = (T[]) clazz.getDeclaredMethod("values").invoke(null);
         return values[ordinal];
-      } catch (IllegalAccessException | IllegalArgumentException
-          | InvocationTargetException | NoSuchMethodException
-          | SecurityException e) {
+      } catch (IllegalAccessException | IllegalArgumentException |
+          InvocationTargetException | NoSuchMethodException |
+          SecurityException e) {
         throw new IOException("Cannot read enum", e);
       }
     } else {

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java b/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
index 5ec1872..6b74478 100644
--- a/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
+++ b/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
@@ -585,11 +585,11 @@ public class BspServiceWorker<I extends WritableComparable,
     workerGraphPartitioner.updatePartitionOwners(
         getWorkerInfo(), masterSetPartitionOwners);
 
-    /*if[HADOOP_NON_SECURE]
-      workerClient.setup();
-    else[HADOOP_NON_SECURE]*/
+/*if[HADOOP_NON_SECURE]
+    workerClient.setup();
+else[HADOOP_NON_SECURE]*/
     workerClient.setup(getConfiguration().authenticate());
-    /*end[HADOOP_NON_SECURE]*/
+/*end[HADOOP_NON_SECURE]*/
 
     // Initialize aggregator at worker side during setup.
     // Do this just before vertex and edge loading.
@@ -1706,7 +1706,7 @@ public class BspServiceWorker<I extends WritableComparable,
       // Communication service needs to setup the connections prior to
       // processing vertices
 /*if[HADOOP_NON_SECURE]
-    workerClient.setup();
+      workerClient.setup();
 else[HADOOP_NON_SECURE]*/
       workerClient.setup(getConfiguration().authenticate());
 /*end[HADOOP_NON_SECURE]*/

http://git-wip-us.apache.org/repos/asf/giraph/blob/27661ba3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6c1bb0a..ed9e25a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -536,7 +536,7 @@ under the License.
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-checkstyle-plugin</artifactId>
-          <version>2.10</version>
+          <version>2.15</version>
           <configuration>
             <configLocation>${top.dir}/checkstyle.xml</configLocation>
             <consoleOutput>true</consoleOutput>