[
https://issues.apache.org/jira/browse/STORM-1979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15387802#comment-15387802
]
ASF GitHub Bot commented on STORM-1979:
---------------------------------------
Github user harshach commented on a diff in the pull request:
https://github.com/apache/storm/pull/1583#discussion_r71718893
--- Diff: external/storm-druid/README.md ---
@@ -0,0 +1,125 @@
+# Storm Druid Bolt and TridentState
+
+This module provides core Storm and Trident bolt implementations for
writing data to [Druid] (http://druid.io/) data store.
+This implementation uses Druid's [Tranquility library]
(https://github.com/druid-io/tranquility) to send messages to druid.
+
+Some of the implementation details are borrowed from existing [Tranquility
Storm Bolt] (https://github.com/druid-io/tranquility/blob/master/docs/storm.md).
+This new Bolt added to support latest storm release and maintain the bolt
in the storm repo.
+
+### Core Bolt
+Below example describes the usage of core bolt which is
`org.apache.storm.druid.bolt.DruidBeamBolt`
+This Bolt expects to receive tuples in which the zeroth element is your
event type.
+
+
+```java
+
+ DruidBeamBolt<Map<String, Object>> druidBolt = new
DruidBeamBolt<Map<String, Object>>(new SampleDruidBeamFactoryImpl());
+ topologyBuilder.setBolt("druid-bolt",
druidBolt).shuffleGrouping("event-gen");
+
+```
+
+
+### Trident State
+
+```java
+
+ final Stream stream = tridentTopology.newStream("batch-event-gen", new
SimpleBatchSpout(10));
+
+ stream.peek(new Consumer() {
+ @Override
+ public void accept(TridentTuple input) {
+ LOG.info("########### Received tuple: [{}]", input);
+ }
+ }).partitionPersist(new DruidBeamStateFactory(new
SampleDruidBeamFactoryImpl()), new Fields("events"), new
DruidBeamStateUpdater());
+
+```
+
+### Sample Beam Factory Implementation
+Druid bolt must be supplied with a BeamFactory. You can implement one of
these using the [DruidBeams builder's]
(https://github.com/druid-io/tranquility/blob/master/core/src/main/scala/com/metamx/tranquility/druid/DruidBeams.scala)
"buildBeam()" method.
+See the [Configuration documentation]
(https://github.com/druid-io/tranquility/blob/master/docs/configuration.md) for
details.
+For more details refer [Tranquility library]
(https://github.com/druid-io/tranquility) docs.
+
+```java
+
+public class SampleDruidBeamFactoryImpl implements
DruidBeamFactory<Map<String, Object>> {
+
+ @Override
+ public Beam<Map<String, Object>> makeBeam(Map<?, ?> conf,
IMetricsContext metrics) {
+
+
+ final String indexService = "druid/overlord"; // Your overlord's
druid.service
+ final String discoveryPath = "/druid/discovery"; // Your
overlord's druid.discovery.curator.path
+ final String dataSource = "test";
--- End diff --
same here why are we calling dataSource test?
> Storm Druid Connector
> ---------------------
>
> Key: STORM-1979
> URL: https://issues.apache.org/jira/browse/STORM-1979
> Project: Apache Storm
> Issue Type: Improvement
> Reporter: Sriharsha Chintalapani
> Assignee: Manikumar Reddy
>
> Storm Bolt & Trident state implementation for Druid.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)