HBASE-26216 Move HRegionServer.abort(String) to Abortable as a default method (#3642)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
07c0eeebb3
commit
00981643d2
|
@ -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
|
||||
|
|
|
@ -2636,13 +2636,6 @@ public class HRegionServer extends Thread implements RegionServerServices, LastS
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue