[
https://issues.apache.org/jira/browse/HUDI-470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
lamber-ken updated HUDI-470:
----------------------------
Description:
The size of `rows` is error, for example The size of `rows` is error, for
example
{code:java}
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);
{code}
Result
{code:java}
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){code}
was:Fix NPE when print result via hudi-cli
> Fix NPE when print result via hudi-cli
> --------------------------------------
>
> Key: HUDI-470
> URL: https://issues.apache.org/jira/browse/HUDI-470
> Project: Apache Hudi (incubating)
> Issue Type: Bug
> Reporter: lamber-ken
> Assignee: lamber-ken
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.5.1
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The size of `rows` is error, for example The size of `rows` is error, for
> example
> {code:java}
> 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);
> {code}
> Result
> {code:java}
> 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){code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)