YARN-3919. NPEs' while stopping service after exception during CommonNodeLabelsManager#start. (varun saxena via rohithsharmaks)
This commit is contained in:
parent
5205a330b3
commit
c020b62cf8
|
@ -707,6 +707,9 @@ Release 2.8.0 - UNRELEASED
|
|||
YARN-3982. container-executor parsing of container-executor.cfg broken in
|
||||
trunk and branch-2. (Varun Vasudev via xgong)
|
||||
|
||||
YARN-3919. NPEs' while stopping service after exception during
|
||||
CommonNodeLabelsManager#start. (varun saxane via rohithsharmaks)
|
||||
|
||||
Release 2.7.2 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -139,7 +139,8 @@ public class AsyncDispatcher extends AbstractService implements Dispatcher {
|
|||
blockNewEvents = true;
|
||||
LOG.info("AsyncDispatcher is draining to stop, igonring any new events.");
|
||||
synchronized (waitForDrained) {
|
||||
while (!drained && eventHandlingThread.isAlive()) {
|
||||
while (!drained && eventHandlingThread != null
|
||||
&& eventHandlingThread.isAlive()) {
|
||||
waitForDrained.wait(1000);
|
||||
LOG.info("Waiting for AsyncDispatcher to drain. Thread state is :" +
|
||||
eventHandlingThread.getState());
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.hadoop.fs.FSDataOutputStream;
|
|||
import org.apache.hadoop.fs.FileSystem;
|
||||
import org.apache.hadoop.fs.LocalFileSystem;
|
||||
import org.apache.hadoop.fs.Path;
|
||||
import org.apache.hadoop.io.IOUtils;
|
||||
import org.apache.hadoop.security.UserGroupInformation;
|
||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||
import org.apache.hadoop.yarn.api.records.NodeLabel;
|
||||
|
@ -92,12 +93,7 @@ public class FileSystemNodeLabelsStore extends NodeLabelsStore {
|
|||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
fs.close();
|
||||
editlogOs.close();
|
||||
} catch (IOException e) {
|
||||
LOG.warn("Exception happened whiling shutting down,", e);
|
||||
}
|
||||
IOUtils.cleanup(LOG, fs, editlogOs);
|
||||
}
|
||||
|
||||
private void setFileSystem(Configuration conf) throws IOException {
|
||||
|
|
Loading…
Reference in New Issue