Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ public static void tearDown() throws Exception {
@Test
public void testCurrentQueries() {
try {
Assert.assertEquals(3, QUERIES_COSTS_HISTOGRAM_COLUMN_NUM);

Connection connection =
EnvFactory.getEnv().getConnection(ADMIN_NAME, ADMIN_PWD, BaseEnv.TABLE_SQL_DIALECT);
Statement statement = connection.createStatement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,7 @@ private QueriesCostsHistogramSupplier(
protected void constructLine() {
columnBuilders[0].writeBinary(BUCKETS[nextConsumedIndex]);
columnBuilders[1].writeInt(currentQueriesCostHistogram[nextConsumedIndex]);
columnBuilders[2].writeInt(QueryId.getDataNodeId());
resultBuilder.declarePosition();
nextConsumedIndex++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,17 @@ public void bindTo(AbstractMetricService metricService) {
GlobalMemoryMetrics.ON_HEAP,
Tag.LEVEL.toString(),
GlobalMemoryMetrics.LEVELS[2]);
// TODO @spricoder: CoordinatorMemoryManager are not used
metricService.createAutoGauge(
Metric.MEMORY_ACTUAL_SIZE.toString(),
MetricLevel.IMPORTANT,
memoryConfig.getCoordinatorMemoryManager(),
MemoryManager::getUsedMemorySizeInBytes,
Tag.NAME.toString(),
QUERY_ENGINE_COORDINATOR,
Tag.TYPE.toString(),
GlobalMemoryMetrics.ON_HEAP,
Tag.LEVEL.toString(),
GlobalMemoryMetrics.LEVELS[2]);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void testQueriesCostsHistogram() {
infoSchemaTableScan(
"information_schema.queries_costs_histogram",
Optional.empty(),
ImmutableList.of(BIN, NUMS))));
ImmutableList.of(BIN, NUMS, DATA_NODE_ID_TABLE_MODEL))));

// - Exchange
// Output - Collect - Exchange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ public class InformationSchema {
new TagColumnSchema(ColumnHeaderConstant.BIN, TSDataType.STRING));
queriesCostsHistogramTable.addColumnSchema(
new AttributeColumnSchema(ColumnHeaderConstant.NUMS, TSDataType.INT32));
queriesCostsHistogramTable.addColumnSchema(
new AttributeColumnSchema(ColumnHeaderConstant.DATANODE_ID, TSDataType.INT32));
queriesCostsHistogramTable.removeColumnSchema(TsTable.TIME_COLUMN_NAME);
schemaTables.put(QUERIES_COSTS_HISTOGRAM, queriesCostsHistogramTable);
}
Expand Down