File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
mysql-delta-plugins/src/main/java/io/cdap/delta/mysql
sqlserver-delta-plugins/src/main/java/io/cdap/delta/sqlserver Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 2222import io .cdap .delta .api .EventReader ;
2323import io .cdap .delta .api .Offset ;
2424import io .cdap .delta .api .SourceTable ;
25+ import io .cdap .delta .api .StopContext ;
2526import io .cdap .delta .plugin .common .DBSchemaHistory ;
2627import io .cdap .delta .plugin .common .NotifyingCompletionCallback ;
2728import io .cdap .delta .plugin .common .RuntimeArguments ;
@@ -171,7 +172,10 @@ public void start(Offset offset) {
171172 }
172173 }
173174
174- public void stop () throws InterruptedException {
175+ public void stop (StopContext stopContext ) throws InterruptedException {
176+ LOG .info ("Stopping debezium engine, reason: " + stopContext .getOrigin ());
177+ // Debezium engine is implicitly stopped as part of this call
178+ // Refer EmbeddedEngine docs
175179 executorService .shutdownNow ();
176180 if (!executorService .awaitTermination (2 , TimeUnit .MINUTES )) {
177181 LOG .warn ("Unable to cleanly shutdown reader within the timeout." );
Original file line number Diff line number Diff line change 2222import io .cdap .delta .api .EventReader ;
2323import io .cdap .delta .api .Offset ;
2424import io .cdap .delta .api .SourceTable ;
25+ import io .cdap .delta .api .StopContext ;
2526import io .cdap .delta .plugin .common .DBSchemaHistory ;
2627import io .cdap .delta .plugin .common .NotifyingCompletionCallback ;
2728import io .cdap .delta .plugin .common .RuntimeArguments ;
@@ -176,7 +177,10 @@ public void start(Offset offset) {
176177 }
177178
178179 @ Override
179- public void stop () throws InterruptedException {
180+ public void stop (StopContext stopContext ) throws InterruptedException {
181+ LOG .info ("Stopping debezium engine, reason: " + stopContext .getOrigin ());
182+ // Debezium engine is implicitly stopped as part of this call
183+ // Refer EmbeddedEngine docs
180184 executorService .shutdownNow ();
181185 if (!executorService .awaitTermination (2 , TimeUnit .MINUTES )) {
182186 failedStopping = true ;
You can’t perform that action at this time.
0 commit comments