You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kudu.apache.org by William Berkeley <wd...@gmail.com> on 2018/03/27 21:45:42 UTC

Adding examples

Hi Kudu devs. I'm thinking about adding examples of Kudu client usage to
the main Kudu repo. We already have examples for C++ found in
src/kudu/client/samples, so these examples would be for Java and Spark. I'm
not planning to add Python at first but it should go in there eventually.

The current proposal is to have a new top level directory /examples, with
the Java and Spark example code completely separate from the Java and Spark
client code. This way the examples can also serve as examples of how to
build, as well as how to code.

I'd appreciate any thoughts about this.

Thanks,
-Will

Re: Adding examples

Posted by William Berkeley <wd...@gmail.com>.
I filed KUDU-2382 <https://issues.apache.org/jira/browse/KUDU-2382> for
this as well.

On Tue, Mar 27, 2018 at 2:45 PM, William Berkeley <wd...@gmail.com>
wrote:

> Hi Kudu devs. I'm thinking about adding examples of Kudu client usage to
> the main Kudu repo. We already have examples for C++ found in
> src/kudu/client/samples, so these examples would be for Java and Spark. I'm
> not planning to add Python at first but it should go in there eventually.
>
> The current proposal is to have a new top level directory /examples, with
> the Java and Spark example code completely separate from the Java and Spark
> client code. This way the examples can also serve as examples of how to
> build, as well as how to code.
>
> I'd appreciate any thoughts about this.
>
> Thanks,
> -Will
>
>

Re: Adding examples

Posted by Dan Burkert <da...@apache.org>.
Sounds great to me.  Having examples in the repository proper means they
can be hooked into the build, and prevented from going stale.  Having that
kind of integration with CI is critical to making sure things don't bit-rot.

- Dan

On Tue, Mar 27, 2018 at 2:45 PM, William Berkeley <wd...@gmail.com>
wrote:

> Hi Kudu devs. I'm thinking about adding examples of Kudu client usage to
> the main Kudu repo. We already have examples for C++ found in
> src/kudu/client/samples, so these examples would be for Java and Spark. I'm
> not planning to add Python at first but it should go in there eventually.
>
> The current proposal is to have a new top level directory /examples, with
> the Java and Spark example code completely separate from the Java and Spark
> client code. This way the examples can also serve as examples of how to
> build, as well as how to code.
>
> I'd appreciate any thoughts about this.
>
> Thanks,
> -Will
>

Re: Adding examples

Posted by Alexandra Rodoni <ar...@cloudera.com>.
+1 from Docs

On Tue, Mar 27, 2018 at 2:51 PM, Adar Lieber-Dembo <ad...@cloudera.com>
wrote:

> +1
>
> Where are you sourcing your examples? If from Cloudera's kudu-examples
> repo (https://github.com/cloudera/kudu-examples), make sure to elide
> whatever is Cloudera specific (i.e. the demo-vm-setup subdirectory).
>
> If you are sourcing another repo in its entirety (or close to its
> entirety), please incorporate it via merge so we can preserve git
> history.
>
> Also, I'd be in favor of moving src/kudu/client/samples into the new
> /samples top-level directory, both for symmetry and to make it easier
> for others to see how to bootstrap a CMake project using Kudu.
>
>
> On Tue, Mar 27, 2018 at 2:45 PM, William Berkeley <wd...@gmail.com>
> wrote:
> > Hi Kudu devs. I'm thinking about adding examples of Kudu client usage to
> > the main Kudu repo. We already have examples for C++ found in
> > src/kudu/client/samples, so these examples would be for Java and Spark.
> I'm
> > not planning to add Python at first but it should go in there eventually.
> >
> > The current proposal is to have a new top level directory /examples, with
> > the Java and Spark example code completely separate from the Java and
> Spark
> > client code. This way the examples can also serve as examples of how to
> > build, as well as how to code.
> >
> > I'd appreciate any thoughts about this.
> >
> > Thanks,
> > -Will
>

Re: Adding examples

Posted by Mike Percy <mp...@apache.org>.
Oh, I missed that. Looks good Todd:
https://kudu.apache.org/apidocs/org/apache/kudu/client/AsyncKuduClient.html

Mike

On Wed, Mar 28, 2018 at 2:43 PM, Todd Lipcon <to...@cloudera.com> wrote:

> On Tue, Mar 27, 2018 at 3:36 PM, Mike Percy <mp...@apache.org> wrote:
>
> > +1 on the overall proposal.
> >
> > Maybe a typo but /examples and /samples seem too similar to me and it
> seems
> > like they should be merged.
> >
> > One example that I don't think we have right now is a Kudu client authn
> > example in Java. I would imagine that many people don't really know how
> to
> > set up a keytab using the JAAS classes, security context, etc.
> >
>
> I did add some of this in the AsyncKuduClient javadoc in the last release.
> Though I guess having a buildable example is nice too.
>
> -Todd
>
>
> >
> > On Tue, Mar 27, 2018 at 2:51 PM, Adar Lieber-Dembo <ad...@cloudera.com>
> > wrote:
> >
> > > +1
> > >
> > > Where are you sourcing your examples? If from Cloudera's kudu-examples
> > > repo (https://github.com/cloudera/kudu-examples), make sure to elide
> > > whatever is Cloudera specific (i.e. the demo-vm-setup subdirectory).
> > >
> > > If you are sourcing another repo in its entirety (or close to its
> > > entirety), please incorporate it via merge so we can preserve git
> > > history.
> > >
> > > Also, I'd be in favor of moving src/kudu/client/samples into the new
> > > /samples top-level directory, both for symmetry and to make it easier
> > > for others to see how to bootstrap a CMake project using Kudu.
> > >
> > >
> > > On Tue, Mar 27, 2018 at 2:45 PM, William Berkeley <
> wdberkeley@gmail.com>
> > > wrote:
> > > > Hi Kudu devs. I'm thinking about adding examples of Kudu client usage
> > to
> > > > the main Kudu repo. We already have examples for C++ found in
> > > > src/kudu/client/samples, so these examples would be for Java and
> Spark.
> > > I'm
> > > > not planning to add Python at first but it should go in there
> > eventually.
> > > >
> > > > The current proposal is to have a new top level directory /examples,
> > with
> > > > the Java and Spark example code completely separate from the Java and
> > > Spark
> > > > client code. This way the examples can also serve as examples of how
> to
> > > > build, as well as how to code.
> > > >
> > > > I'd appreciate any thoughts about this.
> > > >
> > > > Thanks,
> > > > -Will
> > >
> >
>
>
>
> --
> Todd Lipcon
> Software Engineer, Cloudera
>

Re: Adding examples

Posted by Todd Lipcon <to...@cloudera.com>.
On Tue, Mar 27, 2018 at 3:36 PM, Mike Percy <mp...@apache.org> wrote:

> +1 on the overall proposal.
>
> Maybe a typo but /examples and /samples seem too similar to me and it seems
> like they should be merged.
>
> One example that I don't think we have right now is a Kudu client authn
> example in Java. I would imagine that many people don't really know how to
> set up a keytab using the JAAS classes, security context, etc.
>

I did add some of this in the AsyncKuduClient javadoc in the last release.
Though I guess having a buildable example is nice too.

-Todd


>
> On Tue, Mar 27, 2018 at 2:51 PM, Adar Lieber-Dembo <ad...@cloudera.com>
> wrote:
>
> > +1
> >
> > Where are you sourcing your examples? If from Cloudera's kudu-examples
> > repo (https://github.com/cloudera/kudu-examples), make sure to elide
> > whatever is Cloudera specific (i.e. the demo-vm-setup subdirectory).
> >
> > If you are sourcing another repo in its entirety (or close to its
> > entirety), please incorporate it via merge so we can preserve git
> > history.
> >
> > Also, I'd be in favor of moving src/kudu/client/samples into the new
> > /samples top-level directory, both for symmetry and to make it easier
> > for others to see how to bootstrap a CMake project using Kudu.
> >
> >
> > On Tue, Mar 27, 2018 at 2:45 PM, William Berkeley <wd...@gmail.com>
> > wrote:
> > > Hi Kudu devs. I'm thinking about adding examples of Kudu client usage
> to
> > > the main Kudu repo. We already have examples for C++ found in
> > > src/kudu/client/samples, so these examples would be for Java and Spark.
> > I'm
> > > not planning to add Python at first but it should go in there
> eventually.
> > >
> > > The current proposal is to have a new top level directory /examples,
> with
> > > the Java and Spark example code completely separate from the Java and
> > Spark
> > > client code. This way the examples can also serve as examples of how to
> > > build, as well as how to code.
> > >
> > > I'd appreciate any thoughts about this.
> > >
> > > Thanks,
> > > -Will
> >
>



-- 
Todd Lipcon
Software Engineer, Cloudera

Re: Adding examples

Posted by Mike Percy <mp...@apache.org>.
+1 on the overall proposal.

Maybe a typo but /examples and /samples seem too similar to me and it seems
like they should be merged.

One example that I don't think we have right now is a Kudu client authn
example in Java. I would imagine that many people don't really know how to
set up a keytab using the JAAS classes, security context, etc.

Mike


On Tue, Mar 27, 2018 at 2:51 PM, Adar Lieber-Dembo <ad...@cloudera.com>
wrote:

> +1
>
> Where are you sourcing your examples? If from Cloudera's kudu-examples
> repo (https://github.com/cloudera/kudu-examples), make sure to elide
> whatever is Cloudera specific (i.e. the demo-vm-setup subdirectory).
>
> If you are sourcing another repo in its entirety (or close to its
> entirety), please incorporate it via merge so we can preserve git
> history.
>
> Also, I'd be in favor of moving src/kudu/client/samples into the new
> /samples top-level directory, both for symmetry and to make it easier
> for others to see how to bootstrap a CMake project using Kudu.
>
>
> On Tue, Mar 27, 2018 at 2:45 PM, William Berkeley <wd...@gmail.com>
> wrote:
> > Hi Kudu devs. I'm thinking about adding examples of Kudu client usage to
> > the main Kudu repo. We already have examples for C++ found in
> > src/kudu/client/samples, so these examples would be for Java and Spark.
> I'm
> > not planning to add Python at first but it should go in there eventually.
> >
> > The current proposal is to have a new top level directory /examples, with
> > the Java and Spark example code completely separate from the Java and
> Spark
> > client code. This way the examples can also serve as examples of how to
> > build, as well as how to code.
> >
> > I'd appreciate any thoughts about this.
> >
> > Thanks,
> > -Will
>

Re: Adding examples

Posted by Adar Lieber-Dembo <ad...@cloudera.com>.
+1

Where are you sourcing your examples? If from Cloudera's kudu-examples
repo (https://github.com/cloudera/kudu-examples), make sure to elide
whatever is Cloudera specific (i.e. the demo-vm-setup subdirectory).

If you are sourcing another repo in its entirety (or close to its
entirety), please incorporate it via merge so we can preserve git
history.

Also, I'd be in favor of moving src/kudu/client/samples into the new
/samples top-level directory, both for symmetry and to make it easier
for others to see how to bootstrap a CMake project using Kudu.


On Tue, Mar 27, 2018 at 2:45 PM, William Berkeley <wd...@gmail.com> wrote:
> Hi Kudu devs. I'm thinking about adding examples of Kudu client usage to
> the main Kudu repo. We already have examples for C++ found in
> src/kudu/client/samples, so these examples would be for Java and Spark. I'm
> not planning to add Python at first but it should go in there eventually.
>
> The current proposal is to have a new top level directory /examples, with
> the Java and Spark example code completely separate from the Java and Spark
> client code. This way the examples can also serve as examples of how to
> build, as well as how to code.
>
> I'd appreciate any thoughts about this.
>
> Thanks,
> -Will