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