Skip to content

Commit 5959ef8

Browse files
authored
Quick start (#10)
1 parent 9cd62f6 commit 5959ef8

File tree

11 files changed

+127
-706
lines changed

11 files changed

+127
-706
lines changed

docs/quick-start/bullet-on-storm-with-rest.md

Lines changed: 0 additions & 417 deletions
This file was deleted.

docs/quick-start/storm.md

Lines changed: 76 additions & 106 deletions
Large diffs are not rendered by default.

docs/releases.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The core Bullet logic (a library) that can be used to implement Bullet on differ
2626

2727
| Date | Release | Highlights |
2828
| ------------ | ------------------------------------------------------------------------------------- | ---------- |
29+
| 2018-06-22 | [**0.4.1**](https://github.com/bullet-db/bullet-core/releases/tag/bullet-core-0.4.1) | Added RESTPublisher HTTP Timeout Setting |
2930
| 2018-06-18 | [**0.4.0**](https://github.com/bullet-db/bullet-core/releases/tag/bullet-core-0.4.0) | Added support for Integer and Float data types, and configurable BulletRecordProvider class used to instantiate BulletRecords in bullet-core |
3031
| 2018-04-11 | [**0.3.4**](https://github.com/bullet-db/bullet-core/releases/tag/bullet-core-0.3.4) | Pre-Start delaying and Buffering changes - queries are now buffered at the start of a query instead of start of each window |
3132
| 2018-03-30 | [**0.3.3**](https://github.com/bullet-db/bullet-core/releases/tag/bullet-core-0.3.3) | Bug fix for com.yahoo.bullet.core.querying.Querier#isClosedForPartition |

examples/install-all-storm.sh

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
set -euo pipefail
44

5-
BULLET_EXAMPLES_VERSION=0.4.0
6-
BULLET_UI_VERSION=0.4.0
7-
BULLET_WS_VERSION=0.1.1
8-
STORM_VERSION=1.0.3
5+
BULLET_EXAMPLES_VERSION=0.5.1
6+
BULLET_UI_VERSION=0.5.0
7+
BULLET_WS_VERSION=0.2.2
8+
STORM_VERSION=1.2.2
99
NVM_VERSION=0.33.1
1010
NODE_VERSION=6.9.4
1111

@@ -80,7 +80,6 @@ install_storm() {
8080

8181
println "Configuring Storm ..."
8282
export PATH="${BACKEND}/${STORM}/bin/:${PATH}"
83-
echo 'drpc.servers: ["127.0.0.1"]' >> "${BACKEND}/${STORM}/conf/storm.yaml"
8483
println "Done!"
8584
}
8685

@@ -91,9 +90,6 @@ launch_storm() {
9190
println "Launching Storm Nimbus..."
9291
storm nimbus &
9392

94-
println "Launching Storm DRPC..."
95-
storm drpc &
96-
9793
println "Launching Storm UI..."
9894
storm ui &
9995

@@ -112,7 +108,7 @@ launch_storm() {
112108

113109
launch_bullet_storm() {
114110
println "Copying Bullet topology configuration and artifacts..."
115-
cp "${BULLET_EXAMPLES}/storm"/* "${BULLET_HOME}/backend/storm"
111+
cp "${BULLET_EXAMPLES}/backend/storm"/* "${BULLET_HOME}/backend/storm"
116112

117113
println "Launching the Bullet topology..."
118114
println "=============================================================================="
@@ -123,11 +119,6 @@ launch_bullet_storm() {
123119
println "=============================================================================="
124120
sleep 30
125121
println "=============================================================================="
126-
127-
println "Testing the Storm topology"
128-
println ""
129-
println "Getting one random record from the Bullet topology..."
130-
curl -s -X POST -d '{"id":"", "content":"{}"}' http://localhost:3774/drpc/bullet-query
131122
println "Done!"
132123
}
133124

@@ -138,16 +129,16 @@ launch_bullet_web_service() {
138129
println "Downloading Bullet Web Service ${BULLET_WS_VERSION}..."
139130
download "http://jcenter.bintray.com/com/yahoo/bullet/bullet-service/${BULLET_WS_VERSION}" "${BULLET_WS_JAR}"
140131

141-
println "Configuring Bullet Web Service and plugging in Storm DRPC PubSub..."
132+
println "Configuring Bullet Web Service and plugging in In-Memory REST PubSub..."
142133
cp "${BULLET_DOWNLOADS}/${BULLET_WS_JAR}" "${BULLET_SERVICE_HOME}/bullet-service.jar"
143-
cp "${BULLET_EXAMPLES}/storm"/*jar-with-dependencies.jar "${BULLET_SERVICE_HOME}/bullet-storm-jar-with-dependencies.jar"
144134
cp "${BULLET_EXAMPLES}/web-service/"example_* "${BULLET_SERVICE_HOME}/"
145135

146-
println "Launching Bullet Web Service..."
136+
println "Launching Bullet Web Service with the built-in REST PubSub enabled..."
147137
cd "${BULLET_SERVICE_HOME}"
148-
java -Dloader.path=bullet-storm-jar-with-dependencies.jar -jar bullet-service.jar \
149-
--bullet.pubsub.config=example_drpc_pubsub_config.yaml --bullet.schema.file=example_columns.json \
150-
--server.port=9999 --logging.path="${BULLET_SERVICE_HOME}" --logging.file=log.txt &> "${BULLET_SERVICE_HOME}/log.txt" &
138+
java -jar ./bullet-service.jar \
139+
--bullet.pubsub.config=example_rest_pubsub_config.yaml --bullet.schema.file=example_columns.json \
140+
--server.port=9999 --bullet.pubsub.builtin.rest.enabled=true --logging.path="${BULLET_SERVICE_HOME}" \
141+
--logging.file=log.txt &> "${BULLET_SERVICE_HOME}/log.txt" &
151142

152143
println "Sleeping for 15 s to ensure Bullet Web Service is up..."
153144
sleep 15
@@ -160,7 +151,7 @@ launch_bullet_web_service() {
160151
println "Getting column schema from the Web Service..."
161152
println ""
162153
curl -s http://localhost:9999/api/bullet/columns
163-
println "Finished Bullet Web Service test"
154+
println "Finished Bullet Web Service test!"
164155
}
165156

166157
install_node() {

examples/spark/src/main/resources/bullet_spark_kafka_settings.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,15 @@ bullet.pubsub.kafka.response.topic.name: "bullet.responses"
9999
## https://github.com/bullet-db/bullet-core/blob/master/src/main/resources/bullet_defaults.yaml
100100
########################################################################################################################
101101
########################################################################################################################
102+
bullet.query.aggregation.raw.max.size: 500
103+
bullet.query.aggregation.max.size: 1024
104+
bullet.query.aggregation.count.distinct.sketch.entries: 16384
105+
bullet.query.aggregation.group.sketch.entries: 1024
106+
bullet.query.aggregation.distribution.sketch.entries: 1024
107+
bullet.query.aggregation.distribution.max.points: 200
108+
bullet.query.aggregation.distribution.generated.points.rounding: 6
109+
bullet.query.aggregation.top.k.sketch.entries: 1024
110+
bullet.query.aggregation.top.k.sketch.error.type: "NFN"
111+
bullet.result.metadata.enable: true
102112
# Factory class to get new BulletRecords.
103113
bullet.record.provider.class.name: "com.yahoo.bullet.record.SimpleBulletRecordProvider"

examples/spark/src/main/resources/bullet_spark_rest_settings.yaml

Lines changed: 0 additions & 104 deletions
This file was deleted.

examples/storm/bin/launch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# We pass 20 and 100 to the RandomSpout, which means it generates up to 20 random records every 100 ms.
44
storm jar bullet-storm-example-1.0-SNAPSHOT-jar-with-dependencies.jar \
55
com.yahoo.bullet.storm.Topology \
6-
--bullet-conf bullet_settings.yaml \
6+
--bullet-conf ./bullet_settings.yaml \
77
--bullet-spout com.yahoo.bullet.storm.examples.RandomSpout \
88
--bullet-spout-parallelism 1 \
99
--bullet-spout-cpu-load 100.0 \

examples/storm/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<packaging>jar</packaging>
88
<name>bullet-storm-example</name>
99
<scm>
10-
<developerConnection>scm:git:ssh://git@github.com/yahoo/bullet-docs.git</developerConnection>
10+
<developerConnection>scm:git:ssh://git@github.com/bullet-db/bullet-db.github.io.git</developerConnection>
1111
<tag>HEAD</tag>
1212
</scm>
1313

@@ -26,7 +26,7 @@
2626
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2727
<maven.compiler.source>1.8</maven.compiler.source>
2828
<maven.compiler.target>1.8</maven.compiler.target>
29-
<bullet.storm.version>0.8.2</bullet.storm.version>
29+
<bullet.storm.version>0.8.3</bullet.storm.version>
3030
<bullet.core.version>0.4.0</bullet.core.version>
3131
<bullet.record.version>0.2.0</bullet.record.version>
3232
<storm.version>1.0.3</storm.version>
Lines changed: 21 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
1-
# Custom settings for the example
1+
# Custom or notable settings for the example
22
# Settings not overridden will default to the defaults in bullet_storm_defaults.yaml in the bullet-storm artifact
33
# and to the defaults in bullet_defaults.yaml in the bullet-core artifact.
4-
# Settings that start with bullet.topology are Storm settings and everything else are Bullet Core settings.
4+
5+
# Storm settings
56
bullet.topology.name: "bullet"
67
bullet.topology.metrics.enable: false
78
bullet.topology.metrics.built.in.enable: false
89
bullet.topology.query.spout.parallelism: 1
910
bullet.topology.query.spout.cpu.load: 30.0
1011
bullet.topology.query.spout.memory.on.heap.load: 256.0
11-
bullet.topology.query.spout.memory.off.heap.load: 192.0
12+
bullet.topology.query.spout.memory.off.heap.load: 160.0
1213
bullet.topology.filter.bolt.parallelism: 1
1314
bullet.topology.filter.bolt.cpu.load: 100.0
1415
bullet.topology.filter.bolt.memory.on.heap.load: 256.0
15-
bullet.topology.filter.bolt.memory.off.heap.load: 192.0
16+
bullet.topology.filter.bolt.memory.off.heap.load: 160.0
1617
bullet.topology.return.bolt.parallelism: 1
1718
bullet.topology.result.bolt.cpu.load: 10.0
1819
bullet.topology.result.bolt.memory.on.heap.load: 128.0
19-
bullet.topology.result.bolt.memory.off.heap.load: 192.0
20+
bullet.topology.result.bolt.memory.off.heap.load: 160.0
21+
bullet.topology.loop.bolt.parallelism: 1
22+
bullet.topology.loop.bolt.cpu.load: 10.0
23+
bullet.topology.loop.bolt.memory.on.heap.load: 128.0
24+
bullet.topology.loop.bolt.memory.off.heap.load: 160.0
2025
bullet.topology.join.bolt.parallelism: 1
2126
bullet.topology.join.bolt.cpu.load: 20.0
2227
bullet.topology.join.bolt.memory.on.heap.load: 128.0
23-
bullet.topology.join.bolt.memory.off.heap.load: 192.0
24-
bullet.topology.join.bolt.error.tick.timeout: 3
25-
bullet.topology.join.bolt.query.tick.timeout: 3
26-
bullet.topology.tick.interval.secs: 1
28+
bullet.topology.join.bolt.memory.off.heap.load: 160.0
29+
bullet.topology.join.bolt.query.post.finish.buffer.ticks: 3
30+
bullet.topology.join.bolt.query.pre.start.delay.ticks: 2
31+
bullet.topology.tick.spout.interval.ms: 100
32+
33+
# Bullet Core settings
2734
bullet.query.aggregation.raw.max.size: 500
2835
bullet.query.aggregation.max.size: 1024
2936
bullet.query.aggregation.count.distinct.sketch.entries: 16384
@@ -33,47 +40,11 @@ bullet.query.aggregation.distribution.max.points: 200
3340
bullet.query.aggregation.distribution.generated.points.rounding: 6
3441
bullet.query.aggregation.top.k.sketch.entries: 1024
3542
bullet.query.aggregation.top.k.sketch.error.type: "NFN"
36-
bullet.query.max.duration: 570000
3743
bullet.result.metadata.enable: true
38-
bullet.result.metadata.metrics:
39-
- name: "Query Identifier"
40-
key: "query_id"
41-
- name: "Query Body"
42-
key: "query"
43-
- name: "Query Creation Time"
44-
key: "query_receive_time"
45-
- name: "Query Termination Time"
46-
key: "query_finish_time"
47-
- name: "Sketch Metadata"
48-
key: "sketches"
49-
- name: "Estimated Result"
50-
key: "was_estimated"
51-
- name: "Standard Deviations"
52-
key: "standard_deviations"
53-
- name: "Family"
54-
key: "family"
55-
- name: "Size"
56-
key: "size"
57-
- name: "Theta"
58-
key: "theta"
59-
- name: "Uniques Estimate"
60-
key: "uniques_estimate"
61-
- name: "Minimum Value"
62-
key: "minimum_value"
63-
- name: "Maximum Value"
64-
key: "maximum_value"
65-
- name: "Items Seen"
66-
key: "items_seen"
67-
- name: "Normalized Rank Error"
68-
key: "normalized_rank_error"
69-
- name: "Maximum Count Error"
70-
key: "maximum_count_error"
71-
- name: "Active Items"
72-
key: "active_items"
73-
bullet.record.inject.timestamp.enable: true
74-
bullet.record.inject.timestamp.key: "receive_timestamp"
7544

76-
# Storm DRPC PubSub settings
45+
# REST PubSub settings
7746
bullet.pubsub.context.name: "QUERY_PROCESSING"
78-
bullet.pubsub.class.name: "com.yahoo.bullet.storm.drpc.DRPCPubSub"
79-
bullet.pubsub.storm.drpc.function: "bullet-query"
47+
bullet.pubsub.class.name: "com.yahoo.bullet.pubsub.rest.RESTPubSub"
48+
bullet.pubsub.rest.query.urls:
49+
- "http://localhost:9999/api/bullet/pubsub/query"
50+
bullet.pubsub.rest.result.url: "http://localhost:9999/api/bullet/pubsub/result"

examples/ui/env-settings.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919
"deletions": "query"
2020
},
2121
"defaultValues": {
22-
"aggregationMaxSize": 512,
23-
"rawMaxSize": 100,
24-
"durationMaxSecs": 120,
22+
"aggregationMaxSize": 1024,
23+
"rawMaxSize": 500,
24+
"durationMaxSecs": 86400,
2525
"distributionNumberOfPoints": 11,
2626
"distributionQuantilePoints": "0, 0.25, 0.5, 0.75, 0.9, 1",
2727
"distributionQuantileStart": 0,
2828
"distributionQuantileEnd": 1,
2929
"distributionQuantileIncrement": 0.1,
30-
"queryTimeoutSecs": 3,
3130
"windowEmitFrequencyMinSecs": 1,
3231
"everyForRecordBasedWindow": 1,
3332
"everyForTimeBasedWindow": 2,

0 commit comments

Comments
 (0)