Skip to content

Commit

Permalink
Add BLURB table
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Bakken committed Dec 16, 2016
1 parent 64f62fa commit 1f54803
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/riak_cluster_config.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function riak_cluster_config
$riak_admin bucket-type create GeoCheckin_Wide '{"props": {"n_val": 3, "table_def": "CREATE TABLE GeoCheckin_Wide (geohash varchar not null, user varchar not null, time timestamp not null, weather varchar not null, temperature double, uv_index sint64, observed boolean not null, PRIMARY KEY((geohash, user, quantum(time, 15, 'm')), geohash, user, time))"}}'
$riak_admin bucket-type create 'GeoCheckin_Wide_1_5' '{"props": {"n_val": 3, "table_def": "CREATE TABLE GeoCheckin_Wide_1_5 (geohash varchar not null, user varchar not null, time timestamp not null, weather varchar not null, temperature double, uv_index sint64, observed boolean not null, sensor_data blob, PRIMARY KEY((geohash, user, quantum(time, 15, 'm')), geohash, user, time))"}}'
$riak_admin bucket-type create WeatherByRegion '{"props": {"n_val": 3, "table_def": "CREATE TABLE WeatherByRegion (region varchar not null, state varchar not null, time timestamp not null, weather varchar not null, temperature double, uv_index sint64, observed boolean not null, PRIMARY KEY((region, state, quantum(time, 15, 'm')), region, state, time))"}}'
$riak_admin bucket-type create BLURB '{"props": {"n_val": 3, "table_def": "CREATE TABLE BLURB (blurb blob not null, time timestamp not null, PRIMARY KEY((blurb, quantum(time, 15, 'm')), blurb, time))"}}'
set -o errexit

$riak_admin bucket-type activate plain
Expand All @@ -43,6 +44,7 @@ function riak_cluster_config
$riak_admin bucket-type activate GeoCheckin_Wide
$riak_admin bucket-type activate GeoCheckin_Wide_1_5
$riak_admin bucket-type activate WeatherByRegion
$riak_admin bucket-type activate BLURB
set -o errexit

if [[ $strong_consistency == 'true' ]]
Expand Down

0 comments on commit 1f54803

Please sign in to comment.