CCDAK 문제 61
StreamsBuilder 빌더 = new StreamsBuilder();
KStream<문자열, 문자열> textLines = builder.stream("단어 개수 입력"); KTable<문자열, Long> wordCounts = textLines
.mapValues(텍스트줄 -> 텍스트줄.toLowerCase())
.flatMapValues(텍스트선 -> 텍스트선.split("\W+")))
.selectKey((키, 단어) -> 단어)
.그룹별키()
.count(Materialized.as("개수"));
wordCounts.toStream().to("word-count-output", Produced.with(Serdes.String(), Serdes.Long())); builder.build(); word-count-output 주제에 대한 적절한 주제 구성은 무엇입니까?
KStream<문자열, 문자열> textLines = builder.stream("단어 개수 입력"); KTable<문자열, Long> wordCounts = textLines
.mapValues(텍스트줄 -> 텍스트줄.toLowerCase())
.flatMapValues(텍스트선 -> 텍스트선.split("\W+")))
.selectKey((키, 단어) -> 단어)
.그룹별키()
.count(Materialized.as("개수"));
wordCounts.toStream().to("word-count-output", Produced.with(Serdes.String(), Serdes.Long())); builder.build(); word-count-output 주제에 대한 적절한 주제 구성은 무엇입니까?
CCDAK 문제 62
메시지의 인코딩과 디코딩은 무엇이라고도 불리나요?
CCDAK 문제 63
다음 생산자는 어떤 예외를 발견할 수 있습니까? (두 가지 선택)
ProducerRecord<문자열, 문자열> 레코드
새로운 ProducerRecord<>("topic1", "key1", "value1");
노력하다 {
프로듀서.레코드 전송;
} catch (예외 e) {
e.print스택추적();
}
ProducerRecord<문자열, 문자열> 레코드
새로운 ProducerRecord<>("topic1", "key1", "value1");
노력하다 {
프로듀서.레코드 전송;
} catch (예외 e) {
e.print스택추적();
}
CCDAK 문제 64
카프카 파티션은 무엇으로 만들어졌나요?
CCDAK 문제 65
아래의 프로듀서 코드를 참조하세요. 여기에는 'onCompletion()'이라는 메서드가 있는 'Callback' 클래스가 있습니다.
'on Completion*.)' 메서드에서 'metadata.offset()' 값은 무엇을 나타냅니까?

producer.send(레코드, new MyCallback(레코드));
'on Completion*.)' 메서드에서 'metadata.offset()' 값은 무엇을 나타냅니까?

producer.send(레코드, new MyCallback(레코드));
