RE: where do I get the Kafka classes
Learning build tools is going to take a bit. For the time being, I'd really just like to get the jars and add them manually. I'm not sure anybody has showed me where to get the jars yet. B. > From: ghe...@cloudera.com > Date: Tue, 17 Nov 2015 08:25:11 -0600 > Subject: Re: where do I get the Kafka classes > To: users@kafka.apache.org > > Hi Adaryl, > > Kafka and its clients doesn't define how you must build your project. You > are free to pull together all the jars needed and include them however you > like. Though that may be difficult and error prone depending on the method > you choose. Thats where build tools like maven, gradle, etc come in. They > make sure your build is "easy", repeatable, and clear. > > Here are some answers on the web about why using a build tool is a good > idea: > >- > > http://stackoverflow.com/questions/1382432/whats-with-all-the-java-build-tools >- > > http://stackoverflow.com/questions/10764576/why-do-we-need-maven-or-ant-if-we-already-have-eclipse > > Here are some quick-start guides to get you started with maven or gradle: > >- https://maven.apache.org/guides/getting-started/ >- https://docs.gradle.org/current/userguide/tutorials.html#N100D0 > > Stackoverflow is often a good place for general programming or java > questions (Just search first to be sure it hasn't been asked before). For > Kafka questions you can also search the mailing list archives here: > http://search-hadoop.com/kafka > > Hope that helps get you going. If you have any more Kafka related > questions, don't hesitate to ask. > > Thanks, > Grant > > On Tue, Nov 17, 2015 at 12:51 AM, Adaryl "Bob" Wakefield, MBA < > adaryl.wakefi...@hotmail.com> wrote: > > > Is it not possible to just manually include the packages in my Eclipse > > project? Do you have to use a build tool? > > > > > > > > Adaryl "Bob" Wakefield, MBA > > Principal > > Mass Street Analytics, LLC > > 913.938.6685 > > www.linkedin.com/in/bobwakefieldmba > > Twitter: @BobLovesData > > -Original Message- From: Ewen Cheslack-Postava > > Sent: Tuesday, November 17, 2015 12:32 AM > > To: users@kafka.apache.org > > Subject: Re: where do I get the Kafka classes > > > > > > Hi Adaryl, > > > > First, it looks like you might be trying to use the old producer interface. > > That interface is going to be deprecated in favor of the new producer > > (under org.apache.kafka.clients.producer). I'd highly recommend using the > > new producer interface instead. > > > > Second, perhaps this repository of examples will be a helpful starting > > point: https://github.com/confluentinc/examples It's just a few basic > > examples, but also includes the necessary Maven build scripts. For example, > > the couple of lines after the highlighted one here: > > https://github.com/confluentinc/examples/blob/master/producer/pom.xml#L32 > > will include the necessary jar that includes the new producer. > > > > -Ewen > > > > On Mon, Nov 16, 2015 at 10:16 PM, Adaryl "Bob" Wakefield, MBA < > > adaryl.wakefi...@hotmail.com> wrote: > > > > I'm somewhat new to java development and am studying how to write > >> producers. The sample code I'm looking at has the following import > >> statements: > >> > >> import kafka.javaapi.producer.Producer; > >> import kafka.producer.KeyedMessage; > >> import kafka.producer.ProducerConfig; > >> > >> The thing is, he doesn't use any packages that contain these classes. > >> You're supposed to use Gradle to compile the code but I'm not a whiz with > >> Gradle yet. I'm guessing that Gradle is somehow importing the necessary > >> classes at compile time. If I didn't want to use Gradle, how would I go > >> about just getting Kafka packages with the classes I need? I can't seem to > >> find them by googling. > >> > >> > >> Adaryl "Bob" Wakefield, MBA > >> Principal > >> Mass Street Analytics, LLC > >> 913.938.6685 > >> www.linkedin.com/in/bobwakefieldmba > >> Twitter: @BobLovesData > >> > >> > > > > > > -- > > Thanks, > > Ewen > > > > > > -- > Grant Henke > Software Engineer | Cloudera > gr...@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke
Re: where do I get the Kafka classes
BTW - you could download the jars directly from maven central if you want, for example: http://search.maven.org/#search|ga|1|a%3A%22kafka-clients%22 http://search.maven.org/#search|ga|1|a%3A%22spark-streaming-kafka-assembly_2.11%22%20AND%20v%3A%221.5.2%22 Ofir On Tue, Nov 17, 2015 at 9:36 PM, Adaryl Wakefield < adaryl.wakefi...@hotmail.com> wrote: > Learning build tools is going to take a bit. For the time being, I'd > really just like to get the jars and add them manually. I'm not sure > anybody has showed me where to get the jars yet. > B. > > > From: ghe...@cloudera.com > > Date: Tue, 17 Nov 2015 08:25:11 -0600 > > Subject: Re: where do I get the Kafka classes > > To: users@kafka.apache.org > > > > Hi Adaryl, > > > > Kafka and its clients doesn't define how you must build your project. You > > are free to pull together all the jars needed and include them however > you > > like. Though that may be difficult and error prone depending on the > method > > you choose. Thats where build tools like maven, gradle, etc come in. They > > make sure your build is "easy", repeatable, and clear. > > > > Here are some answers on the web about why using a build tool is a good > > idea: > > > >- > > > http://stackoverflow.com/questions/1382432/whats-with-all-the-java-build-tools > >- > > > http://stackoverflow.com/questions/10764576/why-do-we-need-maven-or-ant-if-we-already-have-eclipse > > > > Here are some quick-start guides to get you started with maven or gradle: > > > >- https://maven.apache.org/guides/getting-started/ > >- https://docs.gradle.org/current/userguide/tutorials.html#N100D0 > > > > Stackoverflow is often a good place for general programming or java > > questions (Just search first to be sure it hasn't been asked before). For > > Kafka questions you can also search the mailing list archives here: > > http://search-hadoop.com/kafka > > > > Hope that helps get you going. If you have any more Kafka related > > questions, don't hesitate to ask. > > > > Thanks, > > Grant > > > > On Tue, Nov 17, 2015 at 12:51 AM, Adaryl "Bob" Wakefield, MBA < > > adaryl.wakefi...@hotmail.com> wrote: > > > > > Is it not possible to just manually include the packages in my Eclipse > > > project? Do you have to use a build tool? > > > > > > > > > > > > Adaryl "Bob" Wakefield, MBA > > > Principal > > > Mass Street Analytics, LLC > > > 913.938.6685 > > > www.linkedin.com/in/bobwakefieldmba > > > Twitter: @BobLovesData > > > -Original Message- From: Ewen Cheslack-Postava > > > Sent: Tuesday, November 17, 2015 12:32 AM > > > To: users@kafka.apache.org > > > Subject: Re: where do I get the Kafka classes > > > > > > > > > Hi Adaryl, > > > > > > First, it looks like you might be trying to use the old producer > interface. > > > That interface is going to be deprecated in favor of the new producer > > > (under org.apache.kafka.clients.producer). I'd highly recommend using > the > > > new producer interface instead. > > > > > > Second, perhaps this repository of examples will be a helpful starting > > > point: https://github.com/confluentinc/examples It's just a few basic > > > examples, but also includes the necessary Maven build scripts. For > example, > > > the couple of lines after the highlighted one here: > > > > https://github.com/confluentinc/examples/blob/master/producer/pom.xml#L32 > > > will include the necessary jar that includes the new producer. > > > > > > -Ewen > > > > > > On Mon, Nov 16, 2015 at 10:16 PM, Adaryl "Bob" Wakefield, MBA < > > > adaryl.wakefi...@hotmail.com> wrote: > > > > > > I'm somewhat new to java development and am studying how to write > > >> producers. The sample code I'm looking at has the following import > > >> statements: > > >> > > >> import kafka.javaapi.producer.Producer; > > >> import kafka.producer.KeyedMessage; > > >> import kafka.producer.ProducerConfig; > > >> > > >> The thing is, he doesn't use any packages that contain these classes. > > >> You're supposed to use Gradle to compile the code but I'm not a whiz > with > > >> Gradle yet. I'm guessing that Gradle is somehow importing the > necessary > > >> classes at compile time. If I didn't want to use Gradle, how would I > go > > >> about just getting Kafka packages with the classes I need? I can't > seem to > > >> find them by googling. > > >> > > >> > > >> Adaryl "Bob" Wakefield, MBA > > >> Principal > > >> Mass Street Analytics, LLC > > >> 913.938.6685 > > >> www.linkedin.com/in/bobwakefieldmba > > >> Twitter: @BobLovesData > > >> > > >> > > > > > > > > > -- > > > Thanks, > > > Ewen > > > > > > > > > > > -- > > Grant Henke > > Software Engineer | Cloudera > > gr...@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke > >
where do I get the Kafka classes
I'm somewhat new to java development and am studying how to write producers. The sample code I'm looking at has the following import statements: import kafka.javaapi.producer.Producer; import kafka.producer.KeyedMessage; import kafka.producer.ProducerConfig; The thing is, he doesn't use any packages that contain these classes. You're supposed to use Gradle to compile the code but I'm not a whiz with Gradle yet. I'm guessing that Gradle is somehow importing the necessary classes at compile time. If I didn't want to use Gradle, how would I go about just getting Kafka packages with the classes I need? I can't seem to find them by googling. Adaryl "Bob" Wakefield, MBA Principal Mass Street Analytics, LLC 913.938.6685 www.linkedin.com/in/bobwakefieldmba Twitter: @BobLovesData
Re: where do I get the Kafka classes
Hi Adaryl, First, it looks like you might be trying to use the old producer interface. That interface is going to be deprecated in favor of the new producer (under org.apache.kafka.clients.producer). I'd highly recommend using the new producer interface instead. Second, perhaps this repository of examples will be a helpful starting point: https://github.com/confluentinc/examples It's just a few basic examples, but also includes the necessary Maven build scripts. For example, the couple of lines after the highlighted one here: https://github.com/confluentinc/examples/blob/master/producer/pom.xml#L32 will include the necessary jar that includes the new producer. -Ewen On Mon, Nov 16, 2015 at 10:16 PM, Adaryl "Bob" Wakefield, MBA < adaryl.wakefi...@hotmail.com> wrote: > I'm somewhat new to java development and am studying how to write > producers. The sample code I'm looking at has the following import > statements: > > import kafka.javaapi.producer.Producer; > import kafka.producer.KeyedMessage; > import kafka.producer.ProducerConfig; > > The thing is, he doesn't use any packages that contain these classes. > You're supposed to use Gradle to compile the code but I'm not a whiz with > Gradle yet. I'm guessing that Gradle is somehow importing the necessary > classes at compile time. If I didn't want to use Gradle, how would I go > about just getting Kafka packages with the classes I need? I can't seem to > find them by googling. > > > Adaryl "Bob" Wakefield, MBA > Principal > Mass Street Analytics, LLC > 913.938.6685 > www.linkedin.com/in/bobwakefieldmba > Twitter: @BobLovesData > -- Thanks, Ewen
Re: where do I get the Kafka classes
Is it not possible to just manually include the packages in my Eclipse project? Do you have to use a build tool? Adaryl "Bob" Wakefield, MBA Principal Mass Street Analytics, LLC 913.938.6685 www.linkedin.com/in/bobwakefieldmba Twitter: @BobLovesData -Original Message- From: Ewen Cheslack-Postava Sent: Tuesday, November 17, 2015 12:32 AM To: users@kafka.apache.org Subject: Re: where do I get the Kafka classes Hi Adaryl, First, it looks like you might be trying to use the old producer interface. That interface is going to be deprecated in favor of the new producer (under org.apache.kafka.clients.producer). I'd highly recommend using the new producer interface instead. Second, perhaps this repository of examples will be a helpful starting point: https://github.com/confluentinc/examples It's just a few basic examples, but also includes the necessary Maven build scripts. For example, the couple of lines after the highlighted one here: https://github.com/confluentinc/examples/blob/master/producer/pom.xml#L32 will include the necessary jar that includes the new producer. -Ewen On Mon, Nov 16, 2015 at 10:16 PM, Adaryl "Bob" Wakefield, MBA < adaryl.wakefi...@hotmail.com> wrote: I'm somewhat new to java development and am studying how to write producers. The sample code I'm looking at has the following import statements: import kafka.javaapi.producer.Producer; import kafka.producer.KeyedMessage; import kafka.producer.ProducerConfig; The thing is, he doesn't use any packages that contain these classes. You're supposed to use Gradle to compile the code but I'm not a whiz with Gradle yet. I'm guessing that Gradle is somehow importing the necessary classes at compile time. If I didn't want to use Gradle, how would I go about just getting Kafka packages with the classes I need? I can't seem to find them by googling. Adaryl "Bob" Wakefield, MBA Principal Mass Street Analytics, LLC 913.938.6685 www.linkedin.com/in/bobwakefieldmba Twitter: @BobLovesData -- Thanks, Ewen