import org.apache.kafka.streams.StreamsBuilder
val builder = new StreamsBuilder
val globalTable = builder.globalTable("topic")
import org.apache.kafka.streams.kstream.internals.GlobalKTableImpl
val impl = globalTable.asInstanceOf[GlobalKTableImpl[_, _]]
scala> println(impl.queryableStoreName)
null
GlobalKTableImpl
GlobalKTableImpl
is a GlobalKTable (of K
primary keys and V
value changes) that uses a KTableValueGetterSupplier for the queryableStoreName when queryable.
GlobalKTableImpl
is created exclusively when InternalStreamsBuilder
is requested to add a global table to a topology (exclusively when StreamsBuilder
is requested to create a GlobalKTable).
Creating GlobalKTableImpl Instance
GlobalKTableImpl
takes the following when created:
-
KTableValueGetterSupplier (of
K
primary keys andV
value changes)
queryableStoreName
Method
String queryableStoreName()
Note
|
queryableStoreName is part of GlobalKTable Contract to…FIXME.
|
Only when queryable is enabled, queryableStoreName
requests the KTableValueGetterSupplier for storeNames and takes the very first one.
Otherwise, queryableStoreName
returns null
.