Github user harshach commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1583#discussion_r72305132
  
    --- Diff: 
external/storm-druid/src/test/java/org/apache/storm/druid/SampleDruidBeamFactoryImpl.java
 ---
    @@ -0,0 +1,116 @@
    +/**
    + * 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
    + * <p>
    + * http://www.apache.org/licenses/LICENSE-2.0
    + * <p>
    + * 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.druid;
    +
    +import com.google.common.collect.ImmutableList;
    +import com.metamx.common.Granularity;
    +import com.metamx.tranquility.beam.Beam;
    +import com.metamx.tranquility.beam.ClusteredBeamTuning;
    +import com.metamx.tranquility.druid.DruidBeams;
    +import com.metamx.tranquility.druid.DruidDimensions;
    +import com.metamx.tranquility.druid.DruidLocation;
    +import com.metamx.tranquility.druid.DruidRollup;
    +import com.metamx.tranquility.typeclass.Timestamper;
    +import io.druid.data.input.impl.TimestampSpec;
    +import io.druid.granularity.QueryGranularities;
    +import io.druid.query.aggregation.AggregatorFactory;
    +import io.druid.query.aggregation.CountAggregatorFactory;
    +import org.apache.curator.framework.CuratorFramework;
    +import org.apache.curator.framework.CuratorFrameworkFactory;
    +import org.apache.curator.retry.ExponentialBackoffRetry;
    +import org.apache.storm.druid.bolt.DruidBeamFactory;
    +import org.apache.storm.task.IMetricsContext;
    +import org.joda.time.DateTime;
    +import org.joda.time.Period;
    +
    +import java.util.List;
    +import java.util.Map;
    +
    +/**
    + * 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.
    + */
    +public class SampleDruidBeamFactoryImpl implements 
DruidBeamFactory<Map<String, Object>> {
    +    Map<String, Object> factoryConf = null;
    +
    +
    +    public SampleDruidBeamFactoryImpl(Map<String, Object> factoryConf) {
    +        this.factoryConf = factoryConf; // This can be used to pass config 
values
    +    }
    +
    +    @Override
    +    public Beam<Map<String, Object>> makeBeam(Map<?, ?> conf, 
IMetricsContext metrics) {
    +
    +
    +        final String indexService = "druid/overlord"; // Your overlord's 
druid.service
    --- End diff --
    
    should we make these as configurable options ? and alos there is no leading 
/ here 


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to