Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-10581

NPE in SummarySubCommand & DiskUsageSubCommand

    XMLWordPrintableJSON

Details

    Description

      TestNSSummaryAdmin invokes various subcommands of ozone admin namespace. It only checks for certain patterns in the output. NPE occurs in SummarySubCommand & DiskUsageSubCommand, but it is silently ignored. (It can be observed by logging getErrContentString()).

      java.lang.NullPointerException
      	at org.apache.hadoop.ozone.admin.nssummary.SummarySubCommand.call(SummarySubCommand.java:86)
      	at org.apache.hadoop.ozone.admin.nssummary.SummarySubCommand.call(SummarySubCommand.java:39)
      	at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
      	at picocli.CommandLine.access$1500(CommandLine.java:148)
      	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
      	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
      	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
      	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
      	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
      	at picocli.CommandLine.execute(CommandLine.java:2170)
      	at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:100)
      	at org.apache.hadoop.hdds.cli.OzoneAdmin.lambda$execute$0(OzoneAdmin.java:80)
      	at org.apache.hadoop.hdds.tracing.TracingUtil.executeInSpan(TracingUtil.java:159)
      	at org.apache.hadoop.hdds.tracing.TracingUtil.executeInNewSpan(TracingUtil.java:149)
      	at org.apache.hadoop.hdds.cli.OzoneAdmin.execute(OzoneAdmin.java:79)
      	at org.apache.hadoop.ozone.shell.TestNSSummaryAdmin.executeAdminCommands(TestNSSummaryAdmin.java:172)
      	at org.apache.hadoop.ozone.shell.TestNSSummaryAdmin.testNSSummaryCLIFSO(TestNSSummaryAdmin.java:135)
      

      Note: this changes slightly after HDDS-10540, but the problem is similar.

      Cannot invoke "com.fasterxml.jackson.databind.JsonNode.asInt()" because the return value of "com.fasterxml.jackson.databind.JsonNode.get(String)" is null
      

      Attachments

        Issue Links

          Activity

            People

              arafat2198 Arafat Khan
              adoroszlai Attila Doroszlai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: