You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Marco (JIRA)" <ji...@apache.org> on 2017/04/20 15:55:04 UTC

[jira] [Created] (PHOENIX-3799) Error on tracing query with "union all"

Marco created PHOENIX-3799:
------------------------------

             Summary: Error on tracing query with "union all" 
                 Key: PHOENIX-3799
                 URL: https://issues.apache.org/jira/browse/PHOENIX-3799
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.7.0
         Environment: Phoenix on Cloudera 5.8
            Reporter: Marco


When i try to enable tracing for query with a "union all" clause, I receive an error  and the process stop the execution.
Error: 
0: jdbc:phoenix:xxxxxxxxx> select sum(1) as num from (
. . . . . . . . . . . . . . > select count(1) as num from my_tab where meas_ym ='201601'
. . . . . . . . . . . . . . > union all
. . . . . . . . . . . . . . > select count(1) as num from my_tab where meas_ym ='201602');
17/04/20 15:39:38 ERROR htrace.Tracer: Tried to close trace span {"i":"7a2caddba3cc1d5d","s":"f262306696ff7120","b":1492702777540,"d":"Creating basic query for [CLIENT 10-CHUNK 9560319 ROWS 2516584015 BYTES PARALLEL 1-WAY RANGE SCAN OVER MY_TAB ['201601'],     SERVER FILTER BY FIRST KEY ONLY,     SERVER AGGREGATE INTO SINGLE ROW]","p":["f6e9e018136584b0"],"t":[{"t":1492702777542,"m":"First request completed"}]} but it is not the current span for the main thread.  You have probably forgotten to close or detach {"i":"7a2caddba3cc1d5d","s":"f1a3a546476f1c94","b":1492702777541,"d":"Creating basic query for [CLIENT 36-CHUNK 40590914 ROWS 10380911994 BYTES PARALLEL 1-WAY RANGE SCAN OVER MY_TAB ['201602'],     SERVER FILTER BY FIRST KEY ONLY,     SERVER AGGREGATE INTO SINGLE ROW]","p":["f262306696ff7120"]}
java.lang.RuntimeException: Tried to close trace span {"i":"7a2caddba3cc1d5d","s":"f262306696ff7120","b":1492702777540,"d":"Creating basic query for [CLIENT 10-CHUNK 9560319 ROWS 2516584015 BYTES PARALLEL 1-WAY RANGE SCAN OVER MY_TAB ['201601'],     SERVER FILTER BY FIRST KEY ONLY,     SERVER AGGREGATE INTO SINGLE ROW]","p":["f6e9e018136584b0"],"t":[{"t":1492702777542,"m":"First request completed"}]} but it is not the current span for the main thread.  You have probably forgotten to close or detach {"i":"7a2caddba3cc1d5d","s":"f1a3a546476f1c94","b":1492702777541,"d":"Creating basic query for [CLIENT 36-CHUNK 40590914 ROWS 10380911994 BYTES PARALLEL 1-WAY RANGE SCAN OVER MY_TAB ['201602'],     SERVER FILTER BY FIRST KEY ONLY,     SERVER AGGREGATE INTO SINGLE ROW]","p":["f262306696ff7120"]}
        at org.apache.htrace.Tracer.clientError(Tracer.java:60)
        at org.apache.htrace.TraceScope.close(TraceScope.java:90)
        at org.apache.phoenix.trace.TracingIterator.close(TracingIterator.java:46)
        at org.apache.phoenix.iterate.DelegateResultIterator.close(DelegateResultIterator.java:39)
        at org.apache.phoenix.iterate.LookAheadResultIterator$1.close(LookAheadResultIterator.java:42)
        at org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:104)
        at org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
        at org.apache.phoenix.iterate.DelegateResultIterator.next(DelegateResultIterator.java:44)
        at org.apache.phoenix.execute.TupleProjectionPlan$1.next(TupleProjectionPlan.java:67)
        at org.apache.phoenix.iterate.LookAheadResultIterator$1.advance(LookAheadResultIterator.java:47)
        at org.apache.phoenix.iterate.LookAheadResultIterator.next(LookAheadResultIterator.java:67)
        at org.apache.phoenix.iterate.BaseGroupedAggregatingResultIterator.next(BaseGroupedAggregatingResultIterator.java:64)
        at org.apache.phoenix.iterate.LookAheadResultIterator$1.advance(LookAheadResultIterator.java:47)
        at org.apache.phoenix.iterate.LookAheadResultIterator.init(LookAheadResultIterator.java:59)
        at org.apache.phoenix.iterate.LookAheadResultIterator.next(LookAheadResultIterator.java:65)
        at org.apache.phoenix.iterate.BaseGroupedAggregatingResultIterator.next(BaseGroupedAggregatingResultIterator.java:64)
        at org.apache.phoenix.iterate.UngroupedAggregatingResultIterator.next(UngroupedAggregatingResultIterator.java:39)
        at org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
        at sqlline.BufferedRows.<init>(BufferedRows.java:37)
        at sqlline.SqlLine.print(SqlLine.java:1650)
        at sqlline.Commands.execute(Commands.java:833)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:808)
        at sqlline.SqlLine.begin(SqlLine.java:681)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:292)


Without tracing, the query works fine:
0: jdbc:phoenix:xxxxxxxxx> select sum(1) as num from (
. . . . . . . . . . . . . . > select count(1) as num from my_tab where meas_ym ='201601'
. . . . . . . . . . . . . . > union all
. . . . . . . . . . . . . . > select count(1) as num from my_tab where meas_ym ='201602');
+------+
| NUM  |
+------+
| 2    |
+------+
1 row selected (8.507 seconds)






--
This message was sent by Atlassian JIRA
(v6.3.15#6346)