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

Signed-off-by: Josh Elser <elserj@apache.org>
This commit is contained in:
Bryan Beaudreault 2022-05-03 14:57:49 -04:00 committed by GitHub
parent 386869a428
commit 64a6ba3647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 3 deletions

View File

@ -177,7 +177,10 @@ public interface BufferedMutator extends Closeable {
* The default value comes from the configuration parameter {@code hbase.client.write.buffer}. * The default value comes from the configuration parameter {@code hbase.client.write.buffer}.
* @return The size of the write buffer in bytes. * @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 * Set rpc timeout for this mutator instance
@ -185,7 +188,10 @@ public interface BufferedMutator extends Closeable {
* {@link BufferedMutatorParams}. * {@link BufferedMutatorParams}.
*/ */
@Deprecated @Deprecated
void setRpcTimeout(int timeout); default void setRpcTimeout(int timeout) {
throw new UnsupportedOperationException(
"The BufferedMutator::setRpcTimeout has not been implemented");
}
/** /**
* Set operation timeout for this mutator instance * Set operation timeout for this mutator instance
@ -193,7 +199,10 @@ public interface BufferedMutator extends Closeable {
* {@link BufferedMutatorParams}. * {@link BufferedMutatorParams}.
*/ */
@Deprecated @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}. * Listens for asynchronous exceptions on a {@link BufferedMutator}.