Пример #1
0
def main(argv=None):
    arg_parser = ArgumentParser(description=DESCRIPTION, )
    arg_parser.add_argument("--master", default=None, required=True)
    PulsarManagerConfigBuilder.populate_options(arg_parser)
    args = arg_parser.parse_args(argv)
    ensure_mesos_libs()

    config_builder = PulsarManagerConfigBuilder(args)
    config_builder.setup_logging()
    config = config_builder.load()

    run(master=args.master,
        manager_options=config_builder.to_dict(),
        config=config)
Пример #2
0
def main(args=None):
    arg_parser = ArgumentParser(description=DESCRIPTION)
    arg_parser.add_argument("--file", default=None)
    arg_parser.add_argument("--base64", default=None)
    PulsarManagerConfigBuilder.populate_options(arg_parser)
    args = arg_parser.parse_args(args)

    config_builder = PulsarManagerConfigBuilder(args)
    manager, app = manager_from_args(config_builder)
    try:
        job_config = __load_job_config(args)
        submit_job(manager, job_config)
        wait_for_job(manager, job_config)
    except BaseException:
        log.exception("Failure submitting or waiting on job.")
    finally:
        app.shutdown()
Пример #3
0
def main(args=None):
    arg_parser = ArgumentParser(description=DESCRIPTION)
    arg_parser.add_argument("--file", default=None)
    arg_parser.add_argument("--base64", default=None)
    PulsarManagerConfigBuilder.populate_options(arg_parser)
    args = arg_parser.parse_args(args)

    config_builder = PulsarManagerConfigBuilder(args)
    manager, app = manager_from_args(config_builder)
    try:
        job_config = __load_job_config(args)
        submit_job(manager, job_config)
        wait_for_job(manager, job_config)
    except BaseException:
        log.exception("Failure submitting or waiting on job.")
    finally:
        app.shutdown()
Пример #4
0
def main():
    ensure_mesos_libs()
    arg_parser = ArgumentParser(
        description=DESCRIPTION,
    )
    arg_parser.add_argument("--master", default=None, required=True)
    PulsarManagerConfigBuilder.populate_options(arg_parser)
    args = arg_parser.parse_args()

    config_builder = PulsarManagerConfigBuilder(args)
    config_builder.setup_logging()
    config = config_builder.load()

    run(
        master=args.master,
        manager_options=config_builder.to_dict(),
        config=config
    )
Пример #5
0
def add_common_submit_args(arg_parser):
    arg_parser.add_argument("--file", default=None)
    arg_parser.add_argument("--base64", default=None)
    PulsarManagerConfigBuilder.populate_options(arg_parser)
Пример #6
0
def add_common_submit_args(arg_parser):
    arg_parser.add_argument("--file", default=None)
    arg_parser.add_argument("--base64", default=None)
    PulsarManagerConfigBuilder.populate_options(arg_parser)