Example #1
0
def _args_show_chunk_operator_summary(args):
    import pbsmrtpipe.loader as L
    chunk_operators = L.load_all_installed_chunk_operators()

    if chunk_operators:
        for i, xs in enumerate(chunk_operators.iteritems()):
            op_id, chunk_operator = xs
            print "{i}. Chunk Operator Id: {o}".format(o=op_id, i=i)
            print "  Scatter :"
            print "    Scatter Task: {i} -> Chunk Task: {t}".format(
                i=chunk_operator.scatter.task_id,
                t=chunk_operator.scatter.scatter_task_id)
            for si, c in enumerate(chunk_operator.scatter.chunks):
                print "    {i} Task Binding: {t} -> Chunk Key: {k}".format(
                    t=c.task_input, k=c.chunk_key, i=si)
            print "  Gather :"
            for ci, c in enumerate(chunk_operator.gather.chunks):
                print "    {i} Gather Task: {t} ".format(t=c.gather_task_id,
                                                         i=ci)
                print "      Task Binding: {i} -> Chunk Key: {k} ".format(
                    i=c.task_input, k=c.chunk_key)
    else:
        print "WARNING. No Chunk operators loaded"

    return 0
Example #2
0
def _args_show_chunk_operator_summary(args):
    import pbsmrtpipe.loader as L
    chunk_operators = L.load_all_installed_chunk_operators()

    if chunk_operators:
        for i, xs in enumerate(chunk_operators.iteritems()):
            op_id, chunk_operator = xs
            print "{i}. Chunk Operator Id: {o}".format(o=op_id, i=i)
            print "  Scatter :"
            print "    Scatter Task: {i} -> Chunk Task: {t}".format(i=chunk_operator.scatter.task_id, t=chunk_operator.scatter.scatter_task_id)
            for si, c in enumerate(chunk_operator.scatter.chunks):
                print "    {i} Task Binding: {t} -> Chunk Key: {k}".format(t=c.task_input, k=c.chunk_key, i=si)
            print "  Gather :"
            for ci, c in enumerate(chunk_operator.gather.chunks):
                print "    {i} Gather Task: {t} ".format(t=c.gather_task_id, i=ci)
                print "      Task Binding: {i} -> Chunk Key: {k} ".format(i=c.task_input, k=c.chunk_key)
    else:
        print "WARNING. No Chunk operators loaded"

    return 0
Example #3
0
 def test_loading(self):
     import pbsmrtpipe.loader as L
     operators = L.load_all_installed_chunk_operators()
     emsg = "Unable to load operators"
     log.debug(pprint.pformat(operators, indent=4))
     self.assertTrue(len(operators) > 0, emsg)
Example #4
0
def _get_registered_tasks_and_operators():
    import pbsmrtpipe.loader as L
    return L.load_all_tool_contracts(), L.load_all_installed_chunk_operators()
def _get_registered_tasks_and_operators():
    import pbsmrtpipe.loader as L
    return L.load_all_tool_contracts(), L.load_all_installed_chunk_operators()
Example #6
0
 def test_loading(self):
     import pbsmrtpipe.loader as L
     operators = L.load_all_installed_chunk_operators()
     emsg = "Unable to load operators"
     log.debug(pprint.pformat(operators, indent=4))
     self.assertTrue(len(operators) > 0, emsg)