Skip to content

Commit

Permalink
remove dummy zookeeper service
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed May 7, 2024
1 parent 15dd6e6 commit d4a9137
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 30 deletions.
6 changes: 0 additions & 6 deletions risedev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/risedevtool/src/bin/risedev-compose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
7 changes: 0 additions & 7 deletions src/risedevtool/src/bin/risedev-dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
1 change: 0 additions & 1 deletion src/risedevtool/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
13 changes: 0 additions & 13 deletions src/risedevtool/src/service_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
pub id: String,
}

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)]
Expand Down Expand Up @@ -368,7 +359,6 @@ pub enum ServiceConfig {
Kafka(KafkaConfig),
Pubsub(PubsubConfig),
Redis(RedisConfig),
DummyZooKeeper(DummyZooKeeperConfig),
RedPanda(RedPandaConfig),
MySql(MySqlConfig),
}
Expand All @@ -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,
Expand All @@ -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),
Expand All @@ -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,
Expand Down

0 comments on commit d4a9137

Please sign in to comment.