Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-470

Fix NPE when print result via hudi-cli

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.5.1
    • None

    Description

      The size of `rows` is error, for example The size of `rows` is error, for example 

      List<String> allRecords = Arrays.asList();
      
      String[][] rows = new String[allRecords.size() + 1][];
      int i = 0;
      for (String record : allRecords) {
          String[] data = new String[1];
          data[0] = record;
          rows[i++] = data;
      }
      
      HoodiePrintHelper.print(new String[]{"Partition Path"}, rows);
      

      Result

      Exception in thread "main" java.lang.NullPointerException
          at com.jakewharton.fliptables.FlipTable.<init>(FlipTable.java:37)
          at com.jakewharton.fliptables.FlipTable.of(FlipTable.java:20)
          at org.apache.hudi.cli.HoodiePrintHelper.printTextTable(HoodiePrintHelper.java:110)
          at org.apache.hudi.cli.HoodiePrintHelper.print(HoodiePrintHelper.java:43)
          at org.apache.hudi.cli.commands.RepairsCommand.main(RepairsCommand.java:127)

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            lamber-ken lamber-ken
            lamber-ken lamber-ken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                Slack

                  Issue deployment