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

Yong Qiao Wang updated MESOS-3301:
----------------------------------
    Description: 
In functions: HierarchicalAllocatorProcess<RoleSorter, 
FrameworkSorter>::initialize() and HierarchicalAllocatorProcess<RoleSorter, 
FrameworkSorter>::allocate(), it does not need to check the roleSorter->count() 
, because the role * always be added to roleSorter.

So suggest to remove the following lines from initialize() and allocate() 
functions:

-if (roleSorter->count() == 0) { 
    - LOG(ERROR) << "No roles specified, cannot allocate resources!"; 
    - return; 
-}

  was:
In functions: HierarchicalAllocatorProcess<RoleSorter, 
FrameworkSorter>::initialize() and HierarchicalAllocatorProcess<RoleSorter, 
FrameworkSorter>::allocate(), it does not need to check the roleSorter->count() 
, because the role * always be added to roleSorter.

So suggest to remove the following lines from initialize() and allocate() 
functions:

    if (roleSorter->count() == 0) { - LOG(ERROR) << "No roles specified, cannot 
allocate resources!"; - return; -}




> Should remove redundant check
> -----------------------------
>
>                 Key: MESOS-3301
>                 URL: https://issues.apache.org/jira/browse/MESOS-3301
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Yong Qiao Wang
>            Assignee: Yong Qiao Wang
>            Priority: Minor
>
> In functions: HierarchicalAllocatorProcess<RoleSorter, 
> FrameworkSorter>::initialize() and HierarchicalAllocatorProcess<RoleSorter, 
> FrameworkSorter>::allocate(), it does not need to check the 
> roleSorter->count() , because the role * always be added to roleSorter.
> So suggest to remove the following lines from initialize() and allocate() 
> functions:
> -if (roleSorter->count() == 0) { 
>     - LOG(ERROR) << "No roles specified, cannot allocate resources!"; 
>     - return; 
> -}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to