def __init__(self, options): super(PbsHodJob, self).__init__(options) self.modules = [options.options.hod_module] config_filenames = resolve_config_paths(options.options.hodconf, options.options.dist) self.log.debug('Manifest config paths resolved to: %s', config_filenames) config_filenames = parse_comma_delim_list(config_filenames) self.log.info('Loading "%s" manifest config', config_filenames) # If the user mistypes the --dist argument (e.g. Haddoop-...) then this will # raise; TODO: cleanup the error reporting. precfg = PreServiceConfigOpts.from_file_list( config_filenames, workdir=options.options.workdir, modulepaths=options.options.modulepaths, modules=options.options.modules) for modulepath in precfg.modulepaths: self.log.debug("Adding extra module path '%s' to startup script", modulepath) self.modulepaths.append(modulepath) for module in precfg.modules: self.log.debug("Adding '%s' module to startup script.", module) self.modules.append(module)
def __init__(self, options): super(PbsHodJob, self).__init__(options) self.modules = [options.options.hod_module] config_filenames = resolve_config_paths(options.options.hodconf, options.options.dist) self.log.debug('Manifest config paths resolved to: %s', config_filenames) config_filenames = parse_comma_delim_list(config_filenames) self.log.info('Loading "%s" manifest config', config_filenames) # If the user mistypes the --dist argument (e.g. Haddoop-...) then this will # raise; TODO: cleanup the error reporting. precfg = PreServiceConfigOpts.from_file_list(config_filenames, workdir=options.options.workdir) for module in precfg.modules: self.log.debug("Adding '%s' module to startup script.", module) self.modules.append(module)
def test_parse_comma_delim_list(self): lst = hcc.parse_comma_delim_list('hello,world, have, a , nice,day') expect = ['hello', 'world', 'have', 'a', 'nice', 'day'] self.assertEqual(lst, expect)