HDFS-10932. Ozone: fix XceiverClient slow shutdown. Contributed by Chen Liang.
This commit is contained in:
parent
595257e3f4
commit
4217f85202
|
@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Client for the storageContainer protocol.
|
* A Client for the storageContainer protocol.
|
||||||
|
@ -96,7 +97,7 @@ public class XceiverClient implements Closeable {
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
if(group != null) {
|
if(group != null) {
|
||||||
group.shutdownGracefully();
|
group.shutdownGracefully(0, 0, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channelFuture != null) {
|
if (channelFuture != null) {
|
||||||
|
|
Loading…
Reference in New Issue