You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pubsub/storm-drpc.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Storm DRPC PubSub
1
+
# Storm DRPC PubSub
2
2
3
3
Bullet on [Storm](https://storm.apache.org/) can use [Storm DRPC](http://storm.apache.org/releases/1.0.0/Distributed-RPC.html) as a PubSub layer. DRPC or Distributed Remote Procedure Call, is built into Storm and consists of a set of servers that are part of the Storm cluster.
4
4
@@ -12,7 +12,7 @@ You can communicate with DRPC using [Apache Thrift](https://thrift.apache.org) o
12
12
13
13
While DRPC exposes a [Thrift](http://thrift.apache.org) endpoint, the PubSub implementation uses REST. When you launch your topology with the DRPC PubSub, you can POST a JSON Bullet PubSubMessage containing a String JSON query to a DRPC server directly with the function name that you specify in the [Bullet configuration](#storm-backend). For example,
14
14
```bash
15
-
curl -s -X POST -d '{"id":"", "content":{}}' http://<DRPC_SERVER>:<DRPC_PORT>/drpc/<DRPC_FUNCTION_FROM_YOUR_BULLET_CONF>
15
+
curl -s -X POST -d '{"id":"", "content":"{}"}' http://<DRPC_SERVER>:<DRPC_PORT>/drpc/<DRPC_FUNCTION_FROM_YOUR_BULLET_CONF>
16
16
```
17
17
to get a random record from your data instantly (if you left the Raw aggregation micro-batch size at the default of 1). The ```content``` above in the JSON is the actual (empty) Bullet query. This is a quick way to check if your topology is up and running!
Copy file name to clipboardExpand all lines: docs/quick-start.md
+51-45Lines changed: 51 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
# Quick Start
2
2
3
-
This section gets you running a mock instance of Bullet to play around with. The instance will run using [Bullet on Storm](backend/storm-setup.md). Since we do not have an actual data source, we will produce some fake data and convert it into [Bullet Records](backend/ingestion.md) in a [custom Storm spout](https://github.com/yahoo/bullet-docs/blob/master/examples/storm/src/main/java/com/yahoo/bullet/storm/examples/RandomSpout.java). If you want to use Bullet for your data, you will need to do read and convert your data to Bullet Records in a similar manner.
3
+
This section gets you running a mock instance of Bullet to play around with. The instance will run using [Bullet on Storm](backend/storm-setup.md) and use the [DRPC Pubsub](pubsub/storm-drpc.md). Since we do not have an actual data source, we will produce some fake data and convert it into [Bullet Records](backend/ingestion.md) in a [custom Storm spout](https://github.com/yahoo/bullet-docs/blob/master/examples/storm/src/main/java/com/yahoo/bullet/storm/examples/RandomSpout.java). If you want to use Bullet for your data, you will need to do read and convert your data to Bullet Records in a similar manner.
4
4
5
5
At the end of this section, you will have:
6
6
7
-
* Setup the Bullet topology using a custom spout on [bullet-storm-0.5.0](https://github.com/yahoo/bullet-storm/releases/tag/bullet-storm-0.5.0)
8
-
* Setup the [Web Service](ws/setup.md) talking to the topology and serving a schema for your UI using [bullet-service-0.0.1](https://github.com/yahoo/bullet-service/releases/tag/bullet-service-0.0.1)
7
+
* Setup the Bullet topology using a custom spout on [bullet-storm-0.6.2](https://github.com/yahoo/bullet-storm/releases/tag/bullet-storm-0.6.2)
8
+
* Setup the [Web Service](ws/setup.md) talking to the topology and serving a schema for your UI using [bullet-service-0.1.1](https://github.com/yahoo/bullet-service/releases/tag/bullet-service-0.1.1)
9
+
* Setup the [DRPC PubSub](pubsub/storm-drpc.md) talking to the topology and Web Service.
9
10
* Setup the [UI](ui/setup.md) talking to the Web Service using [bullet-ui-0.4.0](https://github.com/yahoo/bullet-ui/releases/tag/v0.4.0)
10
11
11
12
**Prerequisites**
@@ -19,7 +20,7 @@ At the end of this section, you will have:
This will setup a local Storm cluster, a Bullet running on it, the Bullet Web Service and a Bullet UI for you. Once everything has launched, you should be able to go to the Bullet UI running locally at [http://localhost:8800](http://localhost:8800). You can then [**continue this guide from here**](#what-did-we-do).
| Web Service |```pkill -f [e]xample_context.properties```|
238
+
| Web Service |```pkill -f [e]xample_drpc_pubsub_config.yaml```|
245
239
| Storm |```pkill -f [a]pache-storm-1.0.3```|
246
240
| File System |```rm -rf $BULLET_HOME /tmp/dev-storm-zookeeper /tmp/jetty-*```|
247
241
@@ -349,9 +343,34 @@ This method generates some fields randomly and inserts them into a BulletRecord.
349
343
350
344
If you put Bullet on your data, you will need to write a Spout (or a topology if your reading is complex), that reads from your data source and emits BulletRecords with the fields you wish to be query-able placed into a BulletRecord similar to this example.
351
345
346
+
### PubSub
347
+
348
+
We used the [DRPC PubSub](pubsub/storm-drpc.md) since we were using the Storm Backend. This code was included in the Bullet Storm artifact that we downloaded (the JAR with dependencies). We configured the Backend to use this PubSub by adding these settings to the YAML file that we passed to our Storm topology. Notice that we set the context to ```QUERY_PROCESSING``` since this is the Backend.
For the Web Service, we passed in a YAML file that pointed to our DRPC server that was part of the Storm cluster we launched. Notice that we set the context to ```QUERY_SUBMISSION``` since this is the Web Service.
We launched the Web Service using two custom files - a properties file and JSON schema file.
373
+
We launched the Web Service using two custom files - a PubSub configuration YAML file and JSON schema file.
355
374
356
375
The JSON columns file contains the schema for our data specified in JSON. Since our schema is not going to change, we use the Web Service to serve it from a file. If your schema changes dynamically, you will need to provide your own endpoint to the UI.
357
376
@@ -383,20 +402,7 @@ The following is a snippet from the [JSON file](https://github.com/yahoo/bullet-
383
402
}
384
403
]
385
404
```
386
-
The [example properties file](https://github.com/yahoo/bullet-docs/blob/master/examples/web-service/example_context.properties) points to the DRPC host, port, and path as well points to the custom columns file.
387
-
388
-
```
389
-
drpc.servers=localhost
390
-
drpc.port=3774
391
-
drpc.path=drpc/bullet
392
-
drpc.retry.limit=3
393
-
drpc.connect.timeout=1000
394
-
columns.file=example_columns.json
395
-
columns.schema.version=1.0
396
-
```
397
-
398
-
```drpc.servers``` is a CSV entry that contains the various DRPC servers in your Storm cluster. If you [visit the Storm UI](http://localhost:8080) and search in the ```Nimbus Configuration``` section, you can find the list of DRPC servers for your cluster. Similarly, ```drpc.port``` in the properties file is ```drpc.http.port``` in ```Nimbus Configuration```. The ```drpc.path``` is the constant string ```drpc/``` followed by the value of the ```topology.function``` setting in bullet_settings.yaml.
399
-
405
+
The contents of the [PubSub configuration file](https://github.com/yahoo/bullet-docs/blob/master/examples/web-service/example_drpc_pubsub_config.yaml) was discussed in the [PubSub section above](#pubsub).
400
406
401
407
### UI
402
408
@@ -406,10 +412,10 @@ Finally, we configured the UI with the custom environment specific settings file
This launches the Web Service using Kafka as the PubSub, no custom schema (the default sample columns) and the default values in [settings](https://github.com/yahoo/bullet-service/blob/master/src/main/resources/application.yaml). It also uses a root logging level of ```INFO```.
92
92
93
-
You could also tweak the various Bullet Web Service settings by passing them in to the command above. You could also have a custom ```application.yaml``` file (you can change the name using ```spring.config.name```) and pass it to the Web Service instead by running:
93
+
You could also tweak the various Bullet Web Service or Spring Boot settings by passing them in to the command above. For instance, you could also provide a path to your schema file using ```--bullet.schema.file=/path/to/schema.json```. You could also have a custom ```application.yaml``` file (you can change the name using ```spring.config.name```) and pass it to the Web Service instead by running:
0 commit comments