use of com.linkedin.pinot.common.request.BrokerRequest in project pinot by linkedin.
the class InstanceServerStarter method getCountQuery.
private static BrokerRequest getCountQuery() {
BrokerRequest query = new BrokerRequest();
AggregationInfo aggregationInfo = getCountAggregationInfo();
List<AggregationInfo> aggregationsInfo = new ArrayList<AggregationInfo>();
aggregationsInfo.add(aggregationInfo);
query.setAggregationsInfo(aggregationsInfo);
FilterQuery filterQuery = getFilterQuery();
query.setFilterQuery(filterQuery);
return query;
}
use of com.linkedin.pinot.common.request.BrokerRequest in project pinot by linkedin.
the class InstanceServerStarter method getSumQuery.
private static BrokerRequest getSumQuery() {
BrokerRequest query = new BrokerRequest();
AggregationInfo aggregationInfo = getSumAggregationInfo();
List<AggregationInfo> aggregationsInfo = new ArrayList<AggregationInfo>();
aggregationsInfo.add(aggregationInfo);
query.setAggregationsInfo(aggregationsInfo);
FilterQuery filterQuery = getFilterQuery();
query.setFilterQuery(filterQuery);
return query;
}
use of com.linkedin.pinot.common.request.BrokerRequest in project pinot by linkedin.
the class IntegrationTest method getSumQuery.
private BrokerRequest getSumQuery() {
BrokerRequest query = new BrokerRequest();
AggregationInfo aggregationInfo = getSumAggregationInfo();
List<AggregationInfo> aggregationsInfo = new ArrayList<AggregationInfo>();
aggregationsInfo.add(aggregationInfo);
query.setAggregationsInfo(aggregationsInfo);
return query;
}
use of com.linkedin.pinot.common.request.BrokerRequest in project pinot by linkedin.
the class IntegrationTest method testCountQuery.
@Test
public void testCountQuery() {
BrokerRequest brokerRequest = getCountQuery();
QuerySource querySource = new QuerySource();
querySource.setTableName("testTable");
brokerRequest.setQuerySource(querySource);
InstanceRequest instanceRequest = new InstanceRequest(0, brokerRequest);
addTestTableSearchSegmentsToInstanceRequest(instanceRequest);
try {
QueryRequest queryRequest = new QueryRequest(instanceRequest, _serverInstance.getServerMetrics());
DataTable instanceResponse = _queryExecutor.processQuery(queryRequest, queryRunners);
// System.out.println(instanceResponse.getLong(0, 0));
// System.out.println(instanceResponse.getMetadata().get(DataTable.TIME_USED_MS_METADATA_KEY));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
use of com.linkedin.pinot.common.request.BrokerRequest in project pinot by linkedin.
the class IntegrationTest method testWvmpQuery.
@Test
public void testWvmpQuery() {
BrokerRequest brokerRequest = getCountQuery();
brokerRequest.setFilterQuery(null);
brokerRequest.setFilterQueryIsSet(false);
QuerySource querySource = new QuerySource();
querySource.setTableName("testTable");
brokerRequest.setQuerySource(querySource);
InstanceRequest instanceRequest = new InstanceRequest(0, brokerRequest);
List<String> searchSegments = new ArrayList<String>();
searchSegments.add("testTable_0_9_");
instanceRequest.setSearchSegments(searchSegments);
try {
QueryRequest queryRequest = new QueryRequest(instanceRequest, _serverInstance.getServerMetrics());
DataTable instanceResponse = _queryExecutor.processQuery(queryRequest, queryRunners);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
Aggregations