Skip to content

Commit

Permalink
improve FlinkClusterController.java
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzk1 committed Jan 10, 2024
1 parent f7ea7a0 commit 707dd21
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public RestResponse shutdown(FlinkCluster cluster) {

@Operation(summary = "Delete flink cluster")
@PostMapping("delete")
public RestResponse delete(FlinkCluster cluster) {
flinkClusterService.remove(cluster);
public RestResponse delete(Long Id) {
flinkClusterService.remove(Id);
return RestResponse.success();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface FlinkClusterService extends IService<FlinkCluster> {

Boolean create(FlinkCluster flinkCluster);

void remove(FlinkCluster flinkCluster);
void remove(Long id);

void update(FlinkCluster flinkCluster);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,7 @@ public void updateClusterState(Long id, ClusterState state) {
}

@Override
public void remove(FlinkCluster cluster) {
Long id = cluster.getId();
public void remove(Long id) {
FlinkCluster flinkCluster = getById(id);
ApiAlertException.throwIfNull(flinkCluster, "Flink cluster not exist, please check.");

Expand Down

0 comments on commit 707dd21

Please sign in to comment.