wjf222 commented on code in PR #10981:
URL: https://github.com/apache/dolphinscheduler/pull/10981#discussion_r921877160
##########
dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-etcd/src/main/java/org/apache/dolphinscheduler/plugin/registry/etcd/EtcdRegistryProperties.java:
##########
@@ -0,0 +1,31 @@
+package org.apache.dolphinscheduler.plugin.registry.etcd;
+
+import lombok.Data;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+import java.time.Duration;
+
+@Data
+@Configuration
+@ConditionalOnProperty(prefix = "registry", name = "type", havingValue =
"etcd")
+@ConfigurationProperties(prefix = "registry")
+public class EtcdRegistryProperties {
+ private String endpoints;
+ private String namespace="dolphinscheduler";
+ private Duration connectionTimeout = Duration.ofSeconds(9);
+
+ // auth
+ private String user;
+ private String password;
+ private String authority;
+
+ // RetryPolicy
+ private Long retryDelay=60L;
+ private Long retryMaxDelay=300L;
Review Comment:
> > The time unit for these two parameters is set by the ChronUnitRetry in
jetcd. The type of these two parameters is long, but the type of
retryMaxDuration is Duration.
> > You can see the reference of these three parameters in EtcdRegistry.java
line 51 to 54.
>
> Hi, you don't have to just copy the type from JETCD client, using
`Duration` as type in our own configurations is for users' convenient, they can
just set something like `1s`, `500ms`, without knowing what's the time unit of
the config. Also, users don't care what types we pass into `EtcdRegistry.java`,
let's provide simplicity to users
You are right,I fix this in [Modify the type of
delay](https://github.com/apache/dolphinscheduler/pull/10981/commits/ba5f7687f8842427e4fea67b56f7f1125e48b9d4)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]