kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiatao Tao (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KYLIN-3669) Add logs to GTStreamAggregateScanner
Date Tue, 06 Nov 2018 15:15:00 GMT

     [ https://issues.apache.org/jira/browse/KYLIN-3669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jiatao Tao updated KYLIN-3669:
------------------------------
    Description: 
There's no log printing in GTStreamAggregateScanner, and you know nothing about whether you
go to this path or not, it's pretty unfriendly for trouble shooting.

Code in _SegmentCubeTupleIterator_.
{code:java}
boolean hasMultiplePartitions = records instanceof SortMergedPartitionResultIterator;
if (hasMultiplePartitions && context.isStreamAggregateEnabled()) {
    ...
    // input records are ordered, leverage stream aggregator to produce possibly fewer records
    try (GTStreamAggregateScanner aggregator = new GTStreamAggregateScanner(inputScanner,
scanRequest)) {
        result = aggregator.valuesIterator(gtDimsIdx, gtMetricsIdx);
    } catch (IOException ioe) {
        // implementation of close method of anonymous IGTScanner is empty, no way throw exception
        throw new IllegalStateException("IOException is not expected here.", ioe);
    }
    return result;
}
{code}



  was:
There's no log printing in GTStreamAggregateScanner, and you know nothing about whether you
go to this path or not, it's pretty unfriendly for trouble shooting.

Code in _SegmentCubeTupleIterator_.
{code:java}
        boolean hasMultiplePartitions = records instanceof SortMergedPartitionResultIterator;
        if (hasMultiplePartitions && context.isStreamAggregateEnabled()) {
            // input records are ordered, leverage stream aggregator to produce possibly fewer
records
            IGTScanner inputScanner = new IGTScanner() {
                public GTInfo getInfo() {
                    return scanRequest.getInfo();
                }

                public void close() {
                    // Underlying resource is hold by scanner and it will be closed at
                    // SegmentCubeTupleIterator#close, caller is SequentialCubeTupleIterator
                }

                public Iterator<GTRecord> iterator() {
                    return records;
                }
            };
            Iterator<Object[]> result;
            try (GTStreamAggregateScanner aggregator = new GTStreamAggregateScanner(inputScanner,
scanRequest)) {
                result = aggregator.valuesIterator(gtDimsIdx, gtMetricsIdx);
            } catch (IOException ioe) {
                // implementation of close method of anonymous IGTScanner is empty, no way
throw exception
                throw new IllegalStateException("IOException is not expected here.", ioe);
            }
            return result;
        }
{code}




> Add logs to GTStreamAggregateScanner
> ------------------------------------
>
>                 Key: KYLIN-3669
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3669
>             Project: Kylin
>          Issue Type: Improvement
>          Components: Query Engine
>            Reporter: Jiatao Tao
>            Assignee: Jiatao Tao
>            Priority: Trivial
>
> There's no log printing in GTStreamAggregateScanner, and you know nothing about whether
you go to this path or not, it's pretty unfriendly for trouble shooting.
> Code in _SegmentCubeTupleIterator_.
> {code:java}
> boolean hasMultiplePartitions = records instanceof SortMergedPartitionResultIterator;
> if (hasMultiplePartitions && context.isStreamAggregateEnabled()) {
>     ...
>     // input records are ordered, leverage stream aggregator to produce possibly fewer
records
>     try (GTStreamAggregateScanner aggregator = new GTStreamAggregateScanner(inputScanner,
scanRequest)) {
>         result = aggregator.valuesIterator(gtDimsIdx, gtMetricsIdx);
>     } catch (IOException ioe) {
>         // implementation of close method of anonymous IGTScanner is empty, no way throw
exception
>         throw new IllegalStateException("IOException is not expected here.", ioe);
>     }
>     return result;
> }
> {code}



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

Mime
View raw message