Skip to content

Commit f0687cb

Browse files
author
dapeng
committed
log test again
1 parent ff67b88 commit f0687cb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kafka-base/kafka-base-sink/src/main/java/com/dtstack/flink/sql/sink/kafka/CustomerFlinkPartition.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
import org.apache.flink.streaming.connectors.kafka.partitioner.FlinkFixedPartitioner;
55

6+
import java.util.Arrays;
67
import java.util.Random;
78
import org.apache.flink.util.Preconditions;
89

910
public class CustomerFlinkPartition<T> extends FlinkFixedPartitioner<T> {
1011
@Override
1112
public int partition(T record, byte[] key, byte[] value, String targetTopic, int[] partitions) {
1213
Preconditions.checkArgument(partitions != null && partitions.length > 0, "Partitions of the target topic is empty.");
14+
System.out.println("key = " + key+ ", value = " + value+ ", targetTopic = " + targetTopic + ", partitions = " + Arrays.toString(partitions));
1315
if(key == null){
1416
super.partition(record, key, value, targetTopic, partitions);
1517
}

0 commit comments

Comments
 (0)