class KTable[K, V] extends AnyRef
Wraps the Java class org.apache.kafka.streams.kstream.KTable and delegates method calls to the underlying Java object.
- K
Type of keys
- V
Type of values
- See also
org.apache.kafka.streams.kstream.KTable
- Alphabetic
- By Inheritance
- KTable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
KTable(inner: kstream.KTable[K, V])
- inner
The underlying Java abstraction for KTable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
filter(predicate: (K, V) ⇒ Boolean, named: Named, materialized: Materialized[K, V, ByteArrayKeyValueStore]): KTable[K, V]
Create a new KTable that consists all records of this KTable which satisfies the given predicate
- predicate
a filter that is applied to each record
- named
a Named config used to name the processor in the topology
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains only those records that satisfy the given predicate
- See also
org.apache.kafka.streams.kstream.KTable#filter
-
def
filter(predicate: (K, V) ⇒ Boolean, materialized: Materialized[K, V, ByteArrayKeyValueStore]): KTable[K, V]
Create a new KTable that consists all records of this KTable which satisfies the given predicate
-
def
filter(predicate: (K, V) ⇒ Boolean, named: Named): KTable[K, V]
Create a new KTable that consists all records of this KTable which satisfies the given predicate
-
def
filter(predicate: (K, V) ⇒ Boolean): KTable[K, V]
Create a new KTable that consists all records of this KTable which satisfies the given predicate
-
def
filterNot(predicate: (K, V) ⇒ Boolean, named: Named, materialized: Materialized[K, V, ByteArrayKeyValueStore]): KTable[K, V]
Create a new KTable that consists all records of this KTable which do not satisfy the given predicate
Create a new KTable that consists all records of this KTable which do not satisfy the given predicate
- predicate
a filter that is applied to each record
- named
a Named config used to name the processor in the topology
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains only those records that do not satisfy the given predicate
- See also
org.apache.kafka.streams.kstream.KTable#filterNot
-
def
filterNot(predicate: (K, V) ⇒ Boolean, materialized: Materialized[K, V, ByteArrayKeyValueStore]): KTable[K, V]
Create a new KTable that consists all records of this KTable which do not satisfy the given predicate
Create a new KTable that consists all records of this KTable which do not satisfy the given predicate
- predicate
a filter that is applied to each record
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains only those records that do not satisfy the given predicate
- See also
org.apache.kafka.streams.kstream.KTable#filterNot
-
def
filterNot(predicate: (K, V) ⇒ Boolean, named: Named): KTable[K, V]
Create a new KTable that consists all records of this KTable which do not satisfy the given predicate
Create a new KTable that consists all records of this KTable which do not satisfy the given predicate
- predicate
a filter that is applied to each record
- named
a Named config used to name the processor in the topology
- returns
a KTable that contains only those records that do not satisfy the given predicate
- See also
org.apache.kafka.streams.kstream.KTable#filterNot
-
def
filterNot(predicate: (K, V) ⇒ Boolean): KTable[K, V]
Create a new KTable that consists all records of this KTable which do not satisfy the given predicate
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
groupBy[KR, VR](selector: (K, V) ⇒ (KR, VR))(implicit grouped: Grouped[KR, VR]): KGroupedTable[KR, VR]
Re-groups the records of this KTable using the provided key/value mapper and
Serde
s as specified byGrouped
.Re-groups the records of this KTable using the provided key/value mapper and
Serde
s as specified byGrouped
.- selector
a function that computes a new grouping key and value to be aggregated
- grouped
the
Grouped
instance used to specifySerdes
- returns
a KGroupedTable that contains the re-grouped records of the original KTable
- See also
org.apache.kafka.streams.kstream.KTable#groupBy
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val inner: kstream.KTable[K, V]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
join[VR, KO, VO](other: KTable[KO, VO], keyExtractor: Function[V, KO], joiner: ValueJoiner[V, VO, VR], named: Named, materialized: Materialized[K, VR, KeyValueStore[Bytes, Array[Byte]]]): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed inner join.
Join records of this KTable with another KTable's records using non-windowed inner join. Records from this table are joined according to the result of keyExtractor on the other KTable.
- other
the other KTable to be joined with this KTable, keyed on the value obtained from keyExtractor
- keyExtractor
a function that extracts the foreign key from this table's value
- joiner
a function that computes the join result for a pair of matching records
- named
a Named config used to name the processor in the topology
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
-
def
join[VR, KO, VO](other: KTable[KO, VO], keyExtractor: Function[V, KO], joiner: ValueJoiner[V, VO, VR], materialized: Materialized[K, VR, KeyValueStore[Bytes, Array[Byte]]]): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed inner join.
Join records of this KTable with another KTable's records using non-windowed inner join. Records from this table are joined according to the result of keyExtractor on the other KTable.
- other
the other KTable to be joined with this KTable, keyed on the value obtained from keyExtractor
- keyExtractor
a function that extracts the foreign key from this table's value
- joiner
a function that computes the join result for a pair of matching records
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
-
def
join[VO, VR](other: KTable[K, VO], named: Named, materialized: Materialized[K, VR, ByteArrayKeyValueStore])(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed inner equi join.
- other
- named
a Named config used to name the processor in the topology
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#join
-
def
join[VO, VR](other: KTable[K, VO], materialized: Materialized[K, VR, ByteArrayKeyValueStore])(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed inner equi join.
- other
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#join
-
def
join[VO, VR](other: KTable[K, VO], named: Named)(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed inner equi join.
- other
- named
a Named config used to name the processor in the topology
- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#join
-
def
join[VO, VR](other: KTable[K, VO])(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed inner equi join.
- other
- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#join
-
def
leftJoin[VR, KO, VO](other: KTable[KO, VO], keyExtractor: Function[V, KO], joiner: ValueJoiner[V, VO, VR], named: Named, materialized: Materialized[K, VR, KeyValueStore[Bytes, Array[Byte]]]): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed left join.
Join records of this KTable with another KTable's records using non-windowed left join. Records from this table are joined according to the result of keyExtractor on the other KTable.
- other
the other KTable to be joined with this KTable, keyed on the value obtained from keyExtractor
- keyExtractor
a function that extracts the foreign key from this table's value
- joiner
a function that computes the join result for a pair of matching records
- named
a Named config used to name the processor in the topology
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
-
def
leftJoin[VR, KO, VO](other: KTable[KO, VO], keyExtractor: Function[V, KO], joiner: ValueJoiner[V, VO, VR], materialized: Materialized[K, VR, KeyValueStore[Bytes, Array[Byte]]]): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed left join.
Join records of this KTable with another KTable's records using non-windowed left join. Records from this table are joined according to the result of keyExtractor on the other KTable.
- other
the other KTable to be joined with this KTable, keyed on the value obtained from keyExtractor
- keyExtractor
a function that extracts the foreign key from this table's value
- joiner
a function that computes the join result for a pair of matching records
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
-
def
leftJoin[VO, VR](other: KTable[K, VO], named: Named, materialized: Materialized[K, VR, ByteArrayKeyValueStore])(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed left equi join.
- other
- named
a Named config used to name the processor in the topology
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#leftJoin
-
def
leftJoin[VO, VR](other: KTable[K, VO], materialized: Materialized[K, VR, ByteArrayKeyValueStore])(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed left equi join.
- other
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#leftJoin
-
def
leftJoin[VO, VR](other: KTable[K, VO], named: Named)(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed left equi join.
- other
- named
a Named config used to name the processor in the topology
- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#leftJoin
-
def
leftJoin[VO, VR](other: KTable[K, VO])(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed left equi join.
- other
- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#leftJoin
-
def
mapValues[VR](mapper: (K, V) ⇒ VR, named: Named, materialized: Materialized[K, VR, ByteArrayKeyValueStore]): KTable[K, VR]
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
The provided
mapper
, a function(K, V) => VR
is applied to each input record value and computes a new value for it- mapper
, a function
(K, V) => VR
that computes a new output value- named
a Named config used to name the processor in the topology
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KTable#mapValues
-
def
mapValues[VR](mapper: (K, V) ⇒ VR, materialized: Materialized[K, VR, ByteArrayKeyValueStore]): KTable[K, VR]
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
The provided
mapper
, a function(K, V) => VR
is applied to each input record value and computes a new value for it- mapper
, a function
(K, V) => VR
that computes a new output value- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KTable#mapValues
-
def
mapValues[VR](mapper: (K, V) ⇒ VR, named: Named): KTable[K, VR]
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
The provided
mapper
, a function(K, V) => VR
is applied to each input record value and computes a new value for it- mapper
, a function
(K, V) => VR
that computes a new output value- named
a Named config used to name the processor in the topology
- returns
a KTable that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KTable#mapValues
-
def
mapValues[VR](mapper: (K, V) ⇒ VR): KTable[K, VR]
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
The provided
mapper
, a function(K, V) => VR
is applied to each input record value and computes a new value for it- mapper
, a function
(K, V) => VR
that computes a new output value- returns
a KTable that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KTable#mapValues
-
def
mapValues[VR](mapper: (V) ⇒ VR, named: Named, materialized: Materialized[K, VR, ByteArrayKeyValueStore]): KTable[K, VR]
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
The provided
mapper
, a functionV => VR
is applied to each input record value and computes a new value for it- mapper
, a function
V => VR
that computes a new output value- named
a Named config used to name the processor in the topology
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KTable#mapValues
-
def
mapValues[VR](mapper: (V) ⇒ VR, materialized: Materialized[K, VR, ByteArrayKeyValueStore]): KTable[K, VR]
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
The provided
mapper
, a functionV => VR
is applied to each input record value and computes a new value for it- mapper
, a function
V => VR
that computes a new output value- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- returns
a KTable that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KTable#mapValues
-
def
mapValues[VR](mapper: (V) ⇒ VR, named: Named): KTable[K, VR]
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
The provided
mapper
, a functionV => VR
is applied to each input record value and computes a new value for it- mapper
, a function
V => VR
that computes a new output value- named
a Named config used to name the processor in the topology
- returns
a KTable that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KTable#mapValues
-
def
mapValues[VR](mapper: (V) ⇒ VR): KTable[K, VR]
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
Create a new KTable by transforming the value of each record in this KTable into a new value (with possible new type) in the new KTable.
The provided
mapper
, a functionV => VR
is applied to each input record value and computes a new value for it- mapper
, a function
V => VR
that computes a new output value- returns
a KTable that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KTable#mapValues
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
outerJoin[VO, VR](other: KTable[K, VO], named: Named, materialized: Materialized[K, VR, ByteArrayKeyValueStore])(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed outer equi join.
- other
- named
a Named config used to name the processor in the topology
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#leftJoin
-
def
outerJoin[VO, VR](other: KTable[K, VO], materialized: Materialized[K, VR, ByteArrayKeyValueStore])(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed outer equi join.
- other
- materialized
a
Materialized
that describes how theStateStore
for the resulting KTable should be materialized.- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#leftJoin
-
def
outerJoin[VO, VR](other: KTable[K, VO], named: Named)(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed outer equi join.
- other
- named
a Named config used to name the processor in the topology
- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#leftJoin
-
def
outerJoin[VO, VR](other: KTable[K, VO])(joiner: (V, VO) ⇒ VR): KTable[K, VR]
Join records of this KTable with another KTable's records using non-windowed outer equi join.
- other
- joiner
a function that computes the join result for a pair of matching records
- returns
a KTable that contains join-records for each key and values computed by the given joiner, one for each matched record-pair with the same key
- See also
org.apache.kafka.streams.kstream.KTable#leftJoin
-
def
queryableStoreName: String
Get the name of the local state store used that can be used to query this KTable.
-
def
suppress(suppressed: Suppressed[_ >: K]): KTable[K, V]
Suppress some updates from this changelog stream, determined by the supplied org.apache.kafka.streams.kstream.Suppressed configuration.
Suppress some updates from this changelog stream, determined by the supplied org.apache.kafka.streams.kstream.Suppressed configuration.
This controls what updates downstream table and stream operations will receive.
- suppressed
Configuration object determining what, if any, updates to suppress.
- returns
A new KTable with the desired suppression characteristics.
- See also
org.apache.kafka.streams.kstream.KTable#suppress
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toStream[KR](mapper: (K, V) ⇒ KR, named: Named): KStream[KR, V]
Convert this changelog stream to a KStream using the given key/value mapper to select the new key
-
def
toStream[KR](mapper: (K, V) ⇒ KR): KStream[KR, V]
Convert this changelog stream to a KStream using the given key/value mapper to select the new key
-
def
toStream(named: Named): KStream[K, V]
Convert this changelog stream to a KStream.
-
def
toStream: KStream[K, V]
Convert this changelog stream to a KStream.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
transformValues[VR](valueTransformerWithKeySupplier: ValueTransformerWithKeySupplier[K, V, VR], materialized: Materialized[K, VR, KeyValueStore[Bytes, Array[Byte]]], named: Named, stateStoreNames: String*): KTable[K, VR]
Create a new
KTable
by transforming the value of each record in thisKTable
into a new value, (with possibly new type).Create a new
KTable
by transforming the value of each record in thisKTable
into a new value, (with possibly new type). AValueTransformer
(provided by the givenValueTransformerSupplier
) is applied to each input record value and computes a new value for it. This is similar to#mapValues(ValueMapperWithKey)
, but more flexible, allowing stateful, rather than stateless, record-by-record operation, access to additional state-stores, and access to theProcessorContext
. In order to assign a state, the state must be created and registered beforehand via stores added viaaddStateStore
oraddGlobalStore
before they can be connected to theTransformer
The resultingKTable
is materialized into another state store (additional to the provided state store names) as specified by the user viaMaterialized
parameter, and is queryable through its given name.- valueTransformerWithKeySupplier
a instance of
ValueTransformerWithKeySupplier
that generates aValueTransformerWithKey
At least one transformer instance will be created per streaming task. Transformer implementations doe not need to be thread-safe.- materialized
an instance of
Materialized
used to describe how the state store of the resulting table should be materialized.- named
a Named config used to name the processor in the topology
- stateStoreNames
the names of the state stores used by the processor
- returns
a KStream that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KStream#transformValues
-
def
transformValues[VR](valueTransformerWithKeySupplier: ValueTransformerWithKeySupplier[K, V, VR], materialized: Materialized[K, VR, KeyValueStore[Bytes, Array[Byte]]], stateStoreNames: String*): KTable[K, VR]
Create a new
KTable
by transforming the value of each record in thisKTable
into a new value, (with possibly new type).Create a new
KTable
by transforming the value of each record in thisKTable
into a new value, (with possibly new type). AValueTransformer
(provided by the givenValueTransformerSupplier
) is applied to each input record value and computes a new value for it. This is similar to#mapValues(ValueMapperWithKey)
, but more flexible, allowing stateful, rather than stateless, record-by-record operation, access to additional state-stores, and access to theProcessorContext
. In order to assign a state, the state must be created and registered beforehand via stores added viaaddStateStore
oraddGlobalStore
before they can be connected to theTransformer
The resultingKTable
is materialized into another state store (additional to the provided state store names) as specified by the user viaMaterialized
parameter, and is queryable through its given name.- valueTransformerWithKeySupplier
a instance of
ValueTransformerWithKeySupplier
that generates aValueTransformerWithKey
At least one transformer instance will be created per streaming task. Transformer implementations doe not need to be thread-safe.- materialized
an instance of
Materialized
used to describe how the state store of the resulting table should be materialized.- stateStoreNames
the names of the state stores used by the processor
- returns
a KStream that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KStream#transformValues
-
def
transformValues[VR](valueTransformerWithKeySupplier: ValueTransformerWithKeySupplier[K, V, VR], named: Named, stateStoreNames: String*): KTable[K, VR]
Create a new
KTable
by transforming the value of each record in thisKTable
into a new value, (with possibly new type).Create a new
KTable
by transforming the value of each record in thisKTable
into a new value, (with possibly new type). Transform the value of each input record into a new value (with possible new type) of the output record. AValueTransformerWithKey
(provided by the givenValueTransformerWithKeySupplier
) is applied to each input record value and computes a new value for it. This is similar to#mapValues(ValueMapperWithKey)
, but more flexible, allowing access to additional state-stores, and to theProcessorContext
. If the downstream topology uses aggregation functions, (e.g.KGroupedTable#reduce
,KGroupedTable#aggregate
, etc), care must be taken when dealing with state, (either held in state-stores or transformer instances), to ensure correct aggregate results. In contrast, if the resulting KTable is materialized, (cf.#transformValues(ValueTransformerWithKeySupplier, Materialized, String...)
), such concerns are handled for you. In order to assign a state, the state must be created and registered beforehand via stores added viaaddStateStore
oraddGlobalStore
before they can be connected to theTransformer
- valueTransformerWithKeySupplier
a instance of
ValueTransformerWithKeySupplier
that generates aValueTransformerWithKey
. At least one transformer instance will be created per streaming task. Transformer implementations doe not need to be thread-safe.- named
a Named config used to name the processor in the topology
- stateStoreNames
the names of the state stores used by the processor
- returns
a KStream that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KStream#transformValues
-
def
transformValues[VR](valueTransformerWithKeySupplier: ValueTransformerWithKeySupplier[K, V, VR], stateStoreNames: String*): KTable[K, VR]
Create a new
KTable
by transforming the value of each record in thisKTable
into a new value, (with possibly new type).Create a new
KTable
by transforming the value of each record in thisKTable
into a new value, (with possibly new type). Transform the value of each input record into a new value (with possible new type) of the output record. AValueTransformerWithKey
(provided by the givenValueTransformerWithKeySupplier
) is applied to each input record value and computes a new value for it. This is similar to#mapValues(ValueMapperWithKey)
, but more flexible, allowing access to additional state-stores, and to theProcessorContext
. If the downstream topology uses aggregation functions, (e.g.KGroupedTable#reduce
,KGroupedTable#aggregate
, etc), care must be taken when dealing with state, (either held in state-stores or transformer instances), to ensure correct aggregate results. In contrast, if the resulting KTable is materialized, (cf.#transformValues(ValueTransformerWithKeySupplier, Materialized, String...)
), such concerns are handled for you. In order to assign a state, the state must be created and registered beforehand via stores added viaaddStateStore
oraddGlobalStore
before they can be connected to theTransformer
- valueTransformerWithKeySupplier
a instance of
ValueTransformerWithKeySupplier
that generates aValueTransformerWithKey
. At least one transformer instance will be created per streaming task. Transformer implementations doe not need to be thread-safe.- stateStoreNames
the names of the state stores used by the processor
- returns
a KStream that contains records with unmodified key and new values (possibly of different type)
- See also
org.apache.kafka.streams.kstream.KStream#transformValues
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()