Explorar el Código

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

Romain Rigaux hace 10 años
padre
commit
bfdf46c
Se han modificado 1 ficheros con 2 adiciones y 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,