Skip to content

Commit

Permalink
Rename presto to trino in Elasticsearch system table
Browse files Browse the repository at this point in the history
  • Loading branch information
martint committed Nov 8, 2023
1 parent 35d7f0e commit ebbdb36
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class NodesSystemTable
private static final ConnectorTableMetadata METADATA = new ConnectorTableMetadata(
new SchemaTableName("system", "nodes"),
ImmutableList.<ColumnMetadata>builder()
.add(new ColumnMetadata("presto_node_id", createUnboundedVarcharType()))
.add(new ColumnMetadata("presto_node_address", createUnboundedVarcharType()))
.add(new ColumnMetadata("trino_node_id", createUnboundedVarcharType()))
.add(new ColumnMetadata("trino_node_address", createUnboundedVarcharType()))
.add(new ColumnMetadata("elasticsearch_node_id", createUnboundedVarcharType()))
.add(new ColumnMetadata("elasticsearch_node_address", createUnboundedVarcharType()))
.build());
Expand Down Expand Up @@ -79,13 +79,13 @@ public ConnectorPageSource pageSource(ConnectorTransactionHandle transaction, Co
Set<ElasticsearchNode> nodes = client.getNodes();

BlockBuilder nodeId = VARCHAR.createBlockBuilder(null, nodes.size());
BlockBuilder prestoAddress = VARCHAR.createBlockBuilder(null, nodes.size());
BlockBuilder trinoAddress = VARCHAR.createBlockBuilder(null, nodes.size());
BlockBuilder elasticsearchNodeId = VARCHAR.createBlockBuilder(null, nodes.size());
BlockBuilder elasticsearchAddress = VARCHAR.createBlockBuilder(null, nodes.size());

for (ElasticsearchNode node : nodes) {
VARCHAR.writeString(nodeId, currentNode.getNodeIdentifier());
VARCHAR.writeString(prestoAddress, currentNode.getHostAndPort().toString());
VARCHAR.writeString(trinoAddress, currentNode.getHostAndPort().toString());
VARCHAR.writeString(elasticsearchNodeId, node.getId());

if (node.getAddress().isPresent()) {
Expand All @@ -98,7 +98,7 @@ public ConnectorPageSource pageSource(ConnectorTransactionHandle transaction, Co

return new FixedPageSource(ImmutableList.of(new Page(
nodeId.build(),
prestoAddress.build(),
trinoAddress.build(),
elasticsearchNodeId.build(),
elasticsearchAddress.build())));
}
Expand Down

0 comments on commit ebbdb36

Please sign in to comment.