-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61557/
-----------------------------------------------------------
Review request for Ambari, Jonathan Hurley and Sebastian Toader.
Bugs: AMBARI-21701
https://issues.apache.org/jira/browse/AMBARI-21701
Repository: ambari
Description
-------
Consider `org.apache.hadoop.metrics2.sink.relocated.*` to be [illegal
import](http://checkstyle.sourceforge.net/config_imports.html#IllegalImport),
in addition to the default `sun.*`.
Diffs
-----
ambari-server/checkstyle.xml fb314bccc19f6a2e687c070620e06beec7d465fa
Diff: https://reviews.apache.org/r/61557/diff/1/
Testing
-------
```
# introduce "relocated" import
$ git revert --no-commit 1433ecff108df159f71961e23a34d248e1684c85
# compile with dependencies (same as before)
$ mvn -am -pl ambari-server -DskipTests clean test
...
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @
ambari-server ---
[INFO] Compiling 792 source files to ambari-server/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.2:testCompile
(default-testCompile) on project ambari-server: Compilation failure:
Compilation failure:
[ERROR]
ambari-server/src/test/java/org/apache/ambari/server/checks/AbstractCheckDescriptorTest.java:[39,71]
package org.apache.hadoop.metrics2.sink.relocated.google.common.collect does
not exist
[ERROR]
ambari-server/src/test/java/org/apache/ambari/server/checks/AbstractCheckDescriptorTest.java:[114,34]
cannot find symbol
[ERROR] symbol: variable Sets
[ERROR] location: class
org.apache.ambari.server.checks.AbstractCheckDescriptorTest
...
[INFO] BUILD FAILURE
# compile with installed artifacts
$ mvn -am -pl
ambari-metrics/ambari-metrics-common,ambari-serviceadvisor,ambari-views clean
install
$ mvn -pl ambari-server -DskipTests clean test
...
[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle) @ ambari-server ---
[INFO] Starting audit...
[ERROR]
ambari-server/src/test/java/org/apache/ambari/server/checks/AbstractCheckDescriptorTest.java:39:1:
Import from illegal package -
org.apache.hadoop.metrics2.sink.relocated.google.common.collect.Sets.
[IllegalImport]
Audit done.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
# back to clean state
$ git revert --abort
$ mvn -pl ambari-server -DskipTests clean test
...
[INFO] BUILD SUCCESS
$ mvn -am -pl ambari-server -DskipTests clean test
...
[INFO] BUILD SUCCESS
```
Thanks,
Attila Doroszlai