-
Notifications
You must be signed in to change notification settings - Fork 0
/
Schedulable.py
75 lines (46 loc) · 1.25 KB
/
Schedulable.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
'''
Created on Jan 8, 2015
@author: niuzhaojie
'''
import abc
from Resources import Resources
class Schedulable(object):
__metaclass__ = abc.ABCMeta
def __init__(self):
self._fairShare = Resources.createResource(0, 0, 0, 0)
self._weight = 1.0
@abc.abstractmethod
def getName(self):
return
@abc.abstractmethod
def getDemand(self):
return
@abc.abstractmethod
def getResourceUsage(self):
return
def setWeight(self, weight):
self._weight = weight
def getWeight(self):
return self._weight
@abc.abstractmethod
def getStartTime(self):
return
'''@abc.abstractmethod
def getPriority(self):
return'''
@abc.abstractmethod
def updateDemand(self):
return
@abc.abstractmethod
def assignContainer(self, node):
return
def setFairShare(self, resource):
self._fairShare = resource
def getFairShare(self):
return self._fairShare
@abc.abstractmethod
def getMultiResFitness(self):
return
@abc.abstractmethod
def getResEntropy(self):
return