[GitHub] storm pull request #1565: STORM-1970: external project examples refator

2016-09-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/storm/pull/1565


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] storm pull request #1565: STORM-1970: external project examples refator

2016-09-01 Thread vesense
Github user vesense commented on a diff in the pull request:

https://github.com/apache/storm/pull/1565#discussion_r77186650
  
--- Diff: examples/storm-mqtt-examples/pom.xml ---
@@ -24,18 +24,24 @@
 
   storm-mqtt-examples
 
-  
-org.apache.storm
-storm-mqtt-parent
-2.0.0-SNAPSHOT
-../pom.xml
-  
+
--- End diff --

Will fix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] storm pull request #1565: STORM-1970: external project examples refator

2016-08-31 Thread HeartSaVioR
Github user HeartSaVioR commented on a diff in the pull request:

https://github.com/apache/storm/pull/1565#discussion_r77088437
  
--- Diff: examples/storm-mqtt-examples/pom.xml ---
@@ -24,18 +24,24 @@
 
   storm-mqtt-examples
 
-  
-org.apache.storm
-storm-mqtt-parent
-2.0.0-SNAPSHOT
-../pom.xml
-  
+
--- End diff --

nit: broken indentation


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] storm pull request #1565: STORM-1970: external project examples refator

2016-07-19 Thread vesense
Github user vesense commented on a diff in the pull request:

https://github.com/apache/storm/pull/1565#discussion_r71467698
  
--- Diff: 
examples/storm-elasticsearch-examples/src/main/java/org/apache/storm/elasticsearch/common/EsConstants.java
 ---
@@ -0,0 +1,22 @@
+/**
+ * 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.elasticsearch.common;
+
+public class EsConstants {
--- End diff --

This is a copy. both unit tests and example use this class. so dose 
`EsTestUtil`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] storm pull request #1565: STORM-1970: external project examples refator

2016-07-19 Thread abhishekagarwal87
Github user abhishekagarwal87 commented on a diff in the pull request:

https://github.com/apache/storm/pull/1565#discussion_r71303863
  
--- Diff: 
examples/storm-elasticsearch-examples/src/main/java/org/apache/storm/elasticsearch/common/EsConstants.java
 ---
@@ -0,0 +1,22 @@
+/**
+ * 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.elasticsearch.common;
+
+public class EsConstants {
--- End diff --

This looks like a new class since I don't see a corresponding delete. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] storm pull request #1565: STORM-1970: external project examples refator

2016-07-16 Thread abhishekagarwal87
Github user abhishekagarwal87 commented on a diff in the pull request:

https://github.com/apache/storm/pull/1565#discussion_r71077064
  
--- Diff: 
examples/storm-mongodb-examples/src/main/java/org/apache/storm/mongodb/topology/InsertWordCount.java
 ---
@@ -1,81 +1,81 @@
-/**
- * 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.mongodb.topology;
-
-import org.apache.storm.Config;
-import org.apache.storm.LocalCluster;
-import org.apache.storm.StormSubmitter;
-import org.apache.storm.topology.TopologyBuilder;
-import org.apache.storm.tuple.Fields;
-import org.apache.storm.mongodb.bolt.MongoInsertBolt;
-import org.apache.storm.mongodb.common.mapper.MongoMapper;
-import org.apache.storm.mongodb.common.mapper.SimpleMongoMapper;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class InsertWordCount {
-private static final String WORD_SPOUT = "WORD_SPOUT";
-private static final String COUNT_BOLT = "COUNT_BOLT";
-private static final String INSERT_BOLT = "INSERT_BOLT";
-
-private static final String TEST_MONGODB_URL = 
"mongodb://127.0.0.1:27017/test";
-private static final String TEST_MONGODB_COLLECTION_NAME = "wordcount";
-
-
-public static void main(String[] args) throws Exception {
-Config config = new Config();
-
-String url = TEST_MONGODB_URL;
-String collectionName = TEST_MONGODB_COLLECTION_NAME;
-
-if (args.length >= 2) {
-url = args[0];
-collectionName = args[1];
-}
-
-WordSpout spout = new WordSpout();
-WordCounter bolt = new WordCounter();
-
-MongoMapper mapper = new SimpleMongoMapper()
-.withFields("word", "count");
-
-MongoInsertBolt insertBolt = new MongoInsertBolt(url, 
collectionName, mapper);
-
-// wordSpout ==> countBolt ==> MongoInsertBolt
-TopologyBuilder builder = new TopologyBuilder();
-
-builder.setSpout(WORD_SPOUT, spout, 1);
-builder.setBolt(COUNT_BOLT, bolt, 1).shuffleGrouping(WORD_SPOUT);
-builder.setBolt(INSERT_BOLT, insertBolt, 
1).fieldsGrouping(COUNT_BOLT, new Fields("word"));
-
-
-if (args.length == 2) {
-LocalCluster cluster = new LocalCluster();
-cluster.submitTopology("test", config, 
builder.createTopology());
-Thread.sleep(3);
-cluster.killTopology("test");
-cluster.shutdown();
-System.exit(0);
-} else if (args.length == 3) {
-StormSubmitter.submitTopology(args[2], config, 
builder.createTopology());
-} else{
-System.out.println("Usage: InsertWordCount  
 [topology name]");
-}
-}
-}
+/**
--- End diff --

I see some formatting changes. Can you revert them if possible? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] storm pull request #1565: STORM-1970: external project examples refator

2016-07-14 Thread vesense
Github user vesense commented on a diff in the pull request:

https://github.com/apache/storm/pull/1565#discussion_r70777166
  
--- Diff: 
examples/storm-mongodb-examples/src/main/java/org/apache/storm/mongodb/topology/InsertWordCount.java
 ---
@@ -1,81 +1,81 @@
-/**
- * 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.mongodb.topology;
-
-import org.apache.storm.Config;
-import org.apache.storm.LocalCluster;
-import org.apache.storm.StormSubmitter;
-import org.apache.storm.topology.TopologyBuilder;
-import org.apache.storm.tuple.Fields;
-import org.apache.storm.mongodb.bolt.MongoInsertBolt;
-import org.apache.storm.mongodb.common.mapper.MongoMapper;
-import org.apache.storm.mongodb.common.mapper.SimpleMongoMapper;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class InsertWordCount {
-private static final String WORD_SPOUT = "WORD_SPOUT";
-private static final String COUNT_BOLT = "COUNT_BOLT";
-private static final String INSERT_BOLT = "INSERT_BOLT";
-
-private static final String TEST_MONGODB_URL = 
"mongodb://127.0.0.1:27017/test";
-private static final String TEST_MONGODB_COLLECTION_NAME = "wordcount";
-
-
-public static void main(String[] args) throws Exception {
-Config config = new Config();
-
-String url = TEST_MONGODB_URL;
-String collectionName = TEST_MONGODB_COLLECTION_NAME;
-
-if (args.length >= 2) {
-url = args[0];
-collectionName = args[1];
-}
-
-WordSpout spout = new WordSpout();
-WordCounter bolt = new WordCounter();
-
-MongoMapper mapper = new SimpleMongoMapper()
-.withFields("word", "count");
-
-MongoInsertBolt insertBolt = new MongoInsertBolt(url, 
collectionName, mapper);
-
-// wordSpout ==> countBolt ==> MongoInsertBolt
-TopologyBuilder builder = new TopologyBuilder();
-
-builder.setSpout(WORD_SPOUT, spout, 1);
-builder.setBolt(COUNT_BOLT, bolt, 1).shuffleGrouping(WORD_SPOUT);
-builder.setBolt(INSERT_BOLT, insertBolt, 
1).fieldsGrouping(COUNT_BOLT, new Fields("word"));
-
-
-if (args.length == 2) {
-LocalCluster cluster = new LocalCluster();
-cluster.submitTopology("test", config, 
builder.createTopology());
-Thread.sleep(3);
-cluster.killTopology("test");
-cluster.shutdown();
-System.exit(0);
-} else if (args.length == 3) {
-StormSubmitter.submitTopology(args[2], config, 
builder.createTopology());
-} else{
-System.out.println("Usage: InsertWordCount  
 [topology name]");
-}
-}
-}
+/**
--- End diff --

it's strange. I just move the file to the new folder like other external 
projects. no code changes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] storm pull request #1565: STORM-1970: external project examples refator

2016-07-14 Thread vesense
GitHub user vesense opened a pull request:

https://github.com/apache/storm/pull/1565

STORM-1970: external project examples refator

refactor example projects:
* storm-elasticsearch
* storm-hbase
* storm-hdfs
* storm-hive
* storm-jdbc
* storm-kafka
* storm-mongodb
* storm-mqtt
* storm-opentsdb
* storm-redis
* storm-solr

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/vesense/storm external-examples

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/storm/pull/1565.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1565


commit 5fcdb4c2d15969cbc9b1df22ba705e837aff4fcb
Author: vesense 
Date:   2016-07-14T09:13:39Z

STORM-1970: external project examples refator




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---