You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by vi...@apache.org on 2020/04/16 04:37:22 UTC

[hadoop-ozone] branch master updated: HDDS-3357. Add check for import from shaded package (#788)

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

vivekratnavel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new bc8d43e  HDDS-3357. Add check for import from shaded package (#788)
bc8d43e is described below

commit bc8d43e649bfd252b36f24d4650e6b15506d58ae
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Thu Apr 16 06:37:14 2020 +0200

    HDDS-3357. Add check for import from shaded package (#788)
---
 .../ozone/container/common/volume/TestVolumeSetDiskChecks.java     | 2 +-
 hadoop-hdds/dev-support/checkstyle/checkstyle.xml                  | 5 ++++-
 hadoop-ozone/dev-support/checks/checkstyle.sh                      | 7 +++++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestVolumeSetDiskChecks.java b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestVolumeSetDiskChecks.java
index c8a8114..c913d53 100644
--- a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestVolumeSetDiskChecks.java
+++ b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestVolumeSetDiskChecks.java
@@ -33,9 +33,9 @@ import org.apache.hadoop.test.GenericTestUtils;
 import org.apache.hadoop.util.DiskChecker.DiskErrorException;
 import org.apache.hadoop.util.Timer;
 
+import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import org.apache.commons.io.FileUtils;
-import org.apache.curator.shaded.com.google.common.collect.ImmutableSet;
 import static org.hamcrest.CoreMatchers.is;
 import org.junit.After;
 import static org.junit.Assert.assertEquals;
diff --git a/hadoop-hdds/dev-support/checkstyle/checkstyle.xml b/hadoop-hdds/dev-support/checkstyle/checkstyle.xml
index 8168efc..c4ebfb6 100644
--- a/hadoop-hdds/dev-support/checkstyle/checkstyle.xml
+++ b/hadoop-hdds/dev-support/checkstyle/checkstyle.xml
@@ -119,7 +119,10 @@
 
         <!-- Checks for imports                              -->
         <!-- See http://checkstyle.sf.net/config_import.html -->
-        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+        <module name="IllegalImport">
+          <property name="regexp" value="true"/>
+          <property name="illegalPkgs" value="^sun\..*, ^.*\.relocated\..*, ^.*\.shaded\..*"/>
+        </module>
         <module name="RedundantImport"/>
         <module name="UnusedImports"/>
 
diff --git a/hadoop-ozone/dev-support/checks/checkstyle.sh b/hadoop-ozone/dev-support/checks/checkstyle.sh
index 933fb44..a433391 100755
--- a/hadoop-ozone/dev-support/checks/checkstyle.sh
+++ b/hadoop-ozone/dev-support/checks/checkstyle.sh
@@ -21,12 +21,15 @@ REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/checkstyle"}
 mkdir -p "$REPORT_DIR"
 REPORT_FILE="$REPORT_DIR/summary.txt"
 
+MAVEN_OPTIONS='-B -fae -Dskip.yarn -Dskip.installyarn -Dcheckstyle.failOnViolation=false'
+
 declare -i rc
-mvn -B checkstyle:check -Dcheckstyle.failOnViolation=false > "${REPORT_DIR}/output.log"
+mvn ${MAVEN_OPTIONS} checkstyle:check > "${REPORT_DIR}/output.log"
 rc=$?
 if [[ ${rc} -ne 0 ]]; then
-  mvn -B test-compile checkstyle:check -Dcheckstyle.failOnViolation=false
+  mvn ${MAVEN_OPTIONS} clean test-compile checkstyle:check
   rc=$?
+  mkdir -p "$REPORT_DIR" # removed by mvn clean
 else
   cat "${REPORT_DIR}/output.log"
 fi


---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org