def from_dict(data: Dict, config) -> object: AbstractJobConfig.from_dict(data, config) config.flink_home = data['flink_home'] config.jm_host_port = data.get('jm_host_port', 'localhost:8081') config.class_path = data.get('class_path') config.py_entry_file = data.get('py_entry_file') config.py_files = data.get('py_files') config.py_module = data.get('py_module') config.jar_path = data.get('jar_path') config.language_type: LanguageType = LanguageType( data.get('language_type')) config.flink_conf = data.get('flink_conf') config.image = data.get('ai_flow_worker_image') return config
def from_dict(data: Dict, config) -> object: AbstractJobConfig.from_dict(data, config) config.base_url = data['base_url'] config.namespace = data['namespace'] config.token = data['token'] config.deployment_name = data['deployment_name'] config.jar_path = data.get('jar_path', None) config.entry_class = data.get('entry_class', None) config.main_args = data.get('main_args', None) config.flink_image_info = data.get('flink_image_info', None) config.parallelism = data.get('parallelism', 1) config.resources = data.get('resources', None) config.logging = data.get('logging', None) config.flink_config = data.get('flink_config') config.upgrade_strategy = data.get('upgrade_strategy', default_upgrade_strategy) config.restore_strategy = data.get('restore_strategy', default_restore_strategy) config.job_type = data.get('job_type', 'java') config.addition_dependencies = data.get('addition_dependencies', []) config.kubernetes = data.get('kubernetes', {}) config.spec = data.get('spec', None) return config
def from_dict(data: Dict, config) -> object: return AbstractJobConfig.from_dict(data, config)