Skip to content

Commit

Permalink
[Polish] Fix error msg typo (#2955)
Browse files Browse the repository at this point in the history
* [Polish] Fix error msg typo

* [Polish] Polish code

---------

Co-authored-by: gongzhongqiang <[email protected]>
  • Loading branch information
GOODBOY008 and GOODBOY008 authored Aug 20, 2023
1 parent 6c5133a commit ceaa0dc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static AlertTemplate of(FlinkCluster cluster, ClusterState clusterState)
}

private static class AlertTemplateBuilder {
private AlertTemplate alertTemplate = new AlertTemplate();
private final AlertTemplate alertTemplate = new AlertTemplate();

public AlertTemplateBuilder setTitle(String title) {
alertTemplate.setTitle(title);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
import org.apache.streampark.console.core.entity.AppBuildPipeline;
import org.apache.streampark.console.core.enums.PermissionType;
import org.apache.streampark.console.core.service.AppBuildPipeService;
import org.apache.streampark.console.core.service.ApplicationLogService;
import org.apache.streampark.console.core.service.ApplicationService;
import org.apache.streampark.console.core.service.FlinkEnvService;
import org.apache.streampark.console.core.service.FlinkSqlService;
import org.apache.streampark.flink.packer.pipeline.DockerResolvedSnapshot;
import org.apache.streampark.flink.packer.pipeline.PipelineType;

Expand Down Expand Up @@ -59,14 +55,6 @@ public class ApplicationBuildPipelineController {

@Autowired private AppBuildPipeService appBuildPipeService;

@Autowired private ApplicationService applicationService;

@Autowired private FlinkSqlService flinkSqlService;

@Autowired private ApplicationLogService applicationLogService;

@Autowired private FlinkEnvService flinkEnvService;

/**
* Release application building pipeline.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public boolean doAlert(AlertConfigWithParams alertConfig, AlertTemplate alertTem
} catch (AlertException alertException) {
throw alertException;
} catch (Exception e) {
throw new AlertException("Failed send dingTalk alert", e);
throw new AlertException("Failed send DingTalk alert", e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private void sendMessage(AlertWeComParams params, Map<String, Object> body)
try {
robotResponse = alertRestTemplate.postForObject(url, entity, RobotResponse.class);
} catch (Exception e) {
log.error("Failed to request DingTalk robot alarm,\nurl:{}", url, e);
log.error("Failed to request WeCom robot alarm,\nurl:{}", url, e);
throw new AlertException(
String.format("Failed to request WeCom robot alert,\nurl:%s", url), e);
}
Expand All @@ -104,7 +104,7 @@ private void sendMessage(AlertWeComParams params, Map<String, Object> body)
if (robotResponse.getErrcode() != 0) {
throw new AlertException(
String.format(
"Failed to request DingTalk robot alert,\nurl:%s,\nerrorCode:%d,\nerrorMsg:%s",
"Failed to request WeCom robot alert,\nurl:%s,\nerrorCode:%d,\nerrorMsg:%s",
url, robotResponse.getErrcode(), robotResponse.getErrmsg()));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,6 @@ private ClusterState yarnStateConvertClusterState(YarnApplicationState state) {
*/
public Boolean verifyClusterConnection(FlinkCluster flinkCluster) {
ClusterState clusterState = httpClusterState(flinkCluster);
return ClusterState.isRunning(clusterState) ? true : false;
return ClusterState.isRunning(clusterState);
}
}

0 comments on commit ceaa0dc

Please sign in to comment.