8000 GitHub - scaperoth/kafka-hwe: Class 3 Instructional Materials
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

scaperoth/kafka-hwe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka-HWE

Opening the Project

  1. Open the pom.xml in Intellij
  2. Select “Open as Project”

Studio Instructions

Set the bootstrap-server environment variable

Windows

SET BOOTSTRAP_SERVERS=35.239.241.212:9092,35.239.230.132:9092,34.69.66.216:9092

Linux/Mac

export BOOTSTRAP_SERVER=35.239.241.212:9092,35.239.230.132:9092,34.69.66.216:9092

Describe the topic "question-1"

A topic exists called "question-1". Use the command line to describe the topic "question-1":

  • How many partitions does it have?
  • What is the replication factor?
  • Hint: There is an example describe command in the CLICommands.md

Create a topic "question-2"

Using the Kafka CLI, create a topic with 3 partitions and a replication factor of 3. Call the topic " question-2-yourname".

Consume from "question-3"

A topic already exists called "question-3". Using SimpleConsumer, what are the first ten messages at the beginning of this topic?

Produce to "question-4"

Using SimpleProducer, produce your name as a string to the topic "question-4". Verify it is there by using SimpleConsumer to read from the "question-4" topic

Consume from "question-5"

A topic exists called "question-5" with JSON strings as its messages. Using JSONConsumer,

  • Print out the string to understand the structure.
  • Create a case class that matches this data structure.
  • Parse the JSON string into the scala case class that you created.

Stretch #1 - Theory

What is the CAP theorem, and where does Kafka fit within it?

About

Class 3 Instructional Materials

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%
0