Repository: samza
Updated Branches:
  refs/heads/master 36bcbacc2 -> 7ae261afa


SAMZA-1015 Add support for streams, Lambdas and other JDK 8 like features in 
checkstyle


Project: http://git-wip-us.apache.org/repos/asf/samza/repo
Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/19ef7cdf
Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/19ef7cdf
Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/19ef7cdf

Branch: refs/heads/master
Commit: 19ef7cdf75c3d34bb6ee518160b6e7f046e1d1e1
Parents: 36bcbac
Author: vjagadish1989 <jvenk...@linkedin.com>
Authored: Fri Sep 30 11:35:06 2016 -0700
Committer: vjagadish1989 <jvenk...@linkedin.com>
Committed: Fri Sep 30 11:35:06 2016 -0700

----------------------------------------------------------------------
 build.gradle                                    | 50 ++++++++++++--------
 checkstyle/checkstyle.xml                       |  3 +-
 gradle.properties                               |  1 +
 .../samza/container/TestLocalityManager.java    | 24 +++++-----
 .../grouper/task/TestTaskAssignmentManager.java | 30 ++++++------
 5 files changed, 59 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/samza/blob/19ef7cdf/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 004c81e..c80415d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -29,7 +29,7 @@ allprojects {
   repositories {
     mavenCentral()
     mavenLocal()
- }
+  }
 }
 
 apply from: file("gradle/dependency-versions.gradle")
@@ -38,6 +38,7 @@ apply from: file("gradle/release.gradle")
 apply from: file("gradle/rat.gradle")
 apply from: file('gradle/customize.gradle')
 
+
 rat {
   excludes = [
     '*.patch',
@@ -125,6 +126,7 @@ project(':samza-api') {
 
   checkstyle {
     configFile = new File(rootDir, "checkstyle/checkstyle.xml")
+    toolVersion = "$checkstyleVersion"
   }
 }
 
@@ -135,6 +137,7 @@ project(":samza-core_$scalaVersion") {
   // Force scala joint compilation
   sourceSets.main.scala.srcDir "src/main/java"
   sourceSets.test.scala.srcDir "src/test/java"
+
   sourceSets.main.java.srcDirs = []
 
   jar {
@@ -158,6 +161,7 @@ project(":samza-core_$scalaVersion") {
 
   checkstyle {
     configFile = new File(rootDir, "checkstyle/checkstyle.xml")
+    toolVersion = "$checkstyleVersion"
   }
 }
 
@@ -190,6 +194,7 @@ project(":samza-autoscaling_$scalaVersion") {
 
   checkstyle {
     configFile = new File(rootDir, "checkstyle/checkstyle.xml")
+    toolVersion = "$checkstyleVersion"
   }
 }
 
@@ -269,6 +274,7 @@ project(':samza-log4j') {
 
   checkstyle {
     configFile = new File(rootDir, "checkstyle/checkstyle.xml")
+    toolVersion = "$checkstyleVersion"
   }
 }
 
@@ -412,6 +418,7 @@ project(":samza-kv_$scalaVersion") {
 
   checkstyle {
     configFile = new File(rootDir, "checkstyle/checkstyle.xml")
+    toolVersion = "$checkstyleVersion"
   }
 }
 
@@ -446,27 +453,27 @@ project(":samza-kv-rocksdb_$scalaVersion") {
 }
 
 project(":samza-hdfs_$scalaVersion") {
-    apply plugin: 'scala'
-
-    dependencies {
-        compile project(':samza-api')
-        compile project(":samza-core_$scalaVersion")
-        compile project(":samza-kafka_$scalaVersion")
-        compile "org.scala-lang:scala-library:$scalaLibVersion"
-        compile("org.apache.hadoop:hadoop-hdfs:$yarnVersion") {
-          exclude module: 'slf4j-log4j12'
-          exclude module: 'servlet-api'
-        }
-        compile("org.apache.hadoop:hadoop-common:$yarnVersion") {
-          exclude module: 'slf4j-log4j12'
-          exclude module: 'servlet-api'
-          exclude module: 'zookeeper'
-        }
-
-        testCompile "junit:junit:$junitVersion"
-        testCompile "org.scalatest:scalatest_$scalaVersion:$scalaTestVersion"
-        testCompile "org.apache.hadoop:hadoop-minicluster:$yarnVersion"
+  apply plugin: 'scala'
+
+  dependencies {
+    compile project(':samza-api')
+    compile project(":samza-core_$scalaVersion")
+    compile project(":samza-kafka_$scalaVersion")
+    compile "org.scala-lang:scala-library:$scalaLibVersion"
+    compile("org.apache.hadoop:hadoop-hdfs:$yarnVersion") {
+      exclude module: 'slf4j-log4j12'
+      exclude module: 'servlet-api'
+    }
+    compile("org.apache.hadoop:hadoop-common:$yarnVersion") {
+      exclude module: 'slf4j-log4j12'
+      exclude module: 'servlet-api'
+      exclude module: 'zookeeper'
     }
+
+    testCompile "junit:junit:$junitVersion"
+    testCompile "org.scalatest:scalatest_$scalaVersion:$scalaTestVersion"
+    testCompile "org.apache.hadoop:hadoop-minicluster:$yarnVersion"
+  }
 }
 
 project(":samza-rest") {
@@ -569,6 +576,7 @@ project(":samza-test_$scalaVersion") {
 
   checkstyle {
     configFile = new File(rootDir, "checkstyle/checkstyle.xml")
+    toolVersion = "$checkstyleVersion"
   }
 
   tasks.create(name: "releaseTestJobs", dependsOn: 
configurations.archives.artifacts, type: Tar) {

http://git-wip-us.apache.org/repos/asf/samza/blob/19ef7cdf/checkstyle/checkstyle.xml
----------------------------------------------------------------------
diff --git a/checkstyle/checkstyle.xml b/checkstyle/checkstyle.xml
index 770b5e7..7bd5caa 100644
--- a/checkstyle/checkstyle.xml
+++ b/checkstyle/checkstyle.xml
@@ -80,9 +80,10 @@
       <property name="basicOffset" value="2"/>
       <property name="caseIndent" value="2"/>
       <property name="throwsIndent" value="2"/>
+      <property name="lineWrappingIndentation" value="2"/>
     </module>
     <module name="MethodParamPad"/>
     <module name="ParenPad"/>
     <module name="TypecastParenPad"/>
   </module>
-</module>
\ No newline at end of file
+</module>

http://git-wip-us.apache.org/repos/asf/samza/blob/19ef7cdf/gradle.properties
----------------------------------------------------------------------
diff --git a/gradle.properties b/gradle.properties
index c94f619..f032b74 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -23,3 +23,4 @@ gradleVersion=2.0
 org.gradle.jvmargs="-XX:MaxPermSize=512m"
 
 systemProp.file.encoding=utf-8
+checkstyleVersion=5.9

http://git-wip-us.apache.org/repos/asf/samza/blob/19ef7cdf/samza-core/src/test/java/org/apache/samza/container/TestLocalityManager.java
----------------------------------------------------------------------
diff --git 
a/samza-core/src/test/java/org/apache/samza/container/TestLocalityManager.java 
b/samza-core/src/test/java/org/apache/samza/container/TestLocalityManager.java
index 9661885..5341141 100644
--- 
a/samza-core/src/test/java/org/apache/samza/container/TestLocalityManager.java
+++ 
b/samza-core/src/test/java/org/apache/samza/container/TestLocalityManager.java
@@ -87,18 +87,18 @@ public class TestLocalityManager {
     localityManager.writeContainerToHostMapping(0, "localhost", 
"jmx:localhost:8080", "jmx:tunnel:localhost:9090");
     Map<Integer, Map<String, String>> localMap = 
localityManager.readContainerLocality();
     Map<Integer, Map<String, String>> expectedMap =
-        new HashMap<Integer, Map<String, String>>() {
-          {
-            this.put(new Integer(0),
-                new HashMap<String, String>() {
-                  {
-                    this.put(SetContainerHostMapping.HOST_KEY, "localhost");
-                    this.put(SetContainerHostMapping.JMX_URL_KEY, 
"jmx:localhost:8080");
-                    this.put(SetContainerHostMapping.JMX_TUNNELING_URL_KEY, 
"jmx:tunnel:localhost:9090");
-                  }
-                });
-          }
-        };
+      new HashMap<Integer, Map<String, String>>() {
+        {
+          this.put(new Integer(0),
+            new HashMap<String, String>() {
+              {
+                this.put(SetContainerHostMapping.HOST_KEY, "localhost");
+                this.put(SetContainerHostMapping.JMX_URL_KEY, 
"jmx:localhost:8080");
+                this.put(SetContainerHostMapping.JMX_TUNNELING_URL_KEY, 
"jmx:tunnel:localhost:9090");
+              }
+            });
+        }
+      };
     assertEquals(expectedMap, localMap);
 
     localityManager.stop();

http://git-wip-us.apache.org/repos/asf/samza/blob/19ef7cdf/samza-core/src/test/java/org/apache/samza/container/grouper/task/TestTaskAssignmentManager.java
----------------------------------------------------------------------
diff --git 
a/samza-core/src/test/java/org/apache/samza/container/grouper/task/TestTaskAssignmentManager.java
 
b/samza-core/src/test/java/org/apache/samza/container/grouper/task/TestTaskAssignmentManager.java
index d813fdc..d3eb7fb 100644
--- 
a/samza-core/src/test/java/org/apache/samza/container/grouper/task/TestTaskAssignmentManager.java
+++ 
b/samza-core/src/test/java/org/apache/samza/container/grouper/task/TestTaskAssignmentManager.java
@@ -71,15 +71,15 @@ public class TestTaskAssignmentManager {
     assertTrue(consumer.isStarted());
 
     Map<String, Integer> expectedMap =
-        new HashMap<String, Integer>() {
-          {
-            this.put("Task0", new Integer(0));
-            this.put("Task1", new Integer(1));
-            this.put("Task2", new Integer(2));
-            this.put("Task3", new Integer(0));
-            this.put("Task4", new Integer(1));
-          }
-        };
+      new HashMap<String, Integer>() {
+        {
+          this.put("Task0", new Integer(0));
+          this.put("Task1", new Integer(1));
+          this.put("Task2", new Integer(2));
+          this.put("Task3", new Integer(0));
+          this.put("Task4", new Integer(1));
+        }
+      };
 
     for (Map.Entry<String, Integer> entry : expectedMap.entrySet()) {
       taskAssignmentManager.writeTaskContainerMapping(entry.getKey(), 
entry.getValue());
@@ -110,12 +110,12 @@ public class TestTaskAssignmentManager {
     assertTrue(consumer.isStarted());
 
     Map<String, Integer> expectedMap =
-        new HashMap<String, Integer>() {
-          {
-            this.put("Task0", new Integer(0));
-            this.put("Task1", new Integer(1));
-          }
-        };
+      new HashMap<String, Integer>() {
+        {
+          this.put("Task0", new Integer(0));
+          this.put("Task1", new Integer(1));
+        }
+      };
 
     for (Map.Entry<String, Integer> entry : expectedMap.entrySet()) {
       taskAssignmentManager.writeTaskContainerMapping(entry.getKey(), 
entry.getValue());

Reply via email to