Skip to content

Commit

Permalink
[INLONG-11153][Manager] Move the disable check to the first place of …
Browse files Browse the repository at this point in the history
…createSinkResource method
  • Loading branch information
fuweng11 committed Sep 27, 2024
1 parent 9af47e1 commit f9c8fe2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public Boolean accept(String sinkType) {
@Override
public void createSinkResource(SinkInfo sinkInfo) {
LOG.info("begin to create sink resources sinkId={}", sinkInfo.getId());
if (SinkStatus.CONFIG_SUCCESSFUL.getCode().equals(sinkInfo.getStatus())) {
LOG.warn("sink resource [" + sinkInfo.getId() + "] already success, skip to create");
return;
} else if (InlongConstants.DISABLE_CREATE_RESOURCE.equals(sinkInfo.getEnableCreateResource())) {
if (InlongConstants.DISABLE_CREATE_RESOURCE.equals(sinkInfo.getEnableCreateResource())) {
LOG.warn("create resource was disabled, skip to create for [" + sinkInfo.getId() + "]");
return;
} else if (SinkStatus.CONFIG_SUCCESSFUL.getCode().equals(sinkInfo.getStatus())) {
LOG.warn("sink resource [" + sinkInfo.getId() + "] already success, skip to create");
return;
}
this.checkTaskAndConsumerGroup(sinkInfo);
this.assignCluster(sinkInfo);
Expand Down

0 comments on commit f9c8fe2

Please sign in to comment.