You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2026/09/26 16:22:07 UTC
[M] Change in asterixdb[master]: [ASTERIXDB-3911][CONF] Require positive sizes, periods and timeouts
From Michael Blow <mb...@apache.org>:
Michael Blow has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21908?usp=email )
Change subject: [ASTERIXDB-3911][CONF] Require positive sizes, periods and timeouts
......................................................................
[ASTERIXDB-3911][CONF] Require positive sizes, periods and timeouts
- user model changes: yes
- storage format changes: no
- interface changes: no
Details: Memory budgets, page and frame sizes, log sizes, heartbeat and
sweep periods, result TTLs and the replication timeout were declared
with unbounded types, so 0 or a negative value was accepted and then
broke node startup (divide by zero, a zero page budget, a negative Timer
period) or every query. They now require a positive value; the two
flush-threshold and false-positive-rate ratios must lie in (0, 1], and
the NC service port in -1..65535.
A per-query compiler.externalscanmemory is parsed with the option's own
type, since 0 there made stream-based external scans spin.
Ext-ref: MB-67864
Co-Authored-By: Claude Opus 5.5 <no...@anthropic.com>
Change-Id: Ie271e693497fdc7cbdca56feb67c77ebca8f863f
---
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MessagingProperties.java
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ReplicationProperties.java
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java
M hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/OptionTypes.java
M hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/CCConfig.java
M hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java
10 files changed, 47 insertions(+), 39 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/08/21908/1
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
index d343a3a..027fe56 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ActiveProperties.java
@@ -18,8 +18,8 @@
*/
package org.apache.asterix.common.config;
-import static org.apache.hyracks.control.common.config.OptionTypes.LONG_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_LONG_BYTE_UNIT;
import static org.apache.hyracks.util.StorageUtil.StorageUnit.MEGABYTE;
import org.apache.hyracks.api.config.IOption;
@@ -31,7 +31,7 @@
public enum Option implements IOption {
ACTIVE_MEMORY_GLOBAL_BUDGET(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(64L, MEGABYTE),
"The memory budget (in bytes) for the active runtime"),
ACTIVE_STOP_TIMEOUT(
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java
index bc58b48..75741d4 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java
@@ -24,11 +24,11 @@
import static org.apache.asterix.common.config.OptimizationConfUtil.MIN_FRAME_LIMIT_FOR_WINDOW;
import static org.apache.hyracks.control.common.config.OptionTypes.BOOLEAN;
import static org.apache.hyracks.control.common.config.OptionTypes.INTEGER;
-import static org.apache.hyracks.control.common.config.OptionTypes.INTEGER_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.LONG_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.NONNEGATIVE_INTEGER;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER_BYTE_UNIT;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_LONG_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.STRING;
import static org.apache.hyracks.control.common.config.OptionTypes.getRangedIntegerType;
import static org.apache.hyracks.util.StorageUtil.StorageUnit.KILOBYTE;
@@ -44,35 +44,35 @@
public enum Option implements IOption {
COMPILER_SORTMEMORY(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(32L, MEGABYTE),
"The memory budget (in bytes) for a sort operator instance in a partition"),
COMPILER_JOINMEMORY(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(32L, MEGABYTE),
"The memory budget (in bytes) for a join operator instance in a partition"),
COMPILER_GROUPMEMORY(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(32L, MEGABYTE),
"The memory budget (in bytes) for a group by operator instance in a partition"),
COMPILER_WINDOWMEMORY(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(32L, MEGABYTE),
"The memory budget (in bytes) for a window operator instance in a partition"),
COMPILER_TEXTSEARCHMEMORY(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(32L, MEGABYTE),
"The memory budget (in bytes) for an inverted-index-search operator instance in a partition"),
COMPILER_CLUSTERBYMEMORY(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(32L, MEGABYTE),
"The memory budget (in bytes) for a CLUSTER BY k-means operator instance in a partition"),
COMPILER_AGGREGATE_DISTINCT_HASH_MEMORY(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(32L, MEGABYTE),
"The memory budget (in bytes) for a hash-based distinct aggregate instance in a partition"),
COMPILER_EXTERNALSCANMEMORY(
- INTEGER_BYTE_UNIT,
+ POSITIVE_INTEGER_BYTE_UNIT,
StorageUtil.getIntSizeInBytes(8, KILOBYTE),
"The memory budget (in bytes) for an external scan operator instance in a partition"),
COMPILER_FRAMESIZE(
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MessagingProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MessagingProperties.java
index 389ac0c..1e95065 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MessagingProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MessagingProperties.java
@@ -18,8 +18,8 @@
*/
package org.apache.asterix.common.config;
-import static org.apache.hyracks.control.common.config.OptionTypes.INTEGER_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER_BYTE_UNIT;
import static org.apache.hyracks.util.StorageUtil.StorageUnit.KILOBYTE;
import org.apache.hyracks.api.config.IOption;
@@ -31,7 +31,7 @@
public enum Option implements IOption {
MESSAGING_FRAME_SIZE(
- INTEGER_BYTE_UNIT,
+ POSITIVE_INTEGER_BYTE_UNIT,
StorageUtil.getIntSizeInBytes(4, KILOBYTE),
"The frame size to be used for NC to NC messaging"),
MESSAGING_FRAME_COUNT(POSITIVE_INTEGER, 512, "Number of reusable frames for NC to NC messaging");
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java
index 9734298..f20caf4 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java
@@ -192,7 +192,8 @@
private static int getExternalScanBufferSize(String externalScanMemorySizeParameter,
int compilerExternalScanMemorySize, SourceLocation sourceLoc) throws AsterixException {
- IOptionType<Integer> intByteParser = OptionTypes.INTEGER_BYTE_UNIT;
+ @SuppressWarnings("unchecked")
+ IOptionType<Integer> intByteParser = CompilerProperties.Option.COMPILER_EXTERNALSCANMEMORY.type();
try {
return externalScanMemorySizeParameter != null ? intByteParser.parse(externalScanMemorySizeParameter)
: compilerExternalScanMemorySize;
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ReplicationProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ReplicationProperties.java
index ada3875..90b36cf 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ReplicationProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ReplicationProperties.java
@@ -19,10 +19,10 @@
package org.apache.asterix.common.config;
import static org.apache.hyracks.control.common.config.OptionTypes.BOOLEAN;
-import static org.apache.hyracks.control.common.config.OptionTypes.INTEGER_BYTE_UNIT;
-import static org.apache.hyracks.control.common.config.OptionTypes.LONG;
import static org.apache.hyracks.control.common.config.OptionTypes.NONNEGATIVE_INTEGER;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER_BYTE_UNIT;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_LONG;
import static org.apache.hyracks.control.common.config.OptionTypes.STRING;
import java.util.concurrent.TimeUnit;
@@ -38,16 +38,16 @@
public enum Option implements IOption {
REPLICATION_LOG_BUFFER_PAGESIZE(
- INTEGER_BYTE_UNIT,
+ POSITIVE_INTEGER_BYTE_UNIT,
StorageUtil.getIntSizeInBytes(128, StorageUnit.KILOBYTE),
"The size in bytes of each log buffer page"),
REPLICATION_LOG_BUFFER_NUMPAGES(POSITIVE_INTEGER, 8, "The number of log buffer pages"),
REPLICATION_LOG_BATCHSIZE(
- INTEGER_BYTE_UNIT,
+ POSITIVE_INTEGER_BYTE_UNIT,
StorageUtil.getIntSizeInBytes(4, StorageUnit.KILOBYTE),
"The size in bytes to replicate in each batch"),
REPLICATION_TIMEOUT(
- LONG,
+ POSITIVE_LONG,
TimeUnit.SECONDS.toSeconds(120),
"The time in seconds to timeout waiting for master or replica to ack"),
REPLICATION_ENABLED(BOOLEAN, false, "Whether or not data replication is enabled"),
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
index b97ff79..5b34bc2 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
@@ -26,7 +26,10 @@
import static org.apache.hyracks.control.common.config.OptionTypes.LONG_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.NONNEGATIVE_INTEGER;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER_BYTE_UNIT;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_LONG_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.STRING;
+import static org.apache.hyracks.control.common.config.OptionTypes.getRangedDoubleType;
import static org.apache.hyracks.control.common.config.OptionTypes.getRangedIntegerType;
import static org.apache.hyracks.control.common.config.OptionTypes.getRangedLongByteUnit;
import static org.apache.hyracks.util.StorageUtil.StorageUnit.KILOBYTE;
@@ -48,17 +51,17 @@
public class StorageProperties extends AbstractProperties {
public enum Option implements IOption {
- STORAGE_BUFFERCACHE_PAGESIZE(INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
+ STORAGE_BUFFERCACHE_PAGESIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
// By default, uses 1/4 of the maximum heap size for read cache, i.e., disk buffer cache.
- STORAGE_BUFFERCACHE_SIZE(LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
+ STORAGE_BUFFERCACHE_SIZE(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
STORAGE_BUFFERCACHE_MAXOPENFILES(NONNEGATIVE_INTEGER, Integer.MAX_VALUE),
- STORAGE_MEMORYCOMPONENT_GLOBALBUDGET(LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
- STORAGE_MEMORYCOMPONENT_PAGESIZE(INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
+ STORAGE_MEMORYCOMPONENT_GLOBALBUDGET(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
+ STORAGE_MEMORYCOMPONENT_PAGESIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS(POSITIVE_INTEGER, 2),
- STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD(DOUBLE, 0.9d),
+ STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.9d),
STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES(NONNEGATIVE_INTEGER, 0),
STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE(LONG_BYTE_UNIT, 0L),
- STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE(DOUBLE, 0.01d),
+ STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.01d),
STORAGE_COMPRESSION_BLOCK(STRING, "snappy"),
STORAGE_DISK_FORCE_BYTES(LONG_BYTE_UNIT, StorageUtil.getLongSizeInBytes(16, MEGABYTE)),
STORAGE_IO_SCHEDULER(STRING, "greedy"),
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java
index f7703fb..bf1dfff 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/TransactionProperties.java
@@ -21,10 +21,10 @@
import static org.apache.asterix.common.api.IIdentifierMapper.Modifier.SINGULAR;
import static org.apache.asterix.common.utils.IdentifierUtil.dataset;
import static org.apache.hyracks.control.common.config.OptionTypes.BOOLEAN;
-import static org.apache.hyracks.control.common.config.OptionTypes.INTEGER_BYTE_UNIT;
-import static org.apache.hyracks.control.common.config.OptionTypes.LONG_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.NONNEGATIVE_INTEGER;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER_BYTE_UNIT;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_LONG_BYTE_UNIT;
import static org.apache.hyracks.util.StorageUtil.StorageUnit.MEGABYTE;
import java.util.Map;
@@ -47,15 +47,15 @@
+ "disk"),
TXN_LOG_BUFFER_NUMPAGES(POSITIVE_INTEGER, 8, "The number of pages in the transaction log tail"),
TXN_LOG_BUFFER_PAGESIZE(
- INTEGER_BYTE_UNIT,
+ POSITIVE_INTEGER_BYTE_UNIT,
StorageUtil.getIntSizeInBytes(4, MEGABYTE),
"The page size (in bytes) for transaction log buffer"),
TXN_LOG_PARTITIONSIZE(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(256L, MEGABYTE),
"The maximum size (in bytes) of each transaction log file"),
TXN_LOG_CHECKPOINT_LSNTHRESHOLD(
- INTEGER_BYTE_UNIT,
+ POSITIVE_INTEGER_BYTE_UNIT,
StorageUtil.getIntSizeInBytes(64, MEGABYTE),
"The checkpoint threshold (in terms of LSNs (log sequence numbers) that have been written to the "
+ "transaction log, i.e., the length of the transaction log) for transaction logs"),
@@ -88,7 +88,7 @@
TXN_COMMITPROFILER_ENABLED(BOOLEAN, false, "Enable output of commit profiler logs"),
TXN_COMMITPROFILER_REPORTINTERVAL(POSITIVE_INTEGER, 5, "Interval (in seconds) to report commit profiler logs"),
TXN_JOB_RECOVERY_MEMORYSIZE(
- LONG_BYTE_UNIT,
+ POSITIVE_LONG_BYTE_UNIT,
StorageUtil.getLongSizeInBytes(64L, MEGABYTE),
"The memory budget for each job (in bytes) used for recovery");
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/OptionTypes.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/OptionTypes.java
index 615fc80..b3f8c16 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/OptionTypes.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/OptionTypes.java
@@ -109,6 +109,8 @@
public static final IOptionType<Long> LONG = new LongOptionType();
+ public static final IOptionType<Long> POSITIVE_LONG = new RangedLongOptionType(1, Long.MAX_VALUE);
+
public static final IOptionType<Boolean> BOOLEAN = new IOptionType<Boolean>() {
@Override
public Boolean parse(String s) {
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/CCConfig.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/CCConfig.java
index 77feb47..26d3f17 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/CCConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/CCConfig.java
@@ -22,6 +22,7 @@
import static org.apache.hyracks.control.common.config.OptionTypes.LONG;
import static org.apache.hyracks.control.common.config.OptionTypes.NONNEGATIVE_INTEGER;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_LONG;
import static org.apache.hyracks.control.common.config.OptionTypes.SHORT;
import static org.apache.hyracks.control.common.config.OptionTypes.STRING;
@@ -61,13 +62,13 @@
CONSOLE_LISTEN_PORT(NONNEGATIVE_INTEGER, 16001),
CONSOLE_PUBLIC_ADDRESS(STRING, PUBLIC_ADDRESS),
CONSOLE_PUBLIC_PORT(NONNEGATIVE_INTEGER, CONSOLE_LISTEN_PORT),
- HEARTBEAT_PERIOD(LONG, 10000L), // TODO (mblow): add time unit
+ HEARTBEAT_PERIOD(POSITIVE_LONG, 10000L), // TODO (mblow): add time unit
HEARTBEAT_MAX_MISSES(NONNEGATIVE_INTEGER, 5),
- DEAD_NODE_SWEEP_THRESHOLD(LONG, HEARTBEAT_PERIOD),
+ DEAD_NODE_SWEEP_THRESHOLD(POSITIVE_LONG, HEARTBEAT_PERIOD),
PROFILE_DUMP_PERIOD(NONNEGATIVE_INTEGER, 0),
JOB_HISTORY_SIZE(NONNEGATIVE_INTEGER, 10),
- RESULT_TTL(LONG, 3600000L), // TODO(mblow): add time unit
- RESULT_SWEEP_THRESHOLD(LONG, 60000L), // TODO(mblow): add time unit
+ RESULT_TTL(POSITIVE_LONG, 3600000L), // TODO(mblow): add time unit
+ RESULT_SWEEP_THRESHOLD(POSITIVE_LONG, 60000L), // TODO(mblow): add time unit
@SuppressWarnings("RedundantCast") // not redundant- false positive from IDEA
ROOT_DIR(STRING, (Function<IApplicationConfig, String>) appConfig -> FileUtil.joinPath(appConfig.getString(ControllerConfig.Option.DEFAULT_DIR), "ClusterControllerService"), "<value of " + ControllerConfig.Option.DEFAULT_DIR.cmdline() + ">/ClusterControllerService"),
CLUSTER_TOPOLOGY(STRING),
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java
index dd43d44..7f9e37d 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/NCConfig.java
@@ -21,12 +21,13 @@
import static org.apache.hyracks.control.common.config.OptionTypes.BOOLEAN;
import static org.apache.hyracks.control.common.config.OptionTypes.INTEGER;
import static org.apache.hyracks.control.common.config.OptionTypes.INTEGER_BYTE_UNIT;
-import static org.apache.hyracks.control.common.config.OptionTypes.LONG;
import static org.apache.hyracks.control.common.config.OptionTypes.NONNEGATIVE_INTEGER;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_INTEGER;
+import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_LONG;
import static org.apache.hyracks.control.common.config.OptionTypes.POSITIVE_LONG_BYTE_UNIT;
import static org.apache.hyracks.control.common.config.OptionTypes.STRING;
import static org.apache.hyracks.control.common.config.OptionTypes.STRING_ARRAY;
+import static org.apache.hyracks.control.common.config.OptionTypes.getRangedIntegerType;
import static org.apache.hyracks.control.common.utils.ConfigurationUtil.JAVA_IO_TMPDIR;
import java.net.InetAddress;
@@ -52,7 +53,7 @@
CLUSTER_LISTEN_ADDRESS(STRING, ADDRESS),
CLUSTER_LISTEN_PORT(NONNEGATIVE_INTEGER, 0),
NCSERVICE_ADDRESS(STRING, PUBLIC_ADDRESS),
- NCSERVICE_PORT(INTEGER, 9090),
+ NCSERVICE_PORT(getRangedIntegerType(-1, 65535), 9090),
CLUSTER_ADDRESS(STRING, (String) null),
CLUSTER_PORT(NONNEGATIVE_INTEGER, 1099),
CLUSTER_PUBLIC_ADDRESS(STRING, PUBLIC_ADDRESS),
@@ -83,8 +84,8 @@
"<value of " + ControllerConfig.Option.DEFAULT_DIR.cmdline() + ">/iodevice"),
NET_THREAD_COUNT(POSITIVE_INTEGER, 1),
NET_BUFFER_COUNT(POSITIVE_INTEGER, 1),
- RESULT_TTL(LONG, 3600000L),
- RESULT_SWEEP_THRESHOLD(LONG, 60000L),
+ RESULT_TTL(POSITIVE_LONG, 3600000L),
+ RESULT_SWEEP_THRESHOLD(POSITIVE_LONG, 60000L),
RESULT_MANAGER_MEMORY(INTEGER_BYTE_UNIT, -1),
@SuppressWarnings("RedundantCast") // not redundant- false positive from IDEA
APP_CLASS(STRING, (String) null),
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21908?usp=email
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: Ie271e693497fdc7cbdca56feb67c77ebca8f863f
Gerrit-Change-Number: 21908
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Blow <mb...@apache.org>