[
https://issues.apache.org/jira/browse/YARN-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839299#comment-13839299
]
Alejandro Abdelnur commented on YARN-1403:
------------------------------------------
* AllocationConfiguration.java
** Do we need the 2 constructors? The one receiving the config is a bit
misleading as sets all default values except for placement policy
** Most getter methods that are querying maps do 2 lookups, containsKey() then
get(), we could just do a single get() and if NULL return the default value.
ie:
{code}
public int getQueueMaxApps(String queue) {
Integer max = queueMaxApps.get(queue);
return (max != null) ? max : queueMaxAppsDefault;
}
{code}
** Most getter methods are doing an if/else block to return default values,
using (v!=null)? v : DEFAULT' would be shorter/simpler.
** getMaxResources(String queueName) should use a constant MAX RESOURCE instead
creating one over an over
** hasAccess() 'lastPeriodIndex-1', space before/after '-'
* AllocationFileLoaderService.java
** the time value constants should indicate in comments the time out (ms I
assume)
** start() Thread run() loop, what happens if somebody deletes the file in
"long lastModified = allocFile.lastModified();" shouldn't we check for exists()
before attempting reload detection? and warn if not there anymore.
** move 'ReloadListener' interface to the top of the class. Also, as it is an
inner interface, it can simply be named 'Listener' and the method of it
'onReload()'
* FairSCheudlerConfiguration.java
** false change line 242
* FSQueue.java
** If the FSQueue receives a QueueManager, and the QueueManager provides the
AllocationConfiguration (which is updated), then the changes are much less and
we don't have to iterate over all FSQueue instances to set an updated
AllocationConfiguration.
* QueueManager.java
** the 'updateQueuesWithReloadedConf()' method should receive the
AllocationConfiguration as parameter, it would be more obvious instead getting
it from the scheduler. Also, the name of the method should be
'updateConfiguration()'
> Separate out configuration loading from QueueManager in the Fair Scheduler
> --------------------------------------------------------------------------
>
> Key: YARN-1403
> URL: https://issues.apache.org/jira/browse/YARN-1403
> Project: Hadoop YARN
> Issue Type: Improvement
> Affects Versions: 2.2.0
> Reporter: Sandy Ryza
> Assignee: Sandy Ryza
> Attachments: YARN-1403-1.patch, YARN-1403-2.patch, YARN-1403-3.patch,
> YARN-1403.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.1#6144)