Skip to content

Commit

Permalink
remove_single_method
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Nov 29, 2023
1 parent 0c92d2c commit 03fe795
Showing 1 changed file with 3 additions and 27 deletions.
30 changes: 3 additions & 27 deletions shotover-proxy/benches/windsock/kafka.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ impl KafkaBench {
async fn run_aws_kafka(&self, nodes: Vec<Arc<Ec2InstanceWithDocker>>) {
match self.topology {
KafkaTopology::Cluster3 => self.run_aws_kafka_cluster(nodes).await,
KafkaTopology::Cluster1 => self.run_aws_kafka_cluster(vec![nodes[0].clone()]).await,
KafkaTopology::Single => self.run_aws_kafka_single(nodes[0].clone()).await,
KafkaTopology::Cluster1 | KafkaTopology::Single => {
self.run_aws_kafka_cluster(vec![nodes[0].clone()]).await
}
}
}

Expand Down Expand Up @@ -151,31 +152,6 @@ impl KafkaBench {
}
}

async fn run_aws_kafka_single(&self, instance: Arc<Ec2InstanceWithDocker>) {
let ip = instance.instance.private_ip().to_string();
let port = 9192;
instance
.run_container(
"bitnami/kafka:3.4.0-debian-11-r22",
&[
("ALLOW_PLAINTEXT_LISTENER".to_owned(), "yes".to_owned()),
(
"KAFKA_CFG_ADVERTISED_LISTENERS".to_owned(),
format!("PLAINTEXT://{ip}:{port}"),
),
(
"KAFKA_CFG_LISTENERS".to_owned(),
format!("PLAINTEXT://:{port},CONTROLLER://:9093"),
),
(
"KAFKA_HEAP_OPTS".to_owned(),
"-Xmx4096M -Xms4096M".to_owned(),
),
],
)
.await;
}

async fn run_aws_shotover_on_own_instance(
&self,
shotover_instance: Arc<Ec2InstanceWithShotover>,
Expand Down

0 comments on commit 03fe795

Please sign in to comment.