From issues-return-24250-apmail-kylin-issues-archive=kylin.apache.org@kylin.apache.org Mon Feb 25 14:45:05 2019 Return-Path: X-Original-To: apmail-kylin-issues-archive@minotaur.apache.org Delivered-To: apmail-kylin-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2127018A7A for ; Mon, 25 Feb 2019 14:45:05 +0000 (UTC) Received: (qmail 82923 invoked by uid 500); 25 Feb 2019 14:45:05 -0000 Delivered-To: apmail-kylin-issues-archive@kylin.apache.org Received: (qmail 82879 invoked by uid 500); 25 Feb 2019 14:45:05 -0000 Mailing-List: contact issues-help@kylin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kylin.apache.org Delivered-To: mailing list issues@kylin.apache.org Received: (qmail 82870 invoked by uid 99); 25 Feb 2019 14:45:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2019 14:45:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 75C57C214B for ; Mon, 25 Feb 2019 14:45:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dfMOlNBk6YyE for ; Mon, 25 Feb 2019 14:45:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 282FF60DB1 for ; Mon, 25 Feb 2019 14:45:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5DD0EE27EB for ; Mon, 25 Feb 2019 14:45:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6A9582455B for ; Mon, 25 Feb 2019 14:45:00 +0000 (UTC) Date: Mon, 25 Feb 2019 14:45:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@kylin.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KYLIN-3828) ArrayIndexOutOfBoundsException thrown when build a streaming cube with empty data in its first dimension MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 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)