Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

PulsarSerializationSchema and parent code documentation issue erroneous and confusing #405

Open
lonerzzz opened this issue Sep 6, 2021 · 0 comments

Comments

@lonerzzz
Copy link

lonerzzz commented Sep 6, 2021

Describe the bug
The code comments of the PulsarSerializationSchema are erroneous and confusing. The class comment indicates that the PulsarSerializationSchema is "An interface for the deserialization of Pulsar messages." so the use of deserialization adds confusion. Subsequently, the 'serialize' method indicates that the purpose of the method is "Serializes the incoming element to a specified type." This would seem to indicate that the generic applied to the interface is the target data type rather than the source data type. Yet the incoming 'element' value is described as "The element to be serialized".

Subsequently, the PulsarContextAware parent interface of the PulsarSerializationSchema has no documentation at all for the 'getSchema' method so it is unclear what the generic type of the schema is expected to be and how a person is supposed to reconcile having the same type for the serialize method and the returned Schema generic of the getSchema method.

I am digging into the code because the examples provided on this page https://github.com/streamnative/pulsar-flink are too specialized to provide general knowledge about how to use the interface.

To Reproduce
N/A

Expected behavior
Between the code comments and examples, it should be clear how to use the PulsarSerializationSchema, but this is not the case given the documentation errors and specialized example provided.

Screenshots
NA

Additional context
This issue is raised for the 2.7.X Pulsar integration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants