You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Tim Armstrong (Jira)" <ji...@apache.org> on 2020/12/21 19:28:00 UTC

[jira] [Resolved] (IMPALA-6616) UUIDs for query id's never seem to start with 0

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

Tim Armstrong resolved IMPALA-6616.
-----------------------------------
    Resolution: Not A Bug

We use boost's UUID generator. UUIDs are not completely random - there is a version field. That is what we are likely seeing here - https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)

> UUIDs for query id's never seem to start with 0
> -----------------------------------------------
>
>                 Key: IMPALA-6616
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6616
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>            Reporter: Philip Martin
>            Priority: Minor
>
> In working with a bucket of Impala profiles, I was surprised to find that I had no queries whose ID began with "0". I would have expected the id space to be uniformly distributed.
> Here's a simple reproduction where I run 200 queries and find that none of them had a query id that began with 0.
> {code}
> $(for i in $(seq 20); do impala-shell.sh --query 'select 1;select 2;select 3;select 4;select 5;select 6;select 7; select 8; select 9;select 10;' |& grep -o 'query_id=.*' | awk -F= '{ print $2 }' | cut -c 1; done) | sort | uniq -c
>      12 1
>       8 2
>      14 3
>      10 4
>      17 5
>      17 6
>      12 7
>      13 8
>      12 9
>       7 a
>      14 b
>      18 c
>      11 d
>      20 e
>      15 f
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)