GithubHelp home page GithubHelp logo

avrogen's Introduction

Avro Generator Tools

Generate and examine Avro data sets! This tool is intended to help with generating Avro test data for CockroachDB IMPORT.

Commands

avrogen create \
  --files [number of files] \
  --size [number of rows to generate per file] \
  [--bucket GCSBUCKET]
  [--bucket-path PATH]
  [--local-path]
  [--sorted]
  [--partitioned]
  [--concurrency CONCURRENCY]

Note:

sorted ensures that rows are sorted within a single file

partitioned ensures that files do not have overlapping data (data is sorted across files)

Example:

avrogen generate /path/to/schema --files 100 --size 10000 --sorted --local-path /tmp

or if you haven't built it and might be hacking on it:

go run main.go generate /path/to/schema --files 100 --size 10000 --sorted --local-path /tmp

To save to local directory, use the --local-path flag.

To save to a GCS bucket, use the --bucket and --bucket-path flags.

Test data

Avrogen comes with a hard-coded test schema, but there are plans to make it easy to add custom schemas.

Each row is approximately 181 bytes (varies a bit)

10k = 1.7 MiB
100k = 17 MiB
1M = 173 MiB
10M = 1.73 GiB
100M = 17.3 GiB
1B = 173 GiB
etc

Build for Linux

GOOS=linux GOARCH=amd64 go build -o bin/avrogen

More Examples

./avrogen create --bucket jon-avro-import --bucket-path sorted-64-100000000 --files 64 --size 100000000 --sorted > gen.log 2>&1 &
./avrogen create --bucket jon-avro-import --bucket-path partitioned-64-100000000 --files 64 --size 100000000 --partitioned > gen.log 2>&1 &

avrogen's People

Contributors

jonstjohn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.