public synchronized <K> KeyQueryMetadata getKeyQueryMetadataForKey(final String storeName,
                                                                       final K key,
                                                                       final Serializer<K> keySerializer,
                                                                       final String topologyName) {
        Objects.requireNonNull(keySerializer, "keySerializer can't be null");
        return getKeyQueryMetadataForKey(storeName,
                                         key,
                                         new DefaultStreamPartitioner<>(keySerializer),
                                         topologyName);
    }
See {@link StreamsMetadataState#getKeyQueryMetadataForKey(String, Object, Serializer)}
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsMetadataState.java