本文整理汇总了Python中Cobalt.Components.base.Component.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Component.__init__方法的具体用法?Python Component.__init__怎么用?Python Component.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cobalt.Components.base.Component
的用法示例。
在下文中一共展示了Component.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.event_manager = ComponentProxy("event-manager")
self.bqsim = ComponentProxy("queue-manager")
self.powmon_logger = None
self.total_cost = 0.0
self.time_power_list =[{"unixtime":0, "power":0, "count":0, "utilization":0}]
示例2: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.resources = ResourceDict()
self.process_groups = ProcessGroupDict()
self.process_groups.item_cls = BBProcessGroup
self.queue_assignments = {}
self.queue_assignments["default"] = sets.Set(self.resources)
示例3: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__ (self, *args, **kwargs):
"""Initialize a new ServiceLocator.
All arguments are passed to the component constructor.
"""
Component.__init__(self, *args, **kwargs)
self.services = ServiceDict()
示例4: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__ (self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.process_groups = ProcessGroupDict()
self.all_nodes = set()
self.running_nodes = set()
self.down_nodes = set()
self.queue_assignments = {}
self.node_order = {}
try:
self.configure(cluster_hostfile)
except:
self.logger.error("unable to load hostfile")
self.queue_assignments["default"] = set(self.all_nodes)
self.alloc_only_nodes = {} # nodename:starttime
self.cleaning_processes = []
#keep track of which jobs still have hosts being cleaned
self.cleaning_host_count = {} # jobid:count
self.locations_by_jobid = {} #jobid:[locations]
self.jobid_to_user = {} #jobid:username
self.alloc_timeout = int(get_cluster_system_config("allocation_timeout", 300))
self.logger.info("allocation timeout set to %d seconds." % self.alloc_timeout)
示例5: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__ (self, *args, **kwargs):
"""Initialize a new BaseForker.
All arguments are passed to the component constructor.
"""
Component.__init__(self, *args, **kwargs)
self.children = {}
self.id_gen = IncrID()
示例6: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__ (self, *args, **kwargs):
"""Initialize a new ServiceLocator.
All arguments are passed to the component constructor.
"""
Component.__init__(self, *args, **kwargs)
self.ignore = []
self.lastwait = 0
self.pgroups = ProcessGroupDict()
self.zombie_mpi = {}
示例7: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.COMP_QUEUE_MANAGER = "queue-manager"
self.COMP_SYSTEM = "system"
self.reservations = ReservationDict()
self.queues = QueueDict(self.COMP_QUEUE_MANAGER)
self.jobs = JobDict(self.COMP_QUEUE_MANAGER)
self.started_jobs = {}
self.sync_state = Cobalt.Util.FailureMode("Foreign Data Sync")
self.active = True
self.get_current_time = time.time
示例8: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.event_list = [{"unixtime": 0}]
self.time_stamp = 0
self.finished = False
self.bgsched = Sim_bg_Sched(**kwargs)
self.csched = Sim_Cluster_Sched()
self.go_next = True
示例9: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__ (self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self._partitions = PartitionDict()
self._managed_partitions = set()
self.process_groups = BGProcessGroupDict()
self.node_card_cache = dict()
self._partitions_lock = thread.allocate_lock()
self.pending_diags = dict()
self.failed_diags = list()
self.bridge_in_error = False
self.cached_partitions = None
self.offline_partitions = []
示例10: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__(self, *args, **kwargs):
logger.debug(
"heckle: System: init ... %s ... &&&&&&&&&&&&&&&&&&&&&&&&&&&&& I am here as well &&&&&&&&&&&&&&&&&&&&&&&&&"
% threading.current_thread().getName()
)
Component.__init__(self, *args, **kwargs)
self.process_groups = ProcessGroupDict()
self.process_groups.item_cls = HeckleProcessGroup
self.resources = ResourceDict()
self.queue_assignments["default"] = self.resources.keys()
print "\n\n\n\n"
print "Queue assignments are: %s" % self.queue_assignments
示例11: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.event_list = [{'unixtime':0}]
self.time_stamp = 0
self.finished = False
self.bgsched = Sim_bg_Sched(**kwargs)
#inhibit coscheduling and cluster simulation feature before bgsched.py makes change
#self.csched = Sim_Cluster_Sched()
self.go_next = True
示例12: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__ (self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.process_groups = ProcessGroupDict()
self.pending_diags = dict()
self.failed_diags = list()
self.all_nodes = sets.Set()
self.running_nodes = sets.Set()
self.down_nodes = sets.Set()
self.queue_assignments = {}
self.node_order = {}
try:
self.configure(CP.get("cluster_system", "hostfile"))
except:
self.logger.error("unable to load hostfile")
self.queue_assignments["default"] = sets.Set(self.all_nodes)
示例13: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.event_list = [{'unixtime':0}]
self.time_stamp = 0
self.finished = False
self.bgsched = Sim_bg_Sched(**kwargs)
self.csched = Sim_Cluster_Sched()
self.powermonitor = PowerMonitor()
self.go_next = True
# last scheduling time
self.last_schedule_time = 0
示例14: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.reservations = ReservationDict()
self.queues = QueueDict()
self.jobs = JobDict()
self.started_jobs = {}
self.sync_state = Cobalt.Util.FailureMode("Foreign Data Sync")
self.active = True
self.get_current_time = time.time
self.id_gen = IncrID()
global bgsched_id_gen
bgsched_id_gen = self.id_gen
self.cycle_id_gen = IncrID()
global bgsched_cycle_id_gen
bgsched_cycle_id_gen = self.cycle_id_gen
示例15: __init__
# 需要导入模块: from Cobalt.Components.base import Component [as 别名]
# 或者: from Cobalt.Components.base.Component import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Component.__init__(self, *args, **kwargs)
self.least_item = int(get_histm_config('least_item', 10)) # tunable
self.lastDays = int(get_histm_config("last_days", 60)) # tunable
self.jobinfo_file = get_histm_config("jobinfo_file", "jobinfo.hist")
self.jobinfo_script = get_histm_config("jobinfo_script", "jobinfo.py")
self.fraction = float(get_histm_config("fraction", 0.8))
self.job_dict = {} #historical job dictionary
self.project_set = set([]) #distinct project names of historical jobs
self.user_set = set([]) #distinct user names of historical jobs
self.pair_set = set([]) #distinct (user, project) pair
self.Ap_dict_proj = {} #dictionary of walltime adjusting parameters by project name
self.Ap_dict_user = {} #dictionary of walltime adjusting parameters by user name
self.Ap_dict_paired = {} #dictionary of walltime adjusting parameters by double key (user, project)
self.update_Ap_Dict()