[ 
https://issues.apache.org/jira/browse/SUBMARINE-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16836426#comment-16836426
 ] 

Hadoop QA commented on SUBMARINE-60:
------------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
42s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} dupname {color} | {color:green}  0m  
0s{color} | {color:green} No case conflicting files found. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
|| || || || {color:brown} trunk Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 19m 
12s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
26s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
17s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
28s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
13m  4s{color} | {color:green} branch has no errors when building and testing 
our client artifacts. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
20s{color} | {color:green} trunk passed {color} |
| {color:blue}0{color} | {color:blue} spotbugs {color} | {color:blue}  0m 
37s{color} | {color:blue} Used deprecated FindBugs config; considering 
switching to SpotBugs. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  0m 
36s{color} | {color:green} trunk passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
23s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
21s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
21s{color} | {color:green} the patch passed {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
0m 12s{color} | {color:orange} 
hadoop-submarine/hadoop-submarine-yarnservice-runtime: The patch generated 1 
new + 0 unchanged - 0 fixed = 1 total (was 0) {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
23s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 
13m 16s{color} | {color:green} patch has no errors when building and testing 
our client artifacts. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
17s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} findbugs {color} | {color:red}  0m 
44s{color} | {color:red} hadoop-submarine/hadoop-submarine-yarnservice-runtime 
generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0) {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  0m 
54s{color} | {color:green} hadoop-submarine-yarnservice-runtime in the patch 
passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
27s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 52m 32s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| FindBugs | module:hadoop-submarine/hadoop-submarine-yarnservice-runtime |
|  |  Write to static field 
org.apache.hadoop.yarn.submarine.runtimes.yarnservice.YarnServiceUtils.appAdminClientFactory
 from instance method new 
org.apache.hadoop.yarn.submarine.runtimes.yarnservice.YarnServiceUtils()  At 
YarnServiceUtils.java:from instance method new 
org.apache.hadoop.yarn.submarine.runtimes.yarnservice.YarnServiceUtils()  At 
YarnServiceUtils.java:[line 30] |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce base: 
https://builds.apache.org/job/PreCommit-SUBMARINE-Build/94/artifact/out/Dockerfile
 |
| JIRA Issue | SUBMARINE-60 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12968303/SUBMARINE-60.001.patch
 |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite 
unit shadedclient findbugs checkstyle |
| uname | Linux dd8049997570 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 
10 13:20:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | personality/hadoop.sh |
| git revision | trunk / 2595125 |
| Default Java | 1.8.0_191 |
| checkstyle | 
https://builds.apache.org/job/PreCommit-SUBMARINE-Build/94/artifact/out/diff-checkstyle-hadoop-submarine_hadoop-submarine-yarnservice-runtime.txt
 |
| findbugs | 
https://builds.apache.org/job/PreCommit-SUBMARINE-Build/94/artifact/out/new-findbugs-hadoop-submarine_hadoop-submarine-yarnservice-runtime.html
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-SUBMARINE-Build/94/testReport/ |
| Max. process+thread count | 361 (vs. ulimit of 10000) |
| modules | C: hadoop-submarine/hadoop-submarine-yarnservice-runtime U: 
hadoop-submarine/hadoop-submarine-yarnservice-runtime |
| Console output | 
https://builds.apache.org/job/PreCommit-SUBMARINE-Build/94/console |
| versions | git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1 |
| Powered by | Apache Yetus 0.11.0-SNAPSHOT http://yetus.apache.org |


This message was automatically generated.



> Remove stubServiceClient from YarnServiceUtils
> ----------------------------------------------
>
>                 Key: SUBMARINE-60
>                 URL: https://issues.apache.org/jira/browse/SUBMARINE-60
>             Project: Hadoop Submarine
>          Issue Type: Improvement
>            Reporter: Szilard Nemeth
>            Assignee: Szilard Nemeth
>            Priority: Major
>         Attachments: SUBMARINE-60.001.patch
>
>
> We have a field in YarnServiceUtils: 
> org.apache.hadoop.yarn.submarine.runtimes.yarnservice.YarnServiceUtils#stubServiceClient
> There's a setter for this field, marked with VisibleForTesting and the test 
> code uses this setter to set the value of this field to a mock.
> Then, when createServiceClient gets called from the production code, it first 
> checks if we have this field set. If so, we return it, otherwise we create a 
> normal app admin client.
> This is an anti-pattern to just have test-related fields or methods in the 
> production code.
>  
> Currently, YarnServiceJobSubmitter and YarnServiceJobMonitor are the only 
> users of 
> org.apache.hadoop.yarn.submarine.runtimes.yarnservice.YarnServiceUtils#createServiceClient.
> This static could be easily replaced with a factory that receives the current 
> Configuration object then returns the AppAdminClient. The test should inject 
> the mock factory either via the constructor or with a setter.



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

Reply via email to