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

HBASE-26990 Add default implementation for BufferedMutator interface setters #4387

Merged
merged 1 commit into from
May 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,23 +177,32 @@ default long getWriteBufferPeriodicFlushTimerTickMs() {
* The default value comes from the configuration parameter {@code hbase.client.write.buffer}.
* @return The size of the write buffer in bytes.
*/
long getWriteBufferSize();
default long getWriteBufferSize() {
throw new UnsupportedOperationException(
"The BufferedMutator::getWriteBufferSize has not been implemented");
}

/**
* Set rpc timeout for this mutator instance
* @deprecated Since 3.0.0, will be removed in 4.0.0. Please set this through the
* {@link BufferedMutatorParams}.
*/
@Deprecated
void setRpcTimeout(int timeout);
default void setRpcTimeout(int timeout) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this will also help downstream users prepare for the removal in 4.0.0 by removing any overloads they might have added in delegate classes, etc.

throw new UnsupportedOperationException(
"The BufferedMutator::setRpcTimeout has not been implemented");
}

/**
* Set operation timeout for this mutator instance
* @deprecated Since 3.0.0, will be removed in 4.0.0. Please set this through the
* {@link BufferedMutatorParams}.
*/
@Deprecated
void setOperationTimeout(int timeout);
default void setOperationTimeout(int timeout) {
throw new UnsupportedOperationException(
"The BufferedMutator::setOperationTimeout has not been implemented");
}

/**
* Listens for asynchronous exceptions on a {@link BufferedMutator}.
Expand Down