diff --git a/examples/bin/examples/webstream/query.body b/examples/bin/examples/webstream/query.body new file mode 100644 index 00000000000..f1103b406de --- /dev/null +++ b/examples/bin/examples/webstream/query.body @@ -0,0 +1,12 @@ +{ + "queryType": "groupBy", + "dataSource": "webstream", + "granularity": "all", + "dimensions": ["country"], + "aggregations":[ + { "type": "count", "name": "rows"}, + { "type": "doubleSum", "fieldName": "known_users", "name": "known_users"} + ], + "filter": { "type": "selector", "dimension": "geo_region", "value": "CA" }, + "intervals":["2012-10-01T00:00/2020-01-01T00"] +} diff --git a/examples/bin/examples/webstream/webstream_realtime.spec b/examples/bin/examples/webstream/webstream_realtime.spec new file mode 100644 index 00000000000..92a0cf42ce9 --- /dev/null +++ b/examples/bin/examples/webstream/webstream_realtime.spec @@ -0,0 +1,47 @@ +[{ + "schema": { + "dataSource": "webstream", + "aggregators": [ + {"type": "count", "name": "rows"}, + {"type": "doubleSum", "fieldName": "known_users", "name": "known_users"} + ], + "indexGranularity": "minute", + "shardSpec": {"type": "none"} + }, + + "config": { + "maxRowsInMemory": 50000, + "intermediatePersistPeriod": "PT2m" + }, + + "firehose": { + "type": "webstream", + "url":"http://developer.usa.gov/1usagov", + "renamedDimensions": { + "g":"bitly_hash", + "c":"country", + "a":"user", + "cy":"city", + "l":"encoding_user_login", + "hh":"short_url", + "hc":"timestamp_hash", + "h":"user_bitly_hash", + "u":"url", + "tz":"timezone", + "t":"time", + "r":"referring_url", + "gr":"geo_region", + "nk":"known_users", + "al":"accept_language" + }, + "timeDimension":"t", + "timeFormat":"posix" + }, + + "plumber": { + "type": "realtime", + "windowPeriod": "PT3m", + "segmentGranularity": "hour", + "basePersistDirectory": "/tmp/example/usagov_realtime/basePersist" + } +}] diff --git a/examples/bin/run_ec2.sh b/examples/bin/run_ec2.sh index 4acdde9cc8d..c66965af512 100755 --- a/examples/bin/run_ec2.sh +++ b/examples/bin/run_ec2.sh @@ -55,7 +55,7 @@ sleep 60 INSTANCE_ADDRESS=`ec2-describe-instances|grep 'INSTANCE'|grep $INSTANCE_ID|cut -f4` echo "Connecting to $INSTANCE_ADDRESS to prepare environment for druid..." scp -i ~/.ssh/druid-keypair -o StrictHostKeyChecking=no ./ec2/env.sh ubuntu@${INSTANCE_ADDRESS}: -ssh -q -i ~/.ssh/druid-keypair -o StrictHostKeyChecking=no ubuntu@${INSTANCE_ADDRESS} 'chmod +x ./env.sh;./env.sh' +ssh -q -f -i ~/.ssh/druid-keypair -o StrictHostKeyChecking=no ubuntu@${INSTANCE_ADDRESS} 'chmod +x ./env.sh;./env.sh' echo "Prepared $INSTANCE_ADDRESS for druid." @@ -70,7 +70,7 @@ fi # Now boot druid parts scp -i ~/.ssh/druid-keypair -o StrictHostKeyChecking=no ./ec2/run.sh ubuntu@${INSTANCE_ADDRESS}: -ssh -q -i ~/.ssh/druid-keypair -o StrictHostKeyChecking=no ubuntu@${INSTANCE_ADDRESS} 'chmod +x ./run.sh;./run.sh' +ssh -q -f -i ~/.ssh/druid-keypair -o StrictHostKeyChecking=no ubuntu@${INSTANCE_ADDRESS} 'chmod +x ./run.sh;./run.sh' echo "Druid booting complete!" echo "ssh -i ~/.ssh/druid-keypair ubuntu@${INSTANCE_ADDRESS} #to connect" diff --git a/upload.sh b/upload.sh old mode 100644 new mode 100755