File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
databricks-sdk-java/src/main/java/com/databricks/sdk/mixin Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1818
1919public class ClustersExt extends ClustersAPI {
2020 private static final Logger LOG = LoggerFactory .getLogger (ClustersExt .class );
21+ private static final String INVALID_STATE = "INVALID_STATE" ;
2122
2223 public ClustersExt (ApiClient apiClient ) {
2324 super (apiClient );
@@ -217,9 +218,11 @@ public void ensureClusterIsRunning(String clusterId) throws TimeoutException {
217218 // running, reconfiguring
218219 LOG .debug ("Cluster is {}: {}" , info .getState (), info .getStateMessage ());
219220 return ;
220- } catch (IllegalStateException e ) {
221- LOG .debug ("Cluster reached illegal state. Retrying startup" , e );
222221 } catch (DatabricksError e ) {
222+ if (e .getErrorCode ().equals (INVALID_STATE )) {
223+ LOG .debug ("Cluster was started by other process: {} Retrying." , e .getMessage ());
224+ continue ;
225+ }
223226 LOG .debug ("Received {} error code" , e .getErrorCode ());
224227 throw e ;
225228 }
You can’t perform that action at this time.
0 commit comments