[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-18 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: YARN-6885.008.patch

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch, YARN-6885.006.patch, 
> YARN-6885.007.patch, YARN-6885.008.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-16 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6781:
--
Attachment: YARN-6781-YARN-3926.004.patch

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: YARN-3926
>
> Attachments: YARN-6781.001.patch, YARN-6781-YARN-3926.002.patch, 
> YARN-6781-YARN-3926.003.patch, YARN-6781-YARN-3926.004.patch
>
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Commented] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-16 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin commented on YARN-6885:
---

I thought the reason make the two fail cases have no related with code change. 
Could you please take a look at the latest patch, [#Daniel Templeton]? thank 
you!

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch, YARN-6885.006.patch, 
> YARN-6885.007.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-16 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6781:
--
Attachment: YARN-6781-YARN-3926.003.patch

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: YARN-3926
>
> Attachments: YARN-6781.001.patch, YARN-6781-YARN-3926.002.patch, 
> YARN-6781-YARN-3926.003.patch
>
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Commented] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-16 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin commented on YARN-6781:
---

Thanks [#Sunil G ] for your suggestion, but I noticed that there has some lines 
of code in testInitializeResourcesMap()
{code:java}
  Configuration conf = new YarnConfiguration();
  String resSt = "";
  for (String[] resources : test) {
resSt += (resources[0] + ",");
  }
  resSt = resSt.substring(0, resSt.length() - 1);
  conf.set(YarnConfiguration.RESOURCE_TYPES, resSt);
  for (String[] resources : test) {
String name =
YarnConfiguration.RESOURCE_TYPES + "." + resources[0] + ".units";
conf.set(name, resources[1]);
  }
{code}
And in the resourceUtils,  getResourceTypes() with Map argument is a private 
function.
Do we have any concern if we use the getResourceTypes() directly?

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: YARN-3926
>
> Attachments: YARN-6781.001.patch, YARN-6781-YARN-3926.002.patch
>
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Comment Edited] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-16 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin edited comment on YARN-6781 at 8/16/17 2:55 PM:


Thanks [#Sunil G ] for your suggestion, but I noticed that there has some lines 
of code in testInitializeResourcesMap()
{code:java}
  Configuration conf = new YarnConfiguration();
  String resSt = "";
  for (String[] resources : test) {
resSt += (resources[0] + ",");
  }
  resSt = resSt.substring(0, resSt.length() - 1);
  conf.set(YarnConfiguration.RESOURCE_TYPES, resSt);
  for (String[] resources : test) {
String name =
YarnConfiguration.RESOURCE_TYPES + "." + resources[0] + ".units";
conf.set(name, resources[1]);
  }
{code}
And in the resourceUtils,  getResourceTypes() with Map argument is a private 
function.
Do we have any concern if we use the getResourceTypes() directly?
If it's ok for you guys, I will modify the code as our discussion before.


was (Author: yu-tang lin):
Thanks [#Sunil G ] for your suggestion, but I noticed that there has some lines 
of code in testInitializeResourcesMap()
{code:java}
  Configuration conf = new YarnConfiguration();
  String resSt = "";
  for (String[] resources : test) {
resSt += (resources[0] + ",");
  }
  resSt = resSt.substring(0, resSt.length() - 1);
  conf.set(YarnConfiguration.RESOURCE_TYPES, resSt);
  for (String[] resources : test) {
String name =
YarnConfiguration.RESOURCE_TYPES + "." + resources[0] + ".units";
conf.set(name, resources[1]);
  }
{code}
And in the resourceUtils,  getResourceTypes() with Map argument is a private 
function.
Do we have any concern if we use the getResourceTypes() directly?

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: YARN-3926
>
> Attachments: YARN-6781.001.patch, YARN-6781-YARN-3926.002.patch
>
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Commented] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-16 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin commented on YARN-6781:
---

Hi [#Sunil G ],  I just checked the code of these two failed test cases. The 
error in testInitializeResourcesMapErrors() could be fixed easily by remove the 
redundant argument; but in testInitializeResourcesMapErrors(), the follow-up 
steps will check the value in Map object, that means after this code changes, 
this test case will be always failed. 
How do you think if we modify the code like this:

{code:java}
void initializeResourcesMap(Configuration conf){
  initializeResourcesMap(conf, null);
}
void initializeResourcesMap(Configuration conf, Map ret){
  if(ret == null) {
ret = new HashMap<>();
  }
...
}
{code}
Only the test will call the second method directly.

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: YARN-3926
>
> Attachments: YARN-6781.001.patch, YARN-6781-YARN-3926.002.patch
>
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Commented] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-15 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin commented on YARN-6781:
---

Hi,[#Daniel Templeton ], looks like jenkins is OK now, please check!

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: YARN-3926
>
> Attachments: YARN-6781.001.patch, YARN-6781-YARN-3926.002.patch
>
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Updated] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-15 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6781:
--
Attachment: YARN-6781-YARN-3926.002.patch

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: YARN-3926
>
> Attachments: YARN-6781.001.patch, YARN-6781-YARN-3926.002.patch
>
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Updated] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-15 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6781:
--
Attachment: YARN-6781.001.patch

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Attachments: YARN-6781.001.patch
>
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Assigned] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-15 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin reassigned YARN-6781:
-

Assignee: Yu-Tang Lin

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Commented] (YARN-6781) ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter

2017-08-15 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin commented on YARN-6781:
---

Hi Daniel, thanks for submit this issue. I would like to take this task!

> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: resourcemanager
>Affects Versions: YARN-3926
>Reporter: Daniel Templeton
>Priority: Minor
>  Labels: newbie
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}} 
> object, and it's never referenced again after the call.  The parameter can be 
> eliminated.  Instead the {{Map}} can be created inside the 
> {{initializeResourcesMap()}} method.



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-14 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: YARN-6885.007.patch

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch, YARN-6885.006.patch, 
> YARN-6885.007.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Comment Edited] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-14 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin edited comment on YARN-6885 at 8/14/17 2:59 PM:


modify some lines of code base on [#Daniel Templeton]'s feedback.


was (Author: yu-tang lin):
modify some lines of code base on [Daniel Templeton]'s feedback.

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch, YARN-6885.006.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Comment Edited] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-14 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin edited comment on YARN-6885 at 8/14/17 2:38 PM:


modify some lines of code base on [Daniel Templeton]'s feedback.


was (Author: yu-tang lin):
modify some lines of code base on code review's result.

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch, YARN-6885.006.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-13 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: YARN-6885.006.patch

modify some lines of code base on code review's result.

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch, YARN-6885.006.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Commented] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-10 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin commented on YARN-6885:
---

Hi [#Daniel Templeton], thanks for the comment!
I put the text and val object outside the switch case due to I can't reuse the 
same variable name just like the previous code in each case section, but just 
like you mentioned, it'll cost more to cast the variable.
About the comment 4 and 5, I tried the treat these two cases just like other 
cases in previous patch, but the finding-bugs plugin showed that the boxing 
issues might be occurred, so I added the brace and tried to use primitive 
variables.
Could you please give me some suggestions?

And I didn't get the comment 6, do you mean the code below should be put in the 
default case section? 
{code:java}
  if (isLeaf && !"parent".equals(element.getAttribute("type"))) {
  configuredQueues.get(FSQueueType.LEAF).add(queueName);
} else {
  if (isReservable) {
throw new AllocationConfigurationException("The configuration settings"
+ " for " + queueName + " are invalid. A queue element that "
+ "contains child queue elements or that has the type='parent' "
+ "attribute cannot also include a reservation element.");
  }
  configuredQueues.get(FSQueueType.PARENT).add(queueName);
}
{code}

 


> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Comment Edited] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-10 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin edited comment on YARN-6885 at 8/10/17 5:08 PM:


keep fixing the indent issue.


was (Author: yu-tang lin):
fix the missing indent issue.

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-10 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: YARN-6885.005.patch

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-10 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: (was: YARN-6885.004.patch)

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.005.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-10 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: (was: YARN-6885.003.patch)

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.004.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-10 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: YARN-6885.004.patch

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.003.patch, YARN-6885.004.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Commented] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-10 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin commented on YARN-6885:
---

Due to this patch is a minor refactor of two functions in 
AllocationFileLoaderService, and no interface is changed, so the existed tests 
should cover this change.

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.003.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Issue Comment Deleted] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-09 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Comment: was deleted

(was: minor refactor the old code, no new test case is needed.)

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.003.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-09 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: (was: YARN-6885.003.patch)

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Comment Edited] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-09 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin edited comment on YARN-6885 at 8/10/17 6:45 AM:


patch updated!


was (Author: yu-tang lin):
minor refactor the old code, no new test case is needed.

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.003.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-09 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: YARN-6885.003.patch

minor refactor the old code, no new test case is needed.

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: YARN-6885.003.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-09 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: YARN-6885.003.patch

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-09 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: (was: YARN-6885.002.patch)

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-09 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: (was: 0001-YARN-6885.patch)

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-09 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: YARN-6885.002.patch

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: 0001-YARN-6885.patch, YARN-6885.002.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Updated] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-08 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin updated YARN-6885:
--
Attachment: 0001-YARN-6885.patch

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
> Fix For: 3.0.0-alpha4
>
> Attachments: 0001-YARN-6885.patch
>
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Commented] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-08 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin commented on YARN-6885:
---

I noticed that reloadAllocations had the similar code, both will be modified in 
the same patch.

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Assignee: Yu-Tang Lin
>Priority: Minor
>  Labels: newbie
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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



[jira] [Commented] (YARN-6885) AllocationFileLoaderService.loadQueue() should use a switch statement in the main tag parsing loop instead of the if/else-if/...

2017-08-07 Thread Yu-Tang Lin (JIRA)

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

Yu-Tang Lin commented on YARN-6885:
---

Thanks to Daniel for filling this form, I would like to take this task, thanks!

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> 
>
> Key: YARN-6885
> URL: https://issues.apache.org/jira/browse/YARN-6885
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: fairscheduler
>Affects Versions: 3.0.0-alpha4
>Reporter: Daniel Templeton
>Priority: Minor
>  Labels: newbie
>
> {code}  if ("minResources".equals(field.getTagName())) {
> String text = ((Text)field.getFirstChild()).getData().trim();
> Resource val =
> FairSchedulerConfiguration.parseResourceConfigValue(text);
> minQueueResources.put(queueName, val);
>   } else if ("maxResources".equals(field.getTagName())) {
>   ...{code}



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

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