[
https://issues.apache.org/jira/browse/STORM-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15057130#comment-15057130
]
ASF GitHub Bot commented on STORM-1210:
---------------------------------------
Github user rfarivar commented on a diff in the pull request:
https://github.com/apache/storm/pull/885#discussion_r47586077
--- Diff: external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java ---
@@ -149,9 +150,9 @@ public EmitState next(SpoutOutputCollector collector) {
}
if ((tups != null) && tups.iterator().hasNext()) {
- if(_spoutConfig.topicAsStreamId) {
+ if (!Strings.isNullOrEmpty(_spoutConfig.outputStreamId)) {
--- End diff --
Isn't it an overkill to import a whole package
(com.google.common.base.Strings) to only test for null or empty? Can't we just
use:
if (_spoutConfig.outputStreamId!=null && _spoutConfig.outputStreamId!="")
or something to that effect instead of importing a new library?
> Set Output Stream id in KafkaSpout
> ----------------------------------
>
> Key: STORM-1210
> URL: https://issues.apache.org/jira/browse/STORM-1210
> Project: Apache Storm
> Issue Type: New Feature
> Components: storm-kafka
> Affects Versions: 0.11.0
> Reporter: Zhiqiang He
> Assignee: Zhiqiang He
> Priority: Minor
>
> topicAsStreamId can only set output stream id to topic name. In some case ,we
> need to set output stream id to other name.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)