public class KafkaEvent extends Object
KafkaExample
.
This is a Java POJO, which Flink recognizes and will allow "by-name" field referencing when
keying a DataStream
of such a type. For a
demonstration of this, see the code in KafkaExample
.
Constructor and Description |
---|
KafkaEvent() |
KafkaEvent(String word,
int frequency,
long timestamp) |
Modifier and Type | Method and Description |
---|---|
static KafkaEvent |
fromString(String eventStr) |
int |
getFrequency() |
long |
getTimestamp() |
String |
getWord() |
void |
setFrequency(int frequency) |
void |
setTimestamp(long timestamp) |
void |
setWord(String word) |
String |
toString() |
public KafkaEvent()
public KafkaEvent(String word, int frequency, long timestamp)
public String getWord()
public void setWord(String word)
public int getFrequency()
public void setFrequency(int frequency)
public long getTimestamp()
public void setTimestamp(long timestamp)
public static KafkaEvent fromString(String eventStr)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.