[jira] [Updated] (AMBARI-21701) Add check for import from relocated packages

2018-05-21 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated AMBARI-21701:

Labels: pull-request-available  (was: )

> Add check for import from relocated packages
> 
>
> Key: AMBARI-21701
> URL: https://issues.apache.org/jira/browse/AMBARI-21701
> Project: Ambari
>  Issue Type: Improvement
>  Components: ambari-server
>Affects Versions: 3.0.0
>Reporter: Doroszlai, Attila
>Assignee: Doroszlai, Attila
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 3.0.0
>
> Attachments: AMBARI-21701.patch
>
>
> Occasionally an import from {{org.apache.hadoop.metrics2.sink.relocated}} 
> creeps into {{ambari-server}} source code, causing compile errors:
> {noformat}
> $ mvn -am -pl ambari-server clean test
> ...
> [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
> {noformat}
> The problem is that the same code can be compiled if dependencies are already 
> installed in one's local Maven repository.
> {noformat}
> $ mvn -am -pl 
> ambari-metrics/ambari-metrics-common,ambari-serviceadvisor,ambari-views clean 
> install
> ...
> $ mvn -pl ambari-server clean test
> ...
> [INFO] BUILD SUCCESS
> {noformat}
> This succeeds because {{ambari-metrics-common}} installs a shaded uber jar 
> including the {{..relocated..}} packages, hence they are available when 
> compiling {{ambari-server}}.  On the other hand, when building from scratch 
> (selectively with {{-am -pl ...}}, or the entire multimodule project) 
> classpath contains {{ambari-metrics-common}} classes and individual 
> dependencies without relocation.
> The goal of this change is to add a checkstyle check to catch such imports at 
> build-time with both compilation methods.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMBARI-21701) Add check for import from relocated packages

2017-08-10 Thread Doroszlai, Attila (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Doroszlai, Attila updated AMBARI-21701:
---
Resolution: Implemented
Status: Resolved  (was: Patch Available)

Committed to 
[trunk|http://git-wip-us.apache.org/repos/asf/ambari/commit/8895386bcc].

> Add check for import from relocated packages
> 
>
> Key: AMBARI-21701
> URL: https://issues.apache.org/jira/browse/AMBARI-21701
> Project: Ambari
>  Issue Type: Improvement
>  Components: ambari-server
>Affects Versions: 3.0.0
>Reporter: Doroszlai, Attila
>Assignee: Doroszlai, Attila
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: AMBARI-21701.patch
>
>
> Occasionally an import from {{org.apache.hadoop.metrics2.sink.relocated}} 
> creeps into {{ambari-server}} source code, causing compile errors:
> {noformat}
> $ mvn -am -pl ambari-server clean test
> ...
> [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
> {noformat}
> The problem is that the same code can be compiled if dependencies are already 
> installed in one's local Maven repository.
> {noformat}
> $ mvn -am -pl 
> ambari-metrics/ambari-metrics-common,ambari-serviceadvisor,ambari-views clean 
> install
> ...
> $ mvn -pl ambari-server clean test
> ...
> [INFO] BUILD SUCCESS
> {noformat}
> This succeeds because {{ambari-metrics-common}} installs a shaded uber jar 
> including the {{..relocated..}} packages, hence they are available when 
> compiling {{ambari-server}}.  On the other hand, when building from scratch 
> (selectively with {{-am -pl ...}}, or the entire multimodule project) 
> classpath contains {{ambari-metrics-common}} classes and individual 
> dependencies without relocation.
> The goal of this change is to add a checkstyle check to catch such imports at 
> build-time with both compilation methods.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-21701) Add check for import from relocated packages

2017-08-10 Thread Doroszlai, Attila (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Doroszlai, Attila updated AMBARI-21701:
---
Status: Patch Available  (was: In Progress)

> Add check for import from relocated packages
> 
>
> Key: AMBARI-21701
> URL: https://issues.apache.org/jira/browse/AMBARI-21701
> Project: Ambari
>  Issue Type: Improvement
>  Components: ambari-server
>Affects Versions: 3.0.0
>Reporter: Doroszlai, Attila
>Assignee: Doroszlai, Attila
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: AMBARI-21701.patch
>
>
> Occasionally an import from {{org.apache.hadoop.metrics2.sink.relocated}} 
> creeps into {{ambari-server}} source code, causing compile errors:
> {noformat}
> $ mvn -am -pl ambari-server clean test
> ...
> [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
> {noformat}
> The problem is that the same code can be compiled if dependencies are already 
> installed in one's local Maven repository.
> {noformat}
> $ mvn -am -pl 
> ambari-metrics/ambari-metrics-common,ambari-serviceadvisor,ambari-views clean 
> install
> ...
> $ mvn -pl ambari-server clean test
> ...
> [INFO] BUILD SUCCESS
> {noformat}
> This succeeds because {{ambari-metrics-common}} installs a shaded uber jar 
> including the {{..relocated..}} packages, hence they are available when 
> compiling {{ambari-server}}.  On the other hand, when building from scratch 
> (selectively with {{-am -pl ...}}, or the entire multimodule project) 
> classpath contains {{ambari-metrics-common}} classes and individual 
> dependencies without relocation.
> The goal of this change is to add a checkstyle check to catch such imports at 
> build-time with both compilation methods.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-21701) Add check for import from relocated packages

2017-08-10 Thread Doroszlai, Attila (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Doroszlai, Attila updated AMBARI-21701:
---
Attachment: AMBARI-21701.patch

> Add check for import from relocated packages
> 
>
> Key: AMBARI-21701
> URL: https://issues.apache.org/jira/browse/AMBARI-21701
> Project: Ambari
>  Issue Type: Improvement
>  Components: ambari-server
>Affects Versions: 3.0.0
>Reporter: Doroszlai, Attila
>Assignee: Doroszlai, Attila
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: AMBARI-21701.patch
>
>
> Occasionally an import from {{org.apache.hadoop.metrics2.sink.relocated}} 
> creeps into {{ambari-server}} source code, causing compile errors:
> {noformat}
> $ mvn -am -pl ambari-server clean test
> ...
> [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
> {noformat}
> The problem is that the same code can be compiled if dependencies are already 
> installed in one's local Maven repository.
> {noformat}
> $ mvn -am -pl 
> ambari-metrics/ambari-metrics-common,ambari-serviceadvisor,ambari-views clean 
> install
> ...
> $ mvn -pl ambari-server clean test
> ...
> [INFO] BUILD SUCCESS
> {noformat}
> This succeeds because {{ambari-metrics-common}} installs a shaded uber jar 
> including the {{..relocated..}} packages, hence they are available when 
> compiling {{ambari-server}}.  On the other hand, when building from scratch 
> (selectively with {{-am -pl ...}}, or the entire multimodule project) 
> classpath contains {{ambari-metrics-common}} classes and individual 
> dependencies without relocation.
> The goal of this change is to add a checkstyle check to catch such imports at 
> build-time with both compilation methods.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)