use of com.linkedin.pinot.client.PinotClientException in project pinot by linkedin.
the class ResultSetGroupCacheLoader method load.
@Override
public ResultSetGroup load(PinotQuery pinotQuery) throws Exception {
try {
Connection connection = getConnection();
synchronized (connection) {
long start = System.currentTimeMillis();
ResultSetGroup resultSetGroup = connection.execute(pinotQuery.getTableName(), pinotQuery.getPql());
if (LOG.isDebugEnabled()) {
LOG.debug("Query:{} response:{}", pinotQuery.getPql(), format(resultSetGroup));
}
long end = System.currentTimeMillis();
LOG.info("Query:{} took:{} ms", pinotQuery.getPql(), (end - start));
return resultSetGroup;
}
} catch (PinotClientException cause) {
LOG.error("Error when running pql:" + pinotQuery.getPql(), cause);
throw new PinotClientException("Error when running pql:" + pinotQuery.getPql(), cause);
}
}
Aggregations