Skip to content

Commit

Permalink
[ISSUE-326]Delete zookeeper directory
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinLi724 authored Jan 17, 2024
1 parent daaa435 commit e24abae
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 1 addition & 3 deletions geaflow-console/docker/bin/start-process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -110,7 +110,7 @@ public void testUpdate() {
public void testBaseKey() {
Map<String, String> 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));
Expand Down

0 comments on commit e24abae

Please sign in to comment.