|
|
|
@ -1,12 +1,12 @@ |
|
|
|
/** |
|
|
|
* Copyright © 2016-2022 The Thingsboard Authors |
|
|
|
* |
|
|
|
* <p> |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* You may obtain a copy of the License at |
|
|
|
* |
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
* |
|
|
|
* <p> |
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
* <p> |
|
|
|
* Unless required by applicable law or agreed to in writing, software |
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
|
|
@ -50,6 +50,7 @@ import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.function.Function; |
|
|
|
|
|
|
|
import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID; |
|
|
|
|
|
|
|
@Component |
|
|
|
@SqlDao |
|
|
|
@RequiredArgsConstructor |
|
|
|
@ -223,12 +224,10 @@ public class JpaBaseEdgeEventDao extends JpaAbstractSearchTextDao<EdgeEventEntit |
|
|
|
startTime = endTime; |
|
|
|
} |
|
|
|
log.info("Event edge migration finished"); |
|
|
|
|
|
|
|
jdbcTemplate.execute("DROP TABLE IF EXISTS old_edge_event"); |
|
|
|
} |
|
|
|
|
|
|
|
private void callMigrationFunction(long startTime, long endTime, long partitionSIzeInMs) { |
|
|
|
jdbcTemplate.update("CALL migrate_edge_event(?, ?, ?)", startTime, endTime, partitionSIzeInMs); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|