Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mobvista-dmp
Project
Overview
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
王金锋
mobvista-dmp
Commits
067fbd6b
Commit
067fbd6b
authored
Oct 20, 2021
by
WangJinfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix RTDmpFetch
parent
746d6acf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
MySQLUtil.java
src/main/java/mobvista/dmp/util/MySQLUtil.java
+4
-4
No files found.
src/main/java/mobvista/dmp/util/MySQLUtil.java
View file @
067fbd6b
package
mobvista
.
dmp
.
util
;
import
mobvista.dmp.datasource.rtdmp.entity.KV
;
import
org.apache.commons.lang3.StringUtils
;
import
java.sql.*
;
import
java.text.SimpleDateFormat
;
...
...
@@ -81,15 +82,14 @@ public class MySQLUtil {
sql
=
"SELECT part,utime FROM dmp.table_info WHERE db_name = '"
+
dbName
+
"' AND tb_name = '"
+
tbName
+
"' AND flag = 1 ORDER BY part DESC LIMIT 1"
;
System
.
out
.
println
(
"getPartitionTime,SQL --->>> "
+
sql
);
ResultSet
rs
=
stmt
.
executeQuery
(
sql
);
if
(!
rs
.
next
())
{
System
.
out
.
println
(
"getPartitionTime Null,SQL --->>> "
+
sql
);
}
while
(
rs
.
next
())
{
partition
=
rs
.
getString
(
"part"
);
utime
=
rs
.
getTimestamp
(
"utime"
);
System
.
out
.
println
(
"partition:"
+
partition
+
",utime:"
+
utime
);
}
if
(
StringUtils
.
isNotBlank
(
partition
))
{
System
.
out
.
println
(
"getPartitionTime Null,SQL --->>> "
+
sql
);
}
System
.
out
.
println
(
"getPartitionTime,SQL --->>> "
+
sql
);
rs
.
close
();
stmt
.
close
();
...
...
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