Re: Kafka Source Connector tasks run only in same node

2016-08-31 Thread dhanuka ranasinghe
Please note *zookeeper* running on only in *10.72.133.195 * On Thu, Sep 1, 2016 at 9:49 AM, dhanuka ranasinghe < dhanuka.priyan...@gmail.com> wrote: > As you can see, connector/worker and task run in different hosts > > On Thu, Sep 1, 2016 at 9:48 AM, dhanuka ranasinghe

Re: Kafka Source Connector tasks run only in same node

2016-08-31 Thread dhanuka ranasinghe
As you can see, connector/worker and task run in different hosts On Thu, Sep 1, 2016 at 9:48 AM, dhanuka ranasinghe < dhanuka.priyan...@gmail.com> wrote: > kafka connector status > > {"name":"socket-connector","connector":{"state":"RUNNING","worker_id":"*10.72.133.194:8084 >

Re: Kafka Source Connector tasks run only in same node

2016-08-31 Thread dhanuka ranasinghe
kafka connector status {"name":"socket-connector","connector":{"state":"RUNNING","worker_id":"*10.72.133.194:8084 * "},"tasks":[{"state":"RUNNING","id":0,"worker_id":"*10.72.133.195:8084 *"}]} On Wed, Aug 31, 2016 at 8:34 PM, dhanuka ranasingh

Re: Kafka consumers unable to process message

2016-08-31 Thread Jason Gustafson
The replicas are always trying to fetch new data from the partition leader. When the leader fails, any in-flight fetches will fail and cause errors such as the ones you saw in the broker log. Eventually the replicas will discover the new leader and begin fetching again. And of course one of the rep

RE: Kafka consumers unable to process message

2016-08-31 Thread Ghosh, Achintya (Contractor)
I'm trying get the consumer logs and will send you. So it means it can happen even my local datacenter too. Still I'm not understanding if 3 nodes are up and message already replicated why it's trying to fetch the data from failed node. Can you please explain bit details how it works. Thanks for

Re: Kafka consumers unable to process message

2016-08-31 Thread Jason Gustafson
The exceptions show one of the replica fetcher threads on the broker failing which makes perfect sense since some of the partitions were bound to have leaders in the failed datacenter. I'd actually like to see the consumer logs at DEBUG level if possible. Thanks, Jason On Wed, Aug 31, 2016 at 7:4

RE: Kafka consumers unable to process message

2016-08-31 Thread Ghosh, Achintya (Contractor)
Hi Jason, No, I didn't bring down any zookeeper server. Even I tried with 3 zookeeper server one as an 'Observer' but the same issue. Here is the server log from one of the node of my other datacenter: [2016-09-01 01:25:19,221] INFO Truncating log TEST3-0 to offset 0. (kafka.log.Log) [2016-09-

Re: Kafka consumers unable to process message

2016-08-31 Thread Jason Gustafson
Hi Achintya, Just to clarify, you did not take down either of the zookeepers in this test, right? Having only two zookeepers in the ensemble would mean that if either one of them failed, zookeeper wouldn't be able to reach quorum. I'm not entirely sure why this would happen. One possibility is th

MirrorMaker: mirror data from 0.8 to 0.10?

2016-08-31 Thread Ren Cao
Hi, We've been trying to use 0.10 build-in MirrorMaker to mirror data from a 0.8.2 cluster to a 0.10 cluster, but keep seeing follow errors: [cid:image002.jpg@01D203AE.0B3B3C70] It looks like a incompatibility issue when Kafka 0.10 consumes byte steam produced by Kafka 0.8 cluster. Can Mirro

RE: Kafka consumers unable to process message

2016-08-31 Thread Ghosh, Achintya (Contractor)
Hi Jason, Thanks for your response. I know that is a known issue and I resolved it calling wakeup method by another thread. But here my problem is different, let me explain , it's very basic I created one cluster with 6 nodes( 3 from one datacenter and 3 from another(remote) datacenter and kep

Re: Kafka consumers unable to process message

2016-08-31 Thread Jason Gustafson
Kafka clients have tended to make broker retries transparent to the user. There's been discussion on various JIRAs about what we should do when all the known brokers become unreachable. One option is to revert to the configured bootstrap broker list, which is nice if you've configured a vip for boo

Re: Kafka Source Connector tasks run only in same node

2016-08-31 Thread Shikhar Bhushan
Hi Dhanuka, For something like a TCP connector where you have a dependency on the placement, the standalone mode makes more sense. With distributed mode you can't have guarantees of what instances your connector's tasks will be distributed to. Best, Shikhar On Wed, Aug 31, 2016 at 8:05 AM dhanu

Re: Kafka consumers unable to process message

2016-08-31 Thread Jim Jagielski
Yeah, let's figure out the "best" action to take... Looks like something I'd like to get a handle on. > On Aug 31, 2016, at 4:05 PM, Jason Gustafson wrote: > > Hi Achintya, > > We have a JIRA for this problem: https://issues. > apache.org/jira/browse/KAFKA-3834. Do you expect the client to rai

Re: Monitoring the max lag of a kafka streams application.

2016-08-31 Thread Rohit Valsakumar
Hi Guozhang, I verified that the metric is available to the custom reporter I registered with the Kafka Streams configuration and the class does an asynchronous poll on the metric periodically to get it’s value and logs it. Once the job has caught up to the end offsets in the input topic, the valu

Re: How distributed countByKey works in KStream ?

2016-08-31 Thread Matthias J. Sax
Hi Tommy, I did checkout your github project and can verify the "issue". As you are using Kafka 0.10.0.1 the automatic repartitioning step is not available. If you use "trunk" version, your program will run as expected. If you want to stay with 0.10.0.1, you need to repartition the data after map

Re: Monitoring the max lag of a kafka streams application.

2016-08-31 Thread Rohit Valsakumar
I will take a look at it. Thanks, Rohit On 8/30/16, 6:10 PM, "Guozhang Wang" wrote: >Hi Rohit, > >Just for clarification, as stated in the java doc, metricChange "is called >whenever a metric is updated or added". It is not the function when a >metric is recorded; in fact, the metrics collectio

Re: Monitoring the max lag of a kafka streams application.

2016-08-31 Thread Rohit Valsakumar
Hi Guozhang, Thanks for confirming the approach and yes I have a Processor node to track the flow of records through the job and it shows that the job is processing the records. I am trying to simulate a slow processing job so that I can verify if the metricChange callback is called for records-la

Re: Kafka consumers unable to process message

2016-08-31 Thread Jason Gustafson
Hi Achintya, We have a JIRA for this problem: https://issues. apache.org/jira/browse/KAFKA-3834. Do you expect the client to raise an exception in this case or do you just want to keep it from blocking indefinitely? If the latter, you could escape the poll from another thread using wakeup(). Than

OffsetsLoadInProgressException and Consumer Rewind

2016-08-31 Thread Thomas Norden
Hi, I am running kafka 0.8.2.1 and we have some consumers that is using kafka to store its offsets (offsets.storage=kafka). About once a week the consumer will see the exception OffsetsLoadInProgressException and when the exception goes away the consumer is reset the the earliest offset. It does

Kafka consumers unable to process message

2016-08-31 Thread Ghosh, Achintya (Contractor)
Hi there, Kafka consumer gets stuck at consumer.poll() method if my current datacenter is down and replicated messages are in remote datacenter. How to solve that issue? Thanks Achintya

Re: How distributed countByKey works in KStream ?

2016-08-31 Thread Guozhang Wang
Hello Tommy, Which version of Kafka are you using? Guozhang On Wed, Aug 31, 2016 at 4:41 AM, Tommy Q wrote: > I cleaned up all the zookeeper & kafka states and run the WordCountDemo > again, the results in wc-out is still wrong: > > a 1 > > b 1 > > a 1 > > b 1 > > c 1 > > > > On Wed, Aug 31, 2

Re: Auto offset commit failed

2016-08-31 Thread Guozhang Wang
Hello Yuanjia, 1) You can take a look at this wiki for details in consumer (re)-join group. https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Client-side+Assignment+Proposal In short summary, the coordinator will detect if a consumer has failed based on the heartbeat protocol, and if yes t

Re: handling generics in Kafka Scala

2016-08-31 Thread Dean Wampler
Okay, the type parameters with the variances need to be after the method name, like this: private def createNewConsumer[K <: java.util.ArrayList[Byte],V <: java.util.ArrayList[Byte]](): KafkaConsumer[K,V] = {...} Dean Wampler, Ph.D. Author: Programming Scala, 2nd Edition

Kafka Source Connector tasks run only in same node

2016-08-31 Thread dhanuka ranasinghe
Hi All, I'm new to Kafka and I created TCP Kafka Source connector [1] and deployed in Kafka Connect Cluster in distributed mode. There is two node/instance of connectors in Kafka Connector cluster. But out of them only in one node run *tasks* even though it shows connector in both nodes active an

Re: handling generics in Kafka Scala

2016-08-31 Thread Martin Gainty
supposedly gmail wont strip \n so we'll try again with non-html mail composer noob with Scala so Im looking for an experienced answer ConsumerGroupCommand.scala //private def createNewConsumer(): KafkaConsumer[String, String] = { //private def createNewConsumer(): KafkaConsumer[K extends //

Re: handling generics in Kafka Scala

2016-08-31 Thread Dean Wampler
Could you format that so it's readable? Dean Wampler, Ph.D. Author: Programming Scala, 2nd Edition (O'Reilly) Lightbend @deanwampler http://polyglotprogramming.com On Tue, Aug 30, 2016 at 10

Re: How distributed countByKey works in KStream ?

2016-08-31 Thread Tommy Q
I cleaned up all the zookeeper & kafka states and run the WordCountDemo again, the results in wc-out is still wrong: a 1 > b 1 > a 1 > b 1 > c 1 On Wed, Aug 31, 2016 at 5:32 PM, Michael Noll wrote: > Can you double-check whether the results in wc-out are not rather: > > a 1 > b 1 > a 2 > b 2

Kafka network metrics with Ambari Metrics System

2016-08-31 Thread Jahn Roux
Hi users, We recently moved from Ambari 1.7 (kafka 0.10) to Ambari 2.2 (kafka 0.10). We have also moved from a Ganglia metrics server to Ambari Metrics Collector + grafana. With Ganglia we tracked a crucial metric called kafka.network.RequestMetrics.LocalTimeMs.request.Produce. However sinc

Re: How distributed countByKey works in KStream ?

2016-08-31 Thread Michael Noll
Can you double-check whether the results in wc-out are not rather: a 1 b 1 a 2 b 2 c 1 ? On Wed, Aug 31, 2016 at 5:47 AM, Tommy Q wrote: > Tried the word count example as discussed, the result in wc-out is wrong: > > a 1 > > b 1 > > a 1 > > b 1 > > c 1 > > > The expected result should be: > >

Re: How distributed countByKey works in KStream ?

2016-08-31 Thread Tommy Q
Hi @Matthias & @Michael I pushed the WordCountDemo code to GitHub https://github.com/deeplambda/kstream-debug, can you help to debug the demo ? Thanks, Tommy On Wed, Aug 31, 2016 at 11:47 AM, Tommy Q wrote: > Tried the word count example as discussed, the result in wc-out is wrong: > > a 1 >> b