You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "hsy541@gmail.com" <hs...@gmail.com> on 2015/11/17 01:01:49 UTC
build error
I got a build error on both trunk and 0.9.0 branch
> docs/producer_config.html (No such file or directory)
Do I miss anything before build
Thanks,
Siyuan
Re: build error
Posted by Grant Henke <gh...@cloudera.com>.
Glad you resolved it. Note that we are currently on gradle 2.8 and likely
2.9 soon feel free to update whenever makes sense for you.
Ewen recently updated the developer setup page here
<https://cwiki.apache.org/confluence/display/KAFKA/Developer+Setup> to show
how to use the wrapper effectively in the Kafka repository. Since we do not
checkin the wrapper jar, you need to execute the default gradle task by
simply executing `gradle` before running and gradle wrapper tasks.
See here
<http://search-hadoop.com/m/uyzND1GtKrd1nxbcE1/The+wrapper+should+be+in+the+repository&subj=+gradle+build+The+wrapper+should+be+in+the+repository>
for the related email chain.
On Tue, Nov 17, 2015 at 10:27 AM, hsy541@gmail.com <hs...@gmail.com> wrote:
> I got main class not found error. So I installed gradle 2.5 and run gradle
> build (not the wrapper)
>
> On Mon, Nov 16, 2015 at 10:17 PM, Guozhang Wang <wa...@gmail.com>
> wrote:
>
> > Did you just use "./gradlew build" in root directory?
> >
> > Guozhang
> >
> > On Mon, Nov 16, 2015 at 6:41 PM, hsy541@gmail.com <hs...@gmail.com>
> > wrote:
> >
> > > The actual thing I want to do is I want to build and install in my
> local
> > > maven repository so I can include new api in my dependencies. When the
> > > release is officially out, I can have both my code ready with the
> > official
> > > maven dependency
> > >
> > > Thanks,
> > > Siyuan
> > >
> > > On Monday, November 16, 2015, Grant Henke <gh...@cloudera.com> wrote:
> > >
> > > > Hi Siyuan,
> > > >
> > > > My guess is that you are trying to build from a subdirectory. I have
> a
> > > > minor patch available to fix this that has not been pulled in yet
> here:
> > > > https://github.com/apache/kafka/pull/509
> > > >
> > > > In the mean time, if you need to build a subproject you can execute a
> > > > command like the following:
> > > > gradle clients:build
> > > >
> > > > Thanks,
> > > > Grant
> > > >
> > > > On Mon, Nov 16, 2015 at 6:33 PM, Guozhang Wang <wangguoz@gmail.com
> > > > <javascript:;>> wrote:
> > > >
> > > > > Siyuan,
> > > > >
> > > > > Which command did you use to build?
> > > > >
> > > > > Guozhang
> > > > >
> > > > > On Mon, Nov 16, 2015 at 4:01 PM, hsy541@gmail.com <javascript:;> <
> > > > hsy541@gmail.com <javascript:;>>
> > > > > wrote:
> > > > >
> > > > > > I got a build error on both trunk and 0.9.0 branch
> > > > > >
> > > > > > > docs/producer_config.html (No such file or directory)
> > > > > >
> > > > > > Do I miss anything before build
> > > > > >
> > > > > > Thanks,
> > > > > > Siyuan
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > -- Guozhang
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Grant Henke
> > > > Software Engineer | Cloudera
> > > > grant@cloudera.com <javascript:;> | twitter.com/gchenke |
> > > > linkedin.com/in/granthenke
> > > >
> > >
> >
> >
> >
> > --
> > -- Guozhang
> >
>
--
Grant Henke
Software Engineer | Cloudera
grant@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke
Re: build error
Posted by "hsy541@gmail.com" <hs...@gmail.com>.
I got main class not found error. So I installed gradle 2.5 and run gradle
build (not the wrapper)
On Mon, Nov 16, 2015 at 10:17 PM, Guozhang Wang <wa...@gmail.com> wrote:
> Did you just use "./gradlew build" in root directory?
>
> Guozhang
>
> On Mon, Nov 16, 2015 at 6:41 PM, hsy541@gmail.com <hs...@gmail.com>
> wrote:
>
> > The actual thing I want to do is I want to build and install in my local
> > maven repository so I can include new api in my dependencies. When the
> > release is officially out, I can have both my code ready with the
> official
> > maven dependency
> >
> > Thanks,
> > Siyuan
> >
> > On Monday, November 16, 2015, Grant Henke <gh...@cloudera.com> wrote:
> >
> > > Hi Siyuan,
> > >
> > > My guess is that you are trying to build from a subdirectory. I have a
> > > minor patch available to fix this that has not been pulled in yet here:
> > > https://github.com/apache/kafka/pull/509
> > >
> > > In the mean time, if you need to build a subproject you can execute a
> > > command like the following:
> > > gradle clients:build
> > >
> > > Thanks,
> > > Grant
> > >
> > > On Mon, Nov 16, 2015 at 6:33 PM, Guozhang Wang <wangguoz@gmail.com
> > > <javascript:;>> wrote:
> > >
> > > > Siyuan,
> > > >
> > > > Which command did you use to build?
> > > >
> > > > Guozhang
> > > >
> > > > On Mon, Nov 16, 2015 at 4:01 PM, hsy541@gmail.com <javascript:;> <
> > > hsy541@gmail.com <javascript:;>>
> > > > wrote:
> > > >
> > > > > I got a build error on both trunk and 0.9.0 branch
> > > > >
> > > > > > docs/producer_config.html (No such file or directory)
> > > > >
> > > > > Do I miss anything before build
> > > > >
> > > > > Thanks,
> > > > > Siyuan
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > -- Guozhang
> > > >
> > >
> > >
> > >
> > > --
> > > Grant Henke
> > > Software Engineer | Cloudera
> > > grant@cloudera.com <javascript:;> | twitter.com/gchenke |
> > > linkedin.com/in/granthenke
> > >
> >
>
>
>
> --
> -- Guozhang
>
Re: build error
Posted by "hsy541@gmail.com" <hs...@gmail.com>.
And I couldn't find wrapper jar files under the gradle folder
https://github.com/apache/kafka/tree/0.9.0/gradle
On Mon, Nov 16, 2015 at 10:17 PM, Guozhang Wang <wa...@gmail.com> wrote:
> Did you just use "./gradlew build" in root directory?
>
> Guozhang
>
> On Mon, Nov 16, 2015 at 6:41 PM, hsy541@gmail.com <hs...@gmail.com>
> wrote:
>
> > The actual thing I want to do is I want to build and install in my local
> > maven repository so I can include new api in my dependencies. When the
> > release is officially out, I can have both my code ready with the
> official
> > maven dependency
> >
> > Thanks,
> > Siyuan
> >
> > On Monday, November 16, 2015, Grant Henke <gh...@cloudera.com> wrote:
> >
> > > Hi Siyuan,
> > >
> > > My guess is that you are trying to build from a subdirectory. I have a
> > > minor patch available to fix this that has not been pulled in yet here:
> > > https://github.com/apache/kafka/pull/509
> > >
> > > In the mean time, if you need to build a subproject you can execute a
> > > command like the following:
> > > gradle clients:build
> > >
> > > Thanks,
> > > Grant
> > >
> > > On Mon, Nov 16, 2015 at 6:33 PM, Guozhang Wang <wangguoz@gmail.com
> > > <javascript:;>> wrote:
> > >
> > > > Siyuan,
> > > >
> > > > Which command did you use to build?
> > > >
> > > > Guozhang
> > > >
> > > > On Mon, Nov 16, 2015 at 4:01 PM, hsy541@gmail.com <javascript:;> <
> > > hsy541@gmail.com <javascript:;>>
> > > > wrote:
> > > >
> > > > > I got a build error on both trunk and 0.9.0 branch
> > > > >
> > > > > > docs/producer_config.html (No such file or directory)
> > > > >
> > > > > Do I miss anything before build
> > > > >
> > > > > Thanks,
> > > > > Siyuan
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > -- Guozhang
> > > >
> > >
> > >
> > >
> > > --
> > > Grant Henke
> > > Software Engineer | Cloudera
> > > grant@cloudera.com <javascript:;> | twitter.com/gchenke |
> > > linkedin.com/in/granthenke
> > >
> >
>
>
>
> --
> -- Guozhang
>
Re: build error
Posted by Grant Henke <gh...@cloudera.com>.
I too would like to understand the command you used to build and what
directory.
That aside it is likely best to test using the release candidate artifacts
that are described in Jun's email here:
http://search-hadoop.com/m/uyzND1bBATE1M3hVn/candidate&subj=+VOTE+0+9+0+0+Candiate+2
This gives you all built artifacts and a maven repo
<https://repository.apache.org/content/groups/staging/> with the client
artifacts
<https://repository.apache.org/content/groups/staging/org/apache/kafka/kafka-clients/0.9.0.0/>
.
Thanks,
Grant
On Tue, Nov 17, 2015 at 12:17 AM, Guozhang Wang <wa...@gmail.com> wrote:
> Did you just use "./gradlew build" in root directory?
>
> Guozhang
>
> On Mon, Nov 16, 2015 at 6:41 PM, hsy541@gmail.com <hs...@gmail.com>
> wrote:
>
> > The actual thing I want to do is I want to build and install in my local
> > maven repository so I can include new api in my dependencies. When the
> > release is officially out, I can have both my code ready with the
> official
> > maven dependency
> >
> > Thanks,
> > Siyuan
> >
> > On Monday, November 16, 2015, Grant Henke <gh...@cloudera.com> wrote:
> >
> > > Hi Siyuan,
> > >
> > > My guess is that you are trying to build from a subdirectory. I have a
> > > minor patch available to fix this that has not been pulled in yet here:
> > > https://github.com/apache/kafka/pull/509
> > >
> > > In the mean time, if you need to build a subproject you can execute a
> > > command like the following:
> > > gradle clients:build
> > >
> > > Thanks,
> > > Grant
> > >
> > > On Mon, Nov 16, 2015 at 6:33 PM, Guozhang Wang <wangguoz@gmail.com
> > > <javascript:;>> wrote:
> > >
> > > > Siyuan,
> > > >
> > > > Which command did you use to build?
> > > >
> > > > Guozhang
> > > >
> > > > On Mon, Nov 16, 2015 at 4:01 PM, hsy541@gmail.com <javascript:;> <
> > > hsy541@gmail.com <javascript:;>>
> > > > wrote:
> > > >
> > > > > I got a build error on both trunk and 0.9.0 branch
> > > > >
> > > > > > docs/producer_config.html (No such file or directory)
> > > > >
> > > > > Do I miss anything before build
> > > > >
> > > > > Thanks,
> > > > > Siyuan
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > -- Guozhang
> > > >
> > >
> > >
> > >
> > > --
> > > Grant Henke
> > > Software Engineer | Cloudera
> > > grant@cloudera.com <javascript:;> | twitter.com/gchenke |
> > > linkedin.com/in/granthenke
> > >
> >
>
>
>
> --
> -- Guozhang
>
--
Grant Henke
Software Engineer | Cloudera
grant@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke
Re: build error
Posted by Guozhang Wang <wa...@gmail.com>.
Did you just use "./gradlew build" in root directory?
Guozhang
On Mon, Nov 16, 2015 at 6:41 PM, hsy541@gmail.com <hs...@gmail.com> wrote:
> The actual thing I want to do is I want to build and install in my local
> maven repository so I can include new api in my dependencies. When the
> release is officially out, I can have both my code ready with the official
> maven dependency
>
> Thanks,
> Siyuan
>
> On Monday, November 16, 2015, Grant Henke <gh...@cloudera.com> wrote:
>
> > Hi Siyuan,
> >
> > My guess is that you are trying to build from a subdirectory. I have a
> > minor patch available to fix this that has not been pulled in yet here:
> > https://github.com/apache/kafka/pull/509
> >
> > In the mean time, if you need to build a subproject you can execute a
> > command like the following:
> > gradle clients:build
> >
> > Thanks,
> > Grant
> >
> > On Mon, Nov 16, 2015 at 6:33 PM, Guozhang Wang <wangguoz@gmail.com
> > <javascript:;>> wrote:
> >
> > > Siyuan,
> > >
> > > Which command did you use to build?
> > >
> > > Guozhang
> > >
> > > On Mon, Nov 16, 2015 at 4:01 PM, hsy541@gmail.com <javascript:;> <
> > hsy541@gmail.com <javascript:;>>
> > > wrote:
> > >
> > > > I got a build error on both trunk and 0.9.0 branch
> > > >
> > > > > docs/producer_config.html (No such file or directory)
> > > >
> > > > Do I miss anything before build
> > > >
> > > > Thanks,
> > > > Siyuan
> > > >
> > >
> > >
> > >
> > > --
> > > -- Guozhang
> > >
> >
> >
> >
> > --
> > Grant Henke
> > Software Engineer | Cloudera
> > grant@cloudera.com <javascript:;> | twitter.com/gchenke |
> > linkedin.com/in/granthenke
> >
>
--
-- Guozhang
Re: where do I get the Kafka classes
Posted by Ofir Manor <of...@equalum.io>.
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.wakefield@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: ghenke@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.wakefield@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.wakefield@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
> > grant@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke
>
>
RE: where do I get the Kafka classes
Posted by Adaryl Wakefield <ad...@hotmail.com>.
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: ghenke@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.wakefield@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.wakefield@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
> grant@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke
Re: where do I get the Kafka classes
Posted by Grant Henke <gh...@cloudera.com>.
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.wakefield@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.wakefield@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
grant@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke
Re: where do I get the Kafka classes
Posted by "Adaryl \"Bob\" Wakefield, MBA" <ad...@hotmail.com>.
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.wakefield@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
Posted by Ewen Cheslack-Postava <ew...@confluent.io>.
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.wakefield@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
where do I get the Kafka classes
Posted by "Adaryl \"Bob\" Wakefield, MBA" <ad...@hotmail.com>.
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: build error
Posted by "hsy541@gmail.com" <hs...@gmail.com>.
The actual thing I want to do is I want to build and install in my local
maven repository so I can include new api in my dependencies. When the
release is officially out, I can have both my code ready with the official
maven dependency
Thanks,
Siyuan
On Monday, November 16, 2015, Grant Henke <gh...@cloudera.com> wrote:
> Hi Siyuan,
>
> My guess is that you are trying to build from a subdirectory. I have a
> minor patch available to fix this that has not been pulled in yet here:
> https://github.com/apache/kafka/pull/509
>
> In the mean time, if you need to build a subproject you can execute a
> command like the following:
> gradle clients:build
>
> Thanks,
> Grant
>
> On Mon, Nov 16, 2015 at 6:33 PM, Guozhang Wang <wangguoz@gmail.com
> <javascript:;>> wrote:
>
> > Siyuan,
> >
> > Which command did you use to build?
> >
> > Guozhang
> >
> > On Mon, Nov 16, 2015 at 4:01 PM, hsy541@gmail.com <javascript:;> <
> hsy541@gmail.com <javascript:;>>
> > wrote:
> >
> > > I got a build error on both trunk and 0.9.0 branch
> > >
> > > > docs/producer_config.html (No such file or directory)
> > >
> > > Do I miss anything before build
> > >
> > > Thanks,
> > > Siyuan
> > >
> >
> >
> >
> > --
> > -- Guozhang
> >
>
>
>
> --
> Grant Henke
> Software Engineer | Cloudera
> grant@cloudera.com <javascript:;> | twitter.com/gchenke |
> linkedin.com/in/granthenke
>
Re: build error
Posted by Grant Henke <gh...@cloudera.com>.
Hi Siyuan,
My guess is that you are trying to build from a subdirectory. I have a
minor patch available to fix this that has not been pulled in yet here:
https://github.com/apache/kafka/pull/509
In the mean time, if you need to build a subproject you can execute a
command like the following:
gradle clients:build
Thanks,
Grant
On Mon, Nov 16, 2015 at 6:33 PM, Guozhang Wang <wa...@gmail.com> wrote:
> Siyuan,
>
> Which command did you use to build?
>
> Guozhang
>
> On Mon, Nov 16, 2015 at 4:01 PM, hsy541@gmail.com <hs...@gmail.com>
> wrote:
>
> > I got a build error on both trunk and 0.9.0 branch
> >
> > > docs/producer_config.html (No such file or directory)
> >
> > Do I miss anything before build
> >
> > Thanks,
> > Siyuan
> >
>
>
>
> --
> -- Guozhang
>
--
Grant Henke
Software Engineer | Cloudera
grant@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke
Re: build error
Posted by Guozhang Wang <wa...@gmail.com>.
Siyuan,
Which command did you use to build?
Guozhang
On Mon, Nov 16, 2015 at 4:01 PM, hsy541@gmail.com <hs...@gmail.com> wrote:
> I got a build error on both trunk and 0.9.0 branch
>
> > docs/producer_config.html (No such file or directory)
>
> Do I miss anything before build
>
> Thanks,
> Siyuan
>
--
-- Guozhang