phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Monil Gandhi <mgand...@gmail.com>
Subject Re: Phoenix metrics error on thin client
Date Wed, 24 Oct 2018 05:07:33 GMT
Here are few suggestions based on what I found tricky to understand
1. How do thin client and thick client work or have dependency on each
other? This was clear after you told me and did some more research
2. If I use thin client can I also use thick client? I had to try this out
to be sure. The biggest point of confusion was if the thick client supports
protobuf or not
3. Specify that the metrics cannot be retrieved via thin client. Maybe my
understanding is still limited but I have thin client running on my PQS and
I wrote a small program to just connect via thick client to my PQS
4. The jmx metric is still not clear to me. I added all the specified
config options. But I do not know what the port is nor do I know if it is
working at all. I also do not know are the metrics provided by pqs same as
that in jmx. This will also be helpful


Hope this helps.
On Tue, Oct 23, 2018 at 6:27 PM Josh Elser <elserj@apache.org> wrote:

> The thick client talks directly to HBase. The thin client talks to PQS.
> You cannot mix-and-match.
>
> Glad to hear you got it working. How can the documentation be improved
> to make this more clear?
>
> On 10/23/18 9:11 PM, Monil Gandhi wrote:
> > Hello
> > Update. I was able to figure this out. Thanks for the initial pointer :)
> > On Mon, Oct 22, 2018 at 10:54 PM Monil Gandhi <mgandhiw@gmail.com
> > <mailto:mgandhiw@gmail.com>> wrote:
> >
> >     Hello,
> >     Thanks for the earlier reply.
> >     I am a little confused with documentation and the response from
> >     Josh. This may be my limited knowledge with Phoenix.
> >
> >     Can I connect to the server with thick client instead of thin for my
> >     server which is running thing client since thick client seems to be
> >     running on PQS?
> >
> >     Additionally I followed the directions on
> >     https://phoenix.apache.org/server.html and the above linked
> >     conversation, but I am unable to generate any kind of metrics for
> >     any queries. Please note that in this scenario I am running my
> >     queries via the think client installed on PQS
> >
> >     For a particular query, I am trying to see how many rows are being
> >     scanned and across how many region servers. If there is an easier
> >     way, please let me know
> >
> >     On Thu, Oct 18, 2018 at 7:00 PM Monil Gandhi <mgandhiw@gmail.com
> >     <mailto:mgandhiw@gmail.com>> wrote:
> >
> >         Okay. Will take a look. Thanks
> >         On Wed, Oct 17, 2018 at 8:28 AM Josh Elser <elserj@apache.org
> >         <mailto:elserj@apache.org>> wrote:
> >
> >             The methods that you are invoking assume that the Phoenix
> >             JDBC driver
> >             (the java class org.apache.phoenix.jdbc.PhoenixDriver) is in
> >             use. It's
> >             not, so you get this error.
> >
> >             The Phoenix "thick" JDBC driver is what's running inside of
> >             the Phoenix
> >             Query Server, just not in your local JVM. As such, you need
> >             to look at
> >             PQS for metrics.
> >
> >             You probably want to look at what was done in
> >             https://issues.apache.org/jira/browse/PHOENIX-3655.
> >
> >             On 10/16/18 2:49 PM, Monil Gandhi wrote:
> >              > Hello,
> >              > I am trying to collect some metrics on certain queries.
> >             Here is the code
> >              > that I have
> >              >
> >              > Properties props =new Properties();
> >              >
> >
>  props.setProperty(QueryServices.COLLECT_REQUEST_LEVEL_METRICS,
> >             "true");
> >              > props.setProperty("phoenix.trace.frequency", "always");
> >              >
> >              > try (Connection conn = DriverManager.getConnection(url,
> >             props)) {
> >              >      conn.setAutoCommit(true);
> >              >
> >              > PreparedStatement stmt = conn.prepareStatement(query);
> >              >
> >              > Map<org.apache.phoenix.monitoring.MetricType, Long>
> >             overAllQueryMetrics =null;
> >              > Map<String, Map<org.apache.phoenix.monitoring.MetricType,
> >             Long>> requestReadMetrics =null;
> >              > try (ResultSet rs = stmt.executeQuery()) {
> >              >          rs.next();
> >              > requestReadMetrics =
> >             PhoenixRuntime.getRequestReadMetricInfo(rs);
> >              > // log or report metrics as needed
> >              > PhoenixRuntime.resetMetrics(rs);
> >              > rs.close();
> >              > }
> >              > }
> >              >
> >              >
> >              > However, rs.next() throws the following error
> >              > java.sql.SQLException: does not implement 'class
> >              > org.apache.phoenix.jdbc.PhoenixResultSet'
> >              >
> >              > I am not sure why the error is happening. Are metrics not
> >             supported with
> >              > thin client?
> >              >
> >              > If not how do I get query level metrics?
> >              >
> >              > Thanks
> >
>

Mime
View raw message