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

Rest data info id list #15

Merged
merged 10 commits into from
Apr 29, 2019
Merged

Conversation

Synex-wh
Copy link
Contributor

Motivation:

Explain the context, and why you're making that change.
To make others understand what is the problem you're trying to solve.

Modification:

provide RESTful api for get session node all dataInfoId list. The api for check all dataInfoId list change and refresh at a particular time.

Result:

Fixes #14

If there is no issue then describe the changes introduced by this PR.

@codecov
Copy link

codecov bot commented Apr 25, 2019

Codecov Report

Merging #15 into master will increase coverage by 0.03%.
The diff coverage is 90.9%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #15      +/-   ##
============================================
+ Coverage     58.98%   59.02%   +0.03%     
  Complexity       44       44              
============================================
  Files           376      376              
  Lines         13059    13066       +7     
  Branches       1283     1283              
============================================
+ Hits           7703     7712       +9     
+ Misses         4479     4476       -3     
- Partials        877      878       +1
Impacted Files Coverage Δ Complexity Δ
...ry/server/session/scheduler/task/DataPushTask.java 51.08% <100%> (ø) 0 <0> (ø) ⬇️
...ssion/scheduler/task/DataChangeFetchCloudTask.java 59.82% <100%> (ø) 0 <0> (ø) ⬇️
...server/data/change/event/DataChangeEventQueue.java 86.36% <100%> (ø) 0 <0> (ø) ⬇️
...egistry/server/session/store/SessionDataStore.java 56.89% <100%> (+0.37%) 0 <0> (ø) ⬇️
...server/session/resource/SessionDigestResource.java 59.01% <100%> (+4.47%) 0 <0> (ø) ⬇️
...gistry/server/data/bootstrap/DataServerConfig.java 64.1% <33.33%> (ø) 0 <0> (ø) ⬇️
...registry/server/data/change/DataChangeHandler.java 77.38% <83.33%> (ø) 0 <0> (ø) ⬇️
...rver/data/change/notify/SessionServerNotifier.java 41.17% <0%> (-7.06%) 0% <0%> (ø)
...a/registry/task/scheduler/TimedSupervisorTask.java 65.51% <0%> (-6.9%) 0% <0%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e1cc58...bad5a9d. Read the comment docs.

@atellwu atellwu merged commit fb83614 into sofastack:master Apr 29, 2019
return sessionInterests.getInterestDataInfoIds();
}

@GET
@Path("checkSumDataInfoIdList")
@Produces(MediaType.APPLICATION_JSON)
public int checkSumDataInfoIdList() {
return sessionInterests.getInterestDataInfoIds().hashCode();
return sessionInterests.getInterestDataInfoIds().hashCode()
Copy link
Contributor

Choose a reason for hiding this comment

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

可以基于上面的方法,返回 getDataInfoIdList().hashcode()即可

@@ -146,14 +146,18 @@ public String getSessionDataCount() {
@Path("getDataInfoIdList")
@Produces(MediaType.APPLICATION_JSON)
public Collection<String> getDataInfoIdList() {
Collection<String> ret = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

这里建议使用HashSet去重

atellwu added a commit to atellwu/sofa-registry that referenced this pull request Nov 21, 2019
dzdx pushed a commit that referenced this pull request Dec 13, 2021
* fix temp push

* update version 5.2.1-SNAPSHOT

* fix test case

* add rest api,getDataInfoIdList,checkSumDataInfoIdList

* add publisher dataInfoList return
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.

provide an interface to get session data
3 participants