Skip to content

Commit d64de82

Browse files
authored
[Optimization-3959][core] Optimize submit task print error log (#3960)
1 parent 6c0953a commit d64de82

File tree

22 files changed

+125
-131
lines changed

22 files changed

+125
-131
lines changed

dinky-admin/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,26 @@
359359
<groupId>org.dinky</groupId>
360360
<artifactId>dinky-alert-dingtalk</artifactId>
361361
</dependency>
362+
<dependency>
363+
<groupId>org.dinky</groupId>
364+
<artifactId>dinky-alert-feishu</artifactId>
365+
</dependency>
366+
<dependency>
367+
<groupId>org.dinky</groupId>
368+
<artifactId>dinky-alert-wechat</artifactId>
369+
</dependency>
362370
<dependency>
363371
<groupId>org.dinky</groupId>
364372
<artifactId>dinky-alert-sms</artifactId>
365373
</dependency>
374+
<dependency>
375+
<groupId>org.dinky</groupId>
376+
<artifactId>dinky-alert-email</artifactId>
377+
</dependency>
378+
<dependency>
379+
<groupId>org.dinky</groupId>
380+
<artifactId>dinky-alert-http</artifactId>
381+
</dependency>
366382
</dependencies>
367383

368384
<build>

dinky-admin/src/main/java/org/dinky/init/SystemInit.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.dinky.data.model.Task;
3232
import org.dinky.data.model.job.JobInstance;
3333
import org.dinky.data.model.rbac.Tenant;
34+
import org.dinky.function.FlinkUDFDiscover;
3435
import org.dinky.function.constant.PathConstant;
3536
import org.dinky.function.pool.UdfCodePool;
3637
import org.dinky.job.ClearJobHistoryTask;
@@ -106,6 +107,7 @@ public void run(ApplicationArguments args) {
106107
initDaemon();
107108
initDolphinScheduler();
108109
registerUDF();
110+
discoverUDF();
109111
updateGitBuildState();
110112
registerURL();
111113
} catch (NoClassDefFoundError e) {
@@ -220,6 +222,10 @@ public void registerUDF() {
220222
UdfCodePool.updateGitPool(gitProjectService.getGitPool());
221223
}
222224

225+
public void discoverUDF() {
226+
FlinkUDFDiscover.getCustomStaticUDFs();
227+
}
228+
223229
public void updateGitBuildState() {
224230
String path = PathConstant.TMP_PATH + "/build.list";
225231
if (FileUtil.exist(path)) {

dinky-admin/src/main/java/org/dinky/service/catalogue/factory/CatalogueTreeSortFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public CatalogueTreeSortStrategy getStrategy(String strategyName) {
5555
CatalogueTreeSortStrategy catalogueTreeSortStrategy =
5656
Safes.of(catalogueTreeSortStrategyMap).get(strategyName);
5757
if (Objects.isNull(catalogueTreeSortStrategy)) {
58-
log.warn("Strategy {} is not defined. Use DefaultStrategy", strategyName);
5958
catalogueTreeSortStrategy =
6059
Safes.of(catalogueTreeSortStrategyMap).get(CatalogueSortConstant.STRATEGY_DEFAULT);
6160
}

dinky-admin/src/main/java/org/dinky/service/catalogue/impl/CatalogueServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public class CatalogueServiceImpl extends SuperServiceImpl<CatalogueMapper, Cata
121121
*/
122122
@Override
123123
public List<Catalogue> getCatalogueTree(CatalogueTreeQueryDTO catalogueTreeQueryDto) {
124-
log.info("getCatalogueTree, catalogueTreeQueryDto: {}", catalogueTreeQueryDto);
125124
List<Catalogue> catalogueTree = buildCatalogueTree(this.list());
126125
// sort
127126
CatalogueTreeSortStrategy strategy = catalogueTreeSortFactory.getStrategy(catalogueTreeQueryDto.getSortValue());

dinky-admin/src/main/java/org/dinky/service/impl/UDFServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
import org.dinky.data.model.udf.UDFManage;
2525
import org.dinky.data.vo.CascaderVO;
2626
import org.dinky.data.vo.UDFManageVO;
27+
import org.dinky.function.FlinkUDFDiscover;
2728
import org.dinky.function.data.model.UDF;
2829
import org.dinky.mapper.UDFManageMapper;
2930
import org.dinky.service.UDFService;
3031
import org.dinky.service.resource.ResourcesService;
31-
import org.dinky.trans.Operations;
3232
import org.dinky.utils.UDFUtils;
3333

3434
import org.apache.flink.table.catalog.FunctionLanguage;
@@ -182,7 +182,7 @@ public List<UDFManage> getUDFFromUdfManage() {
182182
@Override
183183
public List<CascaderVO> getAllUdfsToCascader(List<UDF> userDefinedReleaseUdfs) {
184184
// Get all UDFs of static UDFs and dynamic UDFs
185-
List<UDF> staticUdfs = Operations.getCustomStaticUdfs();
185+
List<UDF> staticUdfs = FlinkUDFDiscover.getCustomStaticUDFs();
186186

187187
// get all UDFs of UDFManage table
188188
List<UDF> udfManageDynamic = getUDFFromUdfManage().stream()

dinky-app/dinky-app-1.20/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
</manifest>
6161
</archive>
6262
<outputDirectory>${project.parent.parent.basedir}/build/extends</outputDirectory>
63+
6364
</configuration>
6465
<executions>
6566
<execution>

dinky-app/dinky-app-base/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
<groupId>org.dinky</groupId>
4747
<artifactId>dinky-core</artifactId>
4848
<exclusions>
49-
<exclusion>
50-
<groupId>com.github.xiaoymin</groupId>
51-
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
52-
</exclusion>
5349
<exclusion>
5450
<groupId>com.github.docker-java</groupId>
5551
<artifactId>docker-java-core</artifactId>
@@ -82,14 +78,6 @@
8278
<groupId>org.dinky</groupId>
8379
<artifactId>dinky-gateway</artifactId>
8480
</exclusion>
85-
<exclusion>
86-
<groupId>org.dinky</groupId>
87-
<artifactId>dinky-alert-sms</artifactId>
88-
</exclusion>
89-
<exclusion>
90-
<groupId>org.dinky</groupId>
91-
<artifactId>dinky-alert-dingtalk</artifactId>
92-
</exclusion>
9381
</exclusions>
9482
</dependency>
9583
<dependency>

dinky-assembly/src/main/assembly/package.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@
122122
<include>dinky-client-1.19-${project.version}.jar</include>
123123
</includes>
124124
</fileSet>
125+
<fileSet>
126+
<directory>${project.parent.basedir}/build/extends/</directory>
127+
<outputDirectory>extends/flink1.20/dinky</outputDirectory>
128+
<includes>
129+
<include>dinky-catalog-mysql-1.20-${project.version}.jar</include>
130+
<include>dinky-client-1.20-${project.version}.jar</include>
131+
</includes>
132+
</fileSet>
125133
<fileSet>
126134
<directory>${project.parent.basedir}/build/extends/</directory>
127135
<outputDirectory>extends</outputDirectory>

dinky-core/pom.xml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232
<hadoop.version>3.1.0</hadoop.version>
3333
</properties>
3434
<dependencies>
35-
<!--<dependency>
36-
<groupId>org.codehaus.groovy</groupId>
37-
<artifactId>groovy</artifactId>
38-
<version>3.0.9</version>
39-
</dependency>-->
4035
<dependency>
4136
<groupId>org.dinky</groupId>
4237
<artifactId>dinky-common</artifactId>
@@ -54,36 +49,6 @@
5449
<artifactId>dinky-metadata-base</artifactId>
5550
<scope>${scope.runtime}</scope>
5651
</dependency>
57-
<dependency>
58-
<groupId>org.dinky</groupId>
59-
<artifactId>dinky-alert-dingtalk</artifactId>
60-
<scope>${scope.runtime}</scope>
61-
</dependency>
62-
<dependency>
63-
<groupId>org.dinky</groupId>
64-
<artifactId>dinky-alert-wechat</artifactId>
65-
<scope>${scope.runtime}</scope>
66-
</dependency>
67-
<dependency>
68-
<groupId>org.dinky</groupId>
69-
<artifactId>dinky-alert-feishu</artifactId>
70-
<scope>${scope.runtime}</scope>
71-
</dependency>
72-
<dependency>
73-
<groupId>org.dinky</groupId>
74-
<artifactId>dinky-alert-sms</artifactId>
75-
<scope>${scope.runtime}</scope>
76-
</dependency>
77-
<dependency>
78-
<groupId>org.dinky</groupId>
79-
<artifactId>dinky-alert-email</artifactId>
80-
<scope>${scope.runtime}</scope>
81-
</dependency>
82-
<dependency>
83-
<groupId>org.dinky</groupId>
84-
<artifactId>dinky-alert-http</artifactId>
85-
<scope>${scope.runtime}</scope>
86-
</dependency>
8752
<dependency>
8853
<groupId>org.dinky</groupId>
8954
<artifactId>dinky-metadata-paimon</artifactId>
@@ -203,10 +168,6 @@
203168
<artifactId>junit-jupiter</artifactId>
204169
<scope>test</scope>
205170
</dependency>
206-
<dependency>
207-
<groupId>org.reflections</groupId>
208-
<artifactId>reflections</artifactId>
209-
</dependency>
210171
<dependency>
211172
<groupId>org.slf4j</groupId>
212173
<artifactId>slf4j-log4j12</artifactId>

dinky-core/src/main/java/org/dinky/data/result/MockResultRunnable.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private void catchChangLog(SelectResult selectResult) {
122122
for (String tableIdentifier : tableIdentifierList) {
123123
if (!tableIdentifierIndexMap.containsKey(tableIdentifier)) {
124124
tableIdentifierIndexMap.put(tableIdentifier, 0);
125-
} else if (tableIdentifierIndexMap.get(tableIdentifier) >= maxRowNum) {
125+
} else if (tableIdentifierIndexMap.get(tableIdentifier) >= maxRowNum - 1) {
126126
allSinkFinished = true;
127127
continue;
128128
}
@@ -145,7 +145,7 @@ private void catchChangLog(SelectResult selectResult) {
145145
rows.add(rowDataWithTableIdentifier);
146146
tableIdentifierIndexMap.put(
147147
tableIdentifier, tableIdentifierIndexMap.get(tableIdentifier) + 1);
148-
if (tableIdentifierIndexMap.get(tableIdentifier) > maxRowNum) {
148+
if (tableIdentifierIndexMap.get(tableIdentifier) >= maxRowNum) {
149149
break;
150150
}
151151
}
@@ -190,7 +190,7 @@ private void catchData(SelectResult selectResult) {
190190
for (String tableIdentifier : tableIdentifierList) {
191191
if (!tableIdentifierIndexMap.containsKey(tableIdentifier)) {
192192
tableIdentifierIndexMap.put(tableIdentifier, 0);
193-
} else if (tableIdentifierIndexMap.get(tableIdentifier) >= maxRowNum) {
193+
} else if (tableIdentifierIndexMap.get(tableIdentifier) >= maxRowNum - 1) {
194194
allSinkFinished = true;
195195
continue;
196196
}
@@ -219,7 +219,7 @@ private void catchData(SelectResult selectResult) {
219219
}
220220
tableIdentifierIndexMap.put(
221221
tableIdentifier, tableIdentifierIndexMap.get(tableIdentifier) + 1);
222-
if (tableIdentifierIndexMap.get(tableIdentifier) > maxRowNum) {
222+
if (tableIdentifierIndexMap.get(tableIdentifier) >= maxRowNum) {
223223
break;
224224
}
225225
}

0 commit comments

Comments
 (0)