diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/Abortable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/Abortable.java index 8233071bc3f..b137a7da2ce 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/Abortable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/Abortable.java @@ -37,6 +37,16 @@ public interface Abortable { */ void abort(String why, Throwable e); + /** + * It just call another abort method and the Throwable + * parameter is null. + * @param why Why we're aborting. + * @see Abortable#abort(String, Throwable) + */ + default void abort(String why) { + abort(why, null); + } + /** * Check if the server or client was aborted. * @return true if the server or client was aborted, false otherwise diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 3e4a501baec..816b8f38109 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -2647,13 +2647,6 @@ public class HRegionServer extends Thread implements return abortRequested.compareAndSet(false, true); } - /** - * @see HRegionServer#abort(String, Throwable) - */ - public void abort(String reason) { - abort(reason, null); - } - @Override public boolean isAborted() { return abortRequested.get();