Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
d64e6eb7
Unverified
Commit
d64e6eb7
authored
Dec 15, 2023
by
gaoyan
Committed by
GitHub
Dec 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sse bug (#2654)
parent
2f13a088
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
20 deletions
+7
-20
ConsoleContextHolder.java
...src/main/java/org/dinky/context/ConsoleContextHolder.java
+6
-5
SseSessionContextHolder.java
.../main/java/org/dinky/context/SseSessionContextHolder.java
+1
-1
SuggestionServiceImpl.java
...in/java/org/dinky/service/impl/SuggestionServiceImpl.java
+0
-14
No files found.
dinky-admin/src/main/java/org/dinky/context/ConsoleContextHolder.java
View file @
d64e6eb7
...
@@ -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 log
Line
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
log
Line
,
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
(
log
Line
);
}
}
if
(
stepPid
!=
null
)
{
if
(
stepPid
!=
null
)
{
ProcessStepEntity
stepNode
=
getStepNode
(
stepPid
,
getStepsMap
(
processName
));
ProcessStepEntity
stepNode
=
getStepNode
(
stepPid
,
getStepsMap
(
processName
));
stepNode
.
appendLog
(
log
);
stepNode
.
appendLog
(
log
Line
);
process
.
setLastUpdateStep
(
stepNode
);
process
.
setLastUpdateStep
(
stepNode
);
}
}
// /TOPIC/PROCESS_CONSOLE/FlinkSubmit/12
// /TOPIC/PROCESS_CONSOLE/FlinkSubmit/12
...
...
dinky-admin/src/main/java/org/dinky/context/SseSessionContextHolder.java
View file @
d64e6eb7
...
@@ -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
IO
Exception
{
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
{
...
...
dinky-admin/src/main/java/org/dinky/service/impl/SuggestionServiceImpl.java
View file @
d64e6eb7
...
@@ -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
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment