Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#1883][#1919][#1921][#1927][#1932][#1950] Improvement: Define and use ConfigConstants static version string (#2149)

YongXing380f90931cef
diff --git a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/config/JdbcConfig.java b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/config/JdbcConfig.java
index a7ae1c5506..39480ab3a0 100644
--- a/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/config/JdbcConfig.java
+++ b/catalogs/catalog-jdbc-common/src/main/java/com/datastrato/gravitino/catalog/jdbc/config/JdbcConfig.java
@@ -17,7 +17,7 @@ public class JdbcConfig extends Config {
public static final ConfigEntry<String> JDBC_URL =
new ConfigBuilder("jdbc-url")
.doc("The url of the Jdbc connection")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -25,7 +25,7 @@ public class JdbcConfig extends Config {
public static final ConfigEntry<String> JDBC_DATABASE =
new ConfigBuilder("jdbc-database")
.doc("The database of the jdbc connection")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -33,7 +33,7 @@ public class JdbcConfig extends Config {
public static final ConfigEntry<String> JDBC_DRIVER =
new ConfigBuilder("jdbc-driver")
.doc("The driver of the jdbc connection")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -41,7 +41,7 @@ public class JdbcConfig extends Config {
public static final ConfigEntry<String> USERNAME =
new ConfigBuilder("jdbc-user")
.doc("The username of the Jdbc connection")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -49,7 +49,7 @@ public class JdbcConfig extends Config {
public static final ConfigEntry<String> PASSWORD =
new ConfigBuilder("jdbc-password")
.doc("The password of the Jdbc connection")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -57,7 +57,7 @@ public class JdbcConfig extends Config {
public static final ConfigEntry<Integer> POOL_MIN_SIZE =
new ConfigBuilder("jdbc.pool.min-size")
.doc("The minimum number of connections in the pool")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(2);
@@ -65,7 +65,7 @@ public class JdbcConfig extends Config {
public static final ConfigEntry<Integer> POOL_MAX_SIZE =
new ConfigBuilder("jdbc.pool.max-size")
.doc("The maximum number of connections in the pool")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(10);
diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergConfig.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergConfig.java
index 0d8a3cbbcf..f8d998703f 100644
--- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergConfig.java
+++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergConfig.java
@@ -29,14 +29,14 @@ public class IcebergConfig extends Config implements OverwriteDefaultConfig {
public static final ConfigEntry<String> CATALOG_BACKEND =
new ConfigBuilder(CATALOG_BACKEND_NAME)
.doc("Catalog backend of Gravitino Iceberg catalog")
- .version("0.2.0")
+ .version(ConfigConstants.VERSION_0_2_0)
.stringConf()
.createWithDefault("memory");
public static final ConfigEntry<String> CATALOG_WAREHOUSE =
new ConfigBuilder(WAREHOUSE)
.doc("Warehouse directory of catalog")
- .version("0.2.0")
+ .version(ConfigConstants.VERSION_0_2_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -44,7 +44,7 @@ public class IcebergConfig extends Config implements OverwriteDefaultConfig {
public static final ConfigEntry<String> CATALOG_URI =
new ConfigBuilder(URI)
.doc("The uri config of the Iceberg catalog")
- .version("0.2.0")
+ .version(ConfigConstants.VERSION_0_2_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -52,7 +52,7 @@ public class IcebergConfig extends Config implements OverwriteDefaultConfig {
public static final ConfigEntry<String> JDBC_USER =
new ConfigBuilder(ICEBERG_JDBC_USER)
.doc("The username of the Jdbc connection")
- .version("0.2.0")
+ .version(ConfigConstants.VERSION_0_2_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -60,7 +60,7 @@ public class IcebergConfig extends Config implements OverwriteDefaultConfig {
public static final ConfigEntry<String> JDBC_PASSWORD =
new ConfigBuilder(ICEBERG_JDBC_PASSWORD)
.doc("The password of the Jdbc connection")
- .version("0.2.0")
+ .version(ConfigConstants.VERSION_0_2_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -68,7 +68,7 @@ public class IcebergConfig extends Config implements OverwriteDefaultConfig {
public static final ConfigEntry<String> JDBC_DRIVER =
new ConfigBuilder(GRAVITINO_JDBC_DRIVER)
.doc("The driver of the Jdbc connection")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -76,14 +76,14 @@ public class IcebergConfig extends Config implements OverwriteDefaultConfig {
public static final ConfigEntry<Boolean> JDBC_INIT_TABLES =
new ConfigBuilder(ICEBERG_JDBC_INITIALIZE)
.doc("Whether to initialize meta tables when create Jdbc catalog")
- .version("0.2.0")
+ .version(ConfigConstants.VERSION_0_2_0)
.booleanConf()
.createWithDefault(true);
public static final ConfigEntry<String> ICEBERG_METRICS_STORE =
new ConfigBuilder(IcebergMetricsManager.ICEBERG_METRICS_STORE)
.doc("The store to save Iceberg metrics")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.stringConf()
.create();
@@ -91,14 +91,14 @@ public class IcebergConfig extends Config implements OverwriteDefaultConfig {
new ConfigBuilder(IcebergMetricsManager.ICEBERG_METRICS_STORE_RETAIN_DAYS)
.doc(
"The retain days of Iceberg metrics, the value not greater than 0 means retain forever")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.intConf()
.createWithDefault(-1);
public static final ConfigEntry<Integer> ICEBERG_METRICS_QUEUE_CAPACITY =
new ConfigBuilder(IcebergMetricsManager.ICEBERG_METRICS_QUEUE_CAPACITY)
.doc("The capacity for Iceberg metrics queues, should greater than 0")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(1000);
diff --git a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergRESTService.java b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergRESTService.java
index b2ec7ed37f..7a3517f615 100644
--- a/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergRESTService.java
+++ b/catalogs/catalog-lakehouse-iceberg/src/main/java/com/datastrato/gravitino/catalog/lakehouse/iceberg/IcebergRESTService.java
@@ -32,6 +32,7 @@ public class IcebergRESTService implements GravitinoAuxiliaryService {
private JettyServer server;
public static final String SERVICE_NAME = "iceberg-rest";
+ public static final String ICEBERG_SPEC = "/iceberg/*";
private IcebergTableOps icebergTableOps;
private IcebergMetricsManager icebergMetricsManager;
@@ -63,9 +64,9 @@ public class IcebergRESTService implements GravitinoAuxiliaryService {
});
Servlet servlet = new ServletContainer(config);
- server.addServlet(servlet, "/iceberg/*");
- server.addCustomFilters("/iceberg/*");
- server.addSystemFilters("/iceberg/*");
+ server.addServlet(servlet, ICEBERG_SPEC);
+ server.addCustomFilters(ICEBERG_SPEC);
+ server.addSystemFilters(ICEBERG_SPEC);
}
@Override
diff --git a/common/src/main/java/com/datastrato/gravitino/config/ConfigConstants.java b/common/src/main/java/com/datastrato/gravitino/config/ConfigConstants.java
index f98fd26036..266971c990 100644
--- a/common/src/main/java/com/datastrato/gravitino/config/ConfigConstants.java
+++ b/common/src/main/java/com/datastrato/gravitino/config/ConfigConstants.java
@@ -18,4 +18,15 @@ public interface ConfigConstants {
* The value of messages used to indicate that the configuration should be a non-negative number.
*/
String NON_NEGATIVE_NUMBER_ERROR_MSG = "The value must be a non-negative number";
+
+ /** The version number for the 0.1.0 release. */
+ String VERSION_0_1_0 = "0.1.0";
+ /** The version number for the 0.2.0 release. */
+ String VERSION_0_2_0 = "0.2.0";
+ /** The version number for the 0.3.0 release. */
+ String VERSION_0_3_0 = "0.3.0";
+ /** The version number for the 0.4.0 release. */
+ String VERSION_0_4_0 = "0.4.0";
+ /** The version number for the 0.5.0 release. */
+ String VERSION_0_5_0 = "0.5.0";
}
diff --git a/core/src/main/java/com/datastrato/gravitino/Configs.java b/core/src/main/java/com/datastrato/gravitino/Configs.java
index 3903870ca1..b53dbd0a33 100644
--- a/core/src/main/java/com/datastrato/gravitino/Configs.java
+++ b/core/src/main/java/com/datastrato/gravitino/Configs.java
@@ -40,21 +40,21 @@ public interface Configs {
ConfigEntry<String> ENTITY_STORE =
new ConfigBuilder(ENTITY_STORE_KEY)
.doc("Which storage implementation to use")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.stringConf()
.createWithDefault(DEFAULT_ENTITY_STORE);
ConfigEntry<String> ENTITY_KV_STORE =
new ConfigBuilder(ENTITY_KV_STORE_KEY)
.doc("Detailed implementation of Kv storage")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.stringConf()
.createWithDefault(DEFAULT_ENTITY_KV_STORE);
ConfigEntry<String> ENTITY_RELATIONAL_STORE =
new ConfigBuilder(ENTITY_RELATIONAL_STORE_KEY)
.doc("Detailed implementation of relational storage")
- .version("0.5.0")
+ .version(ConfigConstants.VERSION_0_5_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.createWithDefault(DEFAULT_ENTITY_RELATIONAL_STORE);
@@ -62,42 +62,42 @@ public interface Configs {
ConfigEntry<String> ENTRY_KV_ROCKSDB_BACKEND_PATH =
new ConfigBuilder(ENTITY_KV_ROCKSDB_BACKEND_PATH_KEY)
.doc("Directory path of `RocksDBKvBackend`")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.stringConf()
.createWithDefault(DEFAULT_KV_ROCKSDB_BACKEND_PATH);
ConfigEntry<String> ENTITY_SERDE =
new ConfigBuilder("gravitino.entity.serde")
.doc("The entity SerDe to use")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.stringConf()
.createWithDefault("proto");
ConfigEntry<Long> CATALOG_CACHE_EVICTION_INTERVAL_MS =
new ConfigBuilder("gravitino.catalog.cache.evictionIntervalMs")
.doc("The interval in milliseconds to evict the catalog cache")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.longConf()
.createWithDefault(60 * 60 * 1000L);
ConfigEntry<Boolean> CATALOG_LOAD_ISOLATED =
new ConfigBuilder("gravitino.catalog.classloader.isolated")
.doc("Whether to load the catalog in an isolated classloader")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.booleanConf()
.createWithDefault(true);
ConfigEntry<String> AUTHENTICATOR =
new ConfigBuilder("gravitino.authenticator")
.doc("The authenticator which Gravitino uses")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.createWithDefault("simple");
ConfigEntry<Long> STORE_TRANSACTION_MAX_SKEW_TIME =
new ConfigBuilder("gravitino.entity.store.maxTransactionSkewTimeMs")
.doc("The maximum skew time of transactions in milliseconds")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.longConf()
.createWithDefault(2000L);
@@ -105,7 +105,7 @@ public interface Configs {
new ConfigBuilder(KV_DELETE_AFTER_TIME_KEY)
.doc(
"The maximum time in milliseconds that the deleted data and old version data is kept")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.longConf()
.createWithDefault(DEFAULT_KV_DELETE_AFTER_TIME);
@@ -114,21 +114,21 @@ public interface Configs {
ConfigEntry<Long> TREE_LOCK_MAX_NODE_IN_MEMORY =
new ConfigBuilder("gravitino.lock.maxNodes")
.doc("The maximum number of tree lock nodes to keep in memory")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.longConf()
.createWithDefault(MAX_NODE_IN_MEMORY);
ConfigEntry<Long> TREE_LOCK_MIN_NODE_IN_MEMORY =
new ConfigBuilder("gravitino.lock.minNodes")
.doc("The minimum number of tree lock nodes to keep in memory")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.longConf()
.createWithDefault(MIN_NODE_IN_MEMORY);
ConfigEntry<Long> TREE_LOCK_CLEAN_INTERVAL =
new ConfigBuilder("gravitino.lock.cleanIntervalInSecs")
.doc("The interval in seconds to clean up the stale tree lock nodes")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.longConf()
.createWithDefault(CLEAN_INTERVAL_IN_SECS);
}
diff --git a/server-common/src/main/java/com/datastrato/gravitino/server/auth/OAuthConfig.java b/server-common/src/main/java/com/datastrato/gravitino/server/auth/OAuthConfig.java
index 26581fe0a8..4ac06509bc 100644
--- a/server-common/src/main/java/com/datastrato/gravitino/server/auth/OAuthConfig.java
+++ b/server-common/src/main/java/com/datastrato/gravitino/server/auth/OAuthConfig.java
@@ -13,27 +13,26 @@ import io.jsonwebtoken.SignatureAlgorithm;
import org.apache.commons.lang3.StringUtils;
public interface OAuthConfig extends Configs {
-
String OAUTH_CONFIG_PREFIX = "gravitino.authenticator.oauth.";
ConfigEntry<String> SERVICE_AUDIENCE =
new ConfigBuilder(OAUTH_CONFIG_PREFIX + "serviceAudience")
.doc("The audience name when Gravitino uses OAuth as the authenticator")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.createWithDefault("GravitinoServer");
ConfigEntry<Long> ALLOW_SKEW_SECONDS =
new ConfigBuilder(OAUTH_CONFIG_PREFIX + "allowSkewSecs")
.doc("The JWT allows skew seconds when Gravitino uses OAuth as the authenticator")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.longConf()
.createWithDefault(0L);
ConfigEntry<String> DEFAULT_SIGN_KEY =
new ConfigBuilder(OAUTH_CONFIG_PREFIX + "defaultSignKey")
.doc("The signing key of JWT when Gravitino uses OAuth as the authenticator")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -41,14 +40,14 @@ public interface OAuthConfig extends Configs {
ConfigEntry<String> SIGNATURE_ALGORITHM_TYPE =
new ConfigBuilder(OAUTH_CONFIG_PREFIX + "signAlgorithmType")
.doc("The signature algorithm when Gravitino uses OAuth as the authenticator")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.createWithDefault(SignatureAlgorithm.RS256.name());
ConfigEntry<String> DEFAULT_SERVER_URI =
new ConfigBuilder(OAUTH_CONFIG_PREFIX + "serverUri")
.doc("The uri of the default OAuth server")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -56,7 +55,7 @@ public interface OAuthConfig extends Configs {
ConfigEntry<String> DEFAULT_TOKEN_PATH =
new ConfigBuilder(OAUTH_CONFIG_PREFIX + "tokenPath")
.doc("The path for token of the default OAuth server")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
diff --git a/server-common/src/main/java/com/datastrato/gravitino/server/web/JettyServerConfig.java b/server-common/src/main/java/com/datastrato/gravitino/server/web/JettyServerConfig.java
index 56e53502d8..8c52197173 100644
--- a/server-common/src/main/java/com/datastrato/gravitino/server/web/JettyServerConfig.java
+++ b/server-common/src/main/java/com/datastrato/gravitino/server/web/JettyServerConfig.java
@@ -34,14 +34,14 @@ public final class JettyServerConfig {
public static final ConfigEntry<String> WEBSERVER_HOST =
new ConfigBuilder("host")
.doc("The host name of the Jetty web server")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.stringConf()
.createWithDefault("0.0.0.0");
public static final ConfigEntry<Integer> WEBSERVER_HTTP_PORT =
new ConfigBuilder("httpPort")
.doc("The http port number of the Jetty web server")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.intConf()
.checkValue(value -> value >= 0, ConfigConstants.NON_NEGATIVE_NUMBER_ERROR_MSG)
.createWithDefault(DEFAULT_GRAVITINO_WEBSERVER_HTTP_PORT);
@@ -49,7 +49,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<Integer> WEBSERVER_MIN_THREADS =
new ConfigBuilder("minThreads")
.doc("The minimum number of threads in the thread pool used by Jetty webserver")
- .version("0.2.0")
+ .version(ConfigConstants.VERSION_0_2_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(
@@ -58,7 +58,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<Integer> WEBSERVER_MAX_THREADS =
new ConfigBuilder("maxThreads")
.doc("The maximum number of threads in the thread pool used by Jetty webserver")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(Math.max(Runtime.getRuntime().availableProcessors() * 4, 400));
@@ -66,7 +66,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<Long> WEBSERVER_STOP_TIMEOUT =
new ConfigBuilder("stopTimeout")
.doc("Time in milliseconds to gracefully shutdown the Jetty webserver")
- .version("0.2.0")
+ .version(ConfigConstants.VERSION_0_2_0)
.longConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(30 * 1000L);
@@ -74,7 +74,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<Integer> WEBSERVER_IDLE_TIMEOUT =
new ConfigBuilder("idleTimeout")
.doc("The timeout in milliseconds of idle connections")
- .version("0.2.0")
+ .version(ConfigConstants.VERSION_0_2_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(30 * 1000);
@@ -82,7 +82,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<Integer> WEBSERVER_REQUEST_HEADER_SIZE =
new ConfigBuilder("requestHeaderSize")
.doc("Maximum size of HTTP requests")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(128 * 1024);
@@ -90,7 +90,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<Integer> WEBSERVER_RESPONSE_HEADER_SIZE =
new ConfigBuilder("responseHeaderSize")
.doc("Maximum size of HTTP responses")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(128 * 1024);
@@ -98,7 +98,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<Integer> WEBSERVER_THREAD_POOL_WORK_QUEUE_SIZE =
new ConfigBuilder("threadPoolWorkQueueSize")
.doc("The size of the queue in the thread pool used by Jetty webserver")
- .version("0.1.0")
+ .version(ConfigConstants.VERSION_0_1_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(100);
@@ -106,14 +106,14 @@ public final class JettyServerConfig {
public static final ConfigEntry<Boolean> ENABLE_HTTPS =
new ConfigBuilder("enableHttps")
.doc("Enable https")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.booleanConf()
.createWithDefault(false);
public static final ConfigEntry<Integer> WEBSERVER_HTTPS_PORT =
new ConfigBuilder("httpsPort")
.doc("The https port number of the Jetty web server")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.intConf()
.checkValue(value -> value >= 0, ConfigConstants.NON_NEGATIVE_NUMBER_ERROR_MSG)
.createWithDefault(DEFAULT_GRAVITINO_WEBSERVER_HTTPS_PORT);
@@ -121,7 +121,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<String> SSL_KEYSTORE_PATH =
new ConfigBuilder("keyStorePath")
.doc("Path to the key store file")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -129,7 +129,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<String> SSL_KEYSTORE_PASSWORD =
new ConfigBuilder("keyStorePassword")
.doc("Password to the key store")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -137,7 +137,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<String> SSL_MANAGER_PASSWORD =
new ConfigBuilder("managerPassword")
.doc("Manager password to the key store")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -145,35 +145,35 @@ public final class JettyServerConfig {
public static final ConfigEntry<String> SSL_KEYSTORE_TYPE =
new ConfigBuilder("keyStoreType")
.doc("The type to the key store")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.createWithDefault("JKS");
public static final ConfigEntry<Optional<String>> SSL_PROTOCOL =
new ConfigBuilder("tlsProtocol")
.doc("TLS protocol to use. The protocol must be supported by JVM")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.createWithOptional();
public static final ConfigEntry<String> ENABLE_CIPHER_ALGORITHMS =
new ConfigBuilder("enableCipherAlgorithms")
.doc("The collection of the cipher algorithms are enabled ")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.createWithDefault("");
public static final ConfigEntry<Boolean> ENABLE_CLIENT_AUTH =
new ConfigBuilder("enableClientAuth")
.doc("Enable the authentication of the client")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.booleanConf()
.createWithDefault(false);
public static final ConfigEntry<String> SSL_TRUST_STORE_PATH =
new ConfigBuilder("trustStorePath")
.doc("Path to the trust store file")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -181,7 +181,7 @@ public final class JettyServerConfig {
public static final ConfigEntry<String> SSL_TRUST_STORE_PASSWORD =
new ConfigBuilder("trustStorePassword")
.doc("Password to the trust store")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();
@@ -189,20 +189,20 @@ public final class JettyServerConfig {
public static final ConfigEntry<String> SSL_TRUST_STORE_TYPE =
new ConfigBuilder("trustStoreType")
.doc("The type to the trust store")
- .version("0.3.0")
+ .version(ConfigConstants.VERSION_0_3_0)
.stringConf()
.createWithDefault("JKS");
public static final ConfigEntry<Optional<String>> CUSTOM_FILTERS =
new ConfigBuilder("customFilters")
.doc("Comma separated list of filter class names to apply to the APIs")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.stringConf()
.createWithOptional();
public static final ConfigEntry<Boolean> ENABLE_CORS_FILTER =
new ConfigBuilder("enableCorsFilter")
.doc("Enable cross origin resource share filter")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.booleanConf()
.createWithDefault(false);
@@ -211,7 +211,7 @@ public final class JettyServerConfig {
.doc(
"A comma separated list of origins that are allowed to access the resources."
+ " Default value is *, means all origins")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.stringConf()
.createWithDefault("*");
@@ -220,7 +220,7 @@ public final class JettyServerConfig {
.doc(
"A comma separated list of origins that are allowed to time the resource."
+ " Default value is the empty string, means no origins.")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.stringConf()
.createWithDefault("");
@@ -229,7 +229,7 @@ public final class JettyServerConfig {
.doc(
"A comma separated list of HTTP methods that are allowed to be used when accessing the resources."
+ " Default value is GET,POST,HEAD,DELETE")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.stringConf()
.createWithDefault("GET,POST,HEAD,DELETE,PUT");
@@ -239,7 +239,7 @@ public final class JettyServerConfig {
"A comma separated list of HTTP headers that are allowed to be specified when accessing the resources."
+ " Default value is X-Requested-With,Content-Type,Accept,Origin. If the value is a single *,"
+ " this means that any headers will be accepted.")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.stringConf()
.createWithDefault("X-Requested-With,Content-Type,Accept,Origin");
@@ -248,7 +248,7 @@ public final class JettyServerConfig {
.doc(
"The number of seconds that preflight requests can be cached by the client."
+ " Default value is 1800 seconds, or 30 minutes")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.intConf()
.checkValue(value -> value > 0, ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
.createWithDefault(1800);
@@ -257,7 +257,7 @@ public final class JettyServerConfig {
new ConfigBuilder("allowCredentials")
.doc(
"A boolean indicating if the resource allows requests with credentials. Default value is true")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.booleanConf()
.createWithDefault(true);
@@ -266,7 +266,7 @@ public final class JettyServerConfig {
.doc(
"A comma separated list of HTTP headers that are allowed to be exposed on the client."
+ " Default value is the empty list")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.stringConf()
.createWithDefault("");
@@ -275,7 +275,7 @@ public final class JettyServerConfig {
.doc(
"If true preflight requests are chained to their target resource for normal handling "
+ "(as an OPTION request). Otherwise the filter will response to the preflight. Default is true.")
- .version("0.4.0")
+ .version(ConfigConstants.VERSION_0_4_0)
.booleanConf()
.createWithDefault(true);