diff --git a/omniadvisor/src/omniadvisor/interface/config_tuning.py b/omniadvisor/src/omniadvisor/interface/config_tuning.py index a8136a3f13b170e082f132891ba6a6cd17642e9f..a735c323b0e2f81ebd3dbd6bd2ba24f1293446f5 100644 --- a/omniadvisor/src/omniadvisor/interface/config_tuning.py +++ b/omniadvisor/src/omniadvisor/interface/config_tuning.py @@ -179,12 +179,6 @@ def main(): # 1. 存在最近的调优结果 # 2. 调优方法不是用户配置(用户配置无需复测) # 3. 调优结果状态仍在运行中(复测中) - tuning_result_history = get_tuning_result_history(load) - if (tuning_result_history.latest_tuning_result - and tuning_result_history.latest_tuning_result.tuning_record.method != OA_CONF.TuningMethod.user - and tuning_result_history.latest_tuning_result.status == OA_CONF.ExecStatus.running): - global_logger.info('The retest status of latest tuning result is still running, please wait.') - return if args.tuning_method or args.retest_way == OA_CONF.RetestWay.hijacking: try: diff --git a/omniadvisor/src/omniadvisor/service/spark_service/spark_run.py b/omniadvisor/src/omniadvisor/service/spark_service/spark_run.py index d7ce7300313a79ef2ce656160b5e58d1abc18ddd..4c03a96ea19771d9ff50019c4ba4fc217810b87c 100644 --- a/omniadvisor/src/omniadvisor/service/spark_service/spark_run.py +++ b/omniadvisor/src/omniadvisor/service/spark_service/spark_run.py @@ -130,7 +130,7 @@ def _update_trace_from_history_server(exam_record: ExamRecord, application_id: s trace_executor = spark_fetcher.get_spark_executor_by_app(application_id) except HTTPError as httpe: time.sleep(OA_CONF.spark_fetch_trace_interval) - global_logger.debug(f"Cannot access history server: {httpe}") + global_logger.debug(f"Cannot access history server: %s", httpe) continue trace_dict['sql'] = save_trace_data(data=trace_sql, data_dir=OA_CONF.data_dir) trace_dict['stages'] = save_trace_data(data=trace_stages, data_dir=OA_CONF.data_dir) @@ -138,6 +138,7 @@ def _update_trace_from_history_server(exam_record: ExamRecord, application_id: s global_logger.info(f"Fetch Spark execute trace success.") break else: - raise RuntimeError(f'Failed to get App {application_id} trace from {history_server_url}') + global_logger.error(f'Failed to get App %s trace from %s', application_id, history_server_url) + return ExamRecordRepository.update_exam_result(exam_record, trace=trace_dict)