You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@twill.apache.org by ch...@apache.org on 2020/01/06 08:42:55 UTC

[twill] branch master updated: (TWILL-253) Remove support for Java 7

This is an automated email from the ASF dual-hosted git repository.

chtyim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/twill.git


The following commit(s) were added to refs/heads/master by this push:
     new cacfb32  (TWILL-253) Remove support for Java 7
cacfb32 is described below

commit cacfb32b60b66033929f06745a29a4b30c26e26e
Author: Terence Yim <te...@google.com>
AuthorDate: Sun Jan 5 16:39:37 2020 -0800

    (TWILL-253) Remove support for Java 7
    
    This fixes #81 on Github.
    
    Signed-off-by: Terence Yim <te...@google.com>
---
 checkstyle.xml                                     |  1 +
 pom.xml                                            | 33 +++++++++-------------
 twill-java8-test/pom.xml                           | 10 -------
 .../appmaster/ApplicationMasterService.java        |  2 +-
 .../twill/internal/yarn/AbstractYarnAMClient.java  |  2 +-
 5 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/checkstyle.xml b/checkstyle.xml
index 6d000bd..15f9a27 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -96,6 +96,7 @@ page at http://checkstyle.sourceforge.net/config.html -->
       <!-- This ensures that static imports go to the end. -->
       <property name="option" value="bottom"/>
       <property name="tokens" value="STATIC_IMPORT, IMPORT"/>
+      <property name="separated" value="true"/>
     </module>
 
     <!--
diff --git a/pom.xml b/pom.xml
index 9fb6971..8c29192 100644
--- a/pom.xml
+++ b/pom.xml
@@ -194,6 +194,15 @@
             <plugins>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.1</version>
+                    <configuration>
+                        <source>1.8</source>
+                        <target>1.8</target>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-source-plugin</artifactId>
                     <version>2.2.1</version>
                     <configuration>
@@ -212,7 +221,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-javadoc-plugin</artifactId>
-                    <version>2.9</version>
+                    <version>3.1.1</version>
                     <configuration>
                         <excludePackageNames>*.internal.*:echo:*.example.*</excludePackageNames>
                         <links>
@@ -235,14 +244,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-checkstyle-plugin</artifactId>
-                    <version>2.11</version>
-                    <dependencies>
-                        <dependency>
-                            <groupId>com.puppycrawl.tools</groupId>
-                            <artifactId>checkstyle</artifactId>
-                            <version>6.5</version>
-                        </dependency>
-                    </dependencies>
+                    <version>3.1.0</version>
                     <executions>
                         <execution>
                             <id>validate</id>
@@ -253,7 +255,7 @@
                                 <consoleOutput>true</consoleOutput>
                                 <failsOnError>true</failsOnError>
                                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
-                                <sourceDirectory>${project.build.sourceDirectory}/..</sourceDirectory>
+                                <sourceDirectories>${project.build.sourceDirectory}/..</sourceDirectories>
                             </configuration>
                             <goals>
                                 <goal>check</goal>
@@ -264,7 +266,7 @@
                 <plugin>
                     <groupId>org.apache.rat</groupId>
                     <artifactId>apache-rat-plugin</artifactId>
-                    <version>0.11</version>
+                    <version>0.13</version>
                     <dependencies>
                         <dependency>
                             <groupId>org.apache.maven.doxia</groupId>
@@ -304,31 +306,22 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.1</version>
-                <configuration>
-                    <source>1.7</source>
-                    <target>1.7</target>
-                </configuration>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-source-plugin</artifactId>
-                <version>2.2.1</version>
             </plugin>
             <plugin>
                 <groupId>org.apache.rat</groupId>
                 <artifactId>apache-rat-plugin</artifactId>
-                <version>0.11</version>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
-                <version>2.12.1</version>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.9.1</version>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
diff --git a/twill-java8-test/pom.xml b/twill-java8-test/pom.xml
index 9bbf3dd..5deda0e 100644
--- a/twill-java8-test/pom.xml
+++ b/twill-java8-test/pom.xml
@@ -59,16 +59,6 @@
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.1</version>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-deploy-plugin</artifactId>
                 <version>2.8.1</version>
                 <configuration>
diff --git a/twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ApplicationMasterService.java b/twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ApplicationMasterService.java
index 8a80041..8071dfb 100644
--- a/twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ApplicationMasterService.java
+++ b/twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ApplicationMasterService.java
@@ -753,7 +753,7 @@ public final class ApplicationMasterService extends AbstractYarnTwillService imp
   private void launchRunnable(List<? extends ProcessLauncher<YarnContainerInfo>> launchers,
                               Queue<ProvisionRequest> provisioning) {
     for (ProcessLauncher<YarnContainerInfo> processLauncher : launchers) {
-      LOG.info("Container allocated: {}", processLauncher.getContainerInfo().getContainer());
+      LOG.info("Container allocated: {}", processLauncher.getContainerInfo().<Object>getContainer());
       ProvisionRequest provisionRequest = provisioning.peek();
       if (provisionRequest == null) {
         continue;
diff --git a/twill-yarn/src/main/java/org/apache/twill/internal/yarn/AbstractYarnAMClient.java b/twill-yarn/src/main/java/org/apache/twill/internal/yarn/AbstractYarnAMClient.java
index b4b50cd..7635f61 100644
--- a/twill-yarn/src/main/java/org/apache/twill/internal/yarn/AbstractYarnAMClient.java
+++ b/twill-yarn/src/main/java/org/apache/twill/internal/yarn/AbstractYarnAMClient.java
@@ -144,7 +144,7 @@ public abstract class AbstractYarnAMClient<T> extends AbstractIdleService implem
         if (!launcher.isLaunched()) {
           YarnContainerInfo containerInfo = launcher.getContainerInfo();
           // Casting is needed in Java 8, otherwise it complains about ambiguous method over the info(String, Throwable)
-          LOG.info("Nothing to run in container, releasing it: {}", containerInfo.getContainer());
+          LOG.info("Nothing to run in container, releasing it: {}", containerInfo.<Object>getContainer());
           releaseAssignedContainer(containerInfo);
         }
       }