PSQ processlist

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PSQ processlist

Aleksandr Saraseka-2
Hello.
Does Phoenix Query Server have any possibility to track running queries ? Like user connects with thin client and run some long running query, can I understand who and what is running ?

--
Aleksandr Saraseka
DBA
<a href="tel:380997600401" style="color:#505050;text-decoration:none;font-family:Arial" target="_blank">380997600401
   [hidden email]    eztexting.com
Reply | Threaded
Open this post in threaded view
|

Re: PSQ processlist

Josh Elser-2
Reply | Threaded
Open this post in threaded view
|

Re: PSQ processlist

Aleksandr Saraseka-2
Thank you Josh, this is very helpful.
Another question - can we kill long running query in PQS somehow ?

On Mon, Sep 9, 2019 at 5:09 PM Josh Elser <[hidden email]> wrote:
Not unique to PQS, see:

https://issues.apache.org/jira/browse/PHOENIX-2715

On 9/9/19 9:02 AM, Aleksandr Saraseka wrote:
> Hello.
> Does Phoenix Query Server have any possibility to track running queries
> ? Like user connects with thin client and run some long running query,
> can I understand who and what is running ?
>
> --
>               Aleksandr Saraseka
> DBA
> 380997600401
> <tel:380997600401> *•* [hidden email]
> <mailto:[hidden email]> *•* eztexting.com
> <http://eztexting.com?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>
>
> <http://facebook.com/eztexting?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <http://linkedin.com/company/eztexting/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <http://twitter.com/eztexting?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <https://www.youtube.com/eztexting?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <https://www.instagram.com/ez_texting/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <https://www.facebook.com/alex.saraseka?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <https://www.linkedin.com/in/alexander-saraseka-32616076/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>


--
Aleksandr Saraseka
DBA
<a href="tel:380997600401" style="color:rgb(80,80,80);text-decoration:none;font-family:Arial" target="_blank">380997600401
   [hidden email]    eztexting.com
Reply | Threaded
Open this post in threaded view
|

Re: PSQ processlist

Josh Elser-2
As you might already know, JDBC is "stateful" in what it does. You have
a Connection, which creates Statements, and the combination of those two
track queries being run.

However, HTTP is a stateless protocol. As such, PQS has to cache things
in memory in order to make this approach work.

To this point, there are Connection and Statement caches which, once
they are not used, are evicted from the cache and closed[1]. I know that
Phoenix is not capable of interrupting/free'ing all resources used by a
Phoenix query (e.g. you cannot interrupt an HBase RPC once it's
running), but it's likely that Phoenix would clean up the client-side
state to the best of its ability when the Statement/Connection are closed.

Maybe someone knows the answer to that off the top of their head.
Otherwise, hopefully this information is a starting point for you to
look at the code and/or run some experiments.

[1] https://phoenix.apache.org/server.html "Configurations relating to
the server connection cache."

On 9/10/19 11:28 AM, Aleksandr Saraseka wrote:

> Thank you Josh, this is very helpful.
> Another question - can we kill long running query in PQS somehow ?
>
> On Mon, Sep 9, 2019 at 5:09 PM Josh Elser <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Not unique to PQS, see:
>
>     https://issues.apache.org/jira/browse/PHOENIX-2715
>
>     On 9/9/19 9:02 AM, Aleksandr Saraseka wrote:
>      > Hello.
>      > Does Phoenix Query Server have any possibility to track running
>     queries
>      > ? Like user connects with thin client and run some long running
>     query,
>      > can I understand who and what is running ?
>      >
>      > --
>      >               Aleksandr Saraseka
>      > DBA
>      > 380997600401
>      > <tel:380997600401> *•* [hidden email]
>     <mailto:[hidden email]>
>      > <mailto:[hidden email] <mailto:[hidden email]>>
>     *•* eztexting.com <http://eztexting.com>
>      >
>     <http://eztexting.com?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>
>      >
>      >
>      >
>     <http://facebook.com/eztexting?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>
>      >
>     <http://linkedin.com/company/eztexting/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>
>      >
>     <http://twitter.com/eztexting?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>
>      >
>     <https://www.youtube.com/eztexting?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>
>      >
>     <https://www.instagram.com/ez_texting/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>
>      >
>     <https://www.facebook.com/alex.saraseka?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>
>      >
>     <https://www.linkedin.com/in/alexander-saraseka-32616076/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>      >
>
>
>
> --
> Aleksandr Saraseka
> DBA
> 380997600401
> <tel:380997600401> *•* [hidden email]
> <mailto:[hidden email]> *•* eztexting.com
> <http://eztexting.com?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>
>
> <http://facebook.com/eztexting?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <http://linkedin.com/company/eztexting/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <http://twitter.com/eztexting?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <https://www.youtube.com/eztexting?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <https://www.instagram.com/ez_texting/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <https://www.facebook.com/alex.saraseka?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
> <https://www.linkedin.com/in/alexander-saraseka-32616076/?utm_source=WiseStamp&utm_medium=email&utm_term=&utm_content=&utm_campaign=signature>
>