瀏覽代碼

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,