syhily commented on code in PR #19:
URL: 
https://github.com/apache/flink-connector-pulsar/pull/19#discussion_r1070539714


##########
flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/reader/deserializer/PulsarDeserializationSchema.java:
##########
@@ -70,80 +66,4 @@ default void open(InitializationContext context, 
SourceConfiguration configurati
      * @param out The collector to put the resulting messages.
      */
     void deserialize(Message<byte[]> message, Collector<T> out) throws 
Exception;
-
-    /**
-     * Create a PulsarDeserializationSchema by using the flink's {@link 
DeserializationSchema}. It
-     * would consume the pulsar message as the byte array and decode the 
message by using flink's
-     * logic.
-     *
-     * @deprecated Use {@link 
PulsarSourceBuilder#setDeserializationSchema(DeserializationSchema)}
-     *     instead.
-     */
-    @Deprecated
-    static <T> PulsarDeserializationSchema<T> flinkSchema(

Review Comment:
   Let me have an explain on this refactoring. I just deprecated and removed 
these methods in `PulsarDeserializationSchema` and `PulsarSerializationSchema` 
for following the API annotation rules. Since the `PulsarSerializationSchema` 
and `PulsarDeserializationSchema` are annotated with `@PublicEvolving`. All the 
methods in this class should be public viewed and can be used without any 
worry. But the methods like `flinkSchema` returned an internal implementation 
of `Pulsar(De)serializationSchema` this is not acceptable and may be hard to 
change in the future.
   
   So I just move these to the source/sink builder method for uniform design 
style and hide these internal implementations (they are annotated with 
`@Internal`). This change also made it easy to implement add the methods in 
`flink-python` module.



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