You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kudu.apache.org by Ron Cecchini <ro...@comcast.net> on 2020/02/17 06:40:01 UTC

Creating schemas in a Kudu docker container

TL;DR:  If using a Kudu Docker image, is the only way to create a schema via client code?

Hi, all.  I'm really new to Kudu (extremely new).

So, I pulled in the apache/kudu:latest image from Docker.

I don't have any intention of building Kudu from source or creating my own Kudu images, so I'd like to be able to use the official image as-is.

I got a little lost in the READMEs, but I eventually was able to gather that I can't just run a single "kudu" container to handle all of my data storage needs.  Instead, I needed a "cluster" of at least 2 containers; i.e. a "tserver" and 1 or more "master" containers.  So I grabbed the docker-compose.yml from the Kudu source at GitHub, did a 'docker-compose up -d', and got the 1 tserver and 3 masters.

Next, I was trying to create a simple table from a schema file.  However, I found nothing about how to get a Kudu master or tserver to load a schema from a file at start up.

But I did find the Java examples (and some Apache Camel examples) that show how to create a table from client code.  And I successfully did that and created my table.  (Haven't played with inserting yet...)

My big question at the moment though is:

*** Is this really the best way to create tables in Kudu, from client code?
*** Or did I miss something in the docs that will let me create tables when the containers are started?

I'd also rather not have to manually create a table in, say, Impala or whatever.  Ultimately I have to run everything in a container in our OpenShift environment - so things have to just work when the containers are deployed.

If I do have to create from client code, it's not a big deal to check to see if the table already exists so I don't try to recreate it (I'm already doing this now).  I just wanted to double-check that this is essentially how things are done with Kudu.

Thank you so much for any guidance!

Ron