@Override protected SnapshottingTask getSnapshottingTask(OffsetContext previousOffset) { boolean snapshotSchema = true; boolean snapshotData = true; // found a previous offset and the earlier snapshot has completed if (previousOffset != null && !previousOffset.isSnapshotRunning()) { LOGGER.info("A previous offset indicating a completed snapshot has been found. Neither schema nor data will be snapshotted."); snapshotSchema = false; snapshotData = false; } else { LOGGER.info("No previous offset has been found"); if (connectorConfig.getSnapshotMode().includeData()) { LOGGER.info("According to the connector configuration both schema and data will be snapshotted"); } else { LOGGER.info("According to the connector configuration only schema will be snapshotted"); } snapshotData = connectorConfig.getSnapshotMode().includeData(); } return new SnapshottingTask(snapshotSchema, snapshotData); }
if (!snapshottingTask.snapshotSchema() && !snapshottingTask.snapshotData()) { LOGGER.debug("Skipping snapshotting"); return SnapshotResult.completed(previousOffset); if (snapshottingTask.snapshotSchema()) { lockTablesForSchemaSnapshot(context, ctx); readTableStructure(context, ctx); if (snapshottingTask.snapshotSchema()) { LOGGER.info("Snapshot step 6 - Persisting schema history"); if (snapshottingTask.snapshotData()) { LOGGER.info("Snapshot step 7 - Snapshotting data"); createDataEvents(context, ctx);
if (!snapshottingTask.snapshotSchema() && !snapshottingTask.snapshotData()) { LOGGER.debug("Skipping snapshotting"); return SnapshotResult.completed(previousOffset); if (snapshottingTask.snapshotSchema()) { lockTablesForSchemaSnapshot(context, ctx); readTableStructure(context, ctx); if (snapshottingTask.snapshotSchema()) { LOGGER.info("Snapshot step 6 - Persisting schema history"); if (snapshottingTask.snapshotData()) { LOGGER.info("Snapshot step 7 - Snapshotting data"); createDataEvents(context, ctx);
@Override protected SnapshottingTask getSnapshottingTask(OffsetContext previousOffset) { boolean snapshotSchema = true; boolean snapshotData = true; // found a previous offset and the earlier snapshot has completed if (previousOffset != null && !previousOffset.isSnapshotRunning()) { snapshotSchema = false; snapshotData = false; } else { snapshotData = connectorConfig.getSnapshotMode().includeData(); } return new SnapshottingTask(snapshotSchema, snapshotData); }