-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-28001: Add request attribute support to BufferedMutator #6076
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
Changes from 6 commits
3c259b8
b897921
e5b5963
23e657e
e1e241e
46aa8b5
a4dbc10
3e8c751
3cecd5a
7abdc55
014c1a6
b382a76
daf6b79
1812fd6
0a04b60
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |
|
|
||
| import static org.apache.hadoop.hbase.client.ConnectionUtils.retries2Attempts; | ||
|
|
||
| import java.util.Map; | ||
| import java.util.concurrent.TimeUnit; | ||
| import org.apache.yetus.audience.InterfaceAudience; | ||
|
|
||
|
|
@@ -38,6 +39,16 @@ public interface AsyncBufferedMutatorBuilder { | |
| */ | ||
| AsyncBufferedMutatorBuilder setRpcTimeout(long timeout, TimeUnit unit); | ||
|
|
||
| /** | ||
| * Set a rpc request attribute. | ||
| */ | ||
| AsyncBufferedMutatorBuilder setRequestAttribute(String key, byte[] value); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we expect this to override all existing requestAttributes and replace the collection with this value? Or, do we expect this method to add an additional requestAttribute to an existing set? Take a look at the breadth of API exposed on
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, or maybe you're hamstrung by the apis that TableBuilder exposes? Maybe we should look at expanding the scope of these methods in a separate JIRA.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, currently the
I think this is a good idea. When I drafted this PR, I had a difficult time understanding what semantics we support and why we chose them. |
||
|
|
||
| /** | ||
| * Set multiple rpc request attributes. | ||
| */ | ||
| AsyncBufferedMutatorBuilder setRequestAttributes(Map<String, byte[]> requestAttributes); | ||
|
|
||
| /** | ||
| * Set the base pause time for retrying. We use an exponential policy to generate sleep time when | ||
| * retrying. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.