Skip to content

Commit 0098164

Browse files
authored
HBASE-26216 Move HRegionServer.abort(String) to Abortable as a default method (#3642)
Signed-off-by: Duo Zhang <[email protected]>
1 parent 07c0eee commit 0098164

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/Abortable.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ public interface Abortable {
3737
*/
3838
void abort(String why, Throwable e);
3939

40+
/**
41+
* It just call another abort method and the Throwable
42+
* parameter is null.
43+
* @param why Why we're aborting.
44+
* @see Abortable#abort(String, Throwable)
45+
*/
46+
default void abort(String why) {
47+
abort(why, null);
48+
}
49+
4050
/**
4151
* Check if the server or client was aborted.
4252
* @return true if the server or client was aborted, false otherwise

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,13 +2636,6 @@ protected boolean setAbortRequested() {
26362636
return abortRequested.compareAndSet(false, true);
26372637
}
26382638

2639-
/**
2640-
* @see HRegionServer#abort(String, Throwable)
2641-
*/
2642-
public void abort(String reason) {
2643-
abort(reason, null);
2644-
}
2645-
26462639
@Override
26472640
public boolean isAborted() {
26482641
return abortRequested.get();

0 commit comments

Comments
 (0)