Repository: storm Updated Branches: refs/heads/master 224c846ec -> a55b05032
convert existing javadoc to markdown Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/d6d85518 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/d6d85518 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/d6d85518 Branch: refs/heads/master Commit: d6d85518bc7a668dfe7cad9e796c226752ad0aca Parents: e03b28c Author: P. Taylor Goetz <[email protected]> Authored: Wed Nov 18 20:19:09 2015 -0500 Committer: P. Taylor Goetz <[email protected]> Committed: Wed Nov 18 20:19:09 2015 -0500 ---------------------------------------------------------------------- storm-core/src/jvm/backtype/storm/Config.java | 8 ++--- .../src/jvm/backtype/storm/StormSubmitter.java | 2 ++ .../metric/HttpForwardingMetricsConsumer.java | 11 ++++-- .../storm/metric/LoggingMetricsConsumer.java | 7 +++- .../jvm/backtype/storm/multilang/BoltMsg.java | 3 +- .../jvm/backtype/storm/multilang/ShellMsg.java | 3 +- .../jvm/backtype/storm/multilang/SpoutMsg.java | 3 +- .../AbstractDNSToSwitchMapping.java | 7 ++-- .../networktopography/DNSToSwitchMapping.java | 1 - .../jvm/backtype/storm/scheduler/INimbus.java | 16 +++++++-- .../backtype/storm/scheduler/IScheduler.java | 8 ++--- .../storm/security/auth/IAuthorizer.java | 6 ++++ .../storm/security/auth/ReqContext.java | 9 ++--- .../authorizer/SimpleWhitelistAuthorizer.java | 2 +- .../serialization/BlowfishTupleSerializer.java | 4 ++- .../src/jvm/backtype/storm/spout/ISpout.java | 18 +++++----- .../storm/spout/ISpoutWaitStrategy.java | 2 +- .../storm/spout/SpoutOutputCollector.java | 8 ++--- .../src/jvm/backtype/storm/task/IBolt.java | 28 ++++++++-------- .../backtype/storm/task/OutputCollector.java | 18 +++++----- .../src/jvm/backtype/storm/task/ShellBolt.java | 12 +++---- .../backtype/storm/task/TopologyContext.java | 35 +++++++++++--------- .../storm/testing/CompleteTopologyParam.java | 2 +- .../testing/ForwardingMetricsConsumer.java | 5 +++ .../backtype/storm/testing/MkClusterParam.java | 2 +- .../backtype/storm/testing/MockedSources.java | 2 +- .../src/jvm/backtype/storm/testing/TestJob.java | 4 ++- .../storm/topology/TopologyBuilder.java | 12 +++---- .../storm/topology/base/BaseRichSpout.java | 4 --- .../src/jvm/backtype/storm/tuple/ITuple.java | 20 +++++------ .../StormBoundedExponentialBackoffRetry.java | 5 +-- .../storm/validation/ConfigValidation.java | 2 +- .../validation/ConfigValidationAnnotations.java | 2 +- .../src/jvm/storm/trident/operation/Filter.java | 1 - .../jvm/storm/trident/state/map/CachedMap.java | 1 - 35 files changed, 154 insertions(+), 119 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/Config.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/Config.java b/storm-core/src/jvm/backtype/storm/Config.java index a61e873..033eec7 100644 --- a/storm-core/src/jvm/backtype/storm/Config.java +++ b/storm-core/src/jvm/backtype/storm/Config.java @@ -34,15 +34,15 @@ import java.util.Map; * all the configs that can be set. It also makes it easier to do things like add * serializations. * - * <p>This class also provides constants for all the configurations possible on + * This class also provides constants for all the configurations possible on * a Storm cluster and Storm topology. 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.</p> + * values for these configs can be found in defaults.yaml. * - * <p>Note that you may put other configurations in any of the configs. Storm + * Note that you may put other configurations in any of the configs. Storm * will ignore anything it doesn't recognize, but your topologies are free to make * use of them by reading them in the prepare method of Bolts or the open method of - * Spouts.</p> + * Spouts. */ public class Config extends HashMap<String, Object> { http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/StormSubmitter.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/StormSubmitter.java b/storm-core/src/jvm/backtype/storm/StormSubmitter.java index 1d7a1f3..95768a6 100644 --- a/storm-core/src/jvm/backtype/storm/StormSubmitter.java +++ b/storm-core/src/jvm/backtype/storm/StormSubmitter.java @@ -173,6 +173,8 @@ public class StormSubmitter { } /** + * Submits a topology to run on the cluster as a particular user. A topology runs forever or until + * explicitly killed. * * @param name * @param stormConf http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/metric/HttpForwardingMetricsConsumer.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/metric/HttpForwardingMetricsConsumer.java b/storm-core/src/jvm/backtype/storm/metric/HttpForwardingMetricsConsumer.java index 4f4242a..0c6325d 100644 --- a/storm-core/src/jvm/backtype/storm/metric/HttpForwardingMetricsConsumer.java +++ b/storm-core/src/jvm/backtype/storm/metric/HttpForwardingMetricsConsumer.java @@ -34,13 +34,18 @@ import backtype.storm.task.TopologyContext; * Listens for all metrics and POSTs them serialized to a configured URL * * To use, add this to your topology's configuration: + * + * ```java * conf.registerMetricsConsumer(backtype.storm.metrics.HttpForwardingMetricsConsumer.class, "http://example.com:8080/metrics/my-topology/", 1); + * ``` * - * The body of the post is data serialized using backtype.storm.serialization.KryoValuesSerializer, with the data passed in - * as a list of [TaskInfo, Collection<DataPoint>]. More things may be appended to the end of the list in the future. + * The body of the post is data serialized using {@link backtype.storm.serialization.KryoValuesSerializer}, with the data passed in + * as a list of `[TaskInfo, Collection<DataPoint>]`. More things may be appended to the end of the list in the future. * * The values can be deserialized using the backtype.storm.serialization.KryoValuesDeserializer, and a - * correct config + classpath. + * correct config + classpath. + * + * @see backtype.storm.serialization.KryoValuesSerializer */ public class HttpForwardingMetricsConsumer implements IMetricsConsumer { private transient URL _url; http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/metric/LoggingMetricsConsumer.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/metric/LoggingMetricsConsumer.java b/storm-core/src/jvm/backtype/storm/metric/LoggingMetricsConsumer.java index 98fb527..738181a 100644 --- a/storm-core/src/jvm/backtype/storm/metric/LoggingMetricsConsumer.java +++ b/storm-core/src/jvm/backtype/storm/metric/LoggingMetricsConsumer.java @@ -27,17 +27,22 @@ import backtype.storm.metric.api.IMetricsConsumer; import backtype.storm.task.IErrorReporter; import backtype.storm.task.TopologyContext; -/* +/** * Listens for all metrics, dumps them to log * * To use, add this to your topology's configuration: + * + * ```java * conf.registerMetricsConsumer(backtype.storm.metrics.LoggingMetricsConsumer.class, 1); + * ``` * * Or edit the storm.yaml config file: * + * ```yaml * topology.metrics.consumer.register: * - class: "backtype.storm.metrics.LoggingMetricsConsumer" * parallelism.hint: 1 + * ``` * */ public class LoggingMetricsConsumer implements IMetricsConsumer { http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/multilang/BoltMsg.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/multilang/BoltMsg.java b/storm-core/src/jvm/backtype/storm/multilang/BoltMsg.java index 446bdc4..164adbc 100644 --- a/storm-core/src/jvm/backtype/storm/multilang/BoltMsg.java +++ b/storm-core/src/jvm/backtype/storm/multilang/BoltMsg.java @@ -24,12 +24,11 @@ import java.util.List; * a bolt process that implements a multi-language protocol. It is the union of * all data types that a bolt can receive from Storm. * - * <p> * BoltMsgs are objects sent to the ISerializer interface, for serialization * according to the wire protocol implemented by the serializer. The BoltMsg * class allows for a decoupling between the serialized representation of the * data and the data itself. - * </p> + * */ public class BoltMsg { private String id; http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/multilang/ShellMsg.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/multilang/ShellMsg.java b/storm-core/src/jvm/backtype/storm/multilang/ShellMsg.java index 9eafb1a..7800e21 100644 --- a/storm-core/src/jvm/backtype/storm/multilang/ShellMsg.java +++ b/storm-core/src/jvm/backtype/storm/multilang/ShellMsg.java @@ -25,12 +25,11 @@ import java.util.List; * a process that implements a multi-language protocol. It is the union of all * data types that a component can send to Storm. * - * <p> * ShellMsgs are objects received from the ISerializer interface, after the * serializer has deserialized the data from the underlying wire protocol. The * ShellMsg class allows for a decoupling between the serialized representation * of the data and the data itself. - * </p> + * */ public class ShellMsg { private String command; http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/multilang/SpoutMsg.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/multilang/SpoutMsg.java b/storm-core/src/jvm/backtype/storm/multilang/SpoutMsg.java index cb1b108..d7069e3 100644 --- a/storm-core/src/jvm/backtype/storm/multilang/SpoutMsg.java +++ b/storm-core/src/jvm/backtype/storm/multilang/SpoutMsg.java @@ -22,12 +22,11 @@ package backtype.storm.multilang; * process that implements a multi-language spout. The SpoutMsg is used to send * a "next", "ack" or "fail" message to a spout. * - * <p> * Spout messages are objects sent to the ISerializer interface, for * serialization according to the wire protocol implemented by the serializer. * The SpoutMsg class allows for a decoupling between the serialized * representation of the data and the data itself. - * </p> + * */ public class SpoutMsg { private String command; http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/networktopography/AbstractDNSToSwitchMapping.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/networktopography/AbstractDNSToSwitchMapping.java b/storm-core/src/jvm/backtype/storm/networktopography/AbstractDNSToSwitchMapping.java index b17ca40..c9867e0 100644 --- a/storm-core/src/jvm/backtype/storm/networktopography/AbstractDNSToSwitchMapping.java +++ b/storm-core/src/jvm/backtype/storm/networktopography/AbstractDNSToSwitchMapping.java @@ -23,11 +23,12 @@ import java.util.Map; import java.util.Set; /** - * This is a base class for DNS to Switch mappings. <p/> It is not mandatory to + * This is a base class for DNS to Switch mappings. + * + * It is not mandatory to * derive {@link DNSToSwitchMapping} implementations from it, but it is strongly * recommended, as it makes it easy for the developers to add new methods * to this base class that are automatically picked up by all implementations. - * <p/> * */ public abstract class AbstractDNSToSwitchMapping @@ -45,7 +46,6 @@ public abstract class AbstractDNSToSwitchMapping * multi-rack. Subclasses may override this with methods that are more aware * of their topologies. * - * <p/> * * * @return true if the mapping thinks that it is on a single switch @@ -66,6 +66,7 @@ public abstract class AbstractDNSToSwitchMapping * Generate a string listing the switch mapping implementation, * the mapping for every known node and the number of nodes and * unique switches known about -each entry to a separate line. + * * @return a string that can be presented to the ops team or used in * debug messages. */ http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/networktopography/DNSToSwitchMapping.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/networktopography/DNSToSwitchMapping.java b/storm-core/src/jvm/backtype/storm/networktopography/DNSToSwitchMapping.java index fbfbb19..0ca9d8e 100644 --- a/storm-core/src/jvm/backtype/storm/networktopography/DNSToSwitchMapping.java +++ b/storm-core/src/jvm/backtype/storm/networktopography/DNSToSwitchMapping.java @@ -36,7 +36,6 @@ public interface DNSToSwitchMapping { * Note the hostname/ip-address is not part of the returned path. * The network topology of the cluster would determine the number of * components in the network path. - * <p/> * * If a name cannot be resolved to a rack, the implementation * should return {DEFAULT_RACK}. This http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/scheduler/INimbus.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/scheduler/INimbus.java b/storm-core/src/jvm/backtype/storm/scheduler/INimbus.java index a0fb417..2933b8e 100644 --- a/storm-core/src/jvm/backtype/storm/scheduler/INimbus.java +++ b/storm-core/src/jvm/backtype/storm/scheduler/INimbus.java @@ -29,10 +29,20 @@ public interface INimbus { */ Collection<WorkerSlot> allSlotsAvailableForScheduling(Collection<SupervisorDetails> existingSupervisors, Topologies topologies, Set<String> topologiesMissingAssignments); - // this is called after the assignment is changed in ZK + + /** + * this is called after the assignment is changed in ZK + * @param topologies + * @param newSlotsByTopologyId + */ void assignSlots(Topologies topologies, Map<String, Collection<WorkerSlot>> newSlotsByTopologyId); - - // map from node id to supervisor details + + /** + * map from node id to supervisor details + * @param existingSupervisors + * @param nodeId + * @return + */ String getHostName(Map<String, SupervisorDetails> existingSupervisors, String nodeId); IScheduler getForcedScheduler(); http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/scheduler/IScheduler.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/scheduler/IScheduler.java b/storm-core/src/jvm/backtype/storm/scheduler/IScheduler.java index 5395882..16070a7 100644 --- a/storm-core/src/jvm/backtype/storm/scheduler/IScheduler.java +++ b/storm-core/src/jvm/backtype/storm/scheduler/IScheduler.java @@ -26,15 +26,15 @@ public interface IScheduler { /** * Set assignments for the topologies which needs scheduling. The new assignments is available - * through <code>cluster.getAssignments()</code> + * through `cluster.getAssignments()` * *@param topologies all the topologies in the cluster, some of them need schedule. Topologies object here * only contain static information about topologies. Information like assignments, slots are all in - * the <code>cluster</code>object. - *@param cluster the cluster these topologies are running in. <code>cluster</code> contains everything user + * the `cluster` object. + *@param cluster the cluster these topologies are running in. `cluster` contains everything user * need to develop a new scheduling logic. e.g. supervisors information, available slots, current * assignments for all the topologies etc. User can set the new assignment for topologies using - * <code>cluster.setAssignmentById</code> + * cluster.setAssignmentById()` */ void schedule(Topologies topologies, Cluster cluster); } http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/security/auth/IAuthorizer.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/security/auth/IAuthorizer.java b/storm-core/src/jvm/backtype/storm/security/auth/IAuthorizer.java index ff1e2ba..b5fb353 100644 --- a/storm-core/src/jvm/backtype/storm/security/auth/IAuthorizer.java +++ b/storm-core/src/jvm/backtype/storm/security/auth/IAuthorizer.java @@ -24,10 +24,16 @@ import java.util.Map; * If not specified, all requests are authorized. * * You could specify the authorization plugin via storm parameter. For example: + * + * ``` * storm -c nimbus.authorization.class=backtype.storm.security.auth.NoopAuthorizer ... + * ``` * * You could also specify it via storm.yaml: + * + * ```yaml * nimbus.authorization.class: backtype.storm.security.auth.NoopAuthorizer + * ``` */ public interface IAuthorizer { /** http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/security/auth/ReqContext.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/security/auth/ReqContext.java b/storm-core/src/jvm/backtype/storm/security/auth/ReqContext.java index 31aeef9..bbff57c 100644 --- a/storm-core/src/jvm/backtype/storm/security/auth/ReqContext.java +++ b/storm-core/src/jvm/backtype/storm/security/auth/ReqContext.java @@ -29,10 +29,11 @@ import java.security.Principal; import javax.security.auth.Subject; /** - * context request context includes info about - * (1) remote address, - * (2) remote subject and primary principal - * (3) request ID + * context request context includes info about: + * + * 1. remote address, + * 2. remote subject and primary principal + * 3. request ID */ public class ReqContext { private static final AtomicInteger uniqueId = new AtomicInteger(0); http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/security/auth/authorizer/SimpleWhitelistAuthorizer.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/security/auth/authorizer/SimpleWhitelistAuthorizer.java b/storm-core/src/jvm/backtype/storm/security/auth/authorizer/SimpleWhitelistAuthorizer.java index 5731f06..e9d3f0f 100644 --- a/storm-core/src/jvm/backtype/storm/security/auth/authorizer/SimpleWhitelistAuthorizer.java +++ b/storm-core/src/jvm/backtype/storm/security/auth/authorizer/SimpleWhitelistAuthorizer.java @@ -47,7 +47,7 @@ public class SimpleWhitelistAuthorizer implements IAuthorizer { } /** - * permit() method is invoked for each incoming Thrift request + * `permit()` method is invoked for each incoming Thrift request * @param context request context includes info about * @param operation operation name * @param topology_conf configuration of targeted topology http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/security/serialization/BlowfishTupleSerializer.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/security/serialization/BlowfishTupleSerializer.java b/storm-core/src/jvm/backtype/storm/security/serialization/BlowfishTupleSerializer.java index fca0c46..45c15da 100644 --- a/storm-core/src/jvm/backtype/storm/security/serialization/BlowfishTupleSerializer.java +++ b/storm-core/src/jvm/backtype/storm/security/serialization/BlowfishTupleSerializer.java @@ -41,7 +41,9 @@ import backtype.storm.Config; public class BlowfishTupleSerializer extends Serializer<ListDelegate> { /** * The secret key (if any) for data encryption by blowfish payload serialization factory (BlowfishSerializationFactory). - * You should use in via "storm -c topology.tuple.serializer.blowfish.key=YOURKEY -c topology.tuple.serializer=backtype.storm.security.serialization.BlowfishTupleSerializer jar ...". + * You should use in via: + * + * ```storm -c topology.tuple.serializer.blowfish.key=YOURKEY -c topology.tuple.serializer=backtype.storm.security.serialization.BlowfishTupleSerializer jar ...``` */ public static final String SECRET_KEY = "topology.tuple.serializer.blowfish.key"; private static final Logger LOG = LoggerFactory.getLogger(BlowfishTupleSerializer.class); http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/spout/ISpout.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/spout/ISpout.java b/storm-core/src/jvm/backtype/storm/spout/ISpout.java index c421fed..9285344 100644 --- a/storm-core/src/jvm/backtype/storm/spout/ISpout.java +++ b/storm-core/src/jvm/backtype/storm/spout/ISpout.java @@ -28,27 +28,27 @@ import java.io.Serializable; * based on a tuple emitted by the spout. When Storm detects that every tuple in * that DAG has been successfully processed, it will send an ack message to the Spout. * - * <p>If a tuple fails to be fully processed within the configured timeout for the + * If a tuple fails to be fully processed within the configured timeout for the * topology (see {@link backtype.storm.Config}), Storm will send a fail message to the spout - * for the message.</p> + * for the message. * - * <p> When a Spout emits a tuple, it can tag the tuple with a message id. The message id + * When a Spout emits a tuple, it can tag the tuple with a message id. The message id * can be any type. When Storm acks or fails a message, it will pass back to the * spout the same message id to identify which tuple it's referring to. If the spout leaves out * the message id, or sets it to null, then Storm will not track the message and the spout - * will not receive any ack or fail callbacks for the message.</p> + * will not receive any ack or fail callbacks for the message. * - * <p>Storm executes ack, fail, and nextTuple all on the same thread. This means that an implementor + * Storm executes ack, fail, and nextTuple all on the same thread. This means that an implementor * of an ISpout does not need to worry about concurrency issues between those methods. However, it * also means that an implementor must ensure that nextTuple is non-blocking: otherwise - * the method could block acks and fails that are pending to be processed.</p> + * the method could block acks and fails that are pending to be processed. */ public interface ISpout extends Serializable { /** * Called when a task for this component is initialized within a worker on the cluster. * It provides the spout with the environment in which the spout executes. * - * <p>This includes the:</p> + * This includes the: * * @param conf The Storm configuration for this spout. This is the configuration provided to the topology merged in with cluster configuration on this machine. * @param context This object can be used to get information about this task's place within the topology, including the task id and component id of this task, input and output information, etc. @@ -60,8 +60,8 @@ public interface ISpout extends Serializable { * Called when an ISpout is going to be shutdown. There is no guarentee that close * will be called, because the supervisor kill -9's worker processes on the cluster. * - * <p>The one context where close is guaranteed to be called is a topology is - * killed when running Storm in local mode.</p> + * The one context where close is guaranteed to be called is a topology is + * killed when running Storm in local mode. */ void close(); http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/spout/ISpoutWaitStrategy.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/spout/ISpoutWaitStrategy.java b/storm-core/src/jvm/backtype/storm/spout/ISpoutWaitStrategy.java index d0bdfa8..8c35f47 100644 --- a/storm-core/src/jvm/backtype/storm/spout/ISpoutWaitStrategy.java +++ b/storm-core/src/jvm/backtype/storm/spout/ISpoutWaitStrategy.java @@ -23,7 +23,7 @@ import java.util.Map; * The strategy a spout needs to use when its waiting. Waiting is * triggered in one of two conditions: * - * 1. nextTuple emits no tuples + * 1. `nextTuple()` emits no tuples * 2. The spout has hit maxSpoutPending and can't emit any more tuples * * The default strategy sleeps for one millisecond. http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/spout/SpoutOutputCollector.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/spout/SpoutOutputCollector.java b/storm-core/src/jvm/backtype/storm/spout/SpoutOutputCollector.java index f23692b..060879d 100644 --- a/storm-core/src/jvm/backtype/storm/spout/SpoutOutputCollector.java +++ b/storm-core/src/jvm/backtype/storm/spout/SpoutOutputCollector.java @@ -107,8 +107,8 @@ public class SpoutOutputCollector implements ISpoutOutputCollector { * use a direct grouping on this stream to receive the message. The emitted values must be * immutable. * - * <p> Because no message id is specified, Storm will not track this message - * so ack and fail will never be called for this tuple.</p> + * Because no message id is specified, Storm will not track this message + * so ack and fail will never be called for this tuple. */ public void emitDirect(int taskId, String streamId, List<Object> tuple) { emitDirect(taskId, streamId, tuple, null); @@ -120,8 +120,8 @@ public class SpoutOutputCollector implements ISpoutOutputCollector { * use a direct grouping on this stream to receive the message. The emitted values must be * immutable. * - * <p> Because no message id is specified, Storm will not track this message - * so ack and fail will never be called for this tuple.</p> + * Because no message id is specified, Storm will not track this message + * so ack and fail will never be called for this tuple. */ public void emitDirect(int taskId, List<Object> tuple) { emitDirect(taskId, tuple, null); http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/task/IBolt.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/task/IBolt.java b/storm-core/src/jvm/backtype/storm/task/IBolt.java index 48acdda..8e0f55f 100644 --- a/storm-core/src/jvm/backtype/storm/task/IBolt.java +++ b/storm-core/src/jvm/backtype/storm/task/IBolt.java @@ -27,26 +27,26 @@ import java.io.Serializable; * to aggregations. It does not have to process a tuple immediately and may * hold onto tuples to process later. * - * <p>A bolt's lifecycle is as follows:</p> + * A bolt's lifecycle is as follows: * - * <p>IBolt object created on client machine. The IBolt is serialized into the topology + * IBolt object created on client machine. The IBolt is serialized into the topology * (using Java serialization) and submitted to the master machine of the cluster (Nimbus). * Nimbus then launches workers which deserialize the object, call prepare on it, and then - * start processing tuples.</p> + * start processing tuples. * - * <p>If you want to parameterize an IBolt, you should set the parameters through its + * If you want to parameterize an IBolt, you should set the parameters through its * constructor and save the parameterization state as instance variables (which will - * then get serialized and shipped to every task executing this bolt across the cluster).</p> + * then get serialized and shipped to every task executing this bolt across the cluster). * - * <p>When defining bolts in Java, you should use the IRichBolt interface which adds - * necessary methods for using the Java TopologyBuilder API.</p> + * When defining bolts in Java, you should use the IRichBolt interface which adds + * necessary methods for using the Java TopologyBuilder API. */ public interface IBolt extends Serializable { /** * Called when a task for this component is initialized within a worker on the cluster. * It provides the bolt with the environment in which the bolt executes. * - * <p>This includes the:</p> + * This includes the: * * @param stormConf The Storm configuration for this bolt. This is the configuration provided to the topology merged in with cluster configuration on this machine. * @param context This object can be used to get information about this task's place within the topology, including the task id and component id of this task, input and output information, etc. @@ -61,13 +61,13 @@ public interface IBolt extends Serializable { * immediately. It is perfectly fine to hang onto a tuple and process it later * (for instance, to do an aggregation or join). * - * <p>Tuples should be emitted using the OutputCollector provided through the prepare method. + * Tuples should be emitted using the OutputCollector provided through the prepare method. * It is required that all input tuples are acked or failed at some point using the OutputCollector. * Otherwise, Storm will be unable to determine when tuples coming off the spouts - * have been completed.</p> + * have been completed. * - * <p>For the common case of acking an input tuple at the end of the execute method, - * see IBasicBolt which automates this.</p> + * For the common case of acking an input tuple at the end of the execute method, + * see IBasicBolt which automates this. * * @param input The input tuple to be processed. */ @@ -77,8 +77,8 @@ public interface IBolt extends Serializable { * Called when an IBolt is going to be shutdown. There is no guarentee that cleanup * will be called, because the supervisor kill -9's worker processes on the cluster. * - * <p>The one context where cleanup is guaranteed to be called is when a topology - * is killed when running Storm in local mode.</p> + * The one context where cleanup is guaranteed to be called is when a topology + * is killed when running Storm in local mode. */ void cleanup(); } http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/task/OutputCollector.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/task/OutputCollector.java b/storm-core/src/jvm/backtype/storm/task/OutputCollector.java index 620d33d..bdc2943 100644 --- a/storm-core/src/jvm/backtype/storm/task/OutputCollector.java +++ b/storm-core/src/jvm/backtype/storm/task/OutputCollector.java @@ -143,12 +143,12 @@ public class OutputCollector implements IOutputCollector { * an error will occur at runtime. The emitted values must be * immutable. * - * <p>The default stream must be declared as direct in the topology definition. + * The default stream must be declared as direct in the topology definition. * See OutputDeclarer#declare for how this is done when defining topologies - * in Java.</p> + * in Java. * * @param taskId the taskId to send the new tuple to - * @param anchosr the tuples to anchor to + * @param anchors the tuples to anchor to * @param tuple the new output tuple from this bolt */ public void emitDirect(int taskId, Collection<Tuple> anchors, List<Object> tuple) { @@ -163,9 +163,9 @@ public class OutputCollector implements IOutputCollector { * an error will occur at runtime. The emitted values must be * immutable. * - * <p>The default stream must be declared as direct in the topology definition. + * The default stream must be declared as direct in the topology definition. * See OutputDeclarer#declare for how this is done when defining topologies - * in Java.</p> + * in Java. * * @param taskId the taskId to send the new tuple to * @param anchor the tuple to anchor to @@ -184,12 +184,12 @@ public class OutputCollector implements IOutputCollector { * an error will occur at runtime. The emitted values must be * immutable. * - * <p>The default stream must be declared as direct in the topology definition. + * The default stream must be declared as direct in the topology definition. * See OutputDeclarer#declare for how this is done when defining topologies - * in Java.</p> + * in Java.< * - * <p>Note that this method does not use anchors, so downstream failures won't - * affect the failure status of any spout tuples.</p> + * Note that this method does not use anchors, so downstream failures won't + * affect the failure status of any spout tuples. * * @param taskId the taskId to send the new tuple to * @param tuple the new output tuple from this bolt http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/task/ShellBolt.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/task/ShellBolt.java b/storm-core/src/jvm/backtype/storm/task/ShellBolt.java index dda99ca..0137a4f 100644 --- a/storm-core/src/jvm/backtype/storm/task/ShellBolt.java +++ b/storm-core/src/jvm/backtype/storm/task/ShellBolt.java @@ -45,16 +45,16 @@ import static java.util.concurrent.TimeUnit.SECONDS; * line library is required to implement that protocol, and adapter libraries * currently exist for Ruby and Python. * - * <p>To run a ShellBolt on a cluster, the scripts that are shelled out to must be + * To run a ShellBolt on a cluster, the scripts that are shelled out to must be * in the resources directory within the jar submitted to the master. * During development/testing on a local machine, that resources directory just - * needs to be on the classpath.</p> + * needs to be on the classpath. * - * <p>When creating topologies using the Java API, subclass this bolt and implement + * When creating topologies using the Java API, subclass this bolt and implement * the IRichBolt interface to create components for the topology that use other languages. For example: - * </p> * - * <pre> + * + * ```java * public class MyBolt extends ShellBolt implements IRichBolt { * public MyBolt() { * super("python", "mybolt.py"); @@ -64,7 +64,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; * declarer.declare(new Fields("field1", "field2")); * } * } - * </pre> + * ``` */ public class ShellBolt implements IBolt { public static final String HEARTBEAT_STREAM_ID = "__heartbeat"; http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/task/TopologyContext.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/task/TopologyContext.java b/storm-core/src/jvm/backtype/storm/task/TopologyContext.java index e9cdb5b..db22179 100644 --- a/storm-core/src/jvm/backtype/storm/task/TopologyContext.java +++ b/storm-core/src/jvm/backtype/storm/task/TopologyContext.java @@ -42,12 +42,12 @@ import org.apache.commons.lang.NotImplementedException; import org.json.simple.JSONValue; /** - * A TopologyContext is given to bolts and spouts in their "prepare" and "open" + * A `TopologyContext` is given to bolts and spouts in their `prepare()` and `open()` * methods, respectively. This object provides information about the component's * place within the topology, such as task ids, inputs and outputs, etc. * - * <p>The TopologyContext is also used to declare ISubscribedState objects to - * synchronize state with StateSpouts this object is subscribed to.</p> + * The `TopologyContext` is also used to declare `ISubscribedState` objects to + * synchronize state with StateSpouts this object is subscribed to. */ public class TopologyContext extends WorkerTopologyContext implements IMetricsContext { private Integer _taskId; @@ -78,12 +78,13 @@ public class TopologyContext extends WorkerTopologyContext implements IMetricsCo * All state from all subscribed state spouts streams will be synced with * the provided object. * - * <p>It is recommended that your ISubscribedState object is kept as an instance - * variable of this object. The recommended usage of this method is as follows:</p> + * It is recommended that your ISubscribedState object is kept as an instance + * variable of this object. The recommended usage of this method is as follows: * - * <p> + * ```java * _myState = context.setAllSubscribedState(new MyState()); - * </p> + * ``` + * * @param obj Provided ISubscribedState implementation * @return Returns the ISubscribedState object provided */ @@ -98,10 +99,11 @@ public class TopologyContext extends WorkerTopologyContext implements IMetricsCo * Synchronizes the default stream from the specified state spout component * id with the provided ISubscribedState object. * - * <p>The recommended usage of this method is as follows:</p> - * <p> + * The recommended usage of this method is as follows: + * + * ```java * _myState = context.setSubscribedState(componentId, new MyState()); - * </p> + * ``` * * @param componentId the id of the StateSpout component to subscribe to * @param obj Provided ISubscribedState implementation @@ -115,10 +117,11 @@ public class TopologyContext extends WorkerTopologyContext implements IMetricsCo * Synchronizes the specified stream from the specified state spout component * id with the provided ISubscribedState object. * - * <p>The recommended usage of this method is as follows:</p> - * <p> + * The recommended usage of this method is as follows: + * + * ```java * _myState = context.setSubscribedState(componentId, streamId, new MyState()); - * </p> + * ``` * * @param componentId the id of the StateSpout component to subscribe to * @param streamId the stream to subscribe to @@ -301,9 +304,11 @@ public class TopologyContext extends WorkerTopologyContext implements IMetricsCo /* * Register a IMetric instance. - * Storm will then call getValueAndReset on the metric every timeBucketSizeInSecs + * + * Storm will then call `getValueAndReset()` on the metric every `timeBucketSizeInSecs` * and the returned value is sent to all metrics consumers. - * You must call this during IBolt::prepare or ISpout::open. + * + * You must call this during `IBolt.prepare()` or `ISpout.open()`. * @return The IMetric argument unchanged. */ public <T extends IMetric> T registerMetric(String name, T metric, int timeBucketSizeInSecs) { http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/testing/CompleteTopologyParam.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/testing/CompleteTopologyParam.java b/storm-core/src/jvm/backtype/storm/testing/CompleteTopologyParam.java index f3306cf..2296754 100644 --- a/storm-core/src/jvm/backtype/storm/testing/CompleteTopologyParam.java +++ b/storm-core/src/jvm/backtype/storm/testing/CompleteTopologyParam.java @@ -20,7 +20,7 @@ package backtype.storm.testing; import backtype.storm.Config; /** - * The param class for the <code>Testing.completeTopology</code>. + * The param class for the `Testing.completeTopology`. */ public class CompleteTopologyParam { /** http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/testing/ForwardingMetricsConsumer.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/testing/ForwardingMetricsConsumer.java b/storm-core/src/jvm/backtype/storm/testing/ForwardingMetricsConsumer.java index 010336e..0ca1a42 100644 --- a/storm-core/src/jvm/backtype/storm/testing/ForwardingMetricsConsumer.java +++ b/storm-core/src/jvm/backtype/storm/testing/ForwardingMetricsConsumer.java @@ -33,14 +33,19 @@ import backtype.storm.task.TopologyContext; * Listens for all metrics, dumps them as text to a configured host:port * * To use, add this to your topology's configuration: + * + * ```java * conf.registerMetricsConsumer(backtype.storm.testing.ForwardingMetricsConsumer.class, "<HOST>:<PORT>", 1); + * ``` * * Or edit the storm.yaml config file: * + * ```yaml * topology.metrics.consumer.register: * - class: "backtype.storm.testing.ForwardingMetricsConsumer" * - argument: "example.com:9999" * parallelism.hint: 1 + * ``` * */ public class ForwardingMetricsConsumer implements IMetricsConsumer { http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/testing/MkClusterParam.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/testing/MkClusterParam.java b/storm-core/src/jvm/backtype/storm/testing/MkClusterParam.java index cd677c8..d174caa 100644 --- a/storm-core/src/jvm/backtype/storm/testing/MkClusterParam.java +++ b/storm-core/src/jvm/backtype/storm/testing/MkClusterParam.java @@ -20,7 +20,7 @@ package backtype.storm.testing; import java.util.Map; /** - * The param arg for <code>Testing.withSimulatedTimeCluster</code> and <code>Testing.withTrackedCluster</code> + * The param arg for `Testing.withSimulatedTimeCluster` and `Testing.withTrackedCluster` */ public class MkClusterParam { /** http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/testing/MockedSources.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/testing/MockedSources.java b/storm-core/src/jvm/backtype/storm/testing/MockedSources.java index 1fd6b85..fae5cc7 100644 --- a/storm-core/src/jvm/backtype/storm/testing/MockedSources.java +++ b/storm-core/src/jvm/backtype/storm/testing/MockedSources.java @@ -36,7 +36,7 @@ public class MockedSources { * * @param spoutId the spout to be mocked * @param streamId the stream of the spout to be mocked - * @param objects the mocked data + * @param valueses the mocked data */ public void addMockData(String spoutId, String streamId, Values... valueses) { if (!data.containsKey(spoutId)) { http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/testing/TestJob.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/testing/TestJob.java b/storm-core/src/jvm/backtype/storm/testing/TestJob.java index d41c36a..d4e48eb 100644 --- a/storm-core/src/jvm/backtype/storm/testing/TestJob.java +++ b/storm-core/src/jvm/backtype/storm/testing/TestJob.java @@ -23,12 +23,14 @@ import backtype.storm.ILocalCluster; * This is the core interface for the storm java testing, usually * we put our java unit testing logic in the run method. A sample * code will be: - * <code> + * + * ```java * Testing.withSimulatedTimeLocalCluster(new TestJob() { * public void run(Cluster cluster) { * // your testing logic here. * } * }); + * ``` */ public interface TestJob { /** http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java b/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java index bccb1bf..b1169b6 100644 --- a/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java +++ b/storm-core/src/jvm/backtype/storm/topology/TopologyBuilder.java @@ -42,7 +42,7 @@ import org.json.simple.JSONValue; * is so verbose, TopologyBuilder greatly eases the process of creating topologies. * The template for creating and submitting a topology looks something like: * - * <pre> + * ```java * TopologyBuilder builder = new TopologyBuilder(); * * builder.setSpout("1", new TestWordSpout(true), 5); @@ -57,13 +57,13 @@ import org.json.simple.JSONValue; * conf.put(Config.TOPOLOGY_WORKERS, 4); * * StormSubmitter.submitTopology("mytopology", conf, builder.createTopology()); - * </pre> + * ``` * * Running the exact same topology in local mode (in process), and configuring it to log all tuples * emitted, looks like the following. Note that it lets the topology run for 10 seconds * before shutting down the local cluster. * - * <pre> + * ```java * TopologyBuilder builder = new TopologyBuilder(); * * builder.setSpout("1", new TestWordSpout(true), 5); @@ -82,11 +82,11 @@ import org.json.simple.JSONValue; * cluster.submitTopology("mytopology", conf, builder.createTopology()); * Utils.sleep(10000); * cluster.shutdown(); - * </pre> + * ``` * - * <p>The pattern for TopologyBuilder is to map component ids to components using the setSpout + * The pattern for `TopologyBuilder` is to map component ids to components using the setSpout * and setBolt methods. Those methods return objects that are then used to declare - * the inputs for that component.</p> + * the inputs for that component. */ public class TopologyBuilder { private Map<String, IRichBolt> _bolts = new HashMap<>(); http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/topology/base/BaseRichSpout.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/topology/base/BaseRichSpout.java b/storm-core/src/jvm/backtype/storm/topology/base/BaseRichSpout.java index 37513b7..e47f039 100644 --- a/storm-core/src/jvm/backtype/storm/topology/base/BaseRichSpout.java +++ b/storm-core/src/jvm/backtype/storm/topology/base/BaseRichSpout.java @@ -23,10 +23,6 @@ package backtype.storm.topology.base; import backtype.storm.topology.IRichSpout; -/** - * - * @author nathan - */ public abstract class BaseRichSpout extends BaseComponent implements IRichSpout { @Override public void close() { http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/tuple/ITuple.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/tuple/ITuple.java b/storm-core/src/jvm/backtype/storm/tuple/ITuple.java index 4d6292e..a72da2b 100644 --- a/storm-core/src/jvm/backtype/storm/tuple/ITuple.java +++ b/storm-core/src/jvm/backtype/storm/tuple/ITuple.java @@ -51,7 +51,7 @@ public interface ITuple { /** * Gets the field at position i in the tuple. Returns object since tuples are dynamically typed. * - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public Object getValue(int i); @@ -59,7 +59,7 @@ public interface ITuple { * Returns the String at position i in the tuple. * * @throws ClassCastException If that field is not a String - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public String getString(int i); @@ -67,7 +67,7 @@ public interface ITuple { * Returns the Integer at position i in the tuple. * * @throws ClassCastException If that field is not a Integer - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public Integer getInteger(int i); @@ -75,7 +75,7 @@ public interface ITuple { * Returns the Long at position i in the tuple. * * @throws ClassCastException If that field is not a Long - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public Long getLong(int i); @@ -83,7 +83,7 @@ public interface ITuple { * Returns the Boolean at position i in the tuple. * * @throws ClassCastException If that field is not a Boolean - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public Boolean getBoolean(int i); @@ -91,7 +91,7 @@ public interface ITuple { * Returns the Short at position i in the tuple. * * @throws ClassCastException If that field is not a Short - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public Short getShort(int i); @@ -99,7 +99,7 @@ public interface ITuple { * Returns the Byte at position i in the tuple. * * @throws ClassCastException If that field is not a Byte - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public Byte getByte(int i); @@ -107,7 +107,7 @@ public interface ITuple { * Returns the Double at position i in the tuple. * * @throws ClassCastException If that field is not a Double - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public Double getDouble(int i); @@ -115,7 +115,7 @@ public interface ITuple { * Returns the Float at position i in the tuple. * * @throws ClassCastException If that field is not a Float - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public Float getFloat(int i); @@ -123,7 +123,7 @@ public interface ITuple { * Returns the byte array at position i in the tuple. * * @throws ClassCastException If that field is not a byte array - * @throws IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) + * @throws IndexOutOfBoundsException - if the index is out of range `(index < 0 || index >= size())` */ public byte[] getBinary(int i); http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/utils/StormBoundedExponentialBackoffRetry.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/utils/StormBoundedExponentialBackoffRetry.java b/storm-core/src/jvm/backtype/storm/utils/StormBoundedExponentialBackoffRetry.java index be6f0e9..2911878 100644 --- a/storm-core/src/jvm/backtype/storm/utils/StormBoundedExponentialBackoffRetry.java +++ b/storm-core/src/jvm/backtype/storm/utils/StormBoundedExponentialBackoffRetry.java @@ -34,9 +34,10 @@ public class StormBoundedExponentialBackoffRetry extends BoundedExponentialBacko * The class provides generic exponential-linear backoff retry strategy for * storm. It calculates threshold for exponentially increasing sleeptime * for retries. Beyond this threshold, the sleeptime increase is linear. + * * Also adds jitter for exponential/linear retry. - * It guarantees currSleepTimeMs >= prevSleepTimeMs and - * baseSleepTimeMs <= currSleepTimeMs <= maxSleepTimeMs + * It guarantees `currSleepTimeMs >= prevSleepTimeMs` and + * `baseSleepTimeMs <= currSleepTimeMs <= maxSleepTimeMs` */ public StormBoundedExponentialBackoffRetry(int baseSleepTimeMs, int maxSleepTimeMs, int maxRetries) { http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java b/storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java index 4e4a4f4..edcfe05 100644 --- a/storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java +++ b/storm-core/src/jvm/backtype/storm/validation/ConfigValidation.java @@ -46,7 +46,7 @@ public class ConfigValidation { public abstract void validateField(String name, Object o); } - /** + /* * Validator definitions */ http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/backtype/storm/validation/ConfigValidationAnnotations.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/validation/ConfigValidationAnnotations.java b/storm-core/src/jvm/backtype/storm/validation/ConfigValidationAnnotations.java index ed93370..b0daec2 100644 --- a/storm-core/src/jvm/backtype/storm/validation/ConfigValidationAnnotations.java +++ b/storm-core/src/jvm/backtype/storm/validation/ConfigValidationAnnotations.java @@ -25,7 +25,7 @@ import java.lang.annotation.ElementType; import java.lang.annotation.RetentionPolicy; /** - * Note: every annotation interface must have method validatorClass() + * Note: every annotation interface must have method `validatorClass()` * For every annotation there must validator class to do the validation * To add another annotation for config validation, add another annotation @interface class. Implement the corresponding * validator logic in a class in ConfigValidation. Make sure validateField method in ConfigValidation knows how to use the validator http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/storm/trident/operation/Filter.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/storm/trident/operation/Filter.java b/storm-core/src/jvm/storm/trident/operation/Filter.java index abda334..c129844 100644 --- a/storm-core/src/jvm/storm/trident/operation/Filter.java +++ b/storm-core/src/jvm/storm/trident/operation/Filter.java @@ -19,7 +19,6 @@ package storm.trident.operation; import storm.trident.tuple.TridentTuple; - public interface Filter extends EachOperation { boolean isKeep(TridentTuple tuple); } http://git-wip-us.apache.org/repos/asf/storm/blob/d6d85518/storm-core/src/jvm/storm/trident/state/map/CachedMap.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/storm/trident/state/map/CachedMap.java b/storm-core/src/jvm/storm/trident/state/map/CachedMap.java index ecc495d..0190225 100644 --- a/storm-core/src/jvm/storm/trident/state/map/CachedMap.java +++ b/storm-core/src/jvm/storm/trident/state/map/CachedMap.java @@ -25,7 +25,6 @@ import storm.trident.util.LRUMap; /** * Useful to layer over a map that communicates with a database. you generally layer opaque map over this over your database store - * @author nathan * @param <T> */ public class CachedMap<T> implements IBackingMap<T> {
