Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
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
zhaowei
dlink
Commits
f9cfbc03
Commit
f9cfbc03
authored
Jan 13, 2022
by
godkaikai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
片段机制bug解决
parent
a052db28
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
11 deletions
+26
-11
README.md
README.md
+1
-0
Explainer.java
dlink-core/src/main/java/com/dlink/explainer/Explainer.java
+2
-1
FlinkSQLConstant.java
...or/src/main/java/com/dlink/constant/FlinkSQLConstant.java
+4
-0
SqlManager.java
...executor/src/main/java/com/dlink/executor/SqlManager.java
+11
-7
Welcome.tsx
dlink-web/src/pages/Welcome.tsx
+6
-3
quickstart.md
docs/en-US/guide/quickstart.md
+1
-0
quickstart.md
docs/guide/quickstart.md
+1
-0
No files found.
README.md
View file @
f9cfbc03
...
@@ -49,6 +49,7 @@ Dinky(原 Dlink):
...
@@ -49,6 +49,7 @@ Dinky(原 Dlink):
| | | 新增 选中片段执行 | 0.4.0 |
| | | 新增 选中片段执行 | 0.4.0 |
| | | 新增 布局拖拽 | 0.4.0 |
| | | 新增 布局拖拽 | 0.4.0 |
| | | 新增 SQL导出 | 0.5.0 |
| | | 新增 SQL导出 | 0.5.0 |
| | | 新增 快捷键保存、校验、美化 | 0.5.0 |
| | | 支持 local 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 local 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 standalone 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 standalone 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 yarn session 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 yarn session 模式下 FlinkSQL 提交 | 0.4.0 |
...
...
dlink-core/src/main/java/com/dlink/explainer/Explainer.java
View file @
f9cfbc03
...
@@ -9,6 +9,7 @@ import com.dlink.explainer.trans.TransGenerator;
...
@@ -9,6 +9,7 @@ import com.dlink.explainer.trans.TransGenerator;
import
com.dlink.interceptor.FlinkInterceptor
;
import
com.dlink.interceptor.FlinkInterceptor
;
import
com.dlink.job.JobParam
;
import
com.dlink.job.JobParam
;
import
com.dlink.job.StatementParam
;
import
com.dlink.job.StatementParam
;
import
com.dlink.model.SystemConfiguration
;
import
com.dlink.parser.SqlType
;
import
com.dlink.parser.SqlType
;
import
com.dlink.result.ExplainResult
;
import
com.dlink.result.ExplainResult
;
import
com.dlink.result.SqlExplainResult
;
import
com.dlink.result.SqlExplainResult
;
...
@@ -162,7 +163,7 @@ public class Explainer {
...
@@ -162,7 +163,7 @@ public class Explainer {
}
}
}
}
if
(
inserts
.
size
()
>
0
)
{
if
(
inserts
.
size
()
>
0
)
{
String
sqlSet
=
String
.
join
(
FlinkSQLConstant
.
SEPARATOR
,
inserts
);
String
sqlSet
=
String
.
join
(
";\r\n "
,
inserts
);
try
{
try
{
record
.
setExplain
(
executor
.
explainStatementSet
(
inserts
));
record
.
setExplain
(
executor
.
explainStatementSet
(
inserts
));
record
.
setParseTrue
(
true
);
record
.
setParseTrue
(
true
);
...
...
dlink-executor/src/main/java/com/dlink/constant/FlinkSQLConstant.java
View file @
f9cfbc03
...
@@ -19,4 +19,8 @@ public interface FlinkSQLConstant {
...
@@ -19,4 +19,8 @@ public interface FlinkSQLConstant {
* DML 类型
* DML 类型
*/
*/
String
DML
=
"DML"
;
String
DML
=
"DML"
;
/**
* 片段 Fragments 标识
*/
String
FRAGMENTS
=
":="
;
}
}
dlink-executor/src/main/java/com/dlink/executor/SqlManager.java
View file @
f9cfbc03
package
com
.
dlink
.
executor
;
package
com
.
dlink
.
executor
;
import
com.dlink.assertion.Asserts
;
import
com.dlink.constant.FlinkSQLConstant
;
import
com.dlink.model.SystemConfiguration
;
import
org.apache.flink.table.api.DataTypes
;
import
org.apache.flink.table.api.DataTypes
;
import
org.apache.flink.table.api.ExpressionParserException
;
import
org.apache.flink.table.api.ExpressionParserException
;
import
org.apache.flink.table.api.Table
;
import
org.apache.flink.table.api.Table
;
...
@@ -148,23 +151,24 @@ public final class SqlManager {
...
@@ -148,23 +151,24 @@ public final class SqlManager {
* @throws ExpressionParserException if the name of the variable under the given sql failed.
* @throws ExpressionParserException if the name of the variable under the given sql failed.
*/
*/
public
String
parseVariable
(
String
statement
)
{
public
String
parseVariable
(
String
statement
)
{
if
(
statement
==
null
||
""
.
equals
(
statement
))
{
if
(
Asserts
.
isNullString
(
statement
))
{
return
statement
;
return
statement
;
}
}
String
[]
strs
=
statement
.
split
(
";"
);
String
[]
strs
=
statement
.
split
(
SystemConfiguration
.
getInstances
().
getSqlSeparator
()
);
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
strs
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
strs
.
length
;
i
++)
{
String
str
=
strs
[
i
]
.
trim
()
;
String
str
=
strs
[
i
];
if
(
str
.
length
()
==
0
)
{
if
(
str
.
trim
().
length
()
==
0
)
{
continue
;
continue
;
}
}
if
(
str
.
contains
(
":="
))
{
str
=
strs
[
i
];
String
[]
strs2
=
str
.
split
(
":="
);
if
(
str
.
contains
(
FlinkSQLConstant
.
FRAGMENTS
))
{
String
[]
strs2
=
str
.
split
(
FlinkSQLConstant
.
FRAGMENTS
);
if
(
strs2
.
length
>=
2
)
{
if
(
strs2
.
length
>=
2
)
{
if
(
strs2
[
0
].
length
()
==
0
)
{
if
(
strs2
[
0
].
length
()
==
0
)
{
throw
new
ExpressionParserException
(
"Illegal variable name."
);
throw
new
ExpressionParserException
(
"Illegal variable name."
);
}
}
String
valueString
=
str
.
substring
(
str
.
indexOf
(
":="
)
+
2
);
String
valueString
=
str
.
substring
(
str
.
indexOf
(
FlinkSQLConstant
.
FRAGMENTS
)
+
2
);
this
.
registerSqlFragment
(
strs2
[
0
],
replaceVariable
(
valueString
));
this
.
registerSqlFragment
(
strs2
[
0
],
replaceVariable
(
valueString
));
}
else
{
}
else
{
throw
new
ExpressionParserException
(
"Illegal variable definition."
);
throw
new
ExpressionParserException
(
"Illegal variable definition."
);
...
...
dlink-web/src/pages/Welcome.tsx
View file @
f9cfbc03
...
@@ -530,7 +530,7 @@ export default (): React.ReactNode => {
...
@@ -530,7 +530,7 @@ export default (): React.ReactNode => {
<
Link
>
修复 set 语法在1.11和1.12的兼容问题
</
Link
>
<
Link
>
修复 set 语法在1.11和1.12的兼容问题
</
Link
>
</
li
>
</
li
>
<
li
>
<
li
>
<
Link
>
升级各版本 Flink 依赖至最新版本以解决核弹问题
</
Link
>
<
Link
>
升级
各版本 Flink 依赖至最新版本以解决核弹问题
</
Link
>
</
li
>
</
li
>
<
li
>
<
li
>
<
Link
>
新增 Yarn 的 Kerboros 验证
</
Link
>
<
Link
>
新增 Yarn 的 Kerboros 验证
</
Link
>
...
@@ -539,10 +539,13 @@ export default (): React.ReactNode => {
...
@@ -539,10 +539,13 @@ export default (): React.ReactNode => {
<
Link
>
新增 ChangLog 和 Table 的查询及自动停止实现
</
Link
>
<
Link
>
新增 ChangLog 和 Table 的查询及自动停止实现
</
Link
>
</
li
>
</
li
>
<
li
>
<
li
>
<
Link
>
修改项目名为 Dinky 以及图标
</
Link
>
<
Link
>
修改
项目名为 Dinky 以及图标
</
Link
>
</
li
>
</
li
>
<
li
>
<
li
>
<
Link
>
优化血缘分析图
</
Link
>
<
Link
>
优化 血缘分析图
</
Link
>
</
li
>
<
li
>
<
Link
>
新增 快捷键保存、校验、美化
</
Link
>
</
li
>
</
li
>
</
ul
>
</
ul
>
</
Paragraph
>
</
Paragraph
>
...
...
docs/en-US/guide/quickstart.md
View file @
f9cfbc03
...
@@ -87,6 +87,7 @@ Dinky 通过已注册的集群配置来获取对应的 YarnClient 实例。对
...
@@ -87,6 +87,7 @@ Dinky 通过已注册的集群配置来获取对应的 YarnClient 实例。对
| | | 新增 选中片段执行 | 0.4.0 |
| | | 新增 选中片段执行 | 0.4.0 |
| | | 新增 布局拖拽 | 0.4.0 |
| | | 新增 布局拖拽 | 0.4.0 |
| | | 新增 SQL导出 | 0.5.0 |
| | | 新增 SQL导出 | 0.5.0 |
| | | 新增 快捷键保存、校验、美化 | 0.5.0 |
| | | 支持 local 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 local 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 standalone 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 standalone 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 yarn session 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 yarn session 模式下 FlinkSQL 提交 | 0.4.0 |
...
...
docs/guide/quickstart.md
View file @
f9cfbc03
...
@@ -87,6 +87,7 @@ Dinky 通过已注册的集群配置来获取对应的 YarnClient 实例。对
...
@@ -87,6 +87,7 @@ Dinky 通过已注册的集群配置来获取对应的 YarnClient 实例。对
| | | 新增 选中片段执行 | 0.4.0 |
| | | 新增 选中片段执行 | 0.4.0 |
| | | 新增 布局拖拽 | 0.4.0 |
| | | 新增 布局拖拽 | 0.4.0 |
| | | 新增 SQL导出 | 0.5.0 |
| | | 新增 SQL导出 | 0.5.0 |
| | | 新增 快捷键保存、校验、美化 | 0.5.0 |
| | | 支持 local 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 local 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 standalone 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 standalone 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 yarn session 模式下 FlinkSQL 提交 | 0.4.0 |
| | | 支持 yarn session 模式下 FlinkSQL 提交 | 0.4.0 |
...
...
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