Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs(memorystore): added valkey leaderboard snippets#10003

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
dackers86 wants to merge10 commits intoGoogleCloudPlatform:main
base:main
Choose a base branch
Loading
frominvertase:@invertase/memorystore-valkey-leaderboard-snippets

Conversation

dackers86
Copy link

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followedSample Format Guide
  • pom.xml parent set to latestshared-configuration
  • Appropriate changes to README are included in PR
  • These samples need a newAPI enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updatedenv vars in testing projects set to pass (let us know which ones)
  • Tests pass:mvn clean verifyrequired
  • Lint passes:mvn -P lint checkstyle:checkrequired
  • Static Analysis:mvn -P lint clean compile pmd:cpd-check spotbugs:checkadvisory only
  • This sample adds a new sample directory, and I updated theCODEOWNERS file with the codeowners for this sample
  • This sample adds a newProduct API, and I updated theBlunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Pleasemerge this PR for me once it is approved

telpirion reacted with eyes emoji
@product-auto-labelproduct-auto-labelbot added samplesIssues that are directly related to samples. api: memorystore labelsJan 31, 2025
Copy link

@ghostghost left a comment

Choose a reason for hiding this comment

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

Hi@dackers86 and reviewers,

I'm currently reviewing this pull request and will provide my feedback in a few minutes. In the meantime, I'm providing this summary of the pull request's content to help you and other reviewers quickly understand the changes and intent.

This pull request, "docs(memorystore): added valkey leaderboard snippets", adds several new Java code snippets demonstrating how to use Google Cloud Memorystore to implement a leaderboard. The changes are focused on adding functionality for managing and querying leaderboard data.

Here's a breakdown of the changes:

  • New Files: The PR introduces new Java files located in thememorystore/valkey/leaderboard/snippets directory. These files contain code snippets for:
    • Adding or updating scores to the leaderboard (MemorystoreAddScore.java).
    • Retrieving the leaderboard sorted in ascending order (MemorystoreFilterByAsc.java).
    • Retrieving the leaderboard sorted in descending order (MemorystoreFilterByDesc.java).
    • Implementing leaderboard pagination (MemorystoreLeaderboardPagination.java).
  • pom.xml File: Apom.xml file was added to thememorystore/valkey/leaderboard/snippets directory, defining the project dependencies, including Jedis (a Redis client) and Google Cloud Client Libraries.

The PR also includes a comprehensive checklist to ensure code quality and adherence to Google's standards. The author has indicated that tests and lint checks have passed.

I'll provide a more detailed review shortly, but this summary should give you a good starting point.


Here's a little poem to brighten your day:

Code flows like a stream,
Tests pass, a joyful gleam,
Review, swift and clean.

Thanks!
Gemini

Copy link

@ghostghost left a comment

Choose a reason for hiding this comment

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

This pull request adds new Java snippets for interacting with Memorystore (Redis) for leaderboard functionality. The code generally looks good, but there are a few improvements that can be made.

I've summarized the key points from the Google Java Style Guide that were referenced in this review below:

  • Javadoc comments should be present for all public classes and methods.
  • Use descriptive variable names.
  • Close resources properly intry-with-resources blocks.
  • Use parameterized types for collections.
  • Avoid unnecessary boxing and unboxing.

It's important to ensure the code adheres to these guidelines for better readability and maintainability.

@graysidegrayside removed their assignmentJan 31, 2025

Choose a reason for hiding this comment

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

should we rename the 'filter' file names to 'sortby' as well?

@telpiriontelpirion self-assigned thisMar 24, 2025
@telpirion
Copy link
Contributor

See comments on#9986 .

@telpiriontelpirion marked this pull request as draftMarch 24, 2025 20:37
@telpiriontelpirion removed their assignmentApr 21, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fewtrellfewtrellfewtrell approved these changes

@yoshi-approveryoshi-approverAwaiting requested review from yoshi-approveryoshi-approver is a code owner

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
api: memorystoresamplesIssues that are directly related to samples.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@dackers86@telpirion@fewtrell@grayside@cabljac@CorieW

[8]ページ先頭

©2009-2025 Movatter.jp