Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
Currently, there are some classes, e.g. JobVertexID, ExecutionAttemptID need to write to NettyMessage. However, the size of these classes in ByteBuf are directly written in NettyMessage class, which is error-prone. If someone edits those classes, there would be no warning or error during the compile phase. I think it would be better to add a NettyMessageContent(the name could be discussed) interface:
public interface NettyMessageContent { void writeTo(ByteBuf bug) int getContentLen(); }
Regarding the fromByteBuf, since it is a static method, we could not add it to the interface. We might explain it in the javaDoc of NettyMessageContent.
Attachments
Issue Links
- is related to
-
FLINK-15679 Improve Flink's ID system
- Closed
- links to