File tree 3 files changed +8
-20
lines changed
3 files changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -87,12 +87,10 @@ Arguments:
87
87
Options:
88
88
--key < KEY> key of state
89
89
--filter < FILTER> filter regex
90
- --table
91
90
```
92
91
93
92
Where:
94
93
* ` --key ` and ` --filter ` refines the result.
95
- * ` --table ` formats the output.
96
94
97
95
#### Examples
98
96
@@ -126,16 +124,6 @@ Show the detailed information:
126
124
127
125
``` bash copy="fl"
128
126
>> show state filter-service/filter-questions/metrics
129
- Key Window Value
130
- stats * {succeeded:2,failed:0,}
131
- ```
132
-
133
- #### Format the result
134
-
135
- Some states can be displayed in table format:
136
-
137
- ``` bash copy="fl"
138
- >> show state filter-service/filter-questions/metrics --table
139
127
Key Window succeeded failed
140
128
stats * 2 0
141
129
```
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ $ cd split-sentence-inline
30
30
Create the ` dataflow.yaml ` and add the following content:
31
31
32
32
``` yaml title="dataflow.yaml"
33
- apiVersion : 0.4 .0
33
+ apiVersion : 0.5 .0
34
34
35
35
meta :
36
36
name : split-sentence-inline
@@ -61,12 +61,12 @@ services:
61
61
transforms :
62
62
- operator : flat-map
63
63
run : |
64
- fn sentence_to_words(sentence: String) -> Result<Vec<String>, String > {
64
+ fn sentence_to_words(sentence: String) -> Result<Vec<String>> {
65
65
Ok(sentence.split_whitespace().map(String::from).collect())
66
66
}
67
67
- operator : map
68
68
run : |
69
- pub fn augment_count(word: String) -> Result<String, String > {
69
+ pub fn augment_count(word: String) -> Result<String> {
70
70
Ok(format!("{}({})", word, word.chars().count()))
71
71
}
72
72
@@ -119,15 +119,15 @@ The dataflow collects runtime metrics that you can inspect in the runtime termin
119
119
Check the `sentence-to-words` counters :
120
120
121
121
` ` ` bash copy="fl"
122
- >> show state sentence-words/sentence-to-words/metrics --table
122
+ >> show state sentence-words/sentence-to-words/metrics
123
123
Key Window succeeded failed
124
124
stats * 2 0
125
125
` ` `
126
126
127
127
Check the `augment-count` counters :
128
128
129
129
` ` ` bash copy="fl"
130
- >> show state sentence-words/augment-count/metrics --table
130
+ >> show state sentence-words/augment-count/metrics
131
131
Key Window succeeded failed
132
132
stats * 4 0
133
133
` ` `
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ Add the following `dataflow.yaml` file:
38
38
39
39
` ` ` yaml
40
40
# dataflow.yaml
41
- apiVersion: 0.4 .0
41
+ apiVersion: 0.5 .0
42
42
43
43
meta:
44
44
name: split
@@ -81,15 +81,15 @@ services:
81
81
transforms:
82
82
- operator: filter
83
83
run: |
84
- fn is_child(person: Person) -> Result<bool, String > {
84
+ fn is_child(person: Person) -> Result<bool> {
85
85
Ok(person.age < 18)
86
86
}
87
87
- type: topic
88
88
id: adult
89
89
transforms:
90
90
- operator: filter
91
91
run: |
92
- fn is_adult(person: Person) -> Result<bool, String > {
92
+ fn is_adult(person: Person) -> Result<bool> {
93
93
Ok(person.age >= 18)
94
94
}
95
95
` ` `
You can’t perform that action at this time.
0 commit comments