From 9321af06d94aa073397933ef014bb283abaa59d0 Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 7 Oct 2024 13:37:35 +0200 Subject: [PATCH] HBASE-28001: Add request attribute support to BufferedMutator (#6076) (addendum) Add default implementations of the new methods so that a custom implementation of AsyncBufferedMutatorBuilder will not fail to compile after upgrade. --- .../client/AsyncBufferedMutatorBuilder.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncBufferedMutatorBuilder.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncBufferedMutatorBuilder.java index fc7db7634d93..4659fe63eefc 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncBufferedMutatorBuilder.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncBufferedMutatorBuilder.java @@ -106,13 +106,25 @@ default AsyncBufferedMutatorBuilder setMaxRetries(int maxRetries) { /** * Set a rpc request attribute. + *

+ * Introduced in 2.6.1. Any custom implementations of this class should implement this method in + * order to take advantage of the new behavior. + *

*/ - AsyncBufferedMutatorBuilder setRequestAttribute(String key, byte[] value); + default AsyncBufferedMutatorBuilder setRequestAttribute(String key, byte[] value) { + throw new UnsupportedOperationException("Not implemented"); + } /** * Set multiple rpc request attributes. + *

+ * Introduced in 2.6.1. Any custom implementations of this class should implement this method in + * order to take advantage of the new behavior. + *

*/ - AsyncBufferedMutatorBuilder setRequestAttributes(Map requestAttributes); + default AsyncBufferedMutatorBuilder setRequestAttributes(Map requestAttributes) { + throw new UnsupportedOperationException("Not implemented"); + } /** * Create the {@link AsyncBufferedMutator} instance.