Ignore:
Timestamp:
11/06/12 12:52:07 (12 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/trunk/src/schedframe/scheduling
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/src/schedframe/scheduling/plan/AllocationInterface.java

    r477 r555  
    111111        public <ProviderInfo> void setProviderInfo(ProviderInfoInterface<ProviderInfo> providerInfo); 
    112112         
    113         public void setSpecificResources(Map<ResourceUnitName, ResourceUnit> choosenResources); 
     113        public void setRequestedResources(Map<ResourceUnitName, ResourceUnit> choosenResources); 
    114114         
    115115        public Map<ResourceUnitName, ResourceUnit> getRequestedResources(); 
     
    119119        public String getProviderName(); 
    120120         
    121         public boolean isProcessing(); 
     121        //public boolean isProcessing(); 
    122122} 
  • DCWoRMS/trunk/src/schedframe/scheduling/plan/impl/Allocation.java

    r477 r555  
    141141 
    142142        protected Map<ResourceUnitName, ResourceUnit> requestedResources; 
    143         protected boolean isProcessing = false; 
     143        //protected boolean isProcessing = false; 
    144144        protected String providerName; 
    145145 
    146146        @Override 
    147         public void setSpecificResources( 
     147        public void setRequestedResources( 
    148148                        Map<ResourceUnitName, ResourceUnit> choosenResources) { 
    149149                requestedResources = choosenResources; 
    150                 ResourceManagerUtils.setPendingResources(choosenResources); 
    151                 ProcessingElements processingElements = (ProcessingElements)requestedResources.get(StandardResourceUnitName.PE); 
    152                 if(processingElements != null){ 
    153                         isProcessing = true; 
    154                 }        
     150                if(choosenResources != null){ 
     151                        ResourceManagerUtils.setPendingResources(choosenResources); 
     152                        /*ProcessingElements processingElements = (ProcessingElements)requestedResources.get(StandardResourceUnitName.PE); 
     153                        if(processingElements != null){ 
     154                                isProcessing = true; 
     155                        }       */ 
     156                } 
     157 
    155158        } 
    156159 
     
    160163        } 
    161164 
    162         public boolean isProcessing(){ 
     165        /*public boolean isProcessing(){ 
    163166                return isProcessing; 
    164         } 
     167        }*/ 
    165168 
    166169        @Override 
  • DCWoRMS/trunk/src/schedframe/scheduling/policy/local/LocalManagementSystem.java

    r497 r555  
    198198 
    199199                                AllocationInterface<?> allocation = allocations.get(j); 
    200                                 if (allocation.isProcessing()) { 
     200                                if (allocation.getRequestedResources() == null || allocation.getRequestedResources().size() > 0) { 
    201201                                        ExecTask exec = (ExecTask) task;                                         
    202202                                        executeTask(exec, allocation.getRequestedResources()); 
     
    217217                Executable exec = (Executable)task; 
    218218                boolean allocationStatus = getAllocationManager().allocateResources(choosenResources); 
    219                 if(allocationStatus == false) 
     219                if(allocationStatus == false){ 
     220                        log.error("Task requires more resources than is availiable at this moment."); 
    220221                        return; 
     222                } 
     223 
    221224                removeFromQueue(task); 
    222225 
Note: See TracChangeset for help on using the changeset viewer.