[
https://issues.apache.org/jira/browse/FLINK-29806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626506#comment-17626506
]
Yanfei Lei commented on FLINK-29806:
------------------------------------
Hi [~senbork], thanks for your suggestion, but I don't think the refactoring is
necessary, because
1){{{}StateChangeOperation{}}} is also used by
{{{}AbstractStateChangeLogger{}}}(located in
{*}_org.apache.flink.state.changelog_{*}{_}),{_}
2) _org.apache.flink.state.changelog.restore_ is the sub-directory of
{_}org.apache.flink.state.changelog{_}, I don't this violates the “high
cohesion and low coupling” design rules.
> Move related class StateChangeOperation into package
> org.apache.flink.state.changelog.restore
> -----------------------------------------------------------------------------------------------
>
> Key: FLINK-29806
> URL: https://issues.apache.org/jira/browse/FLINK-29806
> Project: Flink
> Issue Type: Improvement
> Reporter: senbork
> Priority: Major
> Fix For: shaded-16.0
>
> Attachments: StateChangeOperation-java.png
>
>
> *Issue Description*
> **
> Package _*org.apache.flink.state.changelog*_ groups together miscellaneous
> classes that might be useful to different packages. The package structure
> violates the “high cohesion and low coupling” design rules. I found that
> class *_StateChangeOperation_* strongly interacts with classes in the other
> package ({*}_org.apache.flink.state.changelog.restore_{*}) by checking the
> source code and the snippet of the dependency graph in the attachments. The
> project has grown larger, leading to becoming increasingly hard to maintain.
> During the development process, one groups together classes (that often
> co-change) with similar responsibilities in one package to facilitate
> maintenance, which prevents a change that causes other packages to be
> modified. For example, if one modifies package
> _*org.apache.flink.state.changelog*_ (i.e., package rename), resulting in
> multiple classes of package *_org.apache.flink.state.changelog.restore_* __
> to be changed.
>
> Location: The source file can be found at path File
> flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/StateChangeOperation.java
> **
> *Refactoring suggestions*
>
> I suggest to move related class {*}_StateChangeOperation into package
> org.apache.flink.state.changelog.restore_{*}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)