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

Fix NPE when print result via hudi-cli

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5.1
    • Component/s: 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

          Issue Links

            Activity

              People

              • Assignee:
                lamber-ken lamber-ken
                Reporter:
                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