Github user merrimanr commented on a diff in the pull request:
https://github.com/apache/metron/pull/1250#discussion_r230203860
--- Diff:
metron-platform/metron-common/src/main/java/org/apache/metron/common/bolt/ConfiguredEnrichmentBolt.java
---
@@ -17,18 +17,41 @@
*/
package org.apache.metron.common.bolt;
+import java.io.IOException;
import java.lang.invoke.MethodHandles;
+import java.util.Map;
+
+import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.metron.common.configuration.EnrichmentConfigurations;
+import org.apache.metron.stellar.common.utils.HttpClientUtils;
+import org.apache.storm.task.OutputCollector;
+import org.apache.storm.task.TopologyContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class ConfiguredEnrichmentBolt extends
ConfiguredBolt<EnrichmentConfigurations> {
private static final Logger LOG =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+ protected CloseableHttpClient httpClient;
public ConfiguredEnrichmentBolt(String zookeeperUrl) {
super(zookeeperUrl, "ENRICHMENT");
}
+ @Override
+ public void prepare(Map stormConf, TopologyContext context,
OutputCollector collector) {
+ super.prepare(stormConf, context, collector);
--- End diff --
I can add a property to configure this. Should it be included by default
or not ?
Do you think instantiating this object but never using it would be harmful?
It might make things simpler for users if there is one less setting to worry
about.
---