You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2018/04/26 20:33:11 UTC
[20/63] [abbrv] storm git commit: Fixing stylecheck problemswith
storm-server
Fixing stylecheck problemswith storm-server
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/f1c0bcbe
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/f1c0bcbe
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/f1c0bcbe
Branch: refs/heads/master
Commit: f1c0bcbed16085699f5fa809afb7c58f9925ce68
Parents: 1d8a9b6
Author: Kishor Patil <kp...@yahoo-inc.com>
Authored: Sun Apr 22 20:53:42 2018 -0400
Committer: Kishor Patil <kp...@yahoo-inc.com>
Committed: Mon Apr 23 00:03:38 2018 -0400
----------------------------------------------------------------------
storm-server/pom.xml | 2 +-
.../java/org/apache/storm/DaemonConfig.java | 454 ++--
.../ILocalClusterTrackedTopologyAware.java | 25 +-
.../java/org/apache/storm/LocalCluster.java | 809 ++++---
.../main/java/org/apache/storm/LocalDRPC.java | 12 +-
.../java/org/apache/storm/ProcessSimulator.java | 34 +-
.../src/main/java/org/apache/storm/Testing.java | 330 ++-
.../storm/blobstore/BlobKeySequenceInfo.java | 35 +-
.../apache/storm/blobstore/BlobStoreUtils.java | 35 +-
.../storm/blobstore/BlobSynchronizer.java | 49 +-
.../storm/blobstore/FileBlobStoreImpl.java | 154 +-
.../storm/blobstore/KeySequenceNumber.java | 38 +-
.../storm/blobstore/LocalFsBlobStore.java | 84 +-
.../storm/blobstore/LocalFsBlobStoreFile.java | 36 +-
.../container/ResourceIsolationInterface.java | 18 +-
.../storm/container/cgroup/CgroupManager.java | 85 +-
.../daemon/drpc/BlockingOutstandingRequest.java | 6 +-
.../java/org/apache/storm/daemon/drpc/DRPC.java | 87 +-
.../apache/storm/daemon/drpc/DRPCThrift.java | 3 +-
.../storm/daemon/drpc/OutstandingRequest.java | 4 +-
.../storm/daemon/drpc/RequestFactory.java | 3 +-
.../storm/daemon/metrics/MetricsUtils.java | 1 -
.../reporters/ConsolePreparableReporter.java | 18 +-
.../reporters/CsvPreparableReporter.java | 18 +-
.../reporters/JmxPreparableReporter.java | 18 +-
.../metrics/reporters/PreparableReporter.java | 28 +-
.../org/apache/storm/daemon/nimbus/Nimbus.java | 2040 +++++++++---------
.../apache/storm/daemon/nimbus/TopoCache.java | 46 +-
.../storm/daemon/nimbus/TopologyActions.java | 23 +-
.../storm/daemon/nimbus/TopologyResources.java | 107 +-
.../daemon/nimbus/TopologyStateTransition.java | 23 +-
.../storm/daemon/supervisor/BasicContainer.java | 675 +++---
.../supervisor/BasicContainerLauncher.java | 32 +-
.../storm/daemon/supervisor/Container.java | 305 +--
.../daemon/supervisor/ContainerLauncher.java | 48 +-
.../supervisor/ContainerRecoveryException.java | 19 +-
.../DefaultUncaughtExceptionHandler.java | 20 +-
.../supervisor/EventManagerPushCallback.java | 19 +-
.../storm/daemon/supervisor/Killable.java | 27 +-
.../storm/daemon/supervisor/LocalContainer.java | 26 +-
.../supervisor/LocalContainerLauncher.java | 22 +-
.../daemon/supervisor/OnlyLatestExecutor.java | 9 +-
.../daemon/supervisor/ReadClusterState.java | 109 +-
.../daemon/supervisor/RunAsUserContainer.java | 25 +-
.../supervisor/RunAsUserContainerLauncher.java | 34 +-
.../apache/storm/daemon/supervisor/Slot.java | 863 ++++----
.../daemon/supervisor/StandaloneSupervisor.java | 30 +-
.../storm/daemon/supervisor/Supervisor.java | 184 +-
.../daemon/supervisor/SupervisorUtils.java | 59 +-
.../apache/storm/daemon/supervisor/UniFunc.java | 19 +-
.../timer/ReportWorkerHeartbeats.java | 19 +-
.../supervisor/timer/SupervisorHealthCheck.java | 1 -
.../supervisor/timer/SupervisorHeartbeat.java | 24 +-
.../timer/SynchronizeAssignments.java | 43 +-
.../org/apache/storm/event/EventManager.java | 19 +-
.../org/apache/storm/event/EventManagerImp.java | 30 +-
.../apache/storm/healthcheck/HealthChecker.java | 19 +-
.../apache/storm/localizer/AsyncLocalizer.java | 278 +--
.../storm/localizer/BlobChangingCallback.java | 14 +-
.../org/apache/storm/localizer/GoodToGo.java | 46 +-
.../apache/storm/localizer/LocalResource.java | 18 +-
.../storm/localizer/LocalizedResource.java | 93 +-
.../LocalizedResourceRetentionSet.java | 28 +-
.../storm/localizer/LocallyCachedBlob.java | 115 +-
.../localizer/LocallyCachedTopologyBlob.java | 164 +-
.../storm/localizer/PortAndAssignment.java | 18 +-
.../storm/logging/ThriftAccessLogger.java | 20 +-
.../logging/filters/AccessLoggingFilter.java | 21 +-
.../metric/ClusterMetricsConsumerExecutor.java | 32 +-
.../metric/LoggingClusterMetricsConsumer.java | 38 +-
.../storm/metric/StormMetricsRegistry.java | 29 +-
.../org/apache/storm/metric/api/DataPoint.java | 19 +-
.../metric/api/IClusterMetricsConsumer.java | 32 +-
.../org/apache/storm/metricstore/AggLevel.java | 21 +-
.../apache/storm/metricstore/FilterOptions.java | 79 +-
.../org/apache/storm/metricstore/Metric.java | 82 +-
.../storm/metricstore/MetricException.java | 19 +-
.../apache/storm/metricstore/MetricStore.java | 21 +-
.../storm/metricstore/MetricStoreConfig.java | 23 +-
.../metricstore/NimbusMetricProcessor.java | 21 +-
.../metricstore/WorkerMetricsProcessor.java | 19 +-
.../storm/metricstore/rocksdb/KeyType.java | 32 +-
.../metricstore/rocksdb/MetricsCleaner.java | 19 +-
.../rocksdb/ReadOnlyStringMetadataCache.java | 25 +-
.../storm/metricstore/rocksdb/RocksDbKey.java | 114 +-
.../rocksdb/RocksDbMetricsWriter.java | 35 +-
.../storm/metricstore/rocksdb/RocksDbStore.java | 50 +-
.../storm/metricstore/rocksdb/RocksDbValue.java | 25 +-
.../metricstore/rocksdb/StringMetadata.java | 19 +-
.../rocksdb/StringMetadataCache.java | 57 +-
.../rocksdb/WritableStringMetadataCache.java | 22 +-
.../nimbus/AssignmentDistributionService.java | 130 +-
.../storm/nimbus/DefaultTopologyValidator.java | 22 +-
.../org/apache/storm/nimbus/ILeaderElector.java | 21 +-
.../nimbus/ITopologyActionNotifierPlugin.java | 19 +-
.../apache/storm/nimbus/ITopologyValidator.java | 23 +-
.../IWorkerHeartbeatsRecoveryStrategy.java | 18 +-
.../storm/nimbus/LeaderListenerCallback.java | 58 +-
.../nimbus/NimbusHeartbeatsPressureTest.java | 124 +-
.../storm/nimbus/StrictTopologyValidator.java | 22 +-
...TimeOutWorkerHeartbeatsRecoveryStrategy.java | 20 +-
...WorkerHeartbeatsRecoveryStrategyFactory.java | 24 +-
.../storm/pacemaker/IServerMessageHandler.java | 19 +-
.../org/apache/storm/pacemaker/Pacemaker.java | 123 +-
.../apache/storm/pacemaker/PacemakerServer.java | 109 +-
.../pacemaker/codec/ThriftNettyServerCodec.java | 67 +-
.../org/apache/storm/scheduler/Cluster.java | 219 +-
.../org/apache/storm/scheduler/Component.java | 22 +-
.../storm/scheduler/DefaultScheduler.java | 9 +-
.../apache/storm/scheduler/EvenScheduler.java | 4 +-
.../apache/storm/scheduler/ExecutorDetails.java | 6 +-
.../org/apache/storm/scheduler/INimbus.java | 22 +-
.../org/apache/storm/scheduler/IScheduler.java | 22 +-
.../storm/scheduler/ISchedulingState.java | 118 +-
.../org/apache/storm/scheduler/ISupervisor.java | 21 +-
.../storm/scheduler/IsolationScheduler.java | 51 +-
.../storm/scheduler/SchedulerAssignment.java | 20 +-
.../scheduler/SchedulerAssignmentImpl.java | 35 +-
.../storm/scheduler/SingleTopologyCluster.java | 2 +-
.../storm/scheduler/SupervisorDetails.java | 51 +-
.../storm/scheduler/SupervisorResources.java | 4 +-
.../org/apache/storm/scheduler/Topologies.java | 30 +-
.../apache/storm/scheduler/TopologyDetails.java | 94 +-
.../scheduler/blacklist/BlacklistScheduler.java | 44 +-
.../blacklist/reporters/IReporter.java | 18 +-
.../blacklist/reporters/LogReporter.java | 21 +-
.../strategies/DefaultBlacklistStrategy.java | 29 +-
.../strategies/IBlacklistStrategy.java | 19 +-
.../scheduler/multitenant/DefaultPool.java | 363 ++--
.../storm/scheduler/multitenant/FreePool.java | 182 +-
.../scheduler/multitenant/IsolatedPool.java | 617 +++---
.../multitenant/MultitenantScheduler.java | 186 +-
.../storm/scheduler/multitenant/Node.java | 561 +++--
.../storm/scheduler/multitenant/NodePool.java | 494 +++--
.../storm/scheduler/resource/RAS_Node.java | 101 +-
.../storm/scheduler/resource/RAS_Nodes.java | 8 +-
.../resource/ResourceAwareScheduler.java | 90 +-
.../storm/scheduler/resource/ResourceUtils.java | 34 +-
.../scheduler/resource/SchedulingResult.java | 20 +-
.../scheduler/resource/SchedulingStatus.java | 20 +-
.../apache/storm/scheduler/resource/User.java | 10 +-
.../normalization/NormalizedResourceOffer.java | 9 +-
.../NormalizedResourceRequest.java | 54 +-
.../normalization/NormalizedResources.java | 66 +-
.../normalization/ResourceNameNormalizer.java | 10 +-
.../DefaultSchedulingPriorityStrategy.java | 90 +-
.../FIFOSchedulingPriorityStrategy.java | 28 +-
.../priority/ISchedulingPriorityStrategy.java | 19 +-
.../scheduling/BaseResourceAwareStrategy.java | 231 +-
.../scheduling/ConstraintSolverStrategy.java | 709 +++---
.../DefaultResourceAwareStrategy.java | 93 +-
.../GenericResourceAwareStrategy.java | 129 +-
.../strategies/scheduling/IStrategy.java | 23 +-
.../utils/ArtifactoryConfigLoader.java | 115 +-
.../utils/ArtifactoryConfigLoaderFactory.java | 18 +-
.../utils/ConfigLoaderFactoryService.java | 18 +-
.../storm/scheduler/utils/FileConfigLoader.java | 19 +-
.../utils/FileConfigLoaderFactory.java | 18 +-
.../storm/scheduler/utils/IConfigLoader.java | 20 +-
.../scheduler/utils/IConfigLoaderFactory.java | 18 +-
.../auth/workertoken/WorkerTokenManager.java | 64 +-
.../storm/testing/CompleteTopologyParam.java | 146 +-
.../storm/testing/InProcessZookeeper.java | 27 +-
.../java/org/apache/storm/testing/TestJob.java | 31 +-
.../apache/storm/testing/TrackedTopology.java | 164 +-
.../apache/storm/utils/BufferInputStream.java | 18 +-
.../java/org/apache/storm/utils/LruMap.java | 20 +-
.../apache/storm/utils/ServerConfigUtils.java | 16 +-
.../org/apache/storm/utils/ServerUtils.java | 201 +-
.../storm/utils/StormCommonInstaller.java | 20 +-
.../apache/storm/zookeeper/AclEnforcement.java | 42 +-
.../storm/zookeeper/LeaderElectorImp.java | 30 +-
.../org/apache/storm/zookeeper/Zookeeper.java | 54 +-
.../java/org/apache/storm/DaemonConfigTest.java | 42 +-
.../java/org/apache/storm/LocalStateTest.java | 38 +-
.../java/org/apache/storm/MessagingTest.java | 38 +-
.../java/org/apache/storm/PacemakerTest.java | 25 +-
.../test/java/org/apache/storm/TestCgroups.java | 51 +-
.../apache/storm/TestDaemonConfigValidate.java | 24 +-
.../java/org/apache/storm/TestRebalance.java | 47 +-
.../test/java/org/apache/storm/TestingTest.java | 50 +-
.../java/org/apache/storm/TickTupleTest.java | 41 +-
.../apache/storm/blobstore/BlobStoreTest.java | 798 ++++---
.../storm/blobstore/BlobStoreUtilsTest.java | 34 +-
.../storm/blobstore/BlobSynchronizerTest.java | 201 +-
.../blobstore/MockZookeeperClientBuilder.java | 30 +-
.../org/apache/storm/daemon/drpc/DRPCTest.java | 60 +-
.../apache/storm/daemon/nimbus/NimbusTest.java | 3 +-
.../daemon/supervisor/BasicContainerTest.java | 776 +++----
.../storm/daemon/supervisor/ContainerTest.java | 231 +-
.../storm/daemon/supervisor/SlotTest.java | 259 +--
.../storm/localizer/AsyncLocalizerTest.java | 342 ++-
.../LocalizedResourceRetentionSetTest.java | 31 +-
.../ClusterMetricsConsumerExecutorTest.java | 73 +-
.../apache/storm/nimbus/LocalNimbusTest.java | 36 +-
.../org/apache/storm/scheduler/ClusterTest.java | 24 +-
.../resource/TestResourceAwareScheduler.java | 99 +-
.../storm/scheduler/resource/TestUser.java | 40 +-
.../TestUtilsForResourceAwareScheduler.java | 88 +-
.../utils/ArtifactoryConfigLoaderTest.java | 114 +-
.../scheduler/utils/FileConfigLoaderTest.java | 29 +-
.../apache/storm/security/auth/AuthTest.java | 356 +--
202 files changed, 9484 insertions(+), 10315 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/f1c0bcbe/storm-server/pom.xml
----------------------------------------------------------------------
diff --git a/storm-server/pom.xml b/storm-server/pom.xml
index 9ff7f1d..236b4f1 100644
--- a/storm-server/pom.xml
+++ b/storm-server/pom.xml
@@ -138,7 +138,7 @@
<artifactId>maven-checkstyle-plugin</artifactId>
<!--Note - the version would be inherited-->
<configuration>
- <maxAllowedViolations>2585</maxAllowedViolations>
+ <maxAllowedViolations>783</maxAllowedViolations>
</configuration>
</plugin>
<plugin>
http://git-wip-us.apache.org/repos/asf/storm/blob/f1c0bcbe/storm-server/src/main/java/org/apache/storm/DaemonConfig.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/DaemonConfig.java b/storm-server/src/main/java/org/apache/storm/DaemonConfig.java
index be26ece..8fda533 100644
--- a/storm-server/src/main/java/org/apache/storm/DaemonConfig.java
+++ b/storm-server/src/main/java/org/apache/storm/DaemonConfig.java
@@ -18,23 +18,8 @@
package org.apache.storm;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isBoolean;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isInteger;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isListEntryCustom;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isPositiveNumber;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isString;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isStringList;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isStringOrStringList;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isNumber;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isImplementationOfClass;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isMapEntryType;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isNoDuplicateInList;
-import static org.apache.storm.validation.ConfigValidationAnnotations.isMapEntryCustom;
-import static org.apache.storm.validation.ConfigValidationAnnotations.NotNull;
-
import java.util.ArrayList;
import java.util.Map;
-
import org.apache.storm.container.ResourceIsolationInterface;
import org.apache.storm.nimbus.ITopologyActionNotifierPlugin;
import org.apache.storm.scheduler.blacklist.reporters.IReporter;
@@ -45,11 +30,24 @@ import org.apache.storm.security.auth.IAuthorizer;
import org.apache.storm.validation.ConfigValidation;
import org.apache.storm.validation.Validated;
+import static org.apache.storm.validation.ConfigValidationAnnotations.NotNull;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isBoolean;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isImplementationOfClass;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isInteger;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isListEntryCustom;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isMapEntryCustom;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isMapEntryType;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isNoDuplicateInList;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isNumber;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isPositiveNumber;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isString;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isStringList;
+import static org.apache.storm.validation.ConfigValidationAnnotations.isStringOrStringList;
+
/**
- * Storm configs are specified as a plain old map. This class provides constants for
- * all the configurations possible on a Storm cluster. Each constant is paired with an annotation
- * that defines the validity criterion of the corresponding field. Default
- * values for these configs can be found in defaults.yaml.
+ * Storm configs are specified as a plain old map. This class provides constants for all the configurations possible on a Storm cluster.
+ * Each constant is paired with an annotation that defines the validity criterion of the corresponding field. Default values for these
+ * configs can be found in defaults.yaml.
*
* This class extends {@link org.apache.storm.Config} for supporting Storm Daemons.
*/
@@ -62,8 +60,8 @@ public class DaemonConfig implements Validated {
public static final String STORM_NETTY_FLUSH_CHECK_INTERVAL_MS = "storm.messaging.netty.flush.check.interval.ms";
/**
- * A list of daemon metrics reporter plugin class names.
- * These plugins must implement {@link org.apache.storm.daemon.metrics.reporters.PreparableReporter} interface.
+ * A list of daemon metrics reporter plugin class names. These plugins must implement {@link
+ * org.apache.storm.daemon.metrics.reporters.PreparableReporter} interface.
*/
@isStringList
public static final String STORM_DAEMON_METRICS_REPORTER_PLUGINS = "storm.daemon.metrics.reporter.plugins";
@@ -81,9 +79,8 @@ public class DaemonConfig implements Validated {
public static final String STORM_DAEMON_METRICS_REPORTER_CSV_LOG_DIR = "storm.daemon.metrics.reporter.csv.log.dir";
/**
- * A directory that holds configuration files for log4j2.
- * It can be either a relative or an absolute directory.
- * If relative, it is relative to the storm's home directory.
+ * A directory that holds configuration files for log4j2. It can be either a relative or an absolute directory. If relative, it is
+ * relative to the storm's home directory.
*/
@isString
public static final String STORM_LOG4J2_CONF_DIR = "storm.log4j2.conf.dir";
@@ -129,8 +126,8 @@ public class DaemonConfig implements Validated {
public static final String BLACKLIST_SCHEDULER_STRATEGY = "blacklist.scheduler.strategy";
/**
- * Whether we want to display all the resource capacity and scheduled usage on the UI page.
- * You MUST have this variable set if you are using any kind of resource-related scheduler.
+ * Whether we want to display all the resource capacity and scheduled usage on the UI page. You MUST have this variable set if you are
+ * using any kind of resource-related scheduler.
* <p/>
* If this is not set, we will not display resource capacity and usage on the UI.
*/
@@ -144,30 +141,27 @@ public class DaemonConfig implements Validated {
public static final String STORM_HEALTH_CHECK_DIR = "storm.health.check.dir";
/**
- * The time to allow any given healthcheck script to run before it
- * is marked failed due to timeout.
+ * The time to allow any given healthcheck script to run before it is marked failed due to timeout.
*/
@isNumber
public static final String STORM_HEALTH_CHECK_TIMEOUT_MS = "storm.health.check.timeout.ms";
/**
- * This is the user that the Nimbus daemon process is running as. May be used when security
- * is enabled to authorize actions in the cluster.
+ * This is the user that the Nimbus daemon process is running as. May be used when security is enabled to authorize actions in the
+ * cluster.
*/
@isString
public static final String NIMBUS_DAEMON_USER = "nimbus.daemon.user";
/**
- * This parameter is used by the storm-deploy project to configure the
- * jvm options for the nimbus daemon.
+ * This parameter is used by the storm-deploy project to configure the jvm options for the nimbus daemon.
*/
@isStringOrStringList
public static final String NIMBUS_CHILDOPTS = "nimbus.childopts";
/**
- * How long without heartbeating a task can go before nimbus will consider the
- * task dead and reassign it to another location.
+ * How long without heartbeating a task can go before nimbus will consider the task dead and reassign it to another location.
*/
@isInteger
@isPositiveNumber
@@ -175,10 +169,8 @@ public class DaemonConfig implements Validated {
/**
- * How often nimbus should wake up to check heartbeats and do reassignments. Note
- * that if a machine ever goes down Nimbus will immediately wake up and take action.
- * This parameter is for checking for failures when there's no explicit event like that
- * occurring.
+ * How often nimbus should wake up to check heartbeats and do reassignments. Note that if a machine ever goes down Nimbus will
+ * immediately wake up and take action. This parameter is for checking for failures when there's no explicit event like that occurring.
*/
@isInteger
@isPositiveNumber
@@ -186,6 +178,7 @@ public class DaemonConfig implements Validated {
/**
* How often nimbus should wake the cleanup thread to clean the inbox.
+ *
* @see #NIMBUS_INBOX_JAR_EXPIRATION_SECS
*/
@isInteger
@@ -195,26 +188,25 @@ public class DaemonConfig implements Validated {
/**
* The length of time a jar file lives in the inbox before being deleted by the cleanup thread.
*
- * Probably keep this value greater than or equal to NIMBUS_CLEANUP_INBOX_JAR_EXPIRATION_SECS.
- * Note that the time it takes to delete an inbox jar file is going to be somewhat more than
- * NIMBUS_CLEANUP_INBOX_JAR_EXPIRATION_SECS (depending on how often NIMBUS_CLEANUP_FREQ_SECS
- * is set to).
+ * Probably keep this value greater than or equal to NIMBUS_CLEANUP_INBOX_JAR_EXPIRATION_SECS. Note that the time it takes to delete an
+ * inbox jar file is going to be somewhat more than NIMBUS_CLEANUP_INBOX_JAR_EXPIRATION_SECS (depending on how often
+ * NIMBUS_CLEANUP_FREQ_SECS is set to).
+ *
* @see #NIMBUS_CLEANUP_INBOX_FREQ_SECS
*/
@isInteger
public static final String NIMBUS_INBOX_JAR_EXPIRATION_SECS = "nimbus.inbox.jar.expiration.secs";
/**
- * How long before a supervisor can go without heartbeating before nimbus considers it dead
- * and stops assigning new work to it.
+ * How long before a supervisor can go without heartbeating before nimbus considers it dead and stops assigning new work to it.
*/
@isInteger
@isPositiveNumber
public static final String NIMBUS_SUPERVISOR_TIMEOUT_SECS = "nimbus.supervisor.timeout.secs";
/**
- * A special timeout used when a task is initially launched. During launch, this is the timeout
- * used until the first heartbeat, overriding nimbus.task.timeout.secs.
+ * A special timeout used when a task is initially launched. During launch, this is the timeout used until the first heartbeat,
+ * overriding nimbus.task.timeout.secs.
*
* <p>A separate timeout exists for launch because there can be quite a bit of overhead
* to launching new JVM's and configuring them.</p>
@@ -224,16 +216,15 @@ public class DaemonConfig implements Validated {
public static final String NIMBUS_TASK_LAUNCH_SECS = "nimbus.task.launch.secs";
/**
- * During upload/download with the master, how long an upload or download connection is idle
- * before nimbus considers it dead and drops the connection.
+ * During upload/download with the master, how long an upload or download connection is idle before nimbus considers it dead and drops
+ * the connection.
*/
@isInteger
public static final String NIMBUS_FILE_COPY_EXPIRATION_SECS = "nimbus.file.copy.expiration.secs";
/**
- * A custom class that implements ITopologyValidator that is run whenever a
- * topology is submitted. Can be used to provide business-specific logic for
- * whether topologies are allowed to run or not.
+ * A custom class that implements ITopologyValidator that is run whenever a topology is submitted. Can be used to provide
+ * business-specific logic for whether topologies are allowed to run or not.
*/
@isString
public static final String NIMBUS_TOPOLOGY_VALIDATOR = "nimbus.topology.validator";
@@ -314,8 +305,8 @@ public class DaemonConfig implements Validated {
public static final String UI_CENTRAL_LOGGING_URL = "ui.central.logging.url";
/**
- * Storm UI drop-down pagination value. Set ui.pagination to be a positive integer
- * or -1 (displays all entries). Valid values: -1, 10, 20, 25 etc.
+ * Storm UI drop-down pagination value. Set ui.pagination to be a positive integer or -1 (displays all entries). Valid values: -1, 10,
+ * 20, 25 etc.
*/
@isInteger
public static final String UI_PAGINATION = "ui.pagination";
@@ -379,8 +370,8 @@ public class DaemonConfig implements Validated {
public static final String LOGVIEWER_HTTPS_KEYSTORE_PASSWORD = "logviewer.https.keystore.password";
/**
- * Type of the keystore for HTTPS for Storm Logviewer.
- * see http://docs.oracle.com/javase/8/docs/api/java/security/KeyStore.html for more details.
+ * Type of the keystore for HTTPS for Storm Logviewer. see http://docs.oracle.com/javase/8/docs/api/java/security/KeyStore.html for more
+ * details.
*/
@isString
public static final String LOGVIEWER_HTTPS_KEYSTORE_TYPE = "logviewer.https.keystore.type";
@@ -404,8 +395,8 @@ public class DaemonConfig implements Validated {
public static final String LOGVIEWER_HTTPS_TRUSTSTORE_PASSWORD = "logviewer.https.truststore.password";
/**
- * Type of the truststore for HTTPS for Storm Logviewer.
- * see http://docs.oracle.com/javase/8/docs/api/java/security/Truststore.html for more details.
+ * Type of the truststore for HTTPS for Storm Logviewer. see http://docs.oracle.com/javase/8/docs/api/java/security/Truststore.html for
+ * more details.
*/
@isString
public static final String LOGVIEWER_HTTPS_TRUSTSTORE_TYPE = "logviewer.https.truststore.type";
@@ -482,8 +473,9 @@ public class DaemonConfig implements Validated {
public static final String UI_HTTPS_KEYSTORE_PASSWORD = "ui.https.keystore.password";
/**
- * Type of keystore used by Storm UI for setting up HTTPS (SSL).
- * see http://docs.oracle.com/javase/7/docs/api/java/security/KeyStore.html for more details.
+ * Type of keystore used by Storm UI for setting up HTTPS (SSL). see http://docs.oracle.com/javase/7/docs/api/java/security/KeyStore
+ * .html
+ * for more details.
*/
@isString
public static final String UI_HTTPS_KEYSTORE_TYPE = "ui.https.keystore.type";
@@ -507,8 +499,9 @@ public class DaemonConfig implements Validated {
public static final String UI_HTTPS_TRUSTSTORE_PASSWORD = "ui.https.truststore.password";
/**
- * Type of truststore used by Storm UI for setting up HTTPS (SSL).
- * see http://docs.oracle.com/javase/7/docs/api/java/security/KeyStore.html for more details.
+ * Type of truststore used by Storm UI for setting up HTTPS (SSL). see http://docs.oracle
+ * .com/javase/7/docs/api/java/security/KeyStore.html
+ * for more details.
*/
@isString
public static final String UI_HTTPS_TRUSTSTORE_TYPE = "ui.https.truststore.type";
@@ -523,17 +516,15 @@ public class DaemonConfig implements Validated {
public static final String UI_HTTPS_NEED_CLIENT_AUTH = "ui.https.need.client.auth";
/**
- * The maximum number of threads that should be used by the Pacemaker.
- * When Pacemaker gets loaded it will spawn new threads, up to
- * this many total, to handle the load.
+ * The maximum number of threads that should be used by the Pacemaker. When Pacemaker gets loaded it will spawn new threads, up to this
+ * many total, to handle the load.
*/
@isNumber
@isPositiveNumber
public static final String PACEMAKER_MAX_THREADS = "pacemaker.max.threads";
/**
- * This parameter is used by the storm-deploy project to configure the
- * jvm options for the pacemaker daemon.
+ * This parameter is used by the storm-deploy project to configure the jvm options for the pacemaker daemon.
*/
@isStringOrStringList
public static final String PACEMAKER_CHILDOPTS = "pacemaker.childopts";
@@ -564,8 +555,9 @@ public class DaemonConfig implements Validated {
public static final String DRPC_HTTPS_KEYSTORE_PASSWORD = "drpc.https.keystore.password";
/**
- * Type of keystore used by Storm DRPC for setting up HTTPS (SSL).
- * see http://docs.oracle.com/javase/7/docs/api/java/security/KeyStore.html for more details.
+ * Type of keystore used by Storm DRPC for setting up HTTPS (SSL). see http://docs.oracle
+ * .com/javase/7/docs/api/java/security/KeyStore.html
+ * for more details.
*/
@isString
public static final String DRPC_HTTPS_KEYSTORE_TYPE = "drpc.https.keystore.type";
@@ -589,8 +581,9 @@ public class DaemonConfig implements Validated {
public static final String DRPC_HTTPS_TRUSTSTORE_PASSWORD = "drpc.https.truststore.password";
/**
- * Type of truststore used by Storm DRPC for setting up HTTPS (SSL).
- * see http://docs.oracle.com/javase/7/docs/api/java/security/KeyStore.html for more details.
+ * Type of truststore used by Storm DRPC for setting up HTTPS (SSL). see http://docs.oracle
+ * .com/javase/7/docs/api/java/security/KeyStore.html
+ * for more details.
*/
@isString
public static final String DRPC_HTTPS_TRUSTSTORE_TYPE = "drpc.https.truststore.type";
@@ -611,15 +604,14 @@ public class DaemonConfig implements Validated {
public static final String DRPC_AUTHORIZER = "drpc.authorizer";
/**
- * The timeout on DRPC requests within the DRPC server. Defaults to 10 minutes. Note that requests can also
- * timeout based on the socket timeout on the DRPC client, and separately based on the topology message
- * timeout for the topology implementing the DRPC function.
+ * The timeout on DRPC requests within the DRPC server. Defaults to 10 minutes. Note that requests can also timeout based on the socket
+ * timeout on the DRPC client, and separately based on the topology message timeout for the topology implementing the DRPC function.
*/
@isInteger
@isPositiveNumber
@NotNull
- public static final String DRPC_REQUEST_TIMEOUT_SECS = "drpc.request.timeout.secs";
+ public static final String DRPC_REQUEST_TIMEOUT_SECS = "drpc.request.timeout.secs";
/**
* Childopts for Storm DRPC Java process.
@@ -634,13 +626,12 @@ public class DaemonConfig implements Validated {
public static final String SUPERVISOR_SCHEDULER_META = "supervisor.scheduler.meta";
/**
- * A list of ports that can run workers on this supervisor. Each worker uses one port, and
- * the supervisor will only run one worker per port. Use this configuration to tune
- * how many workers run on each machine.
+ * A list of ports that can run workers on this supervisor. Each worker uses one port, and the supervisor will only run one worker per
+ * port. Use this configuration to tune how many workers run on each machine.
*/
@isNoDuplicateInList
@NotNull
- @isListEntryCustom(entryValidatorClasses = {ConfigValidation.IntegerValidator.class,ConfigValidation.PositiveNumberValidator.class})
+ @isListEntryCustom(entryValidatorClasses = { ConfigValidation.IntegerValidator.class, ConfigValidation.PositiveNumberValidator.class })
public static final String SUPERVISOR_SLOTS_PORTS = "supervisor.slots.ports";
/**
@@ -650,16 +641,14 @@ public class DaemonConfig implements Validated {
public static final String SUPERVISOR_BLOBSTORE = "supervisor.blobstore.class";
/**
- * The distributed cache target size in MB. This is a soft limit to the size of the distributed
- * cache contents.
+ * The distributed cache target size in MB. This is a soft limit to the size of the distributed cache contents.
*/
@isPositiveNumber
@isInteger
public static final String SUPERVISOR_LOCALIZER_CACHE_TARGET_SIZE_MB = "supervisor.localizer.cache.target.size.mb";
/**
- * The distributed cache cleanup interval. Controls how often it scans to attempt to cleanup
- * anything over the cache target size.
+ * The distributed cache cleanup interval. Controls how often it scans to attempt to cleanup anything over the cache target size.
*/
@isPositiveNumber
@isInteger
@@ -686,9 +675,8 @@ public class DaemonConfig implements Validated {
public static final String NIMBUS_BLOBSTORE = "nimbus.blobstore.class";
/**
- * During operations with the blob store, via master, how long a connection
- * is idle before nimbus considers it dead and drops the session and any
- * associated connections.
+ * During operations with the blob store, via master, how long a connection is idle before nimbus considers it dead and drops the
+ * session and any associated connections.
*/
@isPositiveNumber
@isInteger
@@ -708,8 +696,7 @@ public class DaemonConfig implements Validated {
public static final String DRPC_HTTP_FILTER = "drpc.http.filter";
/**
- * Initialization parameters for the javax.servlet.Filter of the DRPC HTTP
- * service.
+ * Initialization parameters for the javax.servlet.Filter of the DRPC HTTP service.
*/
@isMapEntryType(keyType = String.class, valueType = String.class)
public static final String DRPC_HTTP_FILTER_PARAMS = "drpc.http.filter.params";
@@ -722,8 +709,7 @@ public class DaemonConfig implements Validated {
public static final String NIMBUS_EXECUTORS_PER_TOPOLOGY = "nimbus.executors.perTopology";
/**
- * This parameter is used by the storm-deploy project to configure the
- * jvm options for the supervisor daemon.
+ * This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon.
*/
@isStringOrStringList
public static final String SUPERVISOR_CHILDOPTS = "supervisor.childopts";
@@ -736,10 +722,9 @@ public class DaemonConfig implements Validated {
public static final String SUPERVISOR_WORKER_SHUTDOWN_SLEEP_SECS = "supervisor.worker.shutdown.sleep.secs";
/**
- * How long a worker can go without heartbeating during the initial launch before
- * the supervisor tries to restart the worker process. This value override
- * supervisor.worker.timeout.secs during launch because there is additional
- * overhead to starting and configuring the JVM on launch.
+ * How long a worker can go without heartbeating during the initial launch before the supervisor tries to restart the worker process.
+ * This value override supervisor.worker.timeout.secs during launch because there is additional overhead to starting and configuring the
+ * JVM on launch.
*/
@isInteger
@isPositiveNumber
@@ -747,9 +732,8 @@ public class DaemonConfig implements Validated {
public static final String SUPERVISOR_WORKER_START_TIMEOUT_SECS = "supervisor.worker.start.timeout.secs";
/**
- * Whether or not the supervisor should launch workers assigned to it. Defaults
- * to true -- and you should probably never change this value. This configuration
- * is used in the Storm unit tests.
+ * Whether or not the supervisor should launch workers assigned to it. Defaults to true -- and you should probably never change this
+ * value. This configuration is used in the Storm unit tests.
*/
@isBoolean
public static final String SUPERVISOR_ENABLE = "supervisor.enable";
@@ -762,16 +746,13 @@ public class DaemonConfig implements Validated {
/**
- * How often the supervisor checks the worker heartbeats to see if any of them
- * need to be restarted.
+ * How often the supervisor checks the worker heartbeats to see if any of them need to be restarted.
*/
@isInteger
@isPositiveNumber
public static final String SUPERVISOR_MONITOR_FREQUENCY_SECS = "supervisor.monitor.frequency.secs";
-
-
/**
* The jvm profiler opts provided to workers launched by this supervisor.
*/
@@ -779,29 +760,25 @@ public class DaemonConfig implements Validated {
public static final String WORKER_PROFILER_CHILDOPTS = "worker.profiler.childopts";
/**
- * Enable profiling of worker JVMs using Oracle's Java Flight Recorder.
- * Unlocking commercial features requires a special license from Oracle.
- * See http://www.oracle.com/technetwork/java/javase/terms/products/index.html
+ * Enable profiling of worker JVMs using Oracle's Java Flight Recorder. Unlocking commercial features requires a special license from
+ * Oracle. See http://www.oracle.com/technetwork/java/javase/terms/products/index.html
*/
@isBoolean
public static final String WORKER_PROFILER_ENABLED = "worker.profiler.enabled";
/**
- * The command launched supervisor with worker arguments
- * pid, action and [target_directory]
- * Where action is - start profile, stop profile, jstack, heapdump and kill against pid.
- *
+ * The command launched supervisor with worker arguments pid, action and [target_directory] Where action is - start profile, stop
+ * profile, jstack, heapdump and kill against pid.
*/
@isString
public static final String WORKER_PROFILER_COMMAND = "worker.profiler.command";
/**
- * A list of classes implementing IClusterMetricsConsumer (See storm.yaml.example for exact config format).
- * Each listed class will be routed cluster related metrics data.
- * Each listed class maps 1:1 to a ClusterMetricsConsumerExecutor and they're executed in Nimbus.
+ * A list of classes implementing IClusterMetricsConsumer (See storm.yaml.example for exact config format). Each listed class will be
+ * routed cluster related metrics data. Each listed class maps 1:1 to a ClusterMetricsConsumerExecutor and they're executed in Nimbus.
* Only consumers which run in leader Nimbus receives metrics data.
*/
- @isListEntryCustom(entryValidatorClasses = {ConfigValidation.ClusterMetricRegistryValidator.class})
+ @isListEntryCustom(entryValidatorClasses = { ConfigValidation.ClusterMetricRegistryValidator.class })
public static final String STORM_CLUSTER_METRICS_CONSUMER_REGISTER = "storm.cluster.metrics.consumer.register";
/**
@@ -810,7 +787,7 @@ public class DaemonConfig implements Validated {
@NotNull
@isPositiveNumber
public static final String STORM_CLUSTER_METRICS_CONSUMER_PUBLISH_INTERVAL_SECS =
- "storm.cluster.metrics.consumer.publish.interval.secs";
+ "storm.cluster.metrics.consumer.publish.interval.secs";
/**
* Enables user-first classpath. See topology.classpath.beginning.
@@ -819,75 +796,72 @@ public class DaemonConfig implements Validated {
public static final String STORM_TOPOLOGY_CLASSPATH_BEGINNING_ENABLED = "storm.topology.classpath.beginning.enabled";
/**
- * This value is passed to spawned JVMs (e.g., Nimbus, Supervisor, and Workers)
- * for the java.library.path value. java.library.path tells the JVM where
- * to look for native libraries. It is necessary to set this config correctly since
- * Storm uses the ZeroMQ and JZMQ native libs.
+ * This value is passed to spawned JVMs (e.g., Nimbus, Supervisor, and Workers) for the java.library.path value. java.library.path tells
+ * the JVM where to look for native libraries. It is necessary to set this config correctly since Storm uses the ZeroMQ and JZMQ native
+ * libs.
*/
@isString
public static final String JAVA_LIBRARY_PATH = "java.library.path";
/**
- * The path to use as the zookeeper dir when running a zookeeper server via
- * "storm dev-zookeeper". This zookeeper instance is only intended for development;
- * it is not a production grade zookeeper setup.
+ * The path to use as the zookeeper dir when running a zookeeper server via "storm dev-zookeeper". This zookeeper instance is only
+ * intended for development; it is not a production grade zookeeper setup.
*/
@isString
public static final String DEV_ZOOKEEPER_PATH = "dev.zookeeper.path";
/**
- * A map from topology name to the number of machines that should be dedicated for that topology. Set storm.scheduler
- * to org.apache.storm.scheduler.IsolationScheduler to make use of the isolation scheduler.
+ * A map from topology name to the number of machines that should be dedicated for that topology. Set storm.scheduler to
+ * org.apache.storm.scheduler.IsolationScheduler to make use of the isolation scheduler.
*/
@isMapEntryType(keyType = String.class, valueType = Number.class)
public static final String ISOLATION_SCHEDULER_MACHINES = "isolation.scheduler.machines";
/**
- * For ArtifactoryConfigLoader, this can either be a reference to an individual file in Artifactory or to a directory.
- * If it is a directory, the file with the largest lexographic name will be returned. Users need to add "artifactory+"
- * to the beginning of the real URI to use ArtifactoryConfigLoader.
- * For FileConfigLoader, this is the URI pointing to a file.
+ * For ArtifactoryConfigLoader, this can either be a reference to an individual file in Artifactory or to a directory. If it is a
+ * directory, the file with the largest lexographic name will be returned. Users need to add "artifactory+" to the beginning of the real
+ * URI to use ArtifactoryConfigLoader. For FileConfigLoader, this is the URI pointing to a file.
*/
@isString
public static final String SCHEDULER_CONFIG_LOADER_URI = "scheduler.config.loader.uri";
/**
- * It is the frequency at which the plugin will call out to artifactory instead of returning the most recently cached result.
- * Currently it's only used in ArtifactoryConfigLoader.
+ * It is the frequency at which the plugin will call out to artifactory instead of returning the most recently cached result. Currently
+ * it's only used in ArtifactoryConfigLoader.
*/
@isInteger
@isPositiveNumber
public static final String SCHEDULER_CONFIG_LOADER_POLLTIME_SECS = "scheduler.config.loader.polltime.secs";
/**
- * It is the amount of time an http connection to the artifactory server will wait before timing out.
- * Currently it's only used in ArtifactoryConfigLoader.
+ * It is the amount of time an http connection to the artifactory server will wait before timing out. Currently it's only used in
+ * ArtifactoryConfigLoader.
*/
@isInteger
@isPositiveNumber
public static final String SCHEDULER_CONFIG_LOADER_TIMEOUT_SECS = "scheduler.config.loader.timeout.secs";
/**
- * It is the part of the uri, configurable in Artifactory, which represents the top of the directory tree.
- * It's only used in ArtifactoryConfigLoader.
+ * It is the part of the uri, configurable in Artifactory, which represents the top of the directory tree. It's only used in
+ * ArtifactoryConfigLoader.
*/
@isString
- public static final String SCHEDULER_CONFIG_LOADER_ARTIFACTORY_BASE_DIRECTORY = "scheduler.config.loader.artifactory.base.directory";
+ public static final String SCHEDULER_CONFIG_LOADER_ARTIFACTORY_BASE_DIRECTORY = "scheduler.config.loader.artifactory.base.directory";
/**
- * A map from the user name to the number of machines that should that user is allowed to use. Set storm.scheduler
- * to org.apache.storm.scheduler.multitenant.MultitenantScheduler
+ * A map from the user name to the number of machines that should that user is allowed to use. Set storm.scheduler to
+ * org.apache.storm.scheduler.multitenant.MultitenantScheduler
*/
@isMapEntryType(keyType = String.class, valueType = Number.class)
public static final String MULTITENANT_SCHEDULER_USER_POOLS = "multitenant.scheduler.user.pools";
/**
- * A map of users to another map of the resource guarantees of the user. Used by Resource Aware Scheduler to ensure
- * per user resource guarantees.
+ * A map of users to another map of the resource guarantees of the user. Used by Resource Aware Scheduler to ensure per user resource
+ * guarantees.
*/
@isMapEntryCustom(
- keyValidatorClasses = {ConfigValidation.StringValidator.class},
- valueValidatorClasses = {ConfigValidation.UserResourcePoolEntryValidator.class})
+ keyValidatorClasses = { ConfigValidation.StringValidator.class },
+ valueValidatorClasses = { ConfigValidation.UserResourcePoolEntryValidator.class })
public static final String RESOURCE_AWARE_SCHEDULER_USER_POOLS = "resource.aware.scheduler.user.pools";
/**
@@ -934,192 +908,162 @@ public class DaemonConfig implements Validated {
public static final String STORM_CGROUP_HIERARCHY_NAME = "storm.cgroup.hierarchy.name";
/**
- * flag to determine whether to use a resource isolation plugin
- * Also determines whether the unit tests for cgroup runs.
- * If storm.resource.isolation.plugin.enable is set to false the unit tests for cgroups will not run
+ * flag to determine whether to use a resource isolation plugin Also determines whether the unit tests for cgroup runs. If
+ * storm.resource.isolation.plugin.enable is set to false the unit tests for cgroups will not run
*/
@isBoolean
public static final String STORM_RESOURCE_ISOLATION_PLUGIN_ENABLE = "storm.resource.isolation.plugin.enable";
+ /**
+ * Class implementing MetricStore. Runs on Nimbus.
+ */
+ @NotNull
+ @isString
+ // Validating class implementation could fail on non-Nimbus Daemons. Nimbus will catch the class not found on startup
+ // and log an error message, so just validating this as a String for now.
+ public static final String STORM_METRIC_STORE_CLASS = "storm.metricstore.class";
+ /**
+ * Class implementing WorkerMetricsProcessor. Runs on Supervisors.
+ */
+ @NotNull
+ @isString
+ public static final String STORM_METRIC_PROCESSOR_CLASS = "storm.metricprocessor.class";
+ /**
+ * RocksDB file location. This setting is specific to the org.apache.storm.metricstore.rocksdb.RocksDbStore implementation for the
+ * storm.metricstore.class.
+ */
+ @isString
+ public static final String STORM_ROCKSDB_LOCATION = "storm.metricstore.rocksdb.location";
+ /**
+ * RocksDB create if missing flag. This setting is specific to the org.apache.storm.metricstore.rocksdb.RocksDbStore implementation for
+ * the storm.metricstore.class.
+ */
+ @isBoolean
+ public static final String STORM_ROCKSDB_CREATE_IF_MISSING = "storm.metricstore.rocksdb.create_if_missing";
+ /**
+ * RocksDB metadata cache capacity. This setting is specific to the org.apache.storm.metricstore.rocksdb.RocksDbStore implementation for
+ * the storm.metricstore.class.
+ */
+ @isInteger
+ public static final String STORM_ROCKSDB_METADATA_STRING_CACHE_CAPACITY = "storm.metricstore.rocksdb.metadata_string_cache_capacity";
+ /**
+ * RocksDB setting for length of metric retention. This setting is specific to the org.apache.storm.metricstore.rocksdb.RocksDbStore
+ * implementation for the storm.metricstore.class.
+ */
+ @isInteger
+ public static final String STORM_ROCKSDB_METRIC_RETENTION_HOURS = "storm.metricstore.rocksdb.retention_hours";
+ // Configs for memory enforcement done by the supervisor (not cgroups directly)
+ /**
+ * RocksDB setting for period of metric deletion thread. This setting is specific to the org.apache.storm.metricstore.rocksdb
+ * .RocksDbStore
+ * implementation for the storm.metricstore.class.
+ */
+ @isInteger
+ public static final String STORM_ROCKSDB_METRIC_DELETION_PERIOD_HOURS = "storm.metricstore.rocksdb.deletion_period_hours";
+ /**
+ * In nimbus on startup check if all of the zookeeper ACLs are correct before starting. If not don't start nimbus.
+ */
+ @isBoolean
+ public static final String STORM_NIMBUS_ZOOKEEPER_ACLS_CHECK = "storm.nimbus.zookeeper.acls.check";
+ /**
+ * In nimbus on startup check if all of the zookeeper ACLs are correct before starting. If not do your best to fix them before nimbus
+ * starts, if it cannot fix them nimbus will not start. This overrides any value set for storm.nimbus.zookeeper.acls.check.
+ */
+ @isBoolean
+ public static final String STORM_NIMBUS_ZOOKEEPER_ACLS_FIXUP = "storm.nimbus.zookeeper.acls.fixup";
+ /**
+ * Server side validation that @{see Config#TOPOLOGY_SCHEDULER_STRATEGY} is set ot a subclass of IStrategy.
+ */
+ @isImplementationOfClass(implementsClass = IStrategy.class)
+ public static final String VALIDATE_TOPOLOGY_SCHEDULER_STRATEGY = Config.TOPOLOGY_SCHEDULER_STRATEGY;
/**
* root directory for cgoups.
*/
@isString
public static String STORM_SUPERVISOR_CGROUP_ROOTDIR = "storm.supervisor.cgroup.rootdir";
-
/**
* the manually set memory limit (in MB) for each CGroup on supervisor node.
*/
@isPositiveNumber
public static String STORM_WORKER_CGROUP_MEMORY_MB_LIMIT = "storm.worker.cgroup.memory.mb.limit";
-
/**
* the manually set cpu share for each CGroup on supervisor node.
*/
@isPositiveNumber
public static String STORM_WORKER_CGROUP_CPU_LIMIT = "storm.worker.cgroup.cpu.limit";
-
/**
* full path to cgexec command.
*/
@isString
public static String STORM_CGROUP_CGEXEC_CMD = "storm.cgroup.cgexec.cmd";
-
/**
- * Please use STORM_SUPERVISOR_MEMORY_LIMIT_TOLERANCE_MARGIN_MB instead. The amount of memory a
- * worker can exceed its allocation before cgroup will kill it.
+ * Please use STORM_SUPERVISOR_MEMORY_LIMIT_TOLERANCE_MARGIN_MB instead. The amount of memory a worker can exceed its allocation before
+ * cgroup will kill it.
*/
@isPositiveNumber(includeZero = true)
public static String STORM_CGROUP_MEMORY_LIMIT_TOLERANCE_MARGIN_MB =
"storm.cgroup.memory.limit.tolerance.margin.mb";
-
/**
- * Java does not always play nicely with cgroups. It is coming but not fully implemented and not
- * for the way storm uses cgroups. In the short term you can disable the hard memory enforcement
- * by cgroups and let the supervisor handle shooting workers going over their limit in a kinder
- * way.
+ * Java does not always play nicely with cgroups. It is coming but not fully implemented and not for the way storm uses cgroups. In the
+ * short term you can disable the hard memory enforcement by cgroups and let the supervisor handle shooting workers going over their
+ * limit in a kinder way.
*/
@isBoolean
public static String STORM_CGROUP_MEMORY_ENFORCEMENT_ENABLE = "storm.cgroup.memory.enforcement.enable";
-
- // Configs for memory enforcement done by the supervisor (not cgroups directly)
-
/**
- * Memory given to each worker for free (because java and storm have some overhead). This is
- * memory on the box that the workers can use. This should not be included in
- * SUPERVISOR_MEMORY_CAPACITY_MB, as nimbus does not use this memory for scheduling.
+ * Memory given to each worker for free (because java and storm have some overhead). This is memory on the box that the workers can use.
+ * This should not be included in SUPERVISOR_MEMORY_CAPACITY_MB, as nimbus does not use this memory for scheduling.
*/
@isPositiveNumber
public static String STORM_SUPERVISOR_MEMORY_LIMIT_TOLERANCE_MARGIN_MB =
"storm.supervisor.memory.limit.tolerance.margin.mb";
-
/**
- * A multiplier for the memory limit of a worker that will have the supervisor shoot it
- * immediately. 1.0 means shoot the worker as soon as it goes over. 2.0 means shoot the worker if
- * its usage is double what was requested. This value is combined with
- * STORM_SUPERVISOR_HARD_MEMORY_LIMIT_OVERAGE and which ever is greater is used for enforcement.
- * This allows small workers to not be shot.
+ * A multiplier for the memory limit of a worker that will have the supervisor shoot it immediately. 1.0 means shoot the worker as soon
+ * as it goes over. 2.0 means shoot the worker if its usage is double what was requested. This value is combined with
+ * STORM_SUPERVISOR_HARD_MEMORY_LIMIT_OVERAGE and which ever is greater is used for enforcement. This allows small workers to not be
+ * shot.
*/
@isPositiveNumber
public static String STORM_SUPERVISOR_HARD_MEMORY_LIMIT_MULTIPLIER =
"storm.supervisor.hard.memory.limit.multiplier";
-
/**
- * If the memory usage of a worker goes over its limit by this value is it shot immediately. This
- * value is combined with STORM_SUPERVISOR_HARD_LIMIT_MEMORY_MULTIPLIER and which ever is greater
- * is used for enforcement. This allows small workers to not be shot.
+ * If the memory usage of a worker goes over its limit by this value is it shot immediately. This value is combined with
+ * STORM_SUPERVISOR_HARD_LIMIT_MEMORY_MULTIPLIER and which ever is greater is used for enforcement. This allows small workers to not be
+ * shot.
*/
@isPositiveNumber(includeZero = true)
public static String STORM_SUPERVISOR_HARD_LIMIT_MEMORY_OVERAGE_MB = "storm.supervisor.hard.memory.limit.overage.mb";
-
/**
- * If the amount of memory that is free in the system (either on the box or in the supervisor's
- * cgroup) is below this number (in MB) consider the system to be in low memory mode and start
- * shooting workers if they are over their limit.
+ * If the amount of memory that is free in the system (either on the box or in the supervisor's cgroup) is below this number (in MB)
+ * consider the system to be in low memory mode and start shooting workers if they are over their limit.
*/
@isPositiveNumber
public static String STORM_SUPERVISOR_LOW_MEMORY_THRESHOLD_MB = "storm.supervisor.low.memory.threshold.mb";
-
/**
- * If the amount of memory that is free in the system (either on the box or in the supervisor's
- * cgroup) is below this number (in MB) consider the system to be a little low on memory and start
- * shooting workers if they are over their limit for a given grace period
+ * If the amount of memory that is free in the system (either on the box or in the supervisor's cgroup) is below this number (in MB)
+ * consider the system to be a little low on memory and start shooting workers if they are over their limit for a given grace period
* STORM_SUPERVISOR_MEDIUM_MEMORY_GRACE_PERIOD_MS.
*/
@isPositiveNumber
public static String STORM_SUPERVISOR_MEDIUM_MEMORY_THRESHOLD_MB = "storm.supervisor.medium.memory.threshold.mb";
-
/**
- * The number of milliseconds that a worker is allowed to be over their limit when there is a
- * medium amount of memory free in the system.
+ * The number of milliseconds that a worker is allowed to be over their limit when there is a medium amount of memory free in the
+ * system.
*/
@isPositiveNumber
public static String STORM_SUPERVISOR_MEDIUM_MEMORY_GRACE_PERIOD_MS =
"storm.supervisor.medium.memory.grace.period.ms";
- /**
- * Class implementing MetricStore. Runs on Nimbus.
- */
- @NotNull
- @isString
- // Validating class implementation could fail on non-Nimbus Daemons. Nimbus will catch the class not found on startup
- // and log an error message, so just validating this as a String for now.
- public static final String STORM_METRIC_STORE_CLASS = "storm.metricstore.class";
-
- /**
- * Class implementing WorkerMetricsProcessor. Runs on Supervisors.
- */
- @NotNull
- @isString
- public static final String STORM_METRIC_PROCESSOR_CLASS = "storm.metricprocessor.class";
-
- /**
- * RocksDB file location. This setting is specific to the org.apache.storm.metricstore.rocksdb.RocksDbStore
- * implementation for the storm.metricstore.class.
- */
- @isString
- public static final String STORM_ROCKSDB_LOCATION = "storm.metricstore.rocksdb.location";
-
- /**
- * RocksDB create if missing flag. This setting is specific to the org.apache.storm.metricstore.rocksdb.RocksDbStore
- * implementation for the storm.metricstore.class.
- */
- @isBoolean
- public static final String STORM_ROCKSDB_CREATE_IF_MISSING = "storm.metricstore.rocksdb.create_if_missing";
-
- /**
- * RocksDB metadata cache capacity. This setting is specific to the org.apache.storm.metricstore.rocksdb.RocksDbStore
- * implementation for the storm.metricstore.class.
- */
- @isInteger
- public static final String STORM_ROCKSDB_METADATA_STRING_CACHE_CAPACITY = "storm.metricstore.rocksdb.metadata_string_cache_capacity";
-
- /**
- * RocksDB setting for length of metric retention. This setting is specific to the org.apache.storm.metricstore.rocksdb.RocksDbStore
- * implementation for the storm.metricstore.class.
- */
- @isInteger
- public static final String STORM_ROCKSDB_METRIC_RETENTION_HOURS = "storm.metricstore.rocksdb.retention_hours";
-
- /**
- * RocksDB setting for period of metric deletion thread. This setting is specific to the
- * org.apache.storm.metricstore.rocksdb.RocksDbStore implementation for the storm.metricstore.class.
- */
- @isInteger
- public static final String STORM_ROCKSDB_METRIC_DELETION_PERIOD_HOURS = "storm.metricstore.rocksdb.deletion_period_hours";
-
- /**
- * The number of hours a worker token is valid for. This also sets how frequently worker tokens will be renewed.
- */
- @isPositiveNumber
- public static String STORM_WORKER_TOKEN_LIFE_TIME_HOURS = "storm.worker.token.life.time.hours";
-
- /**
- * In nimbus on startup check if all of the zookeeper ACLs are correct before starting. If not
- * don't start nimbus.
- */
- @isBoolean
- public static final String STORM_NIMBUS_ZOOKEEPER_ACLS_CHECK = "storm.nimbus.zookeeper.acls.check";
-
- /**
- * In nimbus on startup check if all of the zookeeper ACLs are correct before starting. If not do
- * your best to fix them before nimbus starts, if it cannot fix them nimbus will not start.
- * This overrides any value set for storm.nimbus.zookeeper.acls.check.
- */
- @isBoolean
- public static final String STORM_NIMBUS_ZOOKEEPER_ACLS_FIXUP = "storm.nimbus.zookeeper.acls.fixup";
-
// VALIDATION ONLY CONFIGS
// Some configs inside Config.java may reference classes we don't want to expose in storm-client, but we still want to validate
// That they reference a valid class. To allow this to happen we do part of the validation on the client side with annotations on
// static final members of the Config class, and other validations here. We avoid naming them the same thing because clojure code
// walks these two classes and creates clojure constants for these values.
-
/**
- * Server side validation that @{see Config#TOPOLOGY_SCHEDULER_STRATEGY} is set ot a subclass of IStrategy.
+ * The number of hours a worker token is valid for. This also sets how frequently worker tokens will be renewed.
*/
- @isImplementationOfClass(implementsClass = IStrategy.class)
- public static final String VALIDATE_TOPOLOGY_SCHEDULER_STRATEGY = Config.TOPOLOGY_SCHEDULER_STRATEGY;
+ @isPositiveNumber
+ public static String STORM_WORKER_TOKEN_LIFE_TIME_HOURS = "storm.worker.token.life.time.hours";
public static String getCgroupRootDir(Map<String, Object> conf) {
return (String) conf.get(STORM_SUPERVISOR_CGROUP_ROOTDIR);
http://git-wip-us.apache.org/repos/asf/storm/blob/f1c0bcbe/storm-server/src/main/java/org/apache/storm/ILocalClusterTrackedTopologyAware.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/ILocalClusterTrackedTopologyAware.java b/storm-server/src/main/java/org/apache/storm/ILocalClusterTrackedTopologyAware.java
index c67d32d..b279a8d 100644
--- a/storm-server/src/main/java/org/apache/storm/ILocalClusterTrackedTopologyAware.java
+++ b/storm-server/src/main/java/org/apache/storm/ILocalClusterTrackedTopologyAware.java
@@ -18,37 +18,40 @@
package org.apache.storm;
+import java.util.Map;
import org.apache.storm.generated.SubmitOptions;
import org.apache.storm.testing.TrackedTopology;
import org.apache.thrift.TException;
-import java.util.Map;
-
/**
- * This is here mostly for backwards compatibility.
- * Please see {@link org.apache.storm.LocalCluster} for
- * more details on testing a Storm Topology.
+ * This is here mostly for backwards compatibility. Please see {@link org.apache.storm.LocalCluster} for more details on testing a Storm
+ * Topology.
*/
public interface ILocalClusterTrackedTopologyAware extends ILocalCluster {
/**
* Submit a tracked topology to be run in local mode
+ *
* @param topologyName the name of the topology to use
- * @param conf the config for the topology
- * @param topology the topology itself.
+ * @param conf the config for the topology
+ * @param topology the topology itself.
* @return an AutoCloseable that will kill the topology.
+ *
* @throws TException on any error from nimbus
*/
ILocalTopology submitTopology(String topologyName, Map<String, Object> conf, TrackedTopology topology) throws TException;
/**
* Submit a tracked topology to be run in local mode
+ *
* @param topologyName the name of the topology to use
- * @param conf the config for the topology
- * @param topology the topology itself.
- * @param submitOpts options for topology
+ * @param conf the config for the topology
+ * @param topology the topology itself.
+ * @param submitOpts options for topology
* @return an AutoCloseable that will kill the topology.
+ *
* @throws TException on any error from nimbus
*/
- ILocalTopology submitTopologyWithOpts(String topologyName, Map<String, Object> conf, TrackedTopology topology, SubmitOptions submitOpts) throws TException;
+ ILocalTopology submitTopologyWithOpts(String topologyName, Map<String, Object> conf, TrackedTopology topology,
+ SubmitOptions submitOpts) throws TException;
}