Skip to content

Commit 87ede22

Browse files
committed
Adding new settings and two new fields
1 parent 63aa064 commit 87ede22

File tree

3 files changed

+55
-21
lines changed

3 files changed

+55
-21
lines changed

examples/storm/src/main/java/com/yahoo/bullet/storm/examples/RandomSpout.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public class RandomSpout extends BaseRichSpout {
5555
public static final String BOOLEAN_MAP = "tags";
5656
public static final String STATS_MAP = "stats";
5757
public static final String LIST = "classifiers";
58+
public static final String DURATION = "duration";
59+
public static final String TYPE = "type";
5860

5961
public static final String RANDOM_MAP_KEY_A = "field_A";
6062
public static final String RANDOM_MAP_KEY_B = "field_B";
@@ -66,6 +68,7 @@ public class RandomSpout extends BaseRichSpout {
6668

6769
// Some static values in BulletRecord for the fields
6870
public static final String[] STRING_POOL = { "foo", "bar", "baz", "qux", "quux", "norf" };
71+
public static final Integer[] INTEGER_POOL = { 2057, 13, 10051, 2, 1059, 187 };
6972

7073
/**
7174
* @param args A List of Strings for your Spout. This example takes a number of messages to emit before sleeping and the amount
@@ -139,6 +142,8 @@ private BulletRecord generateRecord() {
139142
record.setString(STRING, uuid);
140143
record.setLong(LONG, (long) generatedThisPeriod);
141144
record.setDouble(DOUBLE, random.nextDouble());
145+
record.setString(TYPE, STRING_POOL[random.nextInt(STRING_POOL.length)]);
146+
record.setLong(DURATION, System.currentTimeMillis() % INTEGER_POOL[random.nextInt(INTEGER_POOL.length)]);
142147

143148
Map<String, Boolean> booleanMap = new HashMap<>(4);
144149
booleanMap.put(uuid.substring(0, 8), random.nextBoolean());

examples/storm/src/main/resources/bullet_settings.yaml

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,49 @@ bullet.topology.join.bolt.memory.off.heap.load: 192.0
2727
bullet.topology.join.bolt.error.tick.timeout: 3
2828
bullet.topology.join.bolt.rule.tick.timeout: 3
2929
bullet.topology.tick.interval.secs: 1
30-
bullet.rule.aggregation.raw.max.size: 500
31-
bullet.rule.aggregation.max.size: 1024
32-
bullet.rule.aggregation.count.distinct.sketch.entries: 16384
33-
bullet.rule.aggregation.group.sketch.entries: 1024
34-
bullet.rule.max.duration: 570000
30+
bullet.query.aggregation.raw.max.size: 500
31+
bullet.query.aggregation.max.size: 1024
32+
bullet.query.aggregation.count.distinct.sketch.entries: 16384
33+
bullet.query.aggregation.group.sketch.entries: 1024
34+
bullet.query.aggregation.distribution.sketch.entries: 1024
35+
bullet.query.aggregation.top.k.sketch.entries: 1024
36+
bullet.query.aggregation.top.k.sketch.error.type: "NFN"
37+
bullet.query.max.duration: 570000
3538
bullet.result.metadata.enable: true
3639
bullet.result.metadata.metrics:
37-
- name: "Rule Identifier"
38-
key: "rule_id"
39-
- name: "Creation Time"
40-
key: "rule_receive_time"
41-
- name: "Termination Time"
42-
key: "rule_finish_time"
43-
- name: "Aggregation Metadata"
44-
key: "aggregation"
40+
- name: "Query Identifier"
41+
key: "query_id"
42+
- name: "Query Body"
43+
key: "query"
44+
- name: "Query Creation Time"
45+
key: "query_receive_time"
46+
- name: "Query Termination Time"
47+
key: "query_finish_time"
48+
- name: "Sketch Metadata"
49+
key: "sketches"
4550
- name: "Estimated Result"
46-
key: "wasEstimated"
51+
key: "was_estimated"
4752
- name: "Standard Deviations"
48-
key: "standardDeviations"
49-
- name: "Sketch Size"
50-
key: "sketchSize"
51-
- name: "Sketch Theta"
52-
key: "sketchTheta"
53+
key: "standard_deviations"
54+
- name: "Family"
55+
key: "family"
56+
- name: "Size"
57+
key: "size"
58+
- name: "Theta"
59+
key: "theta"
5360
- name: "Uniques Estimate"
54-
key: "uniquesEstimate"
61+
key: "uniques_estimate"
62+
- name: "Minimum Value"
63+
key: "minimum_value"
64+
- name: "Maximum Value"
65+
key: "maximum_value"
66+
- name: "Items Seen"
67+
key: "items_seen"
68+
- name: "Normalized Rank Error"
69+
key: "normalized_rank_error"
70+
- name: "Maximum Count Error"
71+
key: "maximum_count_error"
72+
- name: "Active Items"
73+
key: "active_items"
5574
bullet.record.inject.timestamp.enable: true
56-
bullet.record.inject.timestamp.key: "__receive_timestamp"
75+
bullet.record.inject.timestamp.key: "receive_timestamp"

examples/web-service/example_columns.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
"type": "LONG",
1515
"description": "A numeric id for the tuple generated in a monotonically increasing fashion in this period"
1616
},
17+
{
18+
"name": "duration",
19+
"type": "LONG",
20+
"description": "A random number ranging from 0 to 10050 with a tendency to have a high frequency on lower values"
21+
},
22+
{
23+
"name": "type",
24+
"type": "STRING",
25+
"description": "A random string chosen from: foo, bar, baz, qux, quux, norf"
26+
},
1727
{
1828
"name": "tags",
1929
"type": "MAP",

0 commit comments

Comments
 (0)