Anonymitaet commented on a change in pull request #11369: URL: https://github.com/apache/pulsar/pull/11369#discussion_r672160360
########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" Review comment: ```suggestion value = "Local ZooKeeper quorum connection string" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" Review comment: ```suggestion value = "Configuration store connection string" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" + ) private boolean authorizationAllowWildcardsMatching = false; - // Enable authentication + @ApiModelProperty( + name = "authenticationEnabled", + value = "Whether enable authentication" + ) private boolean authenticationEnabled = false; - // Authentication provider name list, which is a list of class names + + @ApiModelProperty( + name = "authenticationProviders", + value = "Authentication provider name list, which is a list of class names" + ) private Set<String> authenticationProviders = Sets.newTreeSet(); - // Enforce authorization + + @ApiModelProperty( + name = "authorizationEnabled", + value = "Whether Enforce authorization" + ) private boolean authorizationEnabled = false; - // Authorization provider fully qualified class-name + + @ApiModelProperty( + name = "authorizationProvider", + value = "Authorization provider fully qualified class-name" + ) private String authorizationProvider = PulsarAuthorizationProvider.class.getName(); /***** --- TLS --- ****/ @Deprecated private boolean tlsEnabled = false; - // Tls cert refresh duration in seconds (set 0 to check on every new connection) + + @ApiModelProperty( + name = "tlsCertRefreshCheckDurationSec", + value = "Tls cert refresh duration in seconds (set 0 to check on every new connection)" + ) private long tlsCertRefreshCheckDurationSec = 300; - // Path for the TLS certificate file + + @ApiModelProperty( + name = "tlsCertificateFilePath", + value = "Path for the TLS certificate file" + ) private String tlsCertificateFilePath; - // Path for the TLS private key file + + @ApiModelProperty( + name = "tlsKeyFilePath", + value = "Path for the TLS private key file" + ) private String tlsKeyFilePath; - // Path for the trusted TLS certificate file + + @ApiModelProperty( + name = "tlsTrustCertsFilePath", + value = "Path for the trusted TLS certificate file" + ) private String tlsTrustCertsFilePath = ""; - // Accept untrusted TLS certificate from client + + @ApiModelProperty( + name = "tlsAllowInsecureConnection", + value = "Accept untrusted TLS certificate from client" + ) private boolean tlsAllowInsecureConnection = false; - // Specify the tls protocols the broker will use to negotiate during TLS Handshake. - // Example:- [TLSv1.3, TLSv1.2] + + @ApiModelProperty( + name = "tlsProtocols", + value = "Specify the tls protocols the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLSv1.3, TLSv1.2]" Review comment: ```suggestion value = "Specify the TLS protocols the broker uses to negotiate during TLS Handshake. " + "Example:- [TLSv1.3, TLSv1.2]" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" + ) private boolean authorizationAllowWildcardsMatching = false; - // Enable authentication + @ApiModelProperty( + name = "authenticationEnabled", + value = "Whether enable authentication" + ) private boolean authenticationEnabled = false; - // Authentication provider name list, which is a list of class names + + @ApiModelProperty( + name = "authenticationProviders", + value = "Authentication provider name list, which is a list of class names" + ) private Set<String> authenticationProviders = Sets.newTreeSet(); - // Enforce authorization + + @ApiModelProperty( + name = "authorizationEnabled", + value = "Whether Enforce authorization" + ) private boolean authorizationEnabled = false; - // Authorization provider fully qualified class-name + + @ApiModelProperty( + name = "authorizationProvider", + value = "Authorization provider fully qualified class-name" + ) private String authorizationProvider = PulsarAuthorizationProvider.class.getName(); /***** --- TLS --- ****/ @Deprecated private boolean tlsEnabled = false; - // Tls cert refresh duration in seconds (set 0 to check on every new connection) + + @ApiModelProperty( + name = "tlsCertRefreshCheckDurationSec", + value = "Tls cert refresh duration in seconds (set 0 to check on every new connection)" + ) private long tlsCertRefreshCheckDurationSec = 300; - // Path for the TLS certificate file + + @ApiModelProperty( + name = "tlsCertificateFilePath", + value = "Path for the TLS certificate file" + ) private String tlsCertificateFilePath; - // Path for the TLS private key file + + @ApiModelProperty( + name = "tlsKeyFilePath", + value = "Path for the TLS private key file" + ) private String tlsKeyFilePath; - // Path for the trusted TLS certificate file + + @ApiModelProperty( + name = "tlsTrustCertsFilePath", + value = "Path for the trusted TLS certificate file" + ) private String tlsTrustCertsFilePath = ""; - // Accept untrusted TLS certificate from client + + @ApiModelProperty( + name = "tlsAllowInsecureConnection", + value = "Accept untrusted TLS certificate from client" + ) private boolean tlsAllowInsecureConnection = false; - // Specify the tls protocols the broker will use to negotiate during TLS Handshake. - // Example:- [TLSv1.3, TLSv1.2] + + @ApiModelProperty( + name = "tlsProtocols", + value = "Specify the tls protocols the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLSv1.3, TLSv1.2]" + ) private Set<String> tlsProtocols = Sets.newTreeSet(); - // Specify the tls cipher the broker will use to negotiate during TLS Handshake. - // Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256] + + @ApiModelProperty( + name = "tlsCiphers", + value = "Specify the tls cipher the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]" + ) private Set<String> tlsCiphers = Sets.newTreeSet(); - // Specify whether Client certificates are required for TLS - // Reject the Connection if the Client Certificate is not trusted. + + @ApiModelProperty( + name = "tlsRequireTrustedClientCertOnConnect", + value = "Specify whether Client certificates are required for TLS. " + + "Reject the Connection if the Client Certificate is not trusted." + ) private boolean tlsRequireTrustedClientCertOnConnect = false; /***** --- TLS with KeyStore--- ****/ - // Enable TLS with KeyStore type configuration in broker + @ApiModelProperty( + name = "tlsEnabledWithKeyStore", + value = "Enable TLS with KeyStore type configuration in broker" + ) private boolean tlsEnabledWithKeyStore = false; - // TLS Provider + + @ApiModelProperty( + name = "tlsProvider", + value = "Full class name of TLS Provider" + ) private String tlsProvider = null; - // TLS KeyStore type configuration in broker: JKS, PKCS12 + + @ApiModelProperty( + name = "tlsKeyStoreType", + value = "TLS KeyStore type configuration in broker: JKS, PKCS12" + ) private String tlsKeyStoreType = "JKS"; - // TLS KeyStore path in broker + + @ApiModelProperty( + name = "tlsKeyStore", + value = "TLS KeyStore path in broker" + ) private String tlsKeyStore = null; - // TLS KeyStore password in broker + + @ApiModelProperty( + name = "tlsKeyStorePassword", + value = "TLS KeyStore password in broker" + ) private String tlsKeyStorePassword = null; - // TLS TrustStore type configuration in broker: JKS, PKCS12 + + @ApiModelProperty( + name = "tlsTrustStoreType", + value = "TLS TrustStore type configuration in broker: JKS, PKCS12" + ) private String tlsTrustStoreType = "JKS"; - // TLS TrustStore path in broker + + @ApiModelProperty( + name = "tlsTrustStore", + value = "TLS TrustStore path in broker" + ) private String tlsTrustStore = null; - // TLS TrustStore password in broker" + + @ApiModelProperty( + name = "tlsTrustStorePassword", + value = "TLS TrustStore password in broker" + ) private String tlsTrustStorePassword = null; + @ApiModelProperty( + name = "properties", + value = "Can store string in key-value format" Review comment: ```suggestion value = "You can store string in key-value format" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" + ) private boolean authorizationAllowWildcardsMatching = false; - // Enable authentication + @ApiModelProperty( + name = "authenticationEnabled", + value = "Whether enable authentication" + ) private boolean authenticationEnabled = false; - // Authentication provider name list, which is a list of class names + + @ApiModelProperty( + name = "authenticationProviders", + value = "Authentication provider name list, which is a list of class names" + ) private Set<String> authenticationProviders = Sets.newTreeSet(); - // Enforce authorization + + @ApiModelProperty( + name = "authorizationEnabled", + value = "Whether Enforce authorization" + ) private boolean authorizationEnabled = false; - // Authorization provider fully qualified class-name + + @ApiModelProperty( + name = "authorizationProvider", + value = "Authorization provider fully qualified class-name" + ) private String authorizationProvider = PulsarAuthorizationProvider.class.getName(); /***** --- TLS --- ****/ @Deprecated private boolean tlsEnabled = false; - // Tls cert refresh duration in seconds (set 0 to check on every new connection) + + @ApiModelProperty( + name = "tlsCertRefreshCheckDurationSec", + value = "Tls cert refresh duration in seconds (set 0 to check on every new connection)" + ) private long tlsCertRefreshCheckDurationSec = 300; - // Path for the TLS certificate file + + @ApiModelProperty( + name = "tlsCertificateFilePath", + value = "Path for the TLS certificate file" + ) private String tlsCertificateFilePath; - // Path for the TLS private key file + + @ApiModelProperty( + name = "tlsKeyFilePath", + value = "Path for the TLS private key file" + ) private String tlsKeyFilePath; - // Path for the trusted TLS certificate file + + @ApiModelProperty( + name = "tlsTrustCertsFilePath", + value = "Path for the trusted TLS certificate file" + ) private String tlsTrustCertsFilePath = ""; - // Accept untrusted TLS certificate from client + + @ApiModelProperty( + name = "tlsAllowInsecureConnection", + value = "Accept untrusted TLS certificate from client" + ) private boolean tlsAllowInsecureConnection = false; - // Specify the tls protocols the broker will use to negotiate during TLS Handshake. - // Example:- [TLSv1.3, TLSv1.2] + + @ApiModelProperty( + name = "tlsProtocols", + value = "Specify the tls protocols the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLSv1.3, TLSv1.2]" Review comment: What's the meaning of `-` after `Example:`? ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" Review comment: ```suggestion value = "ZooKeeper session timeout (in million seconds)" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" Review comment: ```suggestion value = "Role names that are treated as \"super-user\", meaning they are able to " + "do all admin operations and publish to or consume from all topics" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" Review comment: ```suggestion value = "Allow wildcard matching in authorization (wildcard matching only applicable " + "if wildcard char * presents at first or last position. For example, *.pulsar.service, pulsar.service.*" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" + ) private boolean authorizationAllowWildcardsMatching = false; - // Enable authentication + @ApiModelProperty( + name = "authenticationEnabled", + value = "Whether enable authentication" + ) private boolean authenticationEnabled = false; - // Authentication provider name list, which is a list of class names + + @ApiModelProperty( + name = "authenticationProviders", + value = "Authentication provider name list, which is a list of class names" + ) private Set<String> authenticationProviders = Sets.newTreeSet(); - // Enforce authorization + + @ApiModelProperty( + name = "authorizationEnabled", + value = "Whether Enforce authorization" Review comment: ```suggestion value = "Whether enforce authorization" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" Review comment: ```suggestion value = "Port used to server binary-proto request" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" + ) private boolean authorizationAllowWildcardsMatching = false; - // Enable authentication + @ApiModelProperty( + name = "authenticationEnabled", + value = "Whether enable authentication" + ) private boolean authenticationEnabled = false; - // Authentication provider name list, which is a list of class names + + @ApiModelProperty( + name = "authenticationProviders", + value = "Authentication provider name list, which is a list of class names" + ) private Set<String> authenticationProviders = Sets.newTreeSet(); - // Enforce authorization + + @ApiModelProperty( + name = "authorizationEnabled", + value = "Whether Enforce authorization" + ) private boolean authorizationEnabled = false; - // Authorization provider fully qualified class-name + + @ApiModelProperty( + name = "authorizationProvider", + value = "Authorization provider fully qualified class-name" + ) private String authorizationProvider = PulsarAuthorizationProvider.class.getName(); /***** --- TLS --- ****/ @Deprecated private boolean tlsEnabled = false; - // Tls cert refresh duration in seconds (set 0 to check on every new connection) + + @ApiModelProperty( + name = "tlsCertRefreshCheckDurationSec", + value = "Tls cert refresh duration in seconds (set 0 to check on every new connection)" Review comment: ```suggestion value = "TLS cert refresh duration (in seconds). 0 means checking every new connection." ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" Review comment: ```suggestion value = "ZooKeeper cache expiry time (in seconds)" ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" + ) private boolean authorizationAllowWildcardsMatching = false; - // Enable authentication + @ApiModelProperty( + name = "authenticationEnabled", + value = "Whether enable authentication" + ) private boolean authenticationEnabled = false; - // Authentication provider name list, which is a list of class names + + @ApiModelProperty( + name = "authenticationProviders", + value = "Authentication provider name list, which is a list of class names" + ) private Set<String> authenticationProviders = Sets.newTreeSet(); - // Enforce authorization + + @ApiModelProperty( + name = "authorizationEnabled", + value = "Whether Enforce authorization" + ) private boolean authorizationEnabled = false; - // Authorization provider fully qualified class-name + + @ApiModelProperty( + name = "authorizationProvider", + value = "Authorization provider fully qualified class-name" + ) private String authorizationProvider = PulsarAuthorizationProvider.class.getName(); /***** --- TLS --- ****/ @Deprecated private boolean tlsEnabled = false; - // Tls cert refresh duration in seconds (set 0 to check on every new connection) + + @ApiModelProperty( + name = "tlsCertRefreshCheckDurationSec", + value = "Tls cert refresh duration in seconds (set 0 to check on every new connection)" + ) private long tlsCertRefreshCheckDurationSec = 300; - // Path for the TLS certificate file + + @ApiModelProperty( + name = "tlsCertificateFilePath", + value = "Path for the TLS certificate file" + ) private String tlsCertificateFilePath; - // Path for the TLS private key file + + @ApiModelProperty( + name = "tlsKeyFilePath", + value = "Path for the TLS private key file" + ) private String tlsKeyFilePath; - // Path for the trusted TLS certificate file + + @ApiModelProperty( + name = "tlsTrustCertsFilePath", + value = "Path for the trusted TLS certificate file" + ) private String tlsTrustCertsFilePath = ""; - // Accept untrusted TLS certificate from client + + @ApiModelProperty( + name = "tlsAllowInsecureConnection", + value = "Accept untrusted TLS certificate from client" + ) private boolean tlsAllowInsecureConnection = false; - // Specify the tls protocols the broker will use to negotiate during TLS Handshake. - // Example:- [TLSv1.3, TLSv1.2] + + @ApiModelProperty( + name = "tlsProtocols", + value = "Specify the tls protocols the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLSv1.3, TLSv1.2]" + ) private Set<String> tlsProtocols = Sets.newTreeSet(); - // Specify the tls cipher the broker will use to negotiate during TLS Handshake. - // Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256] + + @ApiModelProperty( + name = "tlsCiphers", + value = "Specify the tls cipher the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]" Review comment: same ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" + ) private boolean authorizationAllowWildcardsMatching = false; - // Enable authentication + @ApiModelProperty( + name = "authenticationEnabled", + value = "Whether enable authentication" + ) private boolean authenticationEnabled = false; - // Authentication provider name list, which is a list of class names + + @ApiModelProperty( + name = "authenticationProviders", + value = "Authentication provider name list, which is a list of class names" + ) private Set<String> authenticationProviders = Sets.newTreeSet(); - // Enforce authorization + + @ApiModelProperty( + name = "authorizationEnabled", + value = "Whether Enforce authorization" + ) private boolean authorizationEnabled = false; - // Authorization provider fully qualified class-name + + @ApiModelProperty( + name = "authorizationProvider", + value = "Authorization provider fully qualified class-name" + ) private String authorizationProvider = PulsarAuthorizationProvider.class.getName(); /***** --- TLS --- ****/ @Deprecated private boolean tlsEnabled = false; - // Tls cert refresh duration in seconds (set 0 to check on every new connection) + + @ApiModelProperty( + name = "tlsCertRefreshCheckDurationSec", + value = "Tls cert refresh duration in seconds (set 0 to check on every new connection)" + ) private long tlsCertRefreshCheckDurationSec = 300; - // Path for the TLS certificate file + + @ApiModelProperty( + name = "tlsCertificateFilePath", + value = "Path for the TLS certificate file" + ) private String tlsCertificateFilePath; - // Path for the TLS private key file + + @ApiModelProperty( + name = "tlsKeyFilePath", + value = "Path for the TLS private key file" + ) private String tlsKeyFilePath; - // Path for the trusted TLS certificate file + + @ApiModelProperty( + name = "tlsTrustCertsFilePath", + value = "Path for the trusted TLS certificate file" + ) private String tlsTrustCertsFilePath = ""; - // Accept untrusted TLS certificate from client + + @ApiModelProperty( + name = "tlsAllowInsecureConnection", + value = "Accept untrusted TLS certificate from client" + ) private boolean tlsAllowInsecureConnection = false; - // Specify the tls protocols the broker will use to negotiate during TLS Handshake. - // Example:- [TLSv1.3, TLSv1.2] + + @ApiModelProperty( + name = "tlsProtocols", + value = "Specify the tls protocols the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLSv1.3, TLSv1.2]" + ) private Set<String> tlsProtocols = Sets.newTreeSet(); - // Specify the tls cipher the broker will use to negotiate during TLS Handshake. - // Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256] + + @ApiModelProperty( + name = "tlsCiphers", + value = "Specify the tls cipher the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]" + ) private Set<String> tlsCiphers = Sets.newTreeSet(); - // Specify whether Client certificates are required for TLS - // Reject the Connection if the Client Certificate is not trusted. + + @ApiModelProperty( + name = "tlsRequireTrustedClientCertOnConnect", + value = "Specify whether Client certificates are required for TLS. " + + "Reject the Connection if the Client Certificate is not trusted." Review comment: ```suggestion value = "Specify whether client certificates are required for TLS. " + "Reject the connection if the client certificate is not trusted." ``` ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" Review comment: Please update all occurrences. ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" + ) private boolean authorizationAllowWildcardsMatching = false; - // Enable authentication + @ApiModelProperty( + name = "authenticationEnabled", + value = "Whether enable authentication" + ) private boolean authenticationEnabled = false; - // Authentication provider name list, which is a list of class names + + @ApiModelProperty( + name = "authenticationProviders", + value = "Authentication provider name list, which is a list of class names" + ) private Set<String> authenticationProviders = Sets.newTreeSet(); - // Enforce authorization + + @ApiModelProperty( + name = "authorizationEnabled", + value = "Whether Enforce authorization" + ) private boolean authorizationEnabled = false; - // Authorization provider fully qualified class-name + + @ApiModelProperty( + name = "authorizationProvider", + value = "Authorization provider fully qualified class-name" + ) private String authorizationProvider = PulsarAuthorizationProvider.class.getName(); /***** --- TLS --- ****/ @Deprecated private boolean tlsEnabled = false; - // Tls cert refresh duration in seconds (set 0 to check on every new connection) + + @ApiModelProperty( + name = "tlsCertRefreshCheckDurationSec", + value = "Tls cert refresh duration in seconds (set 0 to check on every new connection)" + ) private long tlsCertRefreshCheckDurationSec = 300; - // Path for the TLS certificate file + + @ApiModelProperty( + name = "tlsCertificateFilePath", + value = "Path for the TLS certificate file" + ) private String tlsCertificateFilePath; - // Path for the TLS private key file + + @ApiModelProperty( + name = "tlsKeyFilePath", + value = "Path for the TLS private key file" + ) private String tlsKeyFilePath; - // Path for the trusted TLS certificate file + + @ApiModelProperty( + name = "tlsTrustCertsFilePath", + value = "Path for the trusted TLS certificate file" + ) private String tlsTrustCertsFilePath = ""; - // Accept untrusted TLS certificate from client + + @ApiModelProperty( + name = "tlsAllowInsecureConnection", + value = "Accept untrusted TLS certificate from client" + ) private boolean tlsAllowInsecureConnection = false; - // Specify the tls protocols the broker will use to negotiate during TLS Handshake. - // Example:- [TLSv1.3, TLSv1.2] + + @ApiModelProperty( + name = "tlsProtocols", + value = "Specify the tls protocols the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLSv1.3, TLSv1.2]" + ) private Set<String> tlsProtocols = Sets.newTreeSet(); - // Specify the tls cipher the broker will use to negotiate during TLS Handshake. - // Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256] + + @ApiModelProperty( + name = "tlsCiphers", + value = "Specify the tls cipher the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]" + ) private Set<String> tlsCiphers = Sets.newTreeSet(); - // Specify whether Client certificates are required for TLS - // Reject the Connection if the Client Certificate is not trusted. + + @ApiModelProperty( + name = "tlsRequireTrustedClientCertOnConnect", + value = "Specify whether Client certificates are required for TLS. " + + "Reject the Connection if the Client Certificate is not trusted." + ) private boolean tlsRequireTrustedClientCertOnConnect = false; /***** --- TLS with KeyStore--- ****/ - // Enable TLS with KeyStore type configuration in broker + @ApiModelProperty( + name = "tlsEnabledWithKeyStore", + value = "Enable TLS with KeyStore type configuration in broker" + ) private boolean tlsEnabledWithKeyStore = false; - // TLS Provider + + @ApiModelProperty( + name = "tlsProvider", + value = "Full class name of TLS Provider" + ) private String tlsProvider = null; - // TLS KeyStore type configuration in broker: JKS, PKCS12 + + @ApiModelProperty( + name = "tlsKeyStoreType", + value = "TLS KeyStore type configuration in broker: JKS, PKCS12" Review comment: ```suggestion value = "TLS KeyStore type configurations in broker are JKS or PKCS12" ``` do you mean this? ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" + ) private Optional<Integer> servicePort = Optional.ofNullable(5000); - // Port to use to server binary-proto-tls request + + @ApiModelProperty( + name = "servicePortTls", + value = "Port to use to server binary-proto-tls request" + ) private Optional<Integer> servicePortTls = Optional.empty(); - // Port to use to server HTTP request + + @ApiModelProperty( + name = "webServicePort", + value = "Port to use to server HTTP request" + ) private Optional<Integer> webServicePort = Optional.ofNullable(8080); - // Port to use to server HTTPS request + + @ApiModelProperty( + name = "webServicePortTls", + value = "Port to use to server HTTPS request" + ) private Optional<Integer> webServicePortTls = Optional.empty(); - // Control whether to bind directly on localhost rather than on normal - // hostname + + @ApiModelProperty( + name = "bindOnLocalhost", + value = "Control whether to bind directly on localhost rather than on normal hostname" + ) private boolean bindOnLocalhost = false; - // Role names that are treated as "super-user", meaning they will be able to - // do all admin operations and publish/consume from all topics + @ApiModelProperty( + name = "superUserRoles", + value = "Role names that are treated as \"super-user\", meaning they will be able to " + + "do all admin operations and publish/consume from all topics" + ) private Set<String> superUserRoles = Sets.newTreeSet(); - // Allow wildcard matching in authorization - // (wildcard matching only applicable if wildcard-char: - // * presents at first or last position eg: *.pulsar.service, pulsar.service.*) + @ApiModelProperty( + name = "authorizationAllowWildcardsMatching", + value = "Allow wildcard matching in authorization (wildcard matching only applicable " + + "if wildcard-char: * presents at first or last position eg: *.pulsar.service, pulsar.service.*" + ) private boolean authorizationAllowWildcardsMatching = false; - // Enable authentication + @ApiModelProperty( + name = "authenticationEnabled", + value = "Whether enable authentication" + ) private boolean authenticationEnabled = false; - // Authentication provider name list, which is a list of class names + + @ApiModelProperty( + name = "authenticationProviders", + value = "Authentication provider name list, which is a list of class names" + ) private Set<String> authenticationProviders = Sets.newTreeSet(); - // Enforce authorization + + @ApiModelProperty( + name = "authorizationEnabled", + value = "Whether Enforce authorization" + ) private boolean authorizationEnabled = false; - // Authorization provider fully qualified class-name + + @ApiModelProperty( + name = "authorizationProvider", + value = "Authorization provider fully qualified class-name" + ) private String authorizationProvider = PulsarAuthorizationProvider.class.getName(); /***** --- TLS --- ****/ @Deprecated private boolean tlsEnabled = false; - // Tls cert refresh duration in seconds (set 0 to check on every new connection) + + @ApiModelProperty( + name = "tlsCertRefreshCheckDurationSec", + value = "Tls cert refresh duration in seconds (set 0 to check on every new connection)" + ) private long tlsCertRefreshCheckDurationSec = 300; - // Path for the TLS certificate file + + @ApiModelProperty( + name = "tlsCertificateFilePath", + value = "Path for the TLS certificate file" + ) private String tlsCertificateFilePath; - // Path for the TLS private key file + + @ApiModelProperty( + name = "tlsKeyFilePath", + value = "Path for the TLS private key file" + ) private String tlsKeyFilePath; - // Path for the trusted TLS certificate file + + @ApiModelProperty( + name = "tlsTrustCertsFilePath", + value = "Path for the trusted TLS certificate file" + ) private String tlsTrustCertsFilePath = ""; - // Accept untrusted TLS certificate from client + + @ApiModelProperty( + name = "tlsAllowInsecureConnection", + value = "Accept untrusted TLS certificate from client" + ) private boolean tlsAllowInsecureConnection = false; - // Specify the tls protocols the broker will use to negotiate during TLS Handshake. - // Example:- [TLSv1.3, TLSv1.2] + + @ApiModelProperty( + name = "tlsProtocols", + value = "Specify the tls protocols the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLSv1.3, TLSv1.2]" + ) private Set<String> tlsProtocols = Sets.newTreeSet(); - // Specify the tls cipher the broker will use to negotiate during TLS Handshake. - // Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256] + + @ApiModelProperty( + name = "tlsCiphers", + value = "Specify the tls cipher the broker will use to negotiate during TLS Handshake. " + + "Example:- [TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]" + ) private Set<String> tlsCiphers = Sets.newTreeSet(); - // Specify whether Client certificates are required for TLS - // Reject the Connection if the Client Certificate is not trusted. + + @ApiModelProperty( + name = "tlsRequireTrustedClientCertOnConnect", + value = "Specify whether Client certificates are required for TLS. " + + "Reject the Connection if the Client Certificate is not trusted." + ) private boolean tlsRequireTrustedClientCertOnConnect = false; /***** --- TLS with KeyStore--- ****/ - // Enable TLS with KeyStore type configuration in broker + @ApiModelProperty( + name = "tlsEnabledWithKeyStore", + value = "Enable TLS with KeyStore type configuration in broker" + ) private boolean tlsEnabledWithKeyStore = false; - // TLS Provider + + @ApiModelProperty( + name = "tlsProvider", + value = "Full class name of TLS Provider" + ) private String tlsProvider = null; - // TLS KeyStore type configuration in broker: JKS, PKCS12 + + @ApiModelProperty( + name = "tlsKeyStoreType", + value = "TLS KeyStore type configuration in broker: JKS, PKCS12" + ) private String tlsKeyStoreType = "JKS"; - // TLS KeyStore path in broker + + @ApiModelProperty( + name = "tlsKeyStore", + value = "TLS KeyStore path in broker" + ) private String tlsKeyStore = null; - // TLS KeyStore password in broker + + @ApiModelProperty( + name = "tlsKeyStorePassword", + value = "TLS KeyStore password in broker" + ) private String tlsKeyStorePassword = null; - // TLS TrustStore type configuration in broker: JKS, PKCS12 + + @ApiModelProperty( + name = "tlsTrustStoreType", + value = "TLS TrustStore type configuration in broker: JKS, PKCS12" Review comment: same ########## File path: pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/server/ServiceConfig.java ########## @@ -36,91 +37,209 @@ @Data public class ServiceConfig implements PulsarConfiguration { - // Local-Zookeeper quorum connection string + @ApiModelProperty( + name = "zookeeperServers", + value = "Local-Zookeeper quorum connection string" + ) private String zookeeperServers; // Global-Zookeeper quorum connection string @Deprecated private String globalZookeeperServers; - // Configuration Store connection string + + @ApiModelProperty( + name = "configurationStoreServers", + value = "Configuration Store connection string" + ) private String configurationStoreServers; - // ZooKeeper session timeout + @ApiModelProperty( + name = "zookeeperSessionTimeoutMs", + value = "ZooKeeper session timeout in ms" + ) private int zookeeperSessionTimeoutMs = 30_000; - // ZooKeeper cache expiry time in seconds + @ApiModelProperty( + name = "zooKeeperCacheExpirySeconds", + value = "ZooKeeper cache expiry time in seconds" + ) private int zooKeeperCacheExpirySeconds=300; - // Port to use to server binary-proto request + @ApiModelProperty( + name = "servicePort", + value = "Port to use to server binary-proto request" Review comment: Please update all occurrences. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org