use of com.datastax.dse.driver.api.core.metadata.schema.DseKeyspaceMetadata in project java-driver by datastax.
the class DseSchemaParser method parse.
@Override
public SchemaRefresh parse() {
ImmutableMap.Builder<CqlIdentifier, KeyspaceMetadata> keyspacesBuilder = ImmutableMap.builder();
for (AdminRow row : rows.keyspaces()) {
DseKeyspaceMetadata keyspace = parseKeyspace(row);
keyspacesBuilder.put(keyspace.getName(), keyspace);
}
for (AdminRow row : rows.virtualKeyspaces()) {
DseKeyspaceMetadata keyspace = parseVirtualKeyspace(row);
keyspacesBuilder.put(keyspace.getName(), keyspace);
}
SchemaRefresh refresh = new SchemaRefresh(keyspacesBuilder.build());
LOG.debug("[{}] Schema parsing took {}", logPrefix, NanoTime.formatTimeSince(startTimeNs));
return refresh;
}
Aggregations