YARN-3919. NPEs' while stopping service after exception during CommonNodeLabelsManager#start. (varun saxena via rohithsharmaks)

This commit is contained in:
rohithsharmaks 2015-07-29 23:44:15 +05:30
parent 8659315062
commit 9c00ae0009
3 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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());

View File

@ -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 {