Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #4781]management life cycle #4783

Draft
wants to merge 4,463 commits into
base: master
Choose a base branch
from
Draft

[ISSUE #4781]management life cycle #4783

wants to merge 4,463 commits into from

Conversation

Ish1yu
Copy link
Contributor

@Ish1yu Ish1yu commented Mar 4, 2024

Fixes #4781

########
UnMergeable!!! its demo
########

Motivation
I found that Events have a large number of components that need to be collectively converted to a certain life cycle at a certain time,
Starting from the top level EventMeshServer, it needs to manage a series of internal related components, such as Acl MetaStorage, while its own life cycle changes, so I want to design an interface that allows these components to have the same method to be invoked at different times of life cycle states. In a way similar to the observer, I managed and bound components at the time of their own life cycle changes, so I implemented this PR, and now the implementation is the top-level, as well as the internal management of components, For example, ACLs are SPI loaded and cannot be modified, but other fixed implementations such as ProducerTopicManager also have many internal lifecycle components that should be modified later and associated with the topmost component
我发现Event有大量需要在某一特定时间共同转换到某一生命周期的组件,从最上层的 EventMeshServer 开始,他需要在自己生命周期变化的同时管理内部关联的一系列组件,如 Acl MetaStorage等,所以我想设计一个接口,让这些组件在不同的生命周期状态的时刻有同样的方法可以被调用,在通过类似观察者的方式,在自己生命周期变化的时刻管理和自己绑定的组件,所以我实现了这个PR,目前实现的是最顶层的,还有组件内部的管理,如 Acl 之类是 SPI 加载的,这种不能修改,但是像其他ProducerTopicManager之类的固定实现,内部也有很多同生命周期的组件,这些后续也应该被修改,并且能关联到最顶层的组件

Modifications
New org/apache/eventmesh/runtime/lifecircle EventMeshLifeCycle. Java is responsible for defining the eventmesh state transition method
New org/apache/eventmesh/runtime/lifecircle AbstractEventMeshComponent. Java implementation EventMeshLifeCycle define life cycle changes involved in the state and the binding of other components
New org/apache/eventmesh/runtime/lifecircle EventMeshComponent. Java eventmesh without switch control components, the implementation of state transition method, state huan rear method
New org/apache/eventmesh/runtime/lifecircle EventMeshSwitchableComponent. Java eventmesh with switch components, in EventMeshComponent increased switch function

Top-level component modification
EventMeshServer
-Acl Components with switches
-MetaStorage Components with switches
-Trace Components with switches
-StorageResource component
-ProducerTopicManager component
-EventMeshAdminBootstrap Component with a switch
-EventMeshGrpcBootstrap component

新增 org/apache/eventmesh/runtime/lifecircle/EventMeshLifeCycle.java 负责定义EventMesh中状态转换方法
新增 org/apache/eventmesh/runtime/lifecircle/AbstractEventMeshComponent.java 实现 EventMeshLifeCycle 定义生命周期变化中涉及的状态和绑定的其他组件
新增 org/apache/eventmesh/runtime/lifecircle/EventMeshComponent.java 没有开关控制的EventMesh组件,具体实现状态转换时的方法,状态装欢后置方法
新增 org/apache/eventmesh/runtime/lifecircle/EventMeshSwitchableComponent.java 带有开关的EventMesh组件,在EventMeshComponent增加了开关功能

顶层组件修改
EventMeshServer
-Acl 带有开关的组件
-MetaStorage 带有开关的组件
-Trace 带有开关的组件
-StorageResource 组件
-ProducerTopicManager 组件
-EventMeshAdminBootstrap 带有开关的组件
-EventMeshGrpcBootstrap 组件

qqeasonchen and others added 30 commits July 31, 2023 22:08
…eadUtils] (apache#4297)

* Update ThreadUtils.java

* Update ThreadUtils.java
…ectors] (apache#4314)

* [ISSUE apache#4266]: Retore interrupted state for interrupted exception in open function sinc connector

* [ISSUE apache#4266]: Retore interrupted state for interrupted exception in open function source connector

* [ISSUE apache#4266]: Retore interrupted state for interrupted exception in RocketMQSink connector
…pache#4315)

* [ISSUE apache#4093]: Refactor package building chunks to reusable method

* [ISSUE apache#4093]: Refactor user agent building chunks to reusable method
…aced with lambda[HelloTask] (apache#4316)

* [4260] Fixed: Anonymous new ChannelFutureListener() can be replaced with lambda[HelloTask]

* Upgraded: First Interaction Action Version to Latest

* [4260] Removed: Unused Import

* Update package import order in HelloTask.java

---------

Co-authored-by: mike_xwm <[email protected]>
* fix: add cloudEventCodec for redis connector.

* fix: add cloudEventCodec for redis connector.

* fix import order.

* fix: add doc.

* fix: adjust cloudevent encode and decode.
…che#4337)

* issue-4262 Enhancement Request EventMeshCloudEventUtils

* issue-4262 Enhancement Request EventMeshCloudEventUtils move on top method getValue

* issue-4262 Enhancement Request EventMeshCloudEventUtils remove redundant else for Optional.of

---------

Co-authored-by: maxim.zgardan <[email protected]>
[ISSUE apache#4328] Add offsetManagement Service for connectors
[ISSUE apache#4268] Used switch to replace the if-else [CloudEventsProtocolAdaptor]
… test coverage rate (apache#4340)

* issues apache#4264 commit

* unit

* issues apache#4339 unit test coverage

* issues apache#4339 WebhookProtocolTransportObjectTest fix

* issues apache#4339 WebhookProtocolTransportObjectTest fix

* issues apache#4339 WebhookProtocolTransportObjectTest fix

* issues apache#4339 WebhookProtocolTransportObjectTest fix

* issues apache#4339 check style

* issues apache#4339 new instance replace builder.

* issues apache#4339 WebhookProtocolTransportObjectTest unit test.

* issues apache#4339 check style.

* issues apache#4339 check style.

* issues apache#4339 check style.

* fixed.

* fixed.

* fixed.

* fixed.

* fixed.

* delete java bean unit test.

* fix build error.
* fix start error and some code optimization.

* fix code style
MovieTone and others added 22 commits January 13, 2024 09:58
…pache#4741)

* refactor: Use static final modifier to decorate Logger

Signed-off-by: Ruslan Mykoliuk <[email protected]>

* refactor: Check style

Signed-off-by: Ruslan Mykoliuk <[email protected]>

* Update EventMeshConstants.java

* Update BatchSendMessageProcessor.java

* Update EventMeshConstants.java

---------

Signed-off-by: Ruslan Mykoliuk <[email protected]>
* Add GRADLE_ENTERPRISE_ACCESS_KEY to a couple of Gradle builds missing it

* Update to most recent Gradle Enterprise Gradle Plugin

* Move CodeQL verification to its own worfklow

* Rename CodeQL workflow to "Analyze"

* Rename "Build" workflow to "Docker"

* Restore the language matrix with 'java' as the only language in ci workflow

* Return the cpp/csharp language step in ci workflow

* Rename CodeQL job to "Analyze" rather than "Build"
…pache#4709)

* operator quick start link

* update

* README.zh-CN.md

* update README.zh-CN.md

* update README.zh-CN.md and add README.md

* update README.md

* update README.zh-CN.md

* update

* add deploy operator on k8s

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update
…source constraints. (apache#4693)

* resources describes the compute resource requirements and limits 、component initialization order rules and DNS.

* add license and update runtime resources

* update runtime_controller.go

* update

* deployment operator, commands simplified.

* update

* update

* update

* update
apache#4650)

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.

* Implemented the functions of file source connector.
…ling.[EtcdCustomService] (apache#4752)

* Enhance thread handling of InterruptedException

* inline variable

* check code style

* catch InterruptedException in a separate catch code block
…pache#4754)

* Substitute e.printStackTrace() with log.error()

* add exception arg

* Modify the wording of the log
…ctor docs (apache#4726)

* Update issue template and enable code block rendering

* Remove deprecated docs
…ned reply message (apache#4751)

* optimized returned reply msg

* corrected the change
…uestBody] (apache#4757)

* added appropriate getters and setters for HeartbeatEntity class in HeartbeatRequestBody.java. updated EventMeshHttpConsumer.java to access aforementioned variables using correct setters. Updated HeartbeatProcessor.java to access aforementioned variables using correct getters.

* <Removed unnecessary getters and setters in eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatRequestBody.java >
…y server (apache#4739)

* fix 4738

* fix some bug

* fix bug

* remove initProducerManager from AbstractRemotingServer init

* bug fix

* bug fix

* some enhance

* some enhance

* add admin bootstrap

* some enhance

* remove HttpHandlerManager and ClientManageController.

* modify some unit test

* add admin http handlermanager
* [ISSUE apache#4458] Support mysql Sink Connector feature

* remove pg jdbc import

* update dependencies
…ache#4777)

* Add null check in writeOffset method

* delete todo

* Move data.put inside null check in writeOffset method

* simplify if judgement

* remove dev environment

* fix style
a. Change to private modifier.
b. Repeat code extraction as method.
Copy link
Contributor

github-actions bot commented May 3, 2024

It has been 60 days since the last activity on this pull request. I am reaching out here to gently remind you that the Apache EventMesh community values every pull request, and please feel free to get in touch with the reviewers at any time. They are available to assist you in advancing the progress of your pull request and offering the latest feedback.

If you encounter any challenges during development, seeking support within the community is encouraged. We sincerely appreciate your contributions to Apache EventMesh.

@github-actions github-actions bot added the Stale label May 3, 2024
@xwm1992 xwm1992 marked this pull request as draft July 4, 2024 13:27
@github-actions github-actions bot removed the Stale label Jul 4, 2024
Copy link
Contributor

github-actions bot commented Sep 2, 2024

It has been 60 days since the last activity on this pull request. I am reaching out here to gently remind you that the Apache EventMesh community values every pull request, and please feel free to get in touch with the reviewers at any time. They are available to assist you in advancing the progress of your pull request and offering the latest feedback.

If you encounter any challenges during development, seeking support within the community is encouraged. We sincerely appreciate your contributions to Apache EventMesh.

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

Successfully merging this pull request may close these issues.

[Enhancement] EventMeshServer subcomponent lifecycle management