def __init__(self, ipaddr, core=0, port=11911, count=1, accession=0): cores = range(core, 112) m = mapstore() if port is not None: m.merge({"port": port}) config_ado.__init__(self, shard_proto_ado(ipaddr, m, cores=cores, port=port), ado_mixin(cores[1]), count)
# CPU range was 6-8, but will lock-up on 4-core system when clamped to 3-3 and client also clamped to 3 "resources": { "ado_cores": (core_count() < 8 and core_range(1, 2) or core_range(core + 5, core + 5 + 2)), "ado_manager_core": core_clamp(core) } }) class config_ado(config): """ configuration with ado specification """ def __init__(self, shard_proto_, ado, count_=1): config.__init__(self, shard_proto_, count_) self.merge(ado) if __name__ == '__main__': print("core_count: ", core_count()) core = 0 from shard_protos import shard_proto, shard_proto_ado from stores import mapstore print( "config_secure: ", config_secure(shard_proto("127.0.0.1", mapstore(), core=core)).json()) print("ado_resources: ", ado_mixin(1).json()) print( "config_ado: ", config_ado(shard_proto_ado("127.0.0.1", mapstore(), core=core), ado_mixin(core=core + 1)).json())
def __init__(self, addr): config_secure0.__init__(self, shard_proto(addr, mapstore()))
def __init__(self, ipaddr, port=11911, core=0): config_secure.__init__(self, shard_proto(ipaddr, mapstore(), cores=range(core, 112), port=port))
self, { "ado_path": "%s/bin/ado" % (install_prefix, ), # Special case for CPUs with less than 8 cores # CPU range was 6-8, but will lock-up on 4-core system when clamped to 3-3 and client also clamped to 3 "resources": { "ado_cores": (core_count() < 8 and core_range(1, 2) or core_range(6, 8)), "ado_manager_core": core_clamp(1) } }) class config_ado0(config_0): """ configuration with ado specification """ def __init__(self, shard_proto_): config_0.__init__(self, shard_proto_) self.merge(ado_mixin()) if __name__ == '__main__': print("core_count: ", core_count()) from shard_protos import shard_proto, shard_proto_ado from stores import mapstore print("config_secure0: ", config_secure0(shard_proto("127.0.0.1", mapstore())).json()) print("ado_resources: ", ado_mixin().json()) print("config_ado: ", config_ado0(shard_proto_ado("127.0.0.1", mapstore())).json())
def __init__(self, addr, net): config_0.__init__(self, shard_proto_net(addr, mapstore(), net)) self.merge(sockets())
def __init__(self, ipaddr, core=0): cores = range(core,112) config.__init__(self, shard_proto(ipaddr, mapstore(), cores=cores), 1)
def __init__(self, addr): config_ado0.__init__(self, shard_proto_ado(addr, mapstore()))