zhihai xu created YARN-3713: ------------------------------- Summary: Remove duplicate function call storeContainerDiagnostics in ContainerDiagnosticsUpdateTransition Key: YARN-3713 URL: https://issues.apache.org/jira/browse/YARN-3713 Project: Hadoop YARN Issue Type: Improvement Components: nodemanager Affects Versions: 2.7.0 Reporter: zhihai xu Assignee: zhihai xu Priority: Minor
remove duplicate function call {{storeContainerDiagnostics}} in ContainerDiagnosticsUpdateTransition. {{storeContainerDiagnostics}} is already called at ContainerImpl#addDiagnostics. {code} private void addDiagnostics(String... diags) { for (String s : diags) { this.diagnostics.append(s); } try { stateStore.storeContainerDiagnostics(containerId, diagnostics); } catch (IOException e) { LOG.warn("Unable to update diagnostics in state store for " + containerId, e); } } {code} So we don't need call {{storeContainerDiagnostics}} in ContainerDiagnosticsUpdateTransition#transition. {code} container.addDiagnostics(updateEvent.getDiagnosticsUpdate(), "\n"); try { container.stateStore.storeContainerDiagnostics(container.containerId, container.diagnostics); } catch (IOException e) { LOG.warn("Unable to update state store diagnostics for " + container.containerId, e); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)