Explorar o código

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

Romain Rigaux %!s(int64=10) %!d(string=hai) anos
pai
achega
bfdf46c2ea
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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,