kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Lublinsky <boris.lublin...@lightbend.com>
Subject Queryable state
Date Mon, 13 Nov 2017 17:43:41 GMT
I have updated my queryable state example, based on https://github.com/confluentinc/examples/tree/3.2.x/kafka-streams/src/main/java/io/confluent/examples/streams/interactivequeries
<https://github.com/confluentinc/examples/tree/3.2.x/kafka-streams/src/main/java/io/confluent/examples/streams/interactivequeries>

To 1.0.0
And now when I am trying trying to get instances for store when running on a local machine,
I am getting an empty array, from

public List<HostStoreInfo> streamsMetadataForStore(final  String store) {
    // Get metadata for all of the instances of this Kafka Streams application hosting the
store
    final Collection<StreamsMetadata> metadata = streams.allMetadataForStore(store);
    return mapInstancesToHostStoreInfo(metadata);
}
This is happening because in StreamsMetadata state,

public synchronized Collection<StreamsMetadata> getAllMetadataForStore(final String
storeName) {
    Objects.requireNonNull(storeName, "storeName cannot be null");

    if (!isInitialized()) {
        return Collections.emptyList();
    }
IsInitialized method

private boolean isInitialized() {
    return clusterMetadata != null && !clusterMetadata.topics().isEmpty();
}
Check for the cluster, which is null

Boris Lublinsky
FDP Architect
boris.lublinsky@lightbend.com <mailto:boris.lublinsky@lightbend.com>
https://www.lightbend.com/


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message