[
https://issues.apache.org/jira/browse/METRON-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15938435#comment-15938435
]
ASF GitHub Bot commented on METRON-793:
---------------------------------------
Github user cestella commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/486#discussion_r107681982
--- Diff:
metron-platform/metron-parsers/src/main/java/org/apache/metron/parsers/topology/ParserTopologyBuilder.java
---
@@ -106,19 +105,26 @@ public static TopologyBuilder build(String
zookeeperUrl,
/**
* Create a spout that consumes tuples from a Kafka topic.
*
- * @param zookeeperUrl Zookeeper URL
+ * @param zkQuorum Zookeeper URL
* @param sensorType Type of sensor
- * @param offset Kafka topic offset where the topology
will start; BEGINNING, END, WHERE_I_LEFT_OFF
- * @param kafkaSpoutConfigOptions Configuration options for the kafka
spout
+ * @param kafkaConfigOptional Configuration options for the kafka
spout
* @param parserConfig Configuration for the parser
* @return
*/
- private static KafkaSpout createKafkaSpout(String zookeeperUrl, String
sensorType, SpoutConfig.Offset offset, EnumMap<SpoutConfigOptions, Object>
kafkaSpoutConfigOptions, SensorParserConfig parserConfig) {
-
+ private static StormKafkaSpout createKafkaSpout(String zkQuorum, String
sensorType, Optional<Map<String, Object>> kafkaConfigOptional,
SensorParserConfig parserConfig) {
+ Map<String, Object> kafkaSpoutConfigOptions =
kafkaConfigOptional.orElse(new HashMap<>());
String inputTopic = parserConfig.getSensorTopic() != null ?
parserConfig.getSensorTopic() : sensorType;
- SpoutConfig spoutConfig = new SpoutConfig(new ZkHosts(zookeeperUrl),
inputTopic, "", inputTopic).from(offset);
- SpoutConfigOptions.configure(spoutConfig, kafkaSpoutConfigOptions);
- return new KafkaSpout(spoutConfig);
+
if(!kafkaSpoutConfigOptions.containsKey(SpoutConfiguration.FIRST_POLL_OFFSET_STRATEGY.key))
{
--- End diff --
Yep
> Migrate to storm-kafka-client kafka spout from storm-kafka
> ----------------------------------------------------------
>
> Key: METRON-793
> URL: https://issues.apache.org/jira/browse/METRON-793
> Project: Metron
> Issue Type: Improvement
> Reporter: Casey Stella
>
> In order to eventually support kerberos, the suggested path is to migrate to
> the new kafka spout (org.apache.storm:storm-kafka-client) which uses the new
> consumer API.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)