-
Notifications
You must be signed in to change notification settings - Fork 444
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
WIP: Scan Server discussion #4430
base: 2.1
Are you sure you want to change the base?
Conversation
Added client property for a list of tables that support eventual scanning. Scanning level can be overridden by calling setConsistencyLevel() on the created scanner object.
This is an example of defining which tables the scanner should use eventual scan consistency vs immediate. The downside to this is that multiple clients with different properties will return different scan results. A different implementation could set the allowed scan behavior at the table prop level so users can enable scan servers to use individual tables as the data in the system grows over time. |
@@ -91,6 +91,8 @@ public enum ClientProperty { | |||
// Scanner | |||
SCANNER_BATCH_SIZE("scanner.batch.size", "1000", PropertyType.COUNT, | |||
"Number of key/value pairs that will be fetched at time from tablet server", "2.0.0", false), | |||
SCANNER_CONSISTENCY_SCAN_LEVEL("scanner.consistency.level.eventual", "", PropertyType.STRING, |
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.
Not sure if SCANNER
should be the prefix for this or SCAN_SERVER
.
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.
Also the overall general name could be improved.
I'm not sure I fully understand how this property is used. Does this provide a default consistencyLevel setting in the client for the configured tables? If so, then I think this might cause issues in a multi-tenant situation if you have different applications running from the same client host / configuration. Lets say you have two apps (appA and appB). appA is time-sensitive and cannot afford eventual consistency. If appA and appB were to run from the same host/configuration for whatever reason, then that would present a problem for appA. Making the application change the code to use the consistency level feature allows the developers of the application to make an informed choice based on the behavior and requirements of their application. It allows them to opt-in to using the feature. |
Added client property for a list of tables that support eventual scanning.
Scanning level can be overridden by calling setConsistencyLevel() on the created scanner object.