def start_local_catalog(self, isaggressive=False): settings = systemsettings() service = RedisService(settings.name, isaggressive=False) self.localcatalogserver = service.start() logging.info("Catalog service started as a background thread. Waiting on it...") timeout = settings.CATALOG_STARTUP_DELAY while timeout > 0: if service.ping(): return True logging.info("Waiting on the Server. Will timeout in %d secs.", timeout) time.sleep(1) timeout -= 1 self.localcatalogserver = None return False
if args.name is None: logging.error( 'ERROR. Service requires a application name with corresponding input (json) confile file' ) sys.exit() service = CacheService(args.name) elif args.service == 'alluxio': if args.name is None: logging.error( 'ERROR. Service requires a application name with corresponding input (json) confile file' ) sys.exit() service = AlluxioService(args.name, role) else: logging.error('Unrecognized Service. Quitting') sys.exit() if args.command == 'start': logging.info('Service: START') t = service.start() if t is not None: t.join() else: logging.error("Service failed to start") elif args.command == 'stop': logging.info('Service: STOP') service.stop() else: logging.warning("Command not recognized: %s", args.command) logging.debug('Execution Complete for: %s', __file__)
sys.exit() service = RedisService(args.name, isaggressive=True, role=args.role) elif args.service == 'cache': if args.name is None: logging.error('ERROR. Service requires a application name with corresponding input (json) confile file') sys.exit() service = CacheService(args.name) elif args.service == 'alluxio': if args.name is None: logging.error('ERROR. Service requires a application name with corresponding input (json) confile file') sys.exit() service = AlluxioService(args.name, role) else: logging.error('Unrecognized Service. Quitting') sys.exit() if args.command == 'start': logging.info('Service: START') t = service.start() if t is not None: t.join() else: logging.error("Service failed to start") elif args.command == 'stop': logging.info('Service: STOP') service.stop() else: logging.warning("Command not recognized: %s", args.command) logging.debug('Execution Complete for: %s', __file__)