Unverified Commit d64e6eb7 authored by gaoyan's avatar gaoyan Committed by GitHub

fix sse bug (#2654)

parent 2f13a088
...@@ -94,20 +94,21 @@ public class ConsoleContextHolder { ...@@ -94,20 +94,21 @@ public class ConsoleContextHolder {
* *
* @param processName process name * @param processName process name
* @param stepPid process step type * @param stepPid process step type
* @param log messages * @param logLine messages
* @throws BusException Throws an exception if the process does not exist * @throws BusException Throws an exception if the process does not exist
*/ */
public void appendLog(String processName, String stepPid, String log, boolean recordGlobal) { public void appendLog(String processName, String stepPid, String logLine, boolean recordGlobal) {
if (!logPross.containsKey(processName)) { if (!logPross.containsKey(processName)) {
throw new BusException(StrFormatter.format("process {} does not exist", processName)); log.debug("Process {} does not exist, This log was abandoned", processName);
return;
} }
ProcessEntity process = logPross.get(processName); ProcessEntity process = logPross.get(processName);
if (recordGlobal) { if (recordGlobal) {
process.appendLog(log); process.appendLog(logLine);
} }
if (stepPid != null) { if (stepPid != null) {
ProcessStepEntity stepNode = getStepNode(stepPid, getStepsMap(processName)); ProcessStepEntity stepNode = getStepNode(stepPid, getStepsMap(processName));
stepNode.appendLog(log); stepNode.appendLog(logLine);
process.setLastUpdateStep(stepNode); process.setLastUpdateStep(stepNode);
} }
// /TOPIC/PROCESS_CONSOLE/FlinkSubmit/12 // /TOPIC/PROCESS_CONSOLE/FlinkSubmit/12
......
...@@ -173,7 +173,7 @@ public class SseSessionContextHolder { ...@@ -173,7 +173,7 @@ public class SseSessionContextHolder {
* @param content The SSE data to send. * @param content The SSE data to send.
* @throws IOException If an I/O error occurs while sending the data. * @throws IOException If an I/O error occurs while sending the data.
*/ */
public static void sendSse(String sessionKey, SseDataVo content) throws IOException { public static void sendSse(String sessionKey, SseDataVo content) throws Exception {
if (exists(sessionKey)) { if (exists(sessionKey)) {
sessionMap.get(sessionKey).getEmitter().send(content); sessionMap.get(sessionKey).getEmitter().send(content);
} else { } else {
......
...@@ -67,8 +67,6 @@ public class SuggestionServiceImpl implements SuggestionService { ...@@ -67,8 +67,6 @@ public class SuggestionServiceImpl implements SuggestionService {
if (enableSchemaSuggestion) { if (enableSchemaSuggestion) {
buildSchemaSuggestions(new HashSet<>(), suggestionVOS); buildSchemaSuggestions(new HashSet<>(), suggestionVOS);
} }
// 4. 自定义关键词提示
buildCustomSuggestions(new HashSet<>(), suggestionVOS);
// flink config提示 // flink config提示
buildFlinkConfSuggestions(suggestionVOS); buildFlinkConfSuggestions(suggestionVOS);
return suggestionVOS; return suggestionVOS;
...@@ -110,18 +108,6 @@ public class SuggestionServiceImpl implements SuggestionService { ...@@ -110,18 +108,6 @@ public class SuggestionServiceImpl implements SuggestionService {
// todo: 构建schema的建议列表 , 包含 库名 、表名、字段名、.... , 能做到根据库名点出表名,根据表名点出字段名 // todo: 构建schema的建议列表 , 包含 库名 、表名、字段名、.... , 能做到根据库名点出表名,根据表名点出字段名
} }
/**
* build custom suggestions
*
* @param customKeyWordList custom keyword list
* @param suggestionVOS suggestion list
*/
private static void buildCustomSuggestions(Set<Object> customKeyWordList, Set<SuggestionVO> suggestionVOS) {
// todo: 自定义关键词提示,
// 1. 此处自定义是属于 dinky 内部自定义语法关键词提示, 如果有片段, 将片段的建议列表加入到文档中进行提示
// 2. 可以加入 yml 语法的关键词提示 , 因为在集群配置中会有 yml 的配置文件写法 , 获取方式待定
}
/** /**
* build document suggestions * build document suggestions
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment