-
Notifications
You must be signed in to change notification settings - Fork 1
Use Scanner API in Sensor workload #96
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the sensor workload to use the new scanner API in Scalar DB. Key changes include:
- In SensorProcessor.java, adding logic to alternate between using scan() and getScanner() via an AtomicInteger counter.
- In SensorCommon.java, making getRevisionFromResult() public to support usage in the sensor workload.
- Minor error message text updates in SensorChecker.java and schema updates in tx_sensor.cql to add a new keyspace and table.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scalardb-test/src/main/java/kelpie/scalardb/sensor/SensorProcessor.java | Alternates between scan() and getScanner() based on an attempt counter. |
| scalardb-test/src/main/java/kelpie/scalardb/sensor/SensorCommon.java | Changes getRevisionFromResult() from private to public. |
| scalardb-test/src/main/java/kelpie/scalardb/sensor/SensorChecker.java | Updates error message string to correct spelling and formatting. |
| scalardb-test/schema/tx_sensor.cql | Adds a new keyspace and table to support the updated sensor workload. |
Comments suppressed due to low confidence (3)
scalardb-test/src/main/java/kelpie/scalardb/sensor/SensorCommon.java:58
- Since getRevisionFromResult is now part of the public API, consider adding JavaDoc to clarify its expected input, behavior, and any potential exceptions.
public static int getRevisionFromResult(Result result) {
scalardb-test/src/main/java/kelpie/scalardb/sensor/SensorChecker.java:43
- [nitpick] Consider removing the extra space before the exclamation mark for a cleaner error message.
logError("Duplication happened !");
scalardb-test/schema/tx_sensor.cql:5
- Consider updating the project schema documentation to include the new keyspace and table definitions added in this PR.
CREATE KEYSPACE IF NOT EXISTS scalardb WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 };
5ed00b1 to
51851c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
Description
This PR updates the sensor workload to use the scanner API introduced in scalar-labs/scalardb#2729.
Related issues and/or PRs
Changes made
Checklist
Additional notes (optional)
N/A