You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2016/10/06 15:08:42 UTC
[47/50] [abbrv] storm git commit: storm-jms: apply Apache license
headers
storm-jms: apply Apache license headers
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/96431b31
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/96431b31
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/96431b31
Branch: refs/heads/master
Commit: 96431b31c4b06dfb2e69b0828cd0e35bd5903eb4
Parents: 6a57e16
Author: P. Taylor Goetz <pt...@gmail.com>
Authored: Wed Oct 5 14:26:28 2016 -0400
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Wed Oct 5 14:26:28 2016 -0400
----------------------------------------------------------------------
.../apache/storm/jms/JmsMessageProducer.java | 17 +++
.../java/org/apache/storm/jms/JmsProvider.java | 17 +++
.../org/apache/storm/jms/JmsTupleProducer.java | 17 +++
.../java/org/apache/storm/jms/bolt/JmsBolt.java | 17 +++
.../apache/storm/jms/spout/JmsMessageID.java | 17 +++
.../org/apache/storm/jms/spout/JmsSpout.java | 17 +++
.../org/apache/storm/jms/trident/JmsBatch.java | 17 +++
.../storm/jms/trident/TridentJmsSpout.java | 17 +++
.../apache/storm/jms/example/GenericBolt.java | 150 +++++++++----------
.../storm/jms/example/SpringJmsProvider.java | 3 +-
10 files changed, 212 insertions(+), 77 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsMessageProducer.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsMessageProducer.java b/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsMessageProducer.java
index 6f26d89..4932929 100644
--- a/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsMessageProducer.java
+++ b/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsMessageProducer.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.storm.jms;
import java.io.Serializable;
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsProvider.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsProvider.java b/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsProvider.java
index 5d96bb8..d976326 100644
--- a/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsProvider.java
+++ b/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsProvider.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.storm.jms;
import java.io.Serializable;
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsTupleProducer.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsTupleProducer.java b/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsTupleProducer.java
index 7d42ab5..0bbb3a0 100644
--- a/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsTupleProducer.java
+++ b/external/storm-jms/core/src/main/java/org/apache/storm/jms/JmsTupleProducer.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.storm.jms;
import java.io.Serializable;
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/core/src/main/java/org/apache/storm/jms/bolt/JmsBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/core/src/main/java/org/apache/storm/jms/bolt/JmsBolt.java b/external/storm-jms/core/src/main/java/org/apache/storm/jms/bolt/JmsBolt.java
index 10c1b30..791b11f 100644
--- a/external/storm-jms/core/src/main/java/org/apache/storm/jms/bolt/JmsBolt.java
+++ b/external/storm-jms/core/src/main/java/org/apache/storm/jms/bolt/JmsBolt.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.storm.jms.bolt;
import java.util.Map;
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsMessageID.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsMessageID.java b/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsMessageID.java
index b6b57c1..b78a41e 100644
--- a/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsMessageID.java
+++ b/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsMessageID.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.storm.jms.spout;
import java.io.Serializable;
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsSpout.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsSpout.java b/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsSpout.java
index b02e0fa..6aaa7c9 100644
--- a/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsSpout.java
+++ b/external/storm-jms/core/src/main/java/org/apache/storm/jms/spout/JmsSpout.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.storm.jms.spout;
import java.io.Serializable;
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/JmsBatch.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/JmsBatch.java b/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/JmsBatch.java
index 3a7981f..c990058 100644
--- a/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/JmsBatch.java
+++ b/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/JmsBatch.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.storm.jms.trident;
/**
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/TridentJmsSpout.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/TridentJmsSpout.java b/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/TridentJmsSpout.java
index 951d2b2..55e29bc 100644
--- a/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/TridentJmsSpout.java
+++ b/external/storm-jms/core/src/main/java/org/apache/storm/jms/trident/TridentJmsSpout.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.storm.jms.trident;
import java.util.ArrayList;
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/GenericBolt.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/GenericBolt.java b/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/GenericBolt.java
index 90c8b2d..57de1ba 100644
--- a/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/GenericBolt.java
+++ b/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/GenericBolt.java
@@ -28,89 +28,89 @@ import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Tuple;
+
/**
* A generic <code>org.apache.storm.topology.IRichBolt</code> implementation
* for testing/debugging the Storm JMS Spout and example topologies.
- * <p/>
- * For debugging purposes, set the log level of the
+ * <p>
+ * For debugging purposes, set the log level of the
* <code>org.apache.storm.contrib.jms</code> package to DEBUG for debugging
* output.
- * @author tgoetz
*
+ * @author tgoetz
*/
@SuppressWarnings("serial")
public class GenericBolt extends BaseRichBolt {
- private static final Logger LOG = LoggerFactory.getLogger(GenericBolt.class);
- private OutputCollector collector;
- private boolean autoAck = false;
- private boolean autoAnchor = false;
- private Fields declaredFields;
- private String name;
-
- /**
- * Constructs a new <code>GenericBolt</code> instance.
- *
- * @param name The name of the bolt (used in DEBUG logging)
- * @param autoAck Whether or not this bolt should automatically acknowledge received tuples.
- * @param autoAnchor Whether or not this bolt should automatically anchor to received tuples.
- * @param declaredFields The fields this bolt declares as output.
- */
- public GenericBolt(String name, boolean autoAck, boolean autoAnchor, Fields declaredFields){
- this.name = name;
- this.autoAck = autoAck;
- this.autoAnchor = autoAnchor;
- this.declaredFields = declaredFields;
- }
-
- public GenericBolt(String name, boolean autoAck, boolean autoAnchor){
- this(name, autoAck, autoAnchor, null);
- }
-
- @SuppressWarnings("rawtypes")
- public void prepare(Map stormConf, TopologyContext context,
- OutputCollector collector) {
- this.collector = collector;
-
- }
-
- public void execute(Tuple input) {
- LOG.debug("[" + this.name + "] Received message: " + input);
-
-
-
- // only emit if we have declared fields.
- if(this.declaredFields != null){
- LOG.debug("[" + this.name + "] emitting: " + input);
- if(this.autoAnchor){
- this.collector.emit(input, input.getValues());
- } else{
- this.collector.emit(input.getValues());
- }
- }
-
- if(this.autoAck){
- LOG.debug("[" + this.name + "] ACKing tuple: " + input);
- this.collector.ack(input);
- }
-
- }
-
- public void cleanup() {
-
- }
-
- public void declareOutputFields(OutputFieldsDeclarer declarer) {
- if(this.declaredFields != null){
- declarer.declare(this.declaredFields);
- }
- }
-
- public boolean isAutoAck(){
- return this.autoAck;
- }
-
- public void setAutoAck(boolean autoAck){
- this.autoAck = autoAck;
- }
+ private static final Logger LOG = LoggerFactory.getLogger(GenericBolt.class);
+ private OutputCollector collector;
+ private boolean autoAck = false;
+ private boolean autoAnchor = false;
+ private Fields declaredFields;
+ private String name;
+
+ /**
+ * Constructs a new <code>GenericBolt</code> instance.
+ *
+ * @param name The name of the bolt (used in DEBUG logging)
+ * @param autoAck Whether or not this bolt should automatically acknowledge received tuples.
+ * @param autoAnchor Whether or not this bolt should automatically anchor to received tuples.
+ * @param declaredFields The fields this bolt declares as output.
+ */
+ public GenericBolt(String name, boolean autoAck, boolean autoAnchor, Fields declaredFields) {
+ this.name = name;
+ this.autoAck = autoAck;
+ this.autoAnchor = autoAnchor;
+ this.declaredFields = declaredFields;
+ }
+
+ public GenericBolt(String name, boolean autoAck, boolean autoAnchor) {
+ this(name, autoAck, autoAnchor, null);
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void prepare(Map stormConf, TopologyContext context,
+ OutputCollector collector) {
+ this.collector = collector;
+
+ }
+
+ public void execute(Tuple input) {
+ LOG.debug("[" + this.name + "] Received message: " + input);
+
+
+ // only emit if we have declared fields.
+ if (this.declaredFields != null) {
+ LOG.debug("[" + this.name + "] emitting: " + input);
+ if (this.autoAnchor) {
+ this.collector.emit(input, input.getValues());
+ } else {
+ this.collector.emit(input.getValues());
+ }
+ }
+
+ if (this.autoAck) {
+ LOG.debug("[" + this.name + "] ACKing tuple: " + input);
+ this.collector.ack(input);
+ }
+
+ }
+
+ public void cleanup() {
+
+ }
+
+ public void declareOutputFields(OutputFieldsDeclarer declarer) {
+ if (this.declaredFields != null) {
+ declarer.declare(this.declaredFields);
+ }
+ }
+
+ public boolean isAutoAck() {
+ return this.autoAck;
+ }
+
+ public void setAutoAck(boolean autoAck) {
+ this.autoAck = autoAck;
+ }
}
http://git-wip-us.apache.org/repos/asf/storm/blob/96431b31/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/SpringJmsProvider.java
----------------------------------------------------------------------
diff --git a/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/SpringJmsProvider.java b/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/SpringJmsProvider.java
index 2ed8c5f..306fc25 100644
--- a/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/SpringJmsProvider.java
+++ b/external/storm-jms/examples/src/main/java/org/apache/storm/jms/example/SpringJmsProvider.java
@@ -40,8 +40,7 @@ import org.apache.storm.jms.JmsProvider;
* <li>The name of the destination bean</li>
* </ol>
*
- *
- * @author tgoetz
+ *
*
*/
@SuppressWarnings("serial")