Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/772#discussion_r41536283
--- Diff:
external/storm-hbase/src/main/java/org/apache/storm/hbase/bolt/HBaseBolt.java
---
@@ -53,21 +61,69 @@ public HBaseBolt withConfigKey(String configKey) {
return this;
}
+ public HBaseBolt withBatchSize(int batchSize) {
+ this.batchSize = batchSize;
+ return this;
+ }
+
+ public HBaseBolt withFlushIntervalSecs(int flushIntervalSecs) {
+ this.flushIntervalSecs = flushIntervalSecs;
+ return this;
+ }
+
+ @Override
+ public Map<String, Object> getComponentConfiguration() {
+ Map<String, Object> conf = super.getComponentConfiguration();
+ if (conf == null) {
+ conf = new Config();
+ }
+
+ if (conf.containsKey("topology.message.timeout.secs") &&
tickTupleInterval == 0) {
+ Integer topologyTimeout =
Integer.parseInt(conf.get("topology.message.timeout.secs").toString());
+ flushIntervalSecs = (int)(Math.floor(topologyTimeout / 2));
+ LOG.debug("Setting flush interval to [" + flushIntervalSecs +
"] based on topology.message.timeout.secs");
--- End diff --
minor nit. Can we use the "{}" for logging instead of using +.
---
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.
---