kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KYLIN-3828) ArrayIndexOutOfBoundsException thrown when build a streaming cube with empty data in its first dimension
Date Mon, 25 Feb 2019 14:45:00 GMT

    [ https://issues.apache.org/jira/browse/KYLIN-3828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16776956#comment-16776956
] 

ASF subversion and git services commented on KYLIN-3828:
--------------------------------------------------------

Commit d6819b3e70033888b42ab0e5585c191898f8afe9 in kylin's branch refs/heads/2.5.x from nichunen
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=d6819b3 ]

KYLIN-3828 Fix heading empty string be ignored in StringUtil.join


> ArrayIndexOutOfBoundsException thrown when build a streaming cube with empty data in
its first dimension
> --------------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-3828
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3828
>             Project: Kylin
>          Issue Type: Bug
>          Components: NRT Streaming
>    Affects Versions: v2.6.0
>            Reporter: nichunen
>            Assignee: nichunen
>            Priority: Major
>             Fix For: v2.6.1
>
>
> The root cause is 
> in org.apache.kylin.source.kafka.hadoop.KafkaFlatTableMapper#doMap
> {code:java}
>     public void doMap(LongWritable key, BytesWritable value, Context context) throws
IOException, InterruptedException {
>         ByteBuffer buffer = ByteBuffer.wrap(value.getBytes(), 0, value.getLength());
>         StreamingMessageRow row = streamingParser.parse(buffer).get(0);
>         if (row == null) {
>             throw new IllegalArgumentException("");
>         }
>         data = StringUtil.join(row.getData(), delimiter);
>         // output this row to value
>         outValue.set(Bytes.toBytes(data));
>         context.write(outKey, outValue);
>     }
> {code}
> Method _StringUtil.join_ is used to join a collection of string to a single string with
delimiter. But _org.apache.kylin.common.util.StringUtil#join_ will ignore the leading empty
strings in the colletion, source code is:
> {code:java}
>     public static String join(Iterable<String> parts, String separator) {
>         StringBuilder buf = new StringBuilder();
>         for (String p : parts) {
>             if (buf.length() > 0)
>                 buf.append(separator);
>             buf.append(p);
>         }
>         return buf.toString();
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message