소스 검색

HUE-2673 [spark] Show error if session timeouts at creation

Romain Rigaux 10 년 전
부모
커밋
bfdf46c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      apps/spark/src/spark/models.py

+ 2 - 1
apps/spark/src/spark/models.py

@@ -317,7 +317,8 @@ class SparkApi(Api):
       time.sleep(1)
 
     if status['state'] != 'idle':
-      raise QueryError('\n'.join(status['log']))
+      info = '\n'.join(status['log']) if status['log'] else 'timeout'
+      raise QueryError(_('The Spark session could not be created in the cluster: %s') % info)
 
     return {
         'type': lang,