STORM-1079. Batch Puts to HBase.
Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/7710eef9 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/7710eef9 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/7710eef9 Branch: refs/heads/master Commit: 7710eef9249249de2f8bbd5670a50cf6901f7b3e Parents: e3b5c27 Author: Sriharsha Chintalapani <m...@harsha.io> Authored: Wed Sep 30 16:10:36 2015 -0700 Committer: Sriharsha Chintalapani <m...@harsha.io> Committed: Wed Sep 30 16:10:36 2015 -0700 ---------------------------------------------------------------------- external/storm-hbase/README.md | 10 ++++++++++ .../org/apache/storm/hbase/bolt/AbstractHBaseBolt.java | 7 ------- 2 files changed, 10 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/7710eef9/external/storm-hbase/README.md ---------------------------------------------------------------------- diff --git a/external/storm-hbase/README.md b/external/storm-hbase/README.md index 81d351a..fd4d0ad 100644 --- a/external/storm-hbase/README.md +++ b/external/storm-hbase/README.md @@ -107,6 +107,16 @@ To use the `HBaseBolt`, construct it with the name of the table to write to, an ```java HBaseBolt hbase = new HBaseBolt("WordCount", mapper); ``` + + HBaseBolt params + +|Arg |Description | Type | Default | +|--- |--- |--- +|writeToWAL | To turn Durability SYNC_WAL or SKIP_WAL | Boolean (Optional) | True | +|configKey | Any Hbase related configs | Map (Optional) | | +|batchSize | Max no.of Tuples batched together to write to HBase | Int (Optional) | 15000 | +|flushIntervalSecs| (In seconds) If > 0 HBase Bolt will periodically flush transaction batches. Enabling this is recommended to avoid tuple timeouts while waiting for a batch to fill up. | Int (Optional) | 0 | + The `HBaseBolt` will delegate to the `mapper` instance to figure out how to persist tuple data to HBase. http://git-wip-us.apache.org/repos/asf/storm/blob/7710eef9/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java ---------------------------------------------------------------------- diff --git a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java index aad3d88..3372192 100644 --- a/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java +++ b/external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/AbstractHBaseBolt.java @@ -75,12 +75,5 @@ public abstract class AbstractHBaseBolt extends BaseRichBolt { hbaseConfMap.put(Config.TOPOLOGY_AUTO_CREDENTIALS, map.get(Config.TOPOLOGY_AUTO_CREDENTIALS)); this.hBaseClient = new HBaseClient(hbaseConfMap, hbConfig, tableName); - // If interval is non-zero then it has already been explicitly set and we should not default it - if (conf.containsKey("topology.message.timeout.secs") && flushIntervalSecs == 0) - { - Integer topologyTimeout = Integer.parseInt(conf.get("topology.message.timeout.secs").toString()); - flushIntervalSecs = (int)(Math.floor(topologyTimeout / 2)); - LOG.info("Setting tick tuple interval to [" + flushIntervalSecs + "] based on topology timeout"); - } } }