Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3713

Remove duplicate function call storeContainerDiagnostics in ContainerDiagnosticsUpdateTransition

    XMLWordPrintableJSON

    Details

    • Hadoop Flags:
      Reviewed

      Description

      remove duplicate function call storeContainerDiagnostics in ContainerDiagnosticsUpdateTransition. storeContainerDiagnostics is already called at ContainerImpl#addDiagnostics.

        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);
          }
        }
      

      So we don't need call storeContainerDiagnostics in ContainerDiagnosticsUpdateTransition#transition.

            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);
            }
      

        Attachments

        1. YARN-3713.000.patch
          1 kB
          Zhihai Xu

          Activity

            People

            • Assignee:
              zxu Zhihai Xu
              Reporter:
              zxu Zhihai Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: