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 #45] Implement methods from storage-plugin.admin(rocketmq) #55

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
51be376
add rocketmqUtils
scwlkq Mar 9, 2024
b891623
add RocketmqUtils.java
scwlkq Mar 9, 2024
5ee7786
add RocketmqUtils.java
scwlkq Mar 9, 2024
17892e3
change rocketmqUtils impl from MQAdmin to RemotingClient
scwlkq Mar 9, 2024
cfcc41f
fix style
scwlkq Mar 9, 2024
5f76e29
fix style
scwlkq Mar 9, 2024
3a3415c
fix style
scwlkq Mar 9, 2024
dc2634c
fix style
scwlkq Mar 9, 2024
6d4a283
fix style
scwlkq Mar 9, 2024
6561d69
fix test style
scwlkq Mar 9, 2024
4b8fb1d
[ISSUE #29] Set up EventMesh Dashboard Front-end (#56)
SLSJL Mar 9, 2024
449b352
modify rocket dependency version
scwlkq Mar 10, 2024
7ebde4b
move classparse to RocketmqUtils.getTopics
scwlkq Mar 10, 2024
d523e26
fix style
scwlkq Mar 10, 2024
eaf4a3a
Revert "[ISSUE #29] Set up EventMesh Dashboard Front-end (#56)"
scwlkq Mar 13, 2024
e2f4c09
refactor TopicProperties
scwlkq Mar 13, 2024
16e7a53
synchronous
scwlkq Mar 14, 2024
50d40b5
try to sync rocketmq related code
scwlkq Mar 14, 2024
31c0117
move classparser to rocketmqUtil
scwlkq Mar 14, 2024
e2b6c48
move RocketmqProperties to properties
scwlkq Mar 14, 2024
d898abc
[ISSUE #57] Modify the field, synchronize the modification, and add t…
zzxxiansheng Mar 12, 2024
717ff8b
[ISSUE #60] add SDK manager (#62)
Lambert-Rao Mar 15, 2024
fa1c716
[ISSUE #64] Support automated deployment and Fix runtime packaging er…
Pil0tXia Mar 15, 2024
b33d5b0
move clientManager related to core module && add RocketmqService
scwlkq Mar 17, 2024
6e4ce01
revert application-dev.yml
scwlkq Mar 17, 2024
07f71d5
remove @Service
scwlkq Mar 17, 2024
8ff1297
sync
scwlkq Mar 17, 2024
418c6b7
move clientManager to core module
scwlkq Mar 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.service.properties;
package org.apache.eventmesh.dashboard.common.model;

scwlkq marked this conversation as resolved.
Show resolved Hide resolved
import lombok.Data;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.eventmesh.dashboard.common.model;

import org.apache.rocketmq.common.TopicConfig;
import org.apache.rocketmq.common.TopicFilterType;

import lombok.Data;

Expand All @@ -28,6 +28,26 @@
@Data
public class TopicProperties {

private TopicConfig rocketmqTopicConfig;
private static final String SEPARATOR = " ";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the SEPARATOR used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

抄的RocketmqSDK里的 TopicConfig类 我看是连续传多个topic之间用SEPARATOR隔开

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why SEPARATOR should be placed in a dto?

public static int defaultReadQueueNums = 16;

public static int defaultWriteQueueNums = 16;

private String topicName;

private int offset;

private int readQueueNums;

private int writeQueueNums;

private int perm;

private TopicFilterType topicFilterType;

private int topicSysFlag;

private boolean order;
Comment on lines +45 to +51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to add these fields in a dto?


}
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
import java.util.List;
import java.util.concurrent.ConcurrentMap;

import org.springframework.beans.BeanUtils;

import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;


@Slf4j
@UtilityClass
public class RocketmqUtils {
Expand Down Expand Up @@ -80,13 +81,8 @@ public List<TopicProperties> getTopics(String nameServerAddr, long requestTimeou
} catch (Exception e) {
log.error("RocketmqTopicCheck init failed when examining topic stats.", e);
}
List<TopicProperties> topicPropertiesList = new ArrayList<>();
for (TopicConfig topicConfig : topicConfigList) {
TopicProperties topicProperties = new TopicProperties();
topicProperties.setRocketmqTopicConfig(topicConfig);
topicPropertiesList.add(topicProperties);
}
return topicPropertiesList;

return topicConfig2TopicProperties(topicConfigList);
}

public void deleteTopic(String topicName, String nameServerAddr, long requestTimeoutMillis) {
Expand All @@ -102,4 +98,14 @@ public void deleteTopic(String topicName, String nameServerAddr, long requestTim
}
}

private List<TopicProperties> topicConfig2TopicProperties(List<TopicConfig> topicConfigList) {
ArrayList<TopicProperties> topicPropertiesList = new ArrayList<>();
for (TopicConfig topicConfig : topicConfigList) {
TopicProperties topicProperties = new TopicProperties();
BeanUtils.copyProperties(topicConfig, topicProperties);
topicPropertiesList.add(topicProperties);
}
return topicPropertiesList;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.eventmesh.dashboard.console.function.health.check.config;


import org.apache.eventmesh.dashboard.service.properties.RocketmqProperties;
import org.apache.eventmesh.dashboard.common.model.RocketmqProperties;

import java.util.Properties;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
package org.apache.eventmesh.dashboard.core.store;


import org.apache.eventmesh.dashboard.common.model.RocketmqProperties;
import org.apache.eventmesh.dashboard.common.model.TopicProperties;
import org.apache.eventmesh.dashboard.common.util.RocketmqUtils;
import org.apache.eventmesh.dashboard.service.properties.RocketmqProperties;
import org.apache.eventmesh.dashboard.service.store.TopicCore;

import org.apache.rocketmq.common.TopicFilterType;
Expand Down