chengcongchina commented on code in PR #4302:
URL: https://github.com/apache/flink-cdc/pull/4302#discussion_r2958190882


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/com/github/shyiko/mysql/binlog/event/deserialization/DeleteRowsEventDataDeserializer.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.github.shyiko.mysql.binlog.event.deserialization;
+
+import com.github.shyiko.mysql.binlog.event.DeleteRowsEventData;
+import com.github.shyiko.mysql.binlog.event.TableMapEventData;
+import com.github.shyiko.mysql.binlog.io.ByteArrayInputStream;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.BitSet;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Copied from mysql-binlog-connector 0.27.2 to add a {@link TableIdFilter}.
+ *
+ * <p>Line 65-70: Use a {@link TableIdFilter} to skip the binlog 
deserialization of unwanted tables.
+ */
+public class DeleteRowsEventDataDeserializer
+        extends AbstractRowsEventDataDeserializer<DeleteRowsEventData> {
+
+    private boolean mayContainExtraInformation;
+
+    /** the table id filter to skip further deserialization of unsubscribed 
table ids. */
+    private TableIdFilter tableIdFilter = TableIdFilter.all();
+
+    public DeleteRowsEventDataDeserializer(Map<Long, TableMapEventData> 
tableMapEventByTableId) {
+        super(tableMapEventByTableId);
+    }
+
+    public DeleteRowsEventDataDeserializer setMayContainExtraInformation(
+            boolean mayContainExtraInformation) {
+        this.mayContainExtraInformation = mayContainExtraInformation;
+        return this;
+    }
+
+    public DeleteRowsEventDataDeserializer setTableIdFilter(TableIdFilter 
tableIdFilter) {

Review Comment:
   Resolved.



-- 
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]

Reply via email to