From e24abaeb112585dc01f3ef4f0ea1899fe1df3b0d Mon Sep 17 00:00:00 2001 From: KevinLi724 <65723655+KevinLi724@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:07:31 +0800 Subject: [PATCH] [ISSUE-326]Delete zookeeper directory --- .../core/service/statement/AnalyticsClientFactory.java | 2 +- geaflow-console/docker/bin/start-process.sh | 4 +--- .../com/antgroup/geaflow/example/service/BaseServiceTest.java | 2 +- .../geaflow/service/discovery/RedisServiceConsumer.java | 4 ++-- .../geaflow/service/discovery/RedisServiceProvider.java | 4 ++-- .../com/antgroup/geaflow/service/discovery/RedisTest.java | 4 ++-- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/geaflow-console/app/core/service/src/main/java/com/antgroup/geaflow/console/core/service/statement/AnalyticsClientFactory.java b/geaflow-console/app/core/service/src/main/java/com/antgroup/geaflow/console/core/service/statement/AnalyticsClientFactory.java index 35f510d38..7f1581de3 100644 --- a/geaflow-console/app/core/service/src/main/java/com/antgroup/geaflow/console/core/service/statement/AnalyticsClientFactory.java +++ b/geaflow-console/app/core/service/src/main/java/com/antgroup/geaflow/console/core/service/statement/AnalyticsClientFactory.java @@ -39,7 +39,7 @@ public AnalyticsClient buildClient(GeaflowTask task) { configuration.putAll(task.getRelease().getJobConfig().toStringMap()); configuration.put("brpc.connect.timeout.ms", String.valueOf(8000)); configuration.put("geaflow.meta.server.retry.times", String.valueOf(2)); - configuration.put("geaflow.job.unique.id", redisParentNamespace); + configuration.put("geaflow.job.runtime.name", redisParentNamespace); return builder.withConfiguration(configuration) .withInitChannelPools(true) .build(); diff --git a/geaflow-console/docker/bin/start-process.sh b/geaflow-console/docker/bin/start-process.sh index 9302f7442..728858ebd 100755 --- a/geaflow-console/docker/bin/start-process.sh +++ b/geaflow-console/docker/bin/start-process.sh @@ -22,13 +22,11 @@ BASE_LOG_DIR=/tmp/logs GEAFLOW_LOG_DIR=$BASE_LOG_DIR/geaflow GEAFLOW_TASK_LOG_DIR=$BASE_LOG_DIR/task REDIS_LOG_DIR=$BASE_LOG_DIR/redis -ZOOKEEPER_LOG_DIR=$BASE_LOG_DIR/zookeeper INFLUXDB_LOG_DIR=$BASE_LOG_DIR/influxdb mkdir -p $BASE_LOG_DIR mkdir -p $GEAFLOW_LOG_DIR mkdir -p $GEAFLOW_TASK_LOG_DIR mkdir -p $REDIS_LOG_DIR -mkdir -p $ZOOKEEPER_LOG_DIR mkdir -p $INFLUXDB_LOG_DIR if [[ ! -L $GEAFLOW_HOME/logs ]]; then ln -s $BASE_LOG_DIR $GEAFLOW_HOME/logs @@ -101,7 +99,7 @@ function startGeaflowConsole() { } } -# start mysql, redis, zookeeper, influxdb +# start mysql, redis, influxdb if [ "$DEPLOY_MODE" == "local" ]; then startMysql || exit 1 startRedis || exit 1 diff --git a/geaflow/geaflow-examples/src/test/java/com/antgroup/geaflow/example/service/BaseServiceTest.java b/geaflow/geaflow-examples/src/test/java/com/antgroup/geaflow/example/service/BaseServiceTest.java index 0ccd9fe01..f244be210 100644 --- a/geaflow/geaflow-examples/src/test/java/com/antgroup/geaflow/example/service/BaseServiceTest.java +++ b/geaflow/geaflow-examples/src/test/java/com/antgroup/geaflow/example/service/BaseServiceTest.java @@ -248,7 +248,7 @@ public void before() throws Exception { defaultConfig = new Configuration(); defaultConfig.put(RedisConfigKeys.REDIS_HOST, server.getHost()); defaultConfig.put(RedisConfigKeys.REDIS_PORT, String.valueOf(server.getBindPort())); - defaultConfig.put(ExecutionConfigKeys.JOB_UNIQUE_ID, jobName); + defaultConfig.put(ExecutionConfigKeys.JOB_APP_NAME, jobName); metaServer = new MetaServer(); metaServer.init(new MetaServerContext(defaultConfig)); } diff --git a/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/main/java/com/antgroup/geaflow/service/discovery/RedisServiceConsumer.java b/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/main/java/com/antgroup/geaflow/service/discovery/RedisServiceConsumer.java index 413e05814..c2685e130 100644 --- a/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/main/java/com/antgroup/geaflow/service/discovery/RedisServiceConsumer.java +++ b/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/main/java/com/antgroup/geaflow/service/discovery/RedisServiceConsumer.java @@ -19,8 +19,8 @@ public class RedisServiceConsumer implements ServiceConsumer { public RedisServiceConsumer(Configuration configuration) { this.recoverableRedis = new RecoverableRedis(); - String jobUniqueId = configuration.getString(ExecutionConfigKeys.JOB_UNIQUE_ID); - this.baseKey = jobUniqueId.startsWith("/") ? jobUniqueId : "/" + jobUniqueId; + String appName = configuration.getString(ExecutionConfigKeys.JOB_APP_NAME); + this.baseKey = appName.startsWith("/") ? appName : "/" + appName; StoreContext storeContext = new StoreContext(baseKey); storeContext.withKeySerializer(new DefaultKVSerializer(String.class, null)); storeContext.withConfig(configuration); diff --git a/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/main/java/com/antgroup/geaflow/service/discovery/RedisServiceProvider.java b/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/main/java/com/antgroup/geaflow/service/discovery/RedisServiceProvider.java index 23fd53067..0924e802c 100644 --- a/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/main/java/com/antgroup/geaflow/service/discovery/RedisServiceProvider.java +++ b/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/main/java/com/antgroup/geaflow/service/discovery/RedisServiceProvider.java @@ -16,8 +16,8 @@ public class RedisServiceProvider implements ServiceProvider { public RedisServiceProvider(Configuration configuration) { this.recoverableRedis = new RecoverableRedis(); - String jobUniqueId = configuration.getString(ExecutionConfigKeys.JOB_UNIQUE_ID); - this.baseKey = jobUniqueId.startsWith("/") ? jobUniqueId : "/" + jobUniqueId; + String appName = configuration.getString(ExecutionConfigKeys.JOB_APP_NAME); + this.baseKey = appName.startsWith("/") ? appName : "/" + appName; StoreContext storeContext = new StoreContext(baseKey); storeContext.withKeySerializer(new DefaultKVSerializer(String.class, null)); storeContext.withConfig(configuration); diff --git a/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/test/java/com/antgroup/geaflow/service/discovery/RedisTest.java b/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/test/java/com/antgroup/geaflow/service/discovery/RedisTest.java index d97b69f86..568dd9144 100644 --- a/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/test/java/com/antgroup/geaflow/service/discovery/RedisTest.java +++ b/geaflow/geaflow-plugins/geaflow-service-discovery/geaflow-service-discovery-redis/src/test/java/com/antgroup/geaflow/service/discovery/RedisTest.java @@ -32,7 +32,7 @@ public void prepare() throws IOException { this.configuration.put(RedisConfigKeys.REDIS_HOST, redisServer.getHost()); this.configuration.put(RedisConfigKeys.REDIS_PORT, String.valueOf(redisServer.getBindPort())); this.configuration.put(SERVICE_DISCOVERY_TYPE, "redis"); - this.configuration.put(ExecutionConfigKeys.JOB_UNIQUE_ID, "testJob123"); + this.configuration.put(ExecutionConfigKeys.JOB_APP_NAME, "testJob123"); } @AfterClass @@ -110,7 +110,7 @@ public void testUpdate() { public void testBaseKey() { Map config = configuration.getConfigMap(); Configuration newConfig = new Configuration(new HashMap<>(config)); - newConfig.put(ExecutionConfigKeys.JOB_UNIQUE_ID, "234"); + newConfig.put(ExecutionConfigKeys.JOB_APP_NAME, "234"); this.consumer = ServiceBuilderFactory.build(serviceType).buildConsumer(newConfig); this.provider = ServiceBuilderFactory.build(serviceType).buildProvider(newConfig); Assert.assertTrue(provider.exists(null));