aloyszhang commented on code in PR #10428:
URL: https://github.com/apache/inlong/pull/10428#discussion_r1642099799
##########
inlong-audit/audit-service/src/main/java/org/apache/inlong/audit/sink/JdbcSink.java:
##########
@@ -153,6 +174,46 @@ protected void createDataSource() {
dataSource = new HikariDataSource(config);
}
+ private void managePartitions() {
+ addPartition();
+ deletePartition();
+ }
+
+ private String formatPartitionName(LocalDate date) {
+ return "p" + date.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
+ }
+
+ private void addPartition() {
+ String partitionName =
formatPartitionName(LocalDate.now().plusDays(1));
+ String partitionValue =
LocalDate.now().plusDays(2).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]