def create_Nodes(): #max n = 255 def _create_Nodes(n): for i in range(n): yield BaseNode(f"198.168.4.{i+1}") yield _create_Nodes Base.reset()
def fission_pipes(): """Returns a function which returns given number of BasePipes. """ def _pipes(num): return [base.BasePipe(i) for i in range(1, num + 1)] yield _pipes base.reset()
def fission_jobs(): """Returns a function which returns given number of BaseJobs. """ def _jobs(num): return [base.BaseJob() for i in range(num)] yield _jobs base.reset()
def fission_node(): """Returns a function with returns a BaseNode with given ip """ def _node(ip): return base.BaseNode(ip) yield _node base.reset()
def fission_test_job(): _job = ReduceJob(inputs=[ReducePipe(9001)], outputs=[PicklePipe(9002)]) yield _job # This will also remove the buffered job, pipes, groups and nodes which resulted from loading the config. # They are still accessible from the config or via the cfg_job fixture. reset()
def fission_nodes(): """Returns a function with returns a list with given number of BaseNodes (max 253). """ def _nodes(num): assert num <= 253 return [base.BaseNode(f"192.168.4.{i}") for i in range(1, num + 1)] yield _nodes base.reset()
def create_Pipes(): Pipe1 = BasePipe(1) Pipe2 = BasePipe(2) Pipe3 = BasePipe(3) yield Pipe1, Pipe2, Pipe3 base.reset()
def xml_loader(): yield XMLLoader(ip="ip") base.reset()
def fission_reset(): reset() yield None reset()
def job_no_input(pipes): job = base.BaseJob(inputs=[], outputs=pipes) yield job base.reset()
def pipes(): a = [] a.append(base.BasePipe(1)) a[0].BLOCK_SIZE = 16 yield a base.reset()
def fission_pipe(): """Returns BasePipe with id 1. """ yield base.BasePipe(1) base.reset()
def fission_job(): """Returns a BaseJob """ yield base.BaseJob() base.reset()
def create_Jobs(): def _create_Jobs(n): for i in range(n): yield BaseJob() yield _create_Jobs Base.reset()