From d4a913759ecac564c5978c405d74d7b60832f30f Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Mon, 6 May 2024 17:12:50 +0800 Subject: [PATCH] remove dummy zookeeper service Signed-off-by: Bugen Zhao --- risedev.yml | 6 ------ src/risedevtool/src/bin/risedev-compose.rs | 3 --- src/risedevtool/src/bin/risedev-dev.rs | 7 ------- src/risedevtool/src/config.rs | 1 - src/risedevtool/src/service_config.rs | 13 ------------- 5 files changed, 30 deletions(-) diff --git a/risedev.yml b/risedev.yml index 61a41346adc7e..c9b56c19c394b 100644 --- a/risedev.yml +++ b/risedev.yml @@ -1386,12 +1386,6 @@ template: persist-data: true - # **DUMMY** Apache ZooKeeper service - # We use KRaft for Kafka, so ZooKeeper is not needed. Keep it here for compatibility. - zookeeper: - # Id to be picked-up by services - id: zookeeper - # Only supported in RiseDev compose redpanda: # Id to be picked-up by services diff --git a/src/risedevtool/src/bin/risedev-compose.rs b/src/risedevtool/src/bin/risedev-compose.rs index 6de53ad4660cd..10b29e836c66d 100644 --- a/src/risedevtool/src/bin/risedev-compose.rs +++ b/src/risedevtool/src/bin/risedev-compose.rs @@ -201,9 +201,6 @@ fn main() -> Result<()> { ServiceConfig::Pubsub(_) => { return Err(anyhow!("not supported, please use redpanda instead")) } - ServiceConfig::DummyZooKeeper(_) => { - return Err(anyhow!("not supported, please use redpanda instead")) - } ServiceConfig::Opendal(_) => continue, ServiceConfig::AwsS3(_) => continue, ServiceConfig::RedPanda(c) => { diff --git a/src/risedevtool/src/bin/risedev-dev.rs b/src/risedevtool/src/bin/risedev-dev.rs index 17441a11270d3..f11bc1b3b5148 100644 --- a/src/risedevtool/src/bin/risedev-dev.rs +++ b/src/risedevtool/src/bin/risedev-dev.rs @@ -271,13 +271,6 @@ fn task_main( ctx.pb .set_message(format!("using Opendal, namenode = {}", c.namenode)); } - ServiceConfig::DummyZooKeeper(c) => { - let mut ctx = - ExecuteContext::new(&mut logger, manager.new_progress(), status_dir.clone()); - DummyService::new(&c.id).execute(&mut ctx)?; - ctx.pb - .set_message("dummy service for compatibility, not actually started"); - } ServiceConfig::Kafka(c) => { let mut ctx = ExecuteContext::new(&mut logger, manager.new_progress(), status_dir.clone()); diff --git a/src/risedevtool/src/config.rs b/src/risedevtool/src/config.rs index 9474faf75f6ae..541f269ee18c4 100644 --- a/src/risedevtool/src/config.rs +++ b/src/risedevtool/src/config.rs @@ -172,7 +172,6 @@ impl ConfigExpander { "kafka" => ServiceConfig::Kafka(serde_yaml::from_str(&out_str)?), "pubsub" => ServiceConfig::Pubsub(serde_yaml::from_str(&out_str)?), "redis" => ServiceConfig::Redis(serde_yaml::from_str(&out_str)?), - "zookeeper" => ServiceConfig::DummyZooKeeper(serde_yaml::from_str(&out_str)?), "redpanda" => ServiceConfig::RedPanda(serde_yaml::from_str(&out_str)?), "mysql" => ServiceConfig::MySql(serde_yaml::from_str(&out_str)?), other => return Err(anyhow!("unsupported use type: {}", other)), diff --git a/src/risedevtool/src/service_config.rs b/src/risedevtool/src/service_config.rs index b750f58f12109..3135d7af4c009 100644 --- a/src/risedevtool/src/service_config.rs +++ b/src/risedevtool/src/service_config.rs @@ -295,15 +295,6 @@ pub struct PubsubConfig { pub persist_data: bool, } -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "kebab-case")] -#[serde(deny_unknown_fields)] -pub struct DummyZooKeeperConfig { - #[serde(rename = "use")] - phantom_use: Option, - pub id: String, -} - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] #[serde(deny_unknown_fields)] @@ -368,7 +359,6 @@ pub enum ServiceConfig { Kafka(KafkaConfig), Pubsub(PubsubConfig), Redis(RedisConfig), - DummyZooKeeper(DummyZooKeeperConfig), RedPanda(RedPandaConfig), MySql(MySqlConfig), } @@ -387,7 +377,6 @@ impl ServiceConfig { Self::Grafana(c) => &c.id, Self::Tempo(c) => &c.id, Self::AwsS3(c) => &c.id, - Self::DummyZooKeeper(c) => &c.id, Self::Kafka(c) => &c.id, Self::Pubsub(c) => &c.id, Self::Redis(c) => &c.id, @@ -410,7 +399,6 @@ impl ServiceConfig { Self::Grafana(c) => Some(c.port), Self::Tempo(c) => Some(c.port), Self::AwsS3(_) => None, - Self::DummyZooKeeper(_) => None, Self::Kafka(c) => Some(c.port), Self::Pubsub(c) => Some(c.port), Self::Redis(c) => Some(c.port), @@ -433,7 +421,6 @@ impl ServiceConfig { Self::Grafana(_c) => false, Self::Tempo(_c) => false, Self::AwsS3(_c) => false, - Self::DummyZooKeeper(_c) => false, Self::Kafka(c) => c.user_managed, Self::Pubsub(_c) => false, Self::Redis(_c) => false,