@Override public void close() { try { MapReduceTaskContextProvider provider; synchronized (this) { provider = taskContextProvider; } if (provider != null) { Service.State state = provider.state(); if (state == Service.State.STARTING || state == Service.State.RUNNING) { provider.stopAndWait(); } } } catch (Exception e) { // This is non-fatal, since the container is already done. LOG.warn("Exception while stopping MapReduceTaskContextProvider", e); } }
@Override public void close() { try { MapReduceTaskContextProvider provider; synchronized (this) { provider = taskContextProvider; } if (provider != null) { Service.State state = provider.state(); if (state == Service.State.STARTING || state == Service.State.RUNNING) { provider.stopAndWait(); } } } catch (Exception e) { // This is non-fatal, since the container is already done. LOG.warn("Exception while stopping MapReduceTaskContextProvider", e); } }