[jira] [Updated] (YARN-6004) Refactor TestResourceLocalizationService#testDownloadingResourcesOnContainer so that it is less than 150 lines

2017-04-04 Thread Chris Trezzo (JIRA)

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

Chris Trezzo updated YARN-6004:
---
Attachment: YARN-6004-branch-2.001.patch

Thanks [~mingma]! Attached is a branch-2 v1 patch.

Note that the reason why this does not blow up in trunk is because: "starting 
in Java SE 8, a local class can access local variables and parameters of the 
enclosing block that are final or effectively final. A variable or parameter 
whose value is never changed after it is initialized is effectively final." 
Because of this, the final modifier is unnecessary.

See java documentation: 
http://docs.oracle.com/javase/tutorial/java/javaOO/localclasses.html

> Refactor TestResourceLocalizationService#testDownloadingResourcesOnContainer 
> so that it is less than 150 lines
> --
>
> Key: YARN-6004
> URL: https://issues.apache.org/jira/browse/YARN-6004
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: test
>Reporter: Chris Trezzo
>Assignee: Chris Trezzo
>Priority: Trivial
>  Labels: newbie
> Attachments: YARN-6004-branch-2.001.patch, YARN-6004-trunk.001.patch, 
> YARN-6004-trunk.002.patch
>
>
> The TestResourceLocalizationService#testDownloadingResourcesOnContainerKill 
> method is over 150 lines:
> bq. 
> ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestResourceLocalizationService.java:1128:
>  @Test(timeout = 2):3: Method length is 242 lines (max allowed is 150).
> This method needs to be refactored and broken up into smaller methods.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Updated] (YARN-6004) Refactor TestResourceLocalizationService#testDownloadingResourcesOnContainer so that it is less than 150 lines

2017-04-04 Thread Ming Ma (JIRA)

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

Ming Ma updated YARN-6004:
--
Fix Version/s: (was: 3.0.0-alpha3)
   (was: 2.9.0)

> Refactor TestResourceLocalizationService#testDownloadingResourcesOnContainer 
> so that it is less than 150 lines
> --
>
> Key: YARN-6004
> URL: https://issues.apache.org/jira/browse/YARN-6004
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: test
>Reporter: Chris Trezzo
>Assignee: Chris Trezzo
>Priority: Trivial
>  Labels: newbie
> Attachments: YARN-6004-trunk.001.patch, YARN-6004-trunk.002.patch
>
>
> The TestResourceLocalizationService#testDownloadingResourcesOnContainerKill 
> method is over 150 lines:
> bq. 
> ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestResourceLocalizationService.java:1128:
>  @Test(timeout = 2):3: Method length is 242 lines (max allowed is 150).
> This method needs to be refactored and broken up into smaller methods.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Updated] (YARN-6004) Refactor TestResourceLocalizationService#testDownloadingResourcesOnContainer so that it is less than 150 lines

2017-03-29 Thread Chris Trezzo (JIRA)

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

Chris Trezzo updated YARN-6004:
---
Attachment: YARN-6004-trunk.002.patch

Attached is v2 for trunk to address checkstyle issues.

> Refactor TestResourceLocalizationService#testDownloadingResourcesOnContainer 
> so that it is less than 150 lines
> --
>
> Key: YARN-6004
> URL: https://issues.apache.org/jira/browse/YARN-6004
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: test
>Reporter: Chris Trezzo
>Assignee: Chris Trezzo
>Priority: Trivial
>  Labels: newbie
> Attachments: YARN-6004-trunk.001.patch, YARN-6004-trunk.002.patch
>
>
> The TestResourceLocalizationService#testDownloadingResourcesOnContainerKill 
> method is over 150 lines:
> bq. 
> ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestResourceLocalizationService.java:1128:
>  @Test(timeout = 2):3: Method length is 242 lines (max allowed is 150).
> This method needs to be refactored and broken up into smaller methods.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Updated] (YARN-6004) Refactor TestResourceLocalizationService#testDownloadingResourcesOnContainer so that it is less than 150 lines

2017-03-27 Thread Chris Trezzo (JIRA)

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

Chris Trezzo updated YARN-6004:
---
Attachment: YARN-6004-trunk.001.patch

Attached is a v1 patch for trunk. This patch breaks the following out into 
separate methods:
# Creation methods for various objects in the test (i.e. Dispatcher, 
ApplicationBus, ContainerBus...).
# App initialization
# Localizer initialization
# Localizer status mocking
# Localization

> Refactor TestResourceLocalizationService#testDownloadingResourcesOnContainer 
> so that it is less than 150 lines
> --
>
> Key: YARN-6004
> URL: https://issues.apache.org/jira/browse/YARN-6004
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: test
>Reporter: Chris Trezzo
>Assignee: Chris Trezzo
>Priority: Trivial
>  Labels: newbie
> Attachments: YARN-6004-trunk.001.patch
>
>
> The TestResourceLocalizationService#testDownloadingResourcesOnContainerKill 
> method is over 150 lines:
> bq. 
> ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/TestResourceLocalizationService.java:1128:
>  @Test(timeout = 2):3: Method length is 242 lines (max allowed is 150).
> This method needs to be refactored and broken up into smaller methods.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org