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
f02ce97c
Unverified
Commit
f02ce97c
authored
Dec 14, 2023
by
gaoyan
Committed by
GitHub
Dec 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some log print error (#2641)
* fix some log print error * formate code * fix npe * fix npe
parent
7655efe3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
Dinky.java
dinky-admin/src/main/java/org/dinky/Dinky.java
+5
-2
JobRefreshHandler.java
...rc/main/java/org/dinky/job/handler/JobRefreshHandler.java
+1
-1
JobManager.java
dinky-core/src/main/java/org/dinky/job/JobManager.java
+3
-4
JobUDFBuilder.java
...re/src/main/java/org/dinky/job/builder/JobUDFBuilder.java
+1
-3
auto.sh
script/bin/auto.sh
+1
-1
No files found.
dinky-admin/src/main/java/org/dinky/Dinky.java
View file @
f02ce97c
...
@@ -26,7 +26,6 @@ import org.springframework.cache.annotation.EnableCaching;
...
@@ -26,7 +26,6 @@ import org.springframework.cache.annotation.EnableCaching;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
lombok.SneakyThrows
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
/**
/**
* Dinky Starter
* Dinky Starter
...
@@ -36,8 +35,12 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -36,8 +35,12 @@ import lombok.extern.slf4j.Slf4j;
@EnableTransactionManagement
@EnableTransactionManagement
@SpringBootApplication
(
exclude
=
FreeMarkerAutoConfiguration
.
class
)
@SpringBootApplication
(
exclude
=
FreeMarkerAutoConfiguration
.
class
)
@EnableCaching
@EnableCaching
@Slf4j
public
class
Dinky
{
public
class
Dinky
{
static
{
System
.
setProperty
(
"log4j2.isThreadContextMapInheritable"
,
"true"
);
}
@SneakyThrows
@SneakyThrows
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
app
=
new
SpringApplication
(
Dinky
.
class
);
SpringApplication
app
=
new
SpringApplication
(
Dinky
.
class
);
...
...
dinky-admin/src/main/java/org/dinky/job/handler/JobRefreshHandler.java
View file @
f02ce97c
...
@@ -117,7 +117,7 @@ public class JobRefreshHandler {
...
@@ -117,7 +117,7 @@ public class JobRefreshHandler {
jobInstance
.
setError
(
jobDataDto
.
getErrorMsg
());
jobInstance
.
setError
(
jobDataDto
.
getErrorMsg
());
jobInfoDetail
.
getJobDataDto
().
setError
(
true
);
jobInfoDetail
.
getJobDataDto
().
setError
(
true
);
jobInfoDetail
.
getJobDataDto
().
setErrorMsg
(
jobDataDto
.
getErrorMsg
());
jobInfoDetail
.
getJobDataDto
().
setErrorMsg
(
jobDataDto
.
getErrorMsg
());
if
(
TimeUtil
.
localDateTimeToLong
(
jobInstance
.
getFinishTime
())
<
1
)
{
if
(
jobInstance
.
getFinishTime
()
==
null
||
TimeUtil
.
localDateTimeToLong
(
jobInstance
.
getFinishTime
())
<
1
)
{
jobInstance
.
setFinishTime
(
LocalDateTime
.
now
());
jobInstance
.
setFinishTime
(
LocalDateTime
.
now
());
}
}
}
else
{
}
else
{
...
...
dinky-core/src/main/java/org/dinky/job/JobManager.java
View file @
f02ce97c
...
@@ -281,7 +281,7 @@ public class JobManager {
...
@@ -281,7 +281,7 @@ public class JobManager {
job
.
setStatus
(
Job
.
JobStatus
.
FAILED
);
job
.
setStatus
(
Job
.
JobStatus
.
FAILED
);
job
.
setError
(
error
);
job
.
setError
(
error
);
failed
();
failed
();
throw
e
;
throw
new
Exception
(
error
,
e
)
;
}
finally
{
}
finally
{
close
();
close
();
}
}
...
@@ -316,7 +316,6 @@ public class JobManager {
...
@@ -316,7 +316,6 @@ public class JobManager {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
String
error
=
StrFormatter
.
format
(
String
error
=
StrFormatter
.
format
(
"Exception in executing FlinkSQL:\n{}\n{}"
,
SqlUtil
.
addLineNumber
(
currentSql
),
e
.
getMessage
());
"Exception in executing FlinkSQL:\n{}\n{}"
,
SqlUtil
.
addLineNumber
(
currentSql
),
e
.
getMessage
());
e
.
printStackTrace
();
job
.
setEndTime
(
LocalDateTime
.
now
());
job
.
setEndTime
(
LocalDateTime
.
now
());
job
.
setStatus
(
Job
.
JobStatus
.
FAILED
);
job
.
setStatus
(
Job
.
JobStatus
.
FAILED
);
job
.
setError
(
error
);
job
.
setError
(
error
);
...
@@ -324,8 +323,8 @@ public class JobManager {
...
@@ -324,8 +323,8 @@ public class JobManager {
throw
new
Exception
(
error
,
e
);
throw
new
Exception
(
error
,
e
);
}
finally
{
}
finally
{
close
();
close
();
return
job
.
getJobResult
();
}
}
return
job
.
getJobResult
();
}
}
public
IResult
executeDDL
(
String
statement
)
{
public
IResult
executeDDL
(
String
statement
)
{
...
@@ -350,7 +349,7 @@ public class JobManager {
...
@@ -350,7 +349,7 @@ public class JobManager {
}
}
return
result
;
return
result
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
log
.
error
(
"executeDDL failed:"
,
e
);
}
}
return
new
ErrorResult
();
return
new
ErrorResult
();
}
}
...
...
dinky-core/src/main/java/org/dinky/job/builder/JobUDFBuilder.java
View file @
f02ce97c
...
@@ -29,7 +29,6 @@ import org.dinky.function.data.model.UDF;
...
@@ -29,7 +29,6 @@ import org.dinky.function.data.model.UDF;
import
org.dinky.function.util.UDFUtil
;
import
org.dinky.function.util.UDFUtil
;
import
org.dinky.job.JobBuilder
;
import
org.dinky.job.JobBuilder
;
import
org.dinky.job.JobManager
;
import
org.dinky.job.JobManager
;
import
org.dinky.utils.LogUtil
;
import
org.dinky.utils.URLUtils
;
import
org.dinky.utils.URLUtils
;
import
java.io.File
;
import
java.io.File
;
...
@@ -118,8 +117,7 @@ public class JobUDFBuilder extends JobBuilder {
...
@@ -118,8 +117,7 @@ public class JobUDFBuilder extends JobBuilder {
UDFUtil
.
addConfigurationClsAndJars
(
jarList
,
CollUtil
.
newArrayList
(
URLUtils
.
getURLs
(
otherPluginsFiles
)));
UDFUtil
.
addConfigurationClsAndJars
(
jarList
,
CollUtil
.
newArrayList
(
URLUtils
.
getURLs
(
otherPluginsFiles
)));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"add configuration failed;reason:{}"
,
LogUtil
.
getError
(
e
));
throw
new
RuntimeException
(
"add configuration failed: "
,
e
);
throw
new
RuntimeException
(
e
);
}
}
log
.
info
(
StrUtil
.
format
(
"A total of {} UDF have been Init."
,
udfList
.
size
()
+
pyUdfFile
.
size
()));
log
.
info
(
StrUtil
.
format
(
"A total of {} UDF have been Init."
,
udfList
.
size
()
+
pyUdfFile
.
size
()));
...
...
script/bin/auto.sh
View file @
f02ce97c
...
@@ -44,7 +44,7 @@ updatePid() {
...
@@ -44,7 +44,7 @@ updatePid() {
start
()
{
start
()
{
updatePid
updatePid
if
[
-z
"
$pid
"
]
;
then
if
[
-z
"
$pid
"
]
;
then
nohup
java
-Ddruid
.mysql.usePingMethod
=
false
-Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
-XX
:+HeapDumpOnOutOfMemoryError
-Xverify
:none
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky &
nohup
java
-Ddruid
.mysql.usePingMethod
=
false
-
Dlog4j2
.isThreadContextMapInheritable
=
true
-
Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
-XX
:+HeapDumpOnOutOfMemoryError
-Xverify
:none
-cp
"
${
CLASS_PATH
}
"
org.dinky.Dinky &
echo
$!
>
"
${
PID_PATH
}
"
/
${
PID_FILE
}
echo
$!
>
"
${
PID_PATH
}
"
/
${
PID_FILE
}
echo
"FLINK VERSION :
$FLINK_VERSION
"
echo
"FLINK VERSION :
$FLINK_VERSION
"
echo
"........................................Start Dinky Successfully........................................"
echo
"........................................Start Dinky Successfully........................................"
...
...
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