Skip to content

Commit

Permalink
Add Java UDF FlatMap example
Browse files Browse the repository at this point in the history
  • Loading branch information
he-sk committed Aug 11, 2023
1 parent 6732c47 commit a4eb9e3
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
10 changes: 10 additions & 0 deletions coordinator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ logLevel: LOG_ERROR
optimizer:
distributedWindowChildThreshold: 3

worker:
queryCompiler:
queryCompilerType: "NAUTILUS_QUERY_COMPILER"

###
### Network configuration
###
Expand All @@ -18,6 +22,12 @@ restPort: 8081
### Logical source configuration
###
logicalSources:
- logicalSourceName: "ages"
fields:
- name: "timestamp"
type: "TEXT"
- name: "age"
type: "INT32"
- logicalSourceName: "points"
fields:
- name: "x"
Expand Down
3 changes: 2 additions & 1 deletion java-client-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ version '1.0-SNAPSHOT'

repositories {
mavenCentral()
mavenLocal()
}

dependencies {
implementation 'stream.nebula:nebulastream-java-client:0.0.74'
implementation 'stream.nebula:nebulastream-java-client:0.0.80'
}

apply plugin:'application'
Expand Down
51 changes: 51 additions & 0 deletions resources/ages.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
timestamp,age
17:44,3
17:45,12
17:46,28
17:47,92
17:48,9
17:49,70
17:50,69
17:51,47
17:52,44
17:53,32
17:54,55
17:55,12
17:56,24
17:57,17
17:58,12
17:59,33
18:00,63
18:01,5
18:02,90
18:03,27
18:04,12
18:05,90
18:06,32
18:07,23
18:08,56
18:09,74
18:10,35
18:11,87
18:12,22
18:13,5
18:14,32
18:15,57
18:16,2
18:17,10
18:18,60
18:19,28
18:20,94
18:21,6
18:22,31
18:23,23
18:24,37
18:25,88
18:26,58
18:27,78
18:28,15
18:29,91
18:30,73
18:31,92
18:32,95
18:33,66
8 changes: 8 additions & 0 deletions worker-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ queryCompiler:
### Physical source configuration
###
physicalSources:
- logicalSourceName: "ages"
physicalSourceName: "ages_1"
type: "CSV_SOURCE"
configuration:
filePath: "/tutorial/resources/ages.csv"
skipHeader: true
- logicalSourceName: "points"
physicalSourceName: "points_1"
type: "CSV_SOURCE"
Expand All @@ -38,3 +44,5 @@ physicalSources:
configuration:
filePath: /tutorial/resources/iris_short.csv
skipHeader: false

workerId: 2

0 comments on commit a4eb9e3

Please sign in to comment.