File tree Expand file tree Collapse file tree
dinky-admin/src/main/java/org/dinky/service/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ public List<ClusterConfiguration> listAllClusterConfig() {
7474 @ Override
7575 public FlinkClusterConfig getAndCheckEnableFlinkClusterCfg (Integer id ) {
7676 ClusterConfiguration cfg = this .getClusterConfigById (id );
77- DinkyAssert .checkNull (cfg , "The clusterConfiguration not exists! " );
78- DinkyAssert .checkEnable (cfg , "The clusterConfiguration is Disable! " );
77+ DinkyAssert .checkNull (cfg , "The cluster configuration does not exist. " );
78+ DinkyAssert .checkEnable (cfg , "The cluster configuration has been disabled. " );
7979 return FlinkClusterConfig .create (cfg .getType (), cfg .getConfigJson ());
8080 }
8181
Original file line number Diff line number Diff line change 3232import org .dinky .data .model .ClusterInstance ;
3333import org .dinky .data .model .Task ;
3434import org .dinky .gateway .config .GatewayConfig ;
35- import org .dinky .gateway .exception .GatewayException ;
3635import org .dinky .gateway .model .FlinkClusterConfig ;
3736import org .dinky .gateway .result .GatewayResult ;
3837import org .dinky .job .JobConfig ;
@@ -227,9 +226,8 @@ public void killCluster(Integer id) {
227226 @ Override
228227 public ClusterInstance deploySessionCluster (Integer id ) {
229228 ClusterConfiguration clusterCfg = clusterConfigurationService .getClusterConfigById (id );
230- if (Asserts .isNull (clusterCfg )) {
231- throw new GatewayException ("The cluster configuration does not exist." );
232- }
229+ DinkyAssert .checkNull (clusterCfg , "The cluster configuration does not exist." );
230+ DinkyAssert .checkEnable (clusterCfg , "The cluster configuration has been disabled." );
233231 GatewayConfig gatewayConfig =
234232 GatewayConfig .build (FlinkClusterConfig .create (clusterCfg .getType (), clusterCfg .getConfigJson ()));
235233 gatewayConfig .setType (gatewayConfig .getType ().getSessionType ());
You can’t perform that action at this time.
0 commit comments