Browse Source

Increase zk connect timeout (#16180)

dev
Wenjun Ruan 4 months ago committed by GitHub
parent
commit
2ab5f7dd54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml
  2. 4
      dolphinscheduler-api/src/main/resources/application.yaml
  3. 6
      dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/repository/impl/CommandDaoImplTest.java
  4. 10
      dolphinscheduler-master/src/main/resources/application.yaml
  5. 2
      dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/runner/queue/DelayEntryTest.java
  6. 12
      dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/src/main/java/org/apache/dolphinscheduler/plugin/registry/zookeeper/ZookeeperRegistryProperties.java
  7. 10
      dolphinscheduler-standalone-server/src/main/resources/application.yaml
  8. 10
      dolphinscheduler-worker/src/main/resources/application.yaml

10
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml

@ -82,12 +82,12 @@ registry:
namespace: dolphinscheduler
connect-string: localhost:2181
retry-policy:
base-sleep-time: 60ms
max-sleep: 300ms
base-sleep-time: 1s
max-sleep: 3s
max-retries: 5
session-timeout: 30s
connection-timeout: 9s
block-until-connected: 600ms
session-timeout: 60s
connection-timeout: 15s
block-until-connected: 15s
digest: ~
metrics:

4
dolphinscheduler-api/src/main/resources/application.yaml

@ -120,8 +120,8 @@ registry:
namespace: dolphinscheduler
connect-string: localhost:2181
retry-policy:
base-sleep-time: 60ms
max-sleep: 300ms
base-sleep-time: 1s
max-sleep: 3s
max-retries: 5
session-timeout: 60s
connection-timeout: 15s

6
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/repository/impl/CommandDaoImplTest.java

@ -35,6 +35,7 @@ import org.apache.dolphinscheduler.dao.repository.CommandDao;
import org.apache.commons.lang3.RandomUtils;
import java.util.List;
import java.util.stream.Collectors;
import org.junit.jupiter.api.RepeatedTest;
import org.springframework.beans.factory.annotation.Autowired;
@ -62,9 +63,9 @@ class CommandDaoImplTest extends BaseDaoTest {
// Generate commandSize commands
int id = 0;
for (int j = 0; j < commandSize; j++) {
id += idStep;
Command command = generateCommand(CommandType.START_PROCESS, 0);
command.setId(id);
id += idStep;
commandDao.insert(command);
}
@ -75,7 +76,8 @@ class CommandDaoImplTest extends BaseDaoTest {
", idStep: " + idStep +
", fetchSize: " + fetchSize +
", total command size: " + commandSize +
", total commands: " + commandDao.queryAll());
", total commands: "
+ commandDao.queryAll().stream().map(Command::getId).collect(Collectors.toList()));
assertThat(commands.size())
.isEqualTo(commandDao.queryAll()
.stream()

10
dolphinscheduler-master/src/main/resources/application.yaml

@ -74,12 +74,12 @@ registry:
namespace: dolphinscheduler
connect-string: localhost:2181
retry-policy:
base-sleep-time: 60ms
max-sleep: 300ms
base-sleep-time: 1s
max-sleep: 3s
max-retries: 5
session-timeout: 30s
connection-timeout: 9s
block-until-connected: 600ms
session-timeout: 60s
connection-timeout: 15s
block-until-connected: 15s
digest: ~
master:

2
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/runner/queue/DelayEntryTest.java

@ -29,7 +29,7 @@ class DelayEntryTest {
void getDelay() {
DelayEntry<String> delayEntry = new DelayEntry<>(5_000L, "Item");
assertThat(delayEntry.getDelay(TimeUnit.NANOSECONDS))
.isWithin(500)
.isWithin(TimeUnit.NANOSECONDS.convert(500, TimeUnit.MILLISECONDS))
.of(TimeUnit.NANOSECONDS.convert(5_000L, TimeUnit.MILLISECONDS));
}
}

12
dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/src/main/java/org/apache/dolphinscheduler/plugin/registry/zookeeper/ZookeeperRegistryProperties.java

@ -101,16 +101,16 @@ class ZookeeperRegistryProperties implements Validator {
private String connectString;
private RetryPolicy retryPolicy = new RetryPolicy();
private String digest;
private Duration sessionTimeout = Duration.ofSeconds(30);
private Duration connectionTimeout = Duration.ofSeconds(9);
private Duration blockUntilConnected = Duration.ofMillis(600);
private Duration sessionTimeout = Duration.ofSeconds(60);
private Duration connectionTimeout = Duration.ofSeconds(15);
private Duration blockUntilConnected = Duration.ofSeconds(15);
@Data
public static final class RetryPolicy {
private Duration baseSleepTime = Duration.ofMillis(60);
private int maxRetries;
private Duration maxSleep = Duration.ofMillis(300);
private Duration baseSleepTime = Duration.ofSeconds(1);
private int maxRetries = 3;
private Duration maxSleep = Duration.ofSeconds(3);
}
}

10
dolphinscheduler-standalone-server/src/main/resources/application.yaml

@ -85,12 +85,12 @@ registry:
namespace: dolphinscheduler
connect-string: localhost:2181
retry-policy:
base-sleep-time: 60ms
max-sleep: 300ms
base-sleep-time: 1s
max-sleep: 3s
max-retries: 5
session-timeout: 30s
connection-timeout: 9s
block-until-connected: 600ms
session-timeout: 60s
connection-timeout: 15s
block-until-connected: 15s
digest: ~
security:

10
dolphinscheduler-worker/src/main/resources/application.yaml

@ -31,12 +31,12 @@ registry:
namespace: dolphinscheduler
connect-string: localhost:2181
retry-policy:
base-sleep-time: 60ms
max-sleep: 300ms
base-sleep-time: 1s
max-sleep: 3s
max-retries: 5
session-timeout: 30s
connection-timeout: 9s
block-until-connected: 600ms
session-timeout: 60s
connection-timeout: 15s
block-until-connected: 15s
digest: ~
worker:

Loading…
Cancel
Save