Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
TSDB_TABLE=${TSDB_TABLE-'tsdb'}
UID_TABLE=${UID_TABLE-'tsdb-uid'}
TREE_TABLE=${TREE_TABLE-'tsdb-tree'}
META_TABLE=${META_TABLE-'tsdb-meta'}
BLOOMFILTER=${BLOOMFILTER-'ROW'}
COMPRESSION='GZ'
exec "hbase" shell <<EOF
create '$UID_TABLE', {REGION_REPLICATION => 2},
{NAME => 'id', COMPRESSION => '$COMPRESSION', BLOOMFILTER => '$BLOOMFILTER'},
{NAME => 'name', COMPRESSION => '$COMPRESSION', BLOOMFILTER => '$BLOOMFILTER'}
create '$TSDB_TABLE', {REGION_REPLICATION => 2},
{NAME => 't', VERSIONS => 1, COMPRESSION => '$COMPRESSION', BLOOMFILTER => '$BLOOMFILTER'}
create '$TREE_TABLE', {REGION_REPLICATION => 2},
{NAME => 't', VERSIONS => 1, COMPRESSION => '$COMPRESSION', BLOOMFILTER => '$BLOOMFILTER'}
create '$META_TABLE', {REGION_REPLICATION => 2},
{NAME => 'name', COMPRESSION => '$COMPRESSION'}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment