GIRAPH-1207
authorDionysios Logothetis <dlogothetis@gmail.com>
Tue, 23 Oct 2018 20:36:36 +0000 (13:36 -0700)
committerDionysios Logothetis <dionysios@fb.com>
Tue, 23 Oct 2018 20:36:36 +0000 (13:36 -0700)
closes #90

README
giraph-block-app-8/pom.xml
giraph-block-app/src/test/java/org/apache/giraph/block_app/framework/block/TestRepeatUntilBlock.java
giraph-core/src/main/java/org/apache/giraph/writable/kryo/HadoopKryo.java
pom.xml
src/site/xdoc/build.xml

diff --git a/README b/README
index 55ca25f..401302a 100644 (file)
--- a/README
+++ b/README
@@ -87,7 +87,7 @@ at this time.
 Building and testing:
 
 You will need the following:
-- Java 1.6
+- Java 1.8
 - Maven 3 or higher. Giraph uses the munge plugin
   (http://sonatype.github.com/munge-maven-plugin/),
   which requires Maven 3, to support multiple versions of Hadoop. Also, the
index 7b40643..a52a485 100644 (file)
@@ -36,8 +36,6 @@ under the License.
   <properties>
     <top.dir>${project.basedir}/..</top.dir>
     <checkstyle.config.path>${top.dir}/checkstyle-relaxed-8.xml</checkstyle.config.path>
-    <project.build.targetJdk>1.8</project.build.targetJdk>
-    <project.build.javaHome>${env.JAVA_8_HOME}</project.build.javaHome>
   </properties>
 
   <build>
index d1befa5..c7f7fab 100644 (file)
@@ -88,7 +88,7 @@ public class TestRepeatUntilBlock {
       countDown
     );
     BlockTestingUtils.testSequential(
-      Iterables.concat(Collections.nCopies(outer * inner, piece)),
+      Iterables.concat(Collections.<Piece>nCopies(outer * inner, piece)),
       repeatBlock);
   }
 
index 5d51a3f..1a8f2c2 100644 (file)
@@ -318,19 +318,16 @@ public class HadoopKryo extends Kryo {
               new MapReferenceResolver());
     }
 
-    String version = System.getProperty("java.version");
-    char minor = version.charAt(2);
-    if (minor >= '8') {
-      try {
-        kryo.register(Class.forName("java.lang.invoke.SerializedLambda"));
-        kryo.register(Class.forName(
-          "com.esotericsoftware.kryo.serializers.ClosureSerializer$Closure"),
-            new ClosureSerializer());
-      } catch (ClassNotFoundException e) {
-        throw new IllegalStateException(
-            "Trying to use Kryo on >= Java 8 (" + version +
-            "), but unable to find needed classes", e);
-      }
+    try {
+      kryo.register(Class.forName("java.lang.invoke.SerializedLambda"));
+      kryo.register(Class.forName(
+        "com.esotericsoftware.kryo.serializers.ClosureSerializer$Closure"),
+        new ClosureSerializer());
+    } catch (ClassNotFoundException e) {
+      throw new IllegalStateException(
+        "Trying to use Kryo on Java version " +
+          System.getProperty("java.version") +
+          ", but unable to find needed classes", e);
     }
 
     kryo.register(Arrays.asList().getClass(), new ArraysAsListSerializer());
diff --git a/pom.xml b/pom.xml
index 1522fd4..758876e 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -301,9 +301,9 @@ under the License.
     <project.maven.version>3.0.0</project.maven.version>
     <project.enforcer.skip>false</project.enforcer.skip>
     <project.enforcer.fail>true</project.enforcer.fail>
-    <project.build.targetJdk>1.7</project.build.targetJdk>
+    <project.build.targetJdk>1.8</project.build.targetJdk>
     <project.build.javaHome>${env.JAVA_HOME}</project.build.javaHome>
-    <project.enforcer.minJdk>1.7</project.enforcer.minJdk>
+    <project.enforcer.minJdk>1.8</project.enforcer.minJdk>
     <giraph.maven.dependency.plugin.skip>false</giraph.maven.dependency.plugin.skip>
     <giraph.maven.duplicate.finder.skip>false</giraph.maven.duplicate.finder.skip>
     <!-- This lets modules skip unit tests. More details: GIRAPH-957 --> 
index d99bff7..54b344d 100644 (file)
@@ -33,7 +33,7 @@ under the License.
 <p>
 You can check out Giraph with <tt>git clone http://git-wip-us.apache.org/repos/asf/giraph.git</tt>. In order to build and test Giraph, you will need the following:</p>
 <ul>
-  <li>Java 1.7</li>
+  <li>Java 1.8</li>
   <li>Maven 3 or higher. Giraph uses the <a href="http://sonatype.github.com/munge-maven-plugin/">munge plugin</a>, which requires Maven 3, to support multiple versions of Hadoop. Also, the web site plugin requires Maven 3.</li>
   <li>One of the supported versions of Apache Hadoop:
     <ul>