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

[Pine] Support PineTopper as a component of distkv ecosystem. #520

Merged
merged 7 commits into from
Feb 19, 2020
Merged

[Pine] Support PineTopper as a component of distkv ecosystem. #520

merged 7 commits into from
Feb 19, 2020

Conversation

jovany-wang
Copy link
Collaborator

@jovany-wang jovany-wang commented Feb 18, 2020

Introduction

As discussed before, we'd like to support a feature named Pine as the ecosystem of Distkv. The Pine is a set of useful components for Web application that helps Web developer develop simpley.

This PR supports the PineTopper component as the ranking list.

Usage of this PR

The usage or API of PineTopper looks like:

try {
  Pine.init();
  PineTopper topper = Pine.newTopper();
  topper.addMember("Bob", 80);
  topper.addMember("Allen", 90);
  topper.addMember("Lisa", 100);

  // This didn't implement in this PR now.
  topper.getMember("Bob").incr(20);

  topper.top(2); // will return the top 2 items: Bob, 110         Lisa 100
 
} catch (Exception e) {

} finally {
 Pine.shutdown();
}

The related issue is #279

@jovany-wang jovany-wang added the new feature new features label Feb 18, 2020
@kairbon
Copy link
Collaborator

kairbon commented Feb 18, 2020

Can We add an method called like getMemberInfo.
For example:

v =  topper.getMemberInfo("hello");
print( v. getRank() );
print( v. getScore() );

@jovany-wang jovany-wang requested a review from meijies February 18, 2020 12:04
@jovany-wang jovany-wang changed the title [Pine] Support PineTopper as a component of distkv ecosystem. [WIP][Pine] Support PineTopper as a component of distkv ecosystem. Feb 18, 2020
@jovany-wang jovany-wang changed the title [WIP][Pine] Support PineTopper as a component of distkv ecosystem. [Pine] Support PineTopper as a component of distkv ecosystem. Feb 18, 2020
@jovany-wang
Copy link
Collaborator Author

@meijies @kairbon @senyer @tortuo
I have finished this PR, please take a review, thx.

@codecov
Copy link

codecov bot commented Feb 18, 2020

Codecov Report

Merging #520 into master will increase coverage by 0.09%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #520      +/-   ##
============================================
+ Coverage     52.33%   52.42%   +0.09%     
  Complexity       47       47              
============================================
  Files           109      109              
  Lines          3342     3357      +15     
  Branches        212      213       +1     
============================================
+ Hits           1749     1760      +11     
- Misses         1457     1458       +1     
- Partials        136      139       +3
Impacted Files Coverage Δ Complexity Δ
.../client/commandlinetool/DistkvCommandExecutor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...ava/com/distkv/asyncclient/DefaultAsyncClient.java 87.09% <100%> (+0.88%) 0 <0> (ø) ⬇️
...ava/com/distkv/namespace/NamespaceInterceptor.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...in/java/com/distkv/client/DefaultDistkvClient.java 90.9% <100%> (+5.9%) 0 <0> (ø) ⬇️
...client/commandlinetool/CommandExecutorHandler.java 76.49% <50%> (-0.41%) 0 <0> (ø)
...n/java/com/distkv/parser/DistkvNewSqlListener.java 81.06% <50%> (-0.31%) 0 <0> (ø)

Copy link
Collaborator

@senyer senyer left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-io
Copy link

codecov-io commented Feb 18, 2020

Codecov Report

Merging #520 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #520   +/-   ##
=========================================
  Coverage     52.42%   52.42%           
  Complexity       47       47           
=========================================
  Files           109      109           
  Lines          3357     3357           
  Branches        213      213           
=========================================
  Hits           1760     1760           
  Misses         1458     1458           
  Partials        139      139
Impacted Files Coverage Δ Complexity Δ
.../distkv/pine/components/topper/PineTopperImpl.java 72.72% <ø> (ø) 6 <0> (ø) ⬇️
...com/distkv/pine/components/AbstractPineHandle.java 100% <100%> (ø) 2 <1> (?)

Copy link
Collaborator

@meijies meijies left a comment

Choose a reason for hiding this comment

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

Look Good OverAll

Copy link
Collaborator

@meijies meijies left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@kairbon kairbon left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@kairbon kairbon merged commit e87375e into distkv-project:master Feb 19, 2020
@jovany-wang jovany-wang deleted the pine branch February 19, 2020 03:13
@senyer senyer mentioned this pull request Feb 23, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants