Skip to content

Conversation

@revans2
Copy link
Contributor

@revans2 revans2 commented Jan 9, 2017

No description provided.

@revans2
Copy link
Contributor Author

revans2 commented Jan 9, 2017

This is the 1.x version of #1808

@revans2
Copy link
Contributor Author

revans2 commented Jan 11, 2017

The test failures are unrelated and are around the integration tests that always seem to fail lately.

};

protected KafkaSpoutConfig<String,String> newKafkaSpoutConfig() {
return KafkaSpoutConfig.builder("127.0.0.1:9092", TOPIC_1, TOPIC_2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we using a hardcoded port here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an exact translation of the original code. Even down to not using KAFKA_LOCAL_BROKER. If people want me to change it I am happy to, but I thought it best to not overreach on the scope of the pull request. At least until the code worked.


@Override
public String getTopic(Tuple tuple) {
if (fieldIndex < tuple.size()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protect against negative index?

@@ -1,192 +1,5 @@
#Storm Kafka Spout with New Kafka Consumer API
#Storm Kafka integration using the kafka-client jar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we call it as Kafka New consumer API. Not many understand its using newer api by calling it as "kafka-client" jar

public KafkaSpoutTuplesBuilderWildcardTopics(KafkaSpoutTupleBuilder<K, V> tupleBuilder) {
this.tupleBuilder = tupleBuilder;
}
public class StormStringDeserializer extends StringDeserializer implements SerializableDeserializer<String> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this? users can configure the StringSerializer from kafka-clients lib

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we need this even more now. The Kafka Deserializer (including StringDeserializer) is not java serializable. So if we don't do this on a real storm cluster we will get exceptions when we try to write out the spout.

I can look into trying to support some kind of generics like

public <NK> Builder<NK,V> setKey(Class<? extends Deserializer<NK>> keyDeserializer) {

But I really don't know if that works. I'll try it out and let you know.

@harshach
Copy link
Contributor

@revans2 overall looks good to me. Minor nits.

@ppoulosk
Copy link
Contributor

+1, Non-binding.

@revans2
Copy link
Contributor Author

revans2 commented Jan 17, 2017

@harshach and @ppoulosk I just pushed fixes for your review comments. @harshach you were right I could and did remove StormStringDeserializer. I think this made the code much better.

@ppoulosk
Copy link
Contributor

Thanks, @revans2. Still +1, NB.

@revans2 revans2 force-pushed the STORM-2225-1.x branch 2 times, most recently from 17a2e6c to 094d6dc Compare January 23, 2017 21:12
@harshach
Copy link
Contributor

+1. @revans2 can you squash the commits.

@revans2
Copy link
Contributor Author

revans2 commented Jan 24, 2017

@harshach I am happy to once I get a +1 on #1808 too. It has almost identical code, but is for master.

Robert (Bobby) Evans added 2 commits January 30, 2017 14:47
 into STORM-2236-1.x-merge"

This reverts commit 389966e, reversing
changes made to 3979777.
STORM-2225: change spout config to be simpler.
STORM-2228: removed ability to request a single topic go to multiple streams
STORM-2236: Reimplemented manual partition management on top of STORM-2225
@revans2
Copy link
Contributor Author

revans2 commented Jan 30, 2017

This branch is also in sync with #1808 now tabs are removed and code is squashed.

@hmcl
Copy link
Contributor

hmcl commented Jan 30, 2017

+1

@HeartSaVioR
Copy link
Contributor

@revans2
Seems like the commit for JDK 7 is removed so Travis CI shows compile error on JDK 7. Could you address this?

@revans2
Copy link
Contributor Author

revans2 commented Jan 31, 2017

It was two jdk8 annotations that I didn't remove as part of rework/upmerging. I'll get them

@revans2
Copy link
Contributor Author

revans2 commented Jan 31, 2017

@HeartSaVioR I removed the unneeded annotation and rebuilt with JDK7

@HeartSaVioR
Copy link
Contributor

+1

@asfgit asfgit merged commit 2986d0c into apache:1.x-branch Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants