├── dev-edition-app
├── resources
│ ├── voltdb-apps
│ │ ├── csvloader_ACCOUNTS_insert_log.log
│ │ ├── csvloader_ACCOUNTS_insert_report.log
│ │ └── csvloader_ACCOUNTS_insert_invalidrows.csv
│ ├── volt-stream.png
│ ├── voltsp-config-1dbnode.yaml
│ ├── voltsp-config-2dbnode.yaml
│ ├── voltsp-config-3dbnode.yaml
│ ├── deploymentk0.xml
│ ├── deploymentk1.xml
│ ├── prometheus-1dbnode.yml
│ ├── prometheus-2dbnode.yml
│ ├── prometheus-3dbnode.yml
│ ├── datasource.yaml
│ ├── deploymentk0_topics.xml
│ ├── deploymentk1_topics.xml
│ ├── dashboard.yaml
│ ├── deploymentk1_kafka.xml
│ ├── deploymentk0_kafka.xml
│ ├── log4j2.xml
│ └── dashboards
│ │ └── voltdb
│ │ └── voltdb-ttl.json
├── .env-enterprise
├── .env-staging
├── .env-dev
├── .env
├── assembly.xml
├── pom.xml
├── docker-compose.yaml
├── docker-compose-1dbnodes.yaml
├── docker-compose-1dbnodes_topics.yaml
├── docker-compose-2dbnodes.yaml
├── docker-compose-2dbnodes_topics.yaml
├── docker-compose-3dbnodes.yaml
└── docker-compose-3dbnodes_topics.yaml
├── csv
├── vehicle_types.csv
├── toll_locations.csv
├── accounts.csv
└── known_vehicles.csv
├── etc
└── license.txt
├── ddl
├── other
│ ├── set_keepminutes.sql
│ └── remove_db.sql
└── create_db.sql
├── .github
└── workflows
│ └── test.yml
├── TollCollectStreamPipeline
├── src
│ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── voltdb
│ │ │ └── tollcollect
│ │ │ └── pipeline
│ │ │ ├── PlateRecord.java
│ │ │ ├── TollCollectStream.java
│ │ │ └── PlateRecordGenerator.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── voltdb
│ │ └── tollcollect
│ │ └── pipeline
│ │ └── PlateRecordGeneratorTest.java
└── pom.xml
├── .gitignore
├── .mvn
└── wrapper
│ └── maven-wrapper.properties
├── LICENSE
├── TollCollectProcedures
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── voltdb
│ └── tollcollect
│ └── procedures
│ ├── ChargeAccount.java
│ └── ProcessPlate.java
├── TollCollectClient
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── voltdb
│ └── tollcollect
│ └── client
│ ├── TollCollectorDbClient.java
│ └── TollCollector.java
├── pom.xml
├── README.md
├── mvnw.cmd
└── mvnw
/dev-edition-app/resources/voltdb-apps/csvloader_ACCOUNTS_insert_log.log:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/voltdb-apps/csvloader_ACCOUNTS_insert_report.log:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/voltdb-apps/csvloader_ACCOUNTS_insert_invalidrows.csv:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/volt-stream.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VoltDB/TollCollectDemo/master/dev-edition-app/resources/volt-stream.png
--------------------------------------------------------------------------------
/csv/vehicle_types.csv:
--------------------------------------------------------------------------------
1 | vehicle_type,vehicle_class,toll_multip
2 | 1,Motorcycle,0.5
3 | 2,Car,1
4 | 3,Small Truck,1.5
5 | 4,Large Truck,2
6 | 5,Bus,2
--------------------------------------------------------------------------------
/etc/license.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) ${license.git.copyrightYears} Volt Active Data Inc.
2 |
3 | Use of this source code is governed by an MIT
4 | license that can be found in the LICENSE file or at
5 | https://opensource.org/licenses/MIT.
6 |
--------------------------------------------------------------------------------
/dev-edition-app/.env-enterprise:
--------------------------------------------------------------------------------
1 | VOLTDB_IMAGE=voltdb/voltdb-enterprise-dev:master--latest
2 | VMC_IMAGE=voltdb/volt-vmc-svc-dev:latest
3 | VOLTSP_IMAGE=voltdb/volt-streams-dev:master-latest
4 | PROMETHEUS_IMAGE=prom/prometheus:v2.55.0
5 | GRAFANA_IMAGE=grafana/grafana:11.3.0
6 |
--------------------------------------------------------------------------------
/dev-edition-app/.env-staging:
--------------------------------------------------------------------------------
1 | VOLTDB_IMAGE=voltdb/voltdb-developer-staging:14.1.0
2 | VMC_IMAGE=voltdb/voltdb-developer-vmc-staging:14.1.0
3 | VOLTSP_IMAGE=voltdb/voltdb-developer-streams-staging:1.2.1
4 | PROMETHEUS_IMAGE=prom/prometheus:v2.55.0
5 | GRAFANA_IMAGE=grafana/grafana:11.3.0
6 |
--------------------------------------------------------------------------------
/dev-edition-app/.env-dev:
--------------------------------------------------------------------------------
1 | VOLTDB_IMAGE=voltdb/voltdb-developer-dev:master--latest
2 | VMC_IMAGE=voltdb/voltdb-developer-vmc-dev:master--latest
3 | VOLTSP_IMAGE=voltdb/voltdb-developer-streams-dev:master--latest
4 | PROMETHEUS_IMAGE=prom/prometheus:v2.55.0
5 | GRAFANA_IMAGE=grafana/grafana:11.3.0
6 |
--------------------------------------------------------------------------------
/dev-edition-app/.env:
--------------------------------------------------------------------------------
1 | VOLTDB_IMAGE=voltactivedata/volt-developer-edition:14.1.0_voltdb
2 | VMC_IMAGE=voltactivedata/volt-developer-edition:14.1.0_vmc
3 | VOLTSP_IMAGE=voltactivedata/volt-developer-edition:1.2.1_streams
4 | PROMETHEUS_IMAGE=prom/prometheus:v2.55.0
5 | GRAFANA_IMAGE=grafana/grafana:11.3.0
6 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/voltsp-config-1dbnode.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | className: com.voltdb.tollcollect.pipeline.TollCollectStream
10 |
11 | tps: 9000
12 | voltdb:
13 | server: voltdb
14 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/voltsp-config-2dbnode.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | className: com.voltdb.tollcollect.pipeline.TollCollectStream
10 |
11 | tps: 9000
12 | voltdb:
13 | server: voltdb01
14 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/voltsp-config-3dbnode.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | className: com.voltdb.tollcollect.pipeline.TollCollectStream
10 |
11 | tps: 9000
12 | voltdb:
13 | server: voltdb01
14 |
--------------------------------------------------------------------------------
/ddl/other/set_keepminutes.sql:
--------------------------------------------------------------------------------
1 | --
2 | -- Copyright (C) 2025 Volt Active Data Inc.
3 | --
4 | -- Use of this source code is governed by an MIT
5 | -- license that can be found in the LICENSE file or at
6 | -- https://opensource.org/licenses/MIT.
7 | --
8 |
9 | ------------- Application Parameters --------------------------------------------
10 | -- How many minutes we keep data for
11 |
12 |
13 | UPSERT INTO application_parameters
14 | (parameter_name, parameter_value)
15 | VALUES
16 | ('KEEP_MINUTES','10');
17 |
18 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: Tests
2 |
3 | on:
4 | push:
5 | branches: [ "*" ]
6 |
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 |
11 | steps:
12 | - uses: actions/checkout@v4
13 | - uses: actions/setup-java@v4
14 | with:
15 | distribution: 'zulu'
16 | java-version: '17'
17 | - run: |
18 | ./mvnw clean package -ntp
19 | cd dev-edition-app/target/dev-edition-app-1.0-SNAPSHOT/dev-edition-app
20 | # docker compose up --dry-run
21 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/deploymentk0.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/deploymentk1.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/TollCollectStreamPipeline/src/main/java/com/voltdb/tollcollect/pipeline/PlateRecord.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 Volt Active Data Inc.
3 | *
4 | * Use of this source code is governed by an MIT
5 | * license that can be found in the LICENSE file or at
6 | * https://opensource.org/licenses/MIT.
7 | */
8 | package com.voltdb.tollcollect.pipeline;
9 |
10 | public record PlateRecord(
11 | long scanTimestamp,
12 | String location,
13 | String lane,
14 | String plateNum,
15 | String vehicleClass
16 | ) {
17 | }
18 |
--------------------------------------------------------------------------------
/csv/toll_locations.csv:
--------------------------------------------------------------------------------
1 | toll_loc_id,toll_loc,toll_loc_status,base_fare,latitude,longitude
2 | 1,Skyline Toll Plaza,1,2.00, 40.6943,-73.9249
3 | 2,Nexus Crossing,1,2.00, 34.1141,-118.4068
4 | 3,Elevation Pass,1,2.00, 41.8375,-87.6866
5 | 4,Infinity Bridge,1,3.00, 25.7840,-80.2101
6 | 5,Horizon Bridge,1,3.00, 32.7935,-96.7667
7 | 6,Echo Lane Station,1,2.00, 37.7558,-122.4449
8 | 7,Quantum Tunnel,1,4.00, 39.7620,-104.8758
9 | 8,Tannhäuser Gate,1,2.00, 39.3051,-76.6144
10 | 10,Astrolink Path,1,2.00, 38.6359,-90.2451
11 | 11,Orbital Gate,1,2.00, 39.1238,-94.5541
12 | 12,Lumen Tunnel,1,4.00, 37.5295,-77.4756
13 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/prometheus-1dbnode.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | global:
10 | scrape_interval: 30s
11 | evaluation_interval: 15s
12 |
13 | scrape_configs:
14 | - job_name: 'voltdb'
15 | static_configs:
16 | - targets: [ 'voltdb:11781' ]
17 | labels:
18 | namespace: 'dev-edition'
19 | - job_name: 'voltsp'
20 | static_configs:
21 | - targets: [ 'voltsp:11781' ]
22 | labels:
23 | namespace: 'dev-edition'
24 |
--------------------------------------------------------------------------------
/TollCollectStreamPipeline/src/test/java/com/voltdb/tollcollect/pipeline/PlateRecordGeneratorTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 Volt Active Data Inc.
3 | *
4 | * Use of this source code is governed by an MIT
5 | * license that can be found in the LICENSE file or at
6 | * https://opensource.org/licenses/MIT.
7 | */
8 | package com.voltdb.tollcollect.pipeline;
9 |
10 |
11 | class PlateRecordGeneratorTest {
12 |
13 | public static void main(String[] args) {
14 | PlateRecordGenerator plateRecordGenerator = new PlateRecordGenerator();
15 | for (int i = 0; i < 10000; i++) {
16 | plateRecordGenerator.generatePlateRecord();
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/dev-edition-app/resources/prometheus-2dbnode.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | global:
10 | scrape_interval: 30s
11 | evaluation_interval: 15s
12 |
13 | scrape_configs:
14 | - job_name: 'voltdb'
15 | static_configs:
16 | - targets: [ 'voltdb01:11781','voltdb02:11781' ]
17 | labels:
18 | namespace: 'dev-edition'
19 | - job_name: 'voltsp'
20 | static_configs:
21 | - targets: [ 'voltsp:11781' ]
22 | labels:
23 | namespace: 'dev-edition'
24 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/prometheus-3dbnode.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | global:
10 | scrape_interval: 30s
11 | evaluation_interval: 15s
12 |
13 | scrape_configs:
14 | - job_name: 'voltdb'
15 | static_configs:
16 | - targets: [ 'voltdb01:11781','voltdb02:11781','voltdb03:11781' ]
17 | labels:
18 | namespace: 'dev-edition'
19 | - job_name: 'voltsp'
20 | static_configs:
21 | - targets: [ 'voltsp:11781' ]
22 | labels:
23 | namespace: 'dev-edition'
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/*.iml
2 | **/target
3 | .idea/**
4 | **/.idea/**
5 | **/dependency-reduced-pom.xml
6 |
7 | target/
8 | !.mvn/wrapper/maven-wrapper.jar
9 | !**/src/main/**/target/
10 | !**/src/test/**/target/
11 |
12 | ### IntelliJ IDEA ###
13 | .idea/modules.xml
14 | .idea/jarRepositories.xml
15 | .idea/compiler.xml
16 | .idea/libraries/
17 | *.iws
18 | *.iml
19 | *.ipr
20 |
21 | ### Eclipse ###
22 | .apt_generated
23 | .classpath
24 | .factorypath
25 | .project
26 | .settings
27 | .springBeans
28 | .sts4-cache
29 |
30 | ### NetBeans ###
31 | /nbproject/private/
32 | /nbbuild/
33 | /dist/
34 | /nbdist/
35 | /.nb-gradle/
36 | build/
37 | !**/src/main/**/build/
38 | !**/src/test/**/build/
39 |
40 | ### VS Code ###
41 | .vscode/
42 |
43 | ### Mac OS ###
44 | .DS_Store
--------------------------------------------------------------------------------
/dev-edition-app/resources/datasource.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | apiVersion: 1
10 |
11 | datasources:
12 | - name: prometheus
13 | type: prometheus
14 | uid: prometheus
15 | isDefault: true
16 | access: proxy
17 | url: "http://prometheus:9090"
18 | jsonData:
19 | timeInterval: "30s"
20 | prometheusType: Prometheus
21 | prometheusVersion: 2.51.2
22 | - name: voltdb
23 | type: "yesoreyeram-infinity-datasource"
24 | uid: "dea5xuen5apdsc"
25 | access: "proxy"
26 | url: "http://vmc:8080/api/2.0/"
27 | jsonData:
28 | global_queries: [ ]
29 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/deploymentk0_topics.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | 8
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/deploymentk1_topics.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | 8
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/dashboard.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | apiVersion: 1
10 |
11 | providers:
12 | - name: 'voltdb'
13 | type: file
14 | folder: 'VoltDB'
15 | disableDeletion: true
16 | allowUiUpdates: true
17 | options:
18 | path: /etc/grafana/provisioning/voltdb-dashboards
19 | foldersFromFilesStructure: false
20 | - name: 'voltsp'
21 | type: file
22 | folder: 'VoltSP'
23 | disableDeletion: true
24 | allowUiUpdates: true
25 | options:
26 | path: /etc/grafana/provisioning/voltsp-dashboards
27 | foldersFromFilesStructure: false
28 | - name: 'tollcollect'
29 | type: file
30 | disableDeletion: true
31 | allowUiUpdates: true
32 | options:
33 | path: /etc/grafana/dashboards/welcome-dashboard.json
34 | foldersFromFilesStructure: false
35 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | wrapperVersion=3.3.2
18 | distributionType=only-script
19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2025 Volt Active Data Inc.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/deploymentk1_kafka.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | localhost:9092
19 |
20 |
21 |
22 | localhost:9092
23 | top_up_service.account_id
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/deploymentk0_kafka.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | localhost:9092
19 |
20 |
21 |
22 | localhost:9092
23 | top_up_service.account_id
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ddl/other/remove_db.sql:
--------------------------------------------------------------------------------
1 | --
2 | -- Copyright (C) 2025 Volt Active Data Inc.
3 | --
4 | -- Use of this source code is governed by an MIT
5 | -- license that can be found in the LICENSE file or at
6 | -- https://opensource.org/licenses/MIT.
7 | --
8 |
9 | DROP PROCEDURE ChargeAccount IF EXISTS;
10 | DROP PROCEDURE ProcessPlate IF EXISTS;
11 | DROP PROCEDURE AddToBalance IF EXISTS;
12 | DROP PROCEDURE GetPlateHistory IF EXISTS;
13 | DROP PROCEDURE GetAccountHistory IF EXISTS;
14 |
15 | DROP PROCEDURE dashboard_gross IF EXISTS;
16 | DROP PROCEDURE dashboard_fares IF EXISTS;
17 | DROP PROCEDURE dashboard_location_scans IF EXISTS;
18 | DROP PROCEDURE dashboard_top_10_accounts IF EXISTS;
19 | DROP PROCEDURE dashboard_vehicle_classes IF EXISTS;
20 | DROP PROCEDURE dashboard_invalid_scans IF EXISTS;
21 | DROP PROCEDURE dashboard_parameters IF EXISTS;
22 |
23 | DROP VIEW highest_grossing_locations IF EXISTS;
24 | DROP VIEW location_scans IF EXISTS;
25 | DROP VIEW invalid_scans_locations IF EXISTS;
26 | DROP VIEW activity_by_minute IF EXISTS;
27 |
28 | DROP TABLE VEHICLE_TYPES IF EXISTS;
29 | DROP TABLE TOLL_LOCATIONS IF EXISTS;
30 | DROP TABLE KNOWN_VEHICLES IF EXISTS;
31 | DROP TABLE SCAN_HISTORY IF EXISTS;
32 | DROP TABLE ACCOUNTS IF EXISTS;
33 | DROP TABLE ACCOUNT_HISTORY IF EXISTS;
34 | DROP TABLE APPLICATION_PARAMETERS IF EXISTS;
35 |
36 | DROP STREAM bill_by_mail_export IF EXISTS;
37 | DROP STREAM top_up_export IF EXISTS;
38 |
39 |
40 |
--------------------------------------------------------------------------------
/TollCollectProcedures/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
14 | 4.0.0
15 |
16 |
17 | org.voltdb
18 | TollCollectDemo
19 | 1.0-SNAPSHOT
20 |
21 |
22 | TollCollectProcedures
23 | 1.0-SNAPSHOT
24 |
25 |
26 |
27 | org.voltdb
28 | voltdb
29 | 10.1.1
30 | provided
31 |
32 |
33 |
34 |
35 |
36 |
37 | org.apache.maven.plugins
38 | maven-shade-plugin
39 | 3.6.0
40 |
41 |
42 | package
43 |
44 | shade
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/TollCollectStreamPipeline/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
14 | 4.0.0
15 |
16 |
17 | org.voltdb
18 | TollCollectDemo
19 | 1.0-SNAPSHOT
20 |
21 |
22 | TollCollectStreamPipeline
23 | 1.0-SNAPSHOT
24 |
25 |
26 | 1.2.0
27 |
28 |
29 |
30 |
31 | org.voltdb
32 | volt-stream-api
33 | ${volt.stream.version}
34 | provided
35 |
36 |
37 | org.voltdb
38 | volt-stream-connectors-api
39 | ${volt.stream.version}
40 | provided
41 |
42 |
43 |
44 |
45 |
46 |
47 | org.apache.maven.plugins
48 | maven-shade-plugin
49 | 3.6.0
50 |
51 |
52 | package
53 |
54 | shade
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/TollCollectStreamPipeline/src/main/java/com/voltdb/tollcollect/pipeline/TollCollectStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 Volt Active Data Inc.
3 | *
4 | * Use of this source code is governed by an MIT
5 | * license that can be found in the LICENSE file or at
6 | * https://opensource.org/licenses/MIT.
7 | */
8 | package com.voltdb.tollcollect.pipeline;
9 |
10 | import org.voltdb.stream.api.ExecutionContext;
11 | import org.voltdb.stream.api.Sinks;
12 | import org.voltdb.stream.api.Sources;
13 | import org.voltdb.stream.api.pipeline.VoltPipeline;
14 | import org.voltdb.stream.api.pipeline.VoltStreamBuilder;
15 |
16 | public class TollCollectStream implements VoltPipeline {
17 |
18 | @Override
19 | public void define(VoltStreamBuilder stream) {
20 | // Get the configuration value from the environment.
21 | ExecutionContext.ConfigurationContext configurator = stream.getExecutionContext().configurator();
22 | int tps = configurator.findByPath("tps").asInt();
23 | String voltdbServer = configurator.findByPath("voltdb.server").asString();
24 |
25 | PlateRecordGenerator plateRecordGenerator = new PlateRecordGenerator();
26 |
27 | stream
28 | .withName("Toll Collector Data Stream")
29 | .consumeFromSource(
30 | Sources.generateAtRate(
31 | tps,
32 | plateRecordGenerator::generatePlateRecord
33 | )
34 | )
35 | .processWith(
36 | record -> new Object[]{
37 | record.scanTimestamp(),
38 | record.location(),
39 | record.lane(),
40 | record.plateNum(),
41 | record.vehicleClass()
42 | }
43 | )
44 | .terminateWithSink(
45 | Sinks.volt().procedureCall()
46 | .withProcedureName("ProcessPlate")
47 | .withHostAndStandardPort(voltdbServer)
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/dev-edition-app/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/dev-edition-app/assembly.xml:
--------------------------------------------------------------------------------
1 |
10 |
13 | tarball
14 |
15 | tar.gz
16 | dir
17 |
18 | dev-edition-app
19 |
20 |
21 |
22 | resources
23 |
24 | **/*
25 |
26 |
27 |
28 | ../csv
29 |
30 | **/*
31 |
32 |
33 | resources/voltdb-apps
34 |
35 |
36 | ../ddl
37 |
38 | **/*
39 |
40 |
41 | resources/voltdb-schemas
42 |
43 |
44 |
45 |
46 | docker-compose.yaml
47 |
48 |
49 | .env
50 |
51 |
52 |
53 | ../TollCollectProcedures/target/TollCollectProcedures-${project.version}.jar
54 |
55 |
56 | resources/voltdb-apps/
57 |
58 |
59 |
60 | ../TollCollectStreamPipeline/target/TollCollectStreamPipeline-${project.version}.jar
61 |
62 |
63 | resources/voltsp-apps/
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/TollCollectClient/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
14 | 4.0.0
15 |
16 |
17 | org.voltdb
18 | TollCollectDemo
19 | 1.0-SNAPSHOT
20 |
21 |
22 | TollCollectClient
23 | 1.0-SNAPSHOT
24 |
25 |
26 |
27 | org.voltdb
28 | voltdbclient
29 | 14.1.0
30 |
31 |
32 |
33 | org.slf4j
34 | slf4j-api
35 | 1.7.36
36 |
37 |
38 | org.slf4j
39 | slf4j-nop
40 | 1.7.36
41 |
42 |
43 |
44 |
45 |
46 |
47 | org.apache.maven.plugins
48 | maven-shade-plugin
49 | 3.6.0
50 |
51 |
52 | package
53 |
54 | shade
55 |
56 |
57 |
58 |
60 | com.voltdb.tollcollect.client.TollCollector
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/dev-edition-app/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
14 | 4.0.0
15 |
16 |
17 | org.voltdb
18 | TollCollectDemo
19 | 1.0-SNAPSHOT
20 |
21 |
22 | dev-edition-app
23 | jar
24 |
25 |
26 |
27 | org.voltdb
28 | TollCollectProcedures
29 | ${project.version}
30 |
31 |
32 | org.voltdb
33 | TollCollectStreamPipeline
34 | ${project.version}
35 |
36 |
37 |
38 |
39 |
40 |
41 | org.apache.maven.plugins
42 | maven-assembly-plugin
43 | 3.7.1
44 |
45 |
46 | create-tarball
47 | package
48 |
49 | single
50 |
51 |
52 |
53 | assembly.xml
54 |
55 | false
56 | dev-edition-app-${project.version}
57 |
58 | tar.gz
59 | dir
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/TollCollectStreamPipeline/src/main/java/com/voltdb/tollcollect/pipeline/PlateRecordGenerator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 Volt Active Data Inc.
3 | *
4 | * Use of this source code is governed by an MIT
5 | * license that can be found in the LICENSE file or at
6 | * https://opensource.org/licenses/MIT.
7 | */
8 | package com.voltdb.tollcollect.pipeline;
9 |
10 | import java.util.concurrent.ThreadLocalRandom;
11 |
12 | public class PlateRecordGenerator {
13 |
14 | private enum Location {
15 | SKYLINE_TOLL_PLAZA("Skyline Toll Plaza", 0.1),
16 | NEXUS_CROSSING("Nexus Crossing", 0.04),
17 | ELEVATION_PASS("Elevation Pass", 0.13),
18 | INFINITY_BRIDGE("Infinity Bridge", 0.32),
19 | HORIZON_BRIDGE("Horizon Bridge", 0.15),
20 | ECHO_LANE_STATION("Echo Lane Station", 0.05),
21 | QUANTUM_TUNNEL("Quantum Tunnel", 0.34),
22 | TANNHAUSER_GATE("Tannhäuser Gate", 0.09),
23 | ASTROLINK_PATH("Astrolink Path", 0.03),
24 | ORBITAL_GATE("Orbital Gate", 0.08),
25 | LUMEN_TUNNEL("Lumen Tunnel", 0.12);
26 |
27 | private final String name;
28 | private final double invalidScanProbabilities;
29 |
30 | Location(String name, double invalidScanProbabilities) {
31 | this.name = name;
32 | this.invalidScanProbabilities = invalidScanProbabilities;
33 | }
34 |
35 | public String getName() {
36 | return name;
37 | }
38 |
39 | public boolean shouldProduceInvalidScan() {
40 | return ThreadLocalRandom.current().nextFloat() < invalidScanProbabilities;
41 | }
42 | }
43 |
44 | private static final String[] VEHICLE_TYPES = new String[]{
45 | "Motorcycle",
46 | "Car",
47 | "Small Truck",
48 | "Large Truck",
49 | "Bus"
50 | };
51 |
52 | private Location randomLocation() {
53 | double exponentialDistributionSample = ThreadLocalRandom.current().nextExponential() * 2;
54 |
55 | int enumIndex = (int) Math.round(exponentialDistributionSample); // Map to nearest integer
56 | enumIndex = Math.max(0, Math.min(Location.values().length - 1, enumIndex)); // Clamp to valid indices
57 | return Location.values()[enumIndex];
58 | }
59 |
60 | private String randomVehicleType() {
61 | double mean = (VEHICLE_TYPES.length - 1) / 2.0; // Center around the middle index
62 | double stdDev = VEHICLE_TYPES.length / 4.0; // Adjust spread (smaller for tighter grouping)
63 |
64 | double gaussianDistributionSample = ThreadLocalRandom.current().nextGaussian(mean, stdDev);
65 |
66 | int enumIndex = (int) Math.round(gaussianDistributionSample); // Map to nearest integer
67 | enumIndex = Math.max(0, Math.min(VEHICLE_TYPES.length - 1, enumIndex)); // Clamp to valid indices
68 | return VEHICLE_TYPES[enumIndex];
69 | }
70 |
71 | String randomPlate(Location location) {
72 | ThreadLocalRandom random = ThreadLocalRandom.current();
73 |
74 | int plateNumber = random.nextInt(1000);
75 | if (location.shouldProduceInvalidScan()) {
76 | return String.format("K%03d", plateNumber);
77 | } else {
78 | return String.format("X%03d", plateNumber);
79 | }
80 | }
81 |
82 | public PlateRecord generatePlateRecord() {
83 | long scanTimestamp = System.currentTimeMillis();
84 |
85 | Location location = randomLocation();
86 | String lane = Integer.toString(ThreadLocalRandom.current().nextInt(5));
87 | String plateNum = randomPlate(location);
88 | String vehicleClass = randomVehicleType();
89 |
90 | return new PlateRecord(
91 | scanTimestamp,
92 | location.getName(),
93 | lane,
94 | plateNum,
95 | vehicleClass);
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/TollCollectClient/src/main/java/com/voltdb/tollcollect/client/TollCollectorDbClient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 Volt Active Data Inc.
3 | *
4 | * Use of this source code is governed by an MIT
5 | * license that can be found in the LICENSE file or at
6 | * https://opensource.org/licenses/MIT.
7 | */
8 | package com.voltdb.tollcollect.client;
9 |
10 | import org.voltdb.VoltTable;
11 | import org.voltdb.client.Client2;
12 | import org.voltdb.client.Client2Config;
13 | import org.voltdb.client.ClientFactory;
14 | import org.voltdb.client.ClientResponse;
15 | import org.voltdb.client.ProcCallException;
16 |
17 | import java.io.IOException;
18 | import java.math.BigDecimal;
19 |
20 |
21 | public class TollCollectorDbClient implements AutoCloseable {
22 |
23 | private final String servers;
24 | private final Client2 client;
25 |
26 | public TollCollectorDbClient(String servers) {
27 | this.servers = servers;
28 |
29 | // Create a client instance with default configuration values
30 | Client2Config config = new Client2Config();
31 | client = ClientFactory.createClient(config);
32 | }
33 |
34 | // Method to establish connection with Volt using Client2
35 | void connectToVolt() throws IOException {
36 | // Connect to Volt using a string for connection details and synchronous completion
37 | client.connectSync(servers);
38 | System.out.println("Connected to Volt.\n");
39 | }
40 |
41 | @Override
42 | public void close() {
43 | client.close();
44 | }
45 |
46 | // Method used to process plate
47 | void processScanRow(long scanTimestamp, String location, String lane, String plateNum, String vehicleClass)
48 | throws IOException, ProcCallException {
49 | System.out.println("Looking up plate... Calculating toll... Writing to scan log... ");
50 | // Call ProcessPlate procedure with synchronous completion and return response into ClientResponse object
51 | callProcedureSynchronously("ProcessPlate", scanTimestamp, location, lane, plateNum, vehicleClass);
52 | }
53 |
54 | // Method used to get plate history and return query result as VoltTable
55 | VoltTable getPlateHistory(String plateNum, String location, String lane, long rowCount) throws IOException, ProcCallException {
56 | // Call PlateHistory procedure with synchronous completion and return response into ClientResponse object
57 | return callProcedureSynchronously("GetPlateHistory", plateNum, location, lane, rowCount)[0];
58 | }
59 |
60 | // Method used to get account history and return query result as VoltTable
61 | VoltTable getAccountHistory(long accountId, long rowCount) throws IOException, ProcCallException {
62 | // Call PlateHistory procedure with synchronous completion and return response into ClientResponse object
63 | return callProcedureSynchronously("GetAccountHistory", accountId, rowCount)[0];
64 | }
65 |
66 | // Method used to charge account
67 | void chargeRow(long scanId, long scanTimestamp, String location, String lane, String plateNum, int accountId, BigDecimal tollAmount, String tollReason)
68 | throws IOException, ProcCallException {
69 | System.out.println("Checking balance... Charging account... Writing to account log... ");
70 | // Call ChargeAccount procedure with synchronous completion and return response into ClientResponse object
71 | callProcedureSynchronously("ChargeAccount", scanId, scanTimestamp, location, lane, plateNum, accountId, tollAmount, tollReason);
72 | }
73 |
74 | private VoltTable[] callProcedureSynchronously(String procedure, Object... arguments) throws IOException, ProcCallException {
75 | ClientResponse response = client.callProcedureSync(procedure, arguments);
76 | if (response.getStatus() != ClientResponse.SUCCESS) {
77 | System.out.printf("Error calling procedure %s: %s%n", procedure, response.getStatusString());
78 | }
79 |
80 | // Report transaction performance metrics available in ClientResponse object
81 | System.out.printf("Estimated Database Transaction Time: %.3fs | End-to-end Transaction Time: %.3fs%n",
82 | (response.getClusterRoundtrip() / 1000.0),
83 | (response.getClientRoundtrip() / 1000.0));
84 |
85 | return response.getResults();
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
14 | 4.0.0
15 |
16 | org.voltdb
17 | TollCollectDemo
18 | 1.0-SNAPSHOT
19 | pom
20 |
21 |
22 | TollCollectProcedures
23 | TollCollectClient
24 | TollCollectStreamPipeline
25 | dev-edition-app
26 |
27 |
28 |
29 | UTF-8
30 | UTF-8
31 |
32 | 17
33 | 17
34 |
35 | 4.3
36 |
37 |
38 |
39 |
40 | MIT
41 | https://opensource.org/blog/license/mit
42 | manual
43 |
44 |
45 |
46 |
47 |
48 |
49 | org.apache.maven.plugins
50 | maven-compiler-plugin
51 | 3.11.0
52 |
53 |
54 | org.apache.maven.plugins
55 | maven-surefire-plugin
56 | 3.2.2
57 |
58 |
59 |
60 | com.mycila
61 | license-maven-plugin
62 | ${license-maven-plugin.version}
63 |
64 |
65 |
66 | true
67 | true
68 | true
69 | true
70 |
71 | 2025
72 |
73 |
74 | LICENSE.txt
75 | dashboards/**
76 | csv/**
77 | **/.env*
78 |
79 |
80 |
81 |
82 | com.mycila
83 | license-maven-plugin-git
84 | ${license-maven-plugin.version}
85 |
86 |
87 |
88 |
89 |
90 | check
91 |
92 |
93 |
94 |
95 |
96 |
97 | io.github.git-commit-id
98 | git-commit-id-maven-plugin
99 | 4.9.9
100 |
101 |
102 | get-the-git-infos
103 |
104 | revision
105 |
106 | initialize
107 |
108 |
109 |
110 | true
111 | ${project.build.outputDirectory}/git.properties
112 |
113 |
114 | ^git.tags$
115 | ^git.build.time$
116 | ^git.commit.id.abbrev$
117 |
118 | full
119 |
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/dev-edition-app/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | services:
10 | voltdb:
11 | image: ${VOLTDB_IMAGE}
12 | platform: linux/amd64
13 | container_name: voltdb
14 | hostname: voltdb
15 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
16 | healthcheck:
17 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
18 | interval: 10s
19 | retries: 5
20 | start_period: 30s
21 | timeout: 10s
22 | ports:
23 | - 21212:21212
24 | - 9092:9092
25 | expose:
26 | - "21212"
27 | - "9092"
28 | environment:
29 | VOLTDB_START_CONFIG: "--ignore=thp -c 1 -H voltdb --publicinterface=localhost"
30 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
31 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
32 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
33 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
34 | VOLTDB_DIR: /voltdb
35 | VOLTDB_INIT_FORCE: true
36 | volumes:
37 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
38 | - ./resources/deploymentk0.xml:/etc/voltdb/deployment.xml
39 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
40 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
41 | - db:/voltdb
42 |
43 | voltdb-init:
44 | image: ${VOLTDB_IMAGE}
45 | platform: linux/amd64
46 | container_name: voltdb-init
47 | hostname: voltdb-init
48 | command: >
49 | sh -c "csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/accounts.csv ACCOUNTS &&
50 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/known_vehicles.csv KNOWN_VEHICLES &&
51 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/toll_locations.csv TOLL_LOCATIONS &&
52 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/vehicle_types.csv VEHICLE_TYPES"
53 | depends_on:
54 | voltdb:
55 | condition: service_healthy
56 | volumes:
57 | - ./resources/voltdb-apps:/etc/voltdb/data/
58 |
59 | vmc:
60 | image: ${VMC_IMAGE}
61 | platform: linux/amd64
62 | container_name: vmc
63 | command: java -jar /opt/voltdb/volt-vmc-svc.jar --servers=voltdb --port=21212
64 | depends_on:
65 | voltdb:
66 | condition: service_healthy
67 | ports:
68 | - 8080:8080
69 | environment:
70 | VOLTDB_CONTAINER: docker
71 |
72 | prometheus:
73 | image: ${PROMETHEUS_IMAGE}
74 | container_name: prometheus
75 | ports:
76 | - "9090:9090"
77 | volumes:
78 | - ./resources/prometheus-1dbnode.yml:/etc/prometheus/prometheus.yml
79 | command:
80 | - '--config.file=/etc/prometheus/prometheus.yml'
81 | - '--log.level=error'
82 |
83 | grafana:
84 | image: ${GRAFANA_IMAGE}
85 | container_name: grafana
86 | ports:
87 | - "3000:3000"
88 | environment:
89 | - GF_AUTH_ANONYMOUS_ENABLED=true
90 | - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
91 | - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
92 | - GF_AUTH_BASIC_ENABLED=false
93 | - GF_AUTH_DISABLE_LOGIN_FORM=true
94 | - GF_AUTH_DISABLE_SIGNOUT_MENU=true
95 | - GF_USERS_ALLOW_SIGN_UP=false
96 | - GF_USERS_DEFAULT_THEME=light
97 | - GF_LOG_LEVEL=critical
98 | - GF_LOG_MODE=file
99 | - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/welcome-dashboard.json
100 | - GF_INSTALL_PLUGINS=yesoreyeram-infinity-datasource,marcusolsson-treemap-panel,zestairlove-compacthostmap-panel
101 | volumes:
102 | - grafana_data:/var/lib/grafana
103 | - ./resources/dashboards:/etc/grafana/dashboards
104 | - ./resources/volt-stream.svg:/usr/share/grafana/public/img/grafana_icon.svg
105 | - ./resources/volt-stream.png:/usr/share/grafana/public/img/grafana_icon.png
106 | - ./resources/dashboards/voltdb:/etc/grafana/provisioning/voltdb-dashboards
107 | - ./resources/dashboards/voltsp:/etc/grafana/provisioning/voltsp-dashboards
108 | - ./resources/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
109 | - ./resources/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
110 |
111 | voltsp:
112 | image: ${VOLTSP_IMAGE}
113 | platform: linux/amd64
114 | depends_on:
115 | voltdb:
116 | condition: service_healthy
117 | voltdb-init:
118 | condition: service_completed_successfully
119 | container_name: voltsp
120 | healthcheck:
121 | test: curl --fail http://localhost:11781/metrics || exit 1
122 | interval: 60s
123 | retries: 5
124 | start_period: 30s
125 | timeout: 10s
126 | mem_limit: 3g
127 | environment:
128 | - JAVA_OPTS=-XX:InitialRAMPercentage=80.0 -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Dvoltsp.parallelism=10
129 | volumes:
130 | - ./resources/voltsp-apps:/volt-apps
131 | - ./resources/voltsp-config-1dbnode.yaml:/etc/voltsp/configuration.yaml
132 | - ./resources/log4j2.xml:/etc/app/log4j2.xml
133 | - ${LICENSE_FILE_PATH}:/etc/voltsp/license.xml
134 |
135 | volumes:
136 | db:
137 | grafana_data:
138 |
--------------------------------------------------------------------------------
/dev-edition-app/docker-compose-1dbnodes.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | services:
10 | voltdb:
11 | image: ${VOLTDB_IMAGE}
12 | platform: linux/amd64
13 | container_name: voltdb
14 | hostname: voltdb
15 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
16 | healthcheck:
17 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
18 | interval: 10s
19 | retries: 5
20 | start_period: 30s
21 | timeout: 10s
22 | ports:
23 | - 21212:21212
24 | - 9092:9092
25 | expose:
26 | - "21212"
27 | - "9092"
28 | environment:
29 | VOLTDB_START_CONFIG: "--ignore=thp -c 1 -H voltdb --publicinterface=localhost"
30 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
31 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
32 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
33 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
34 | VOLTDB_DIR: /voltdb
35 | VOLTDB_INIT_FORCE: true
36 | volumes:
37 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
38 | - ./resources/deploymentk0.xml:/etc/voltdb/deployment.xml
39 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
40 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
41 | - db:/voltdb
42 |
43 | voltdb-init:
44 | image: ${VOLTDB_IMAGE}
45 | platform: linux/amd64
46 | container_name: voltdb-init
47 | hostname: voltdb-init
48 | command: >
49 | sh -c "csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/accounts.csv ACCOUNTS &&
50 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/known_vehicles.csv KNOWN_VEHICLES &&
51 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/toll_locations.csv TOLL_LOCATIONS &&
52 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/vehicle_types.csv VEHICLE_TYPES"
53 | depends_on:
54 | voltdb:
55 | condition: service_healthy
56 | volumes:
57 | - ./resources/voltdb-apps:/etc/voltdb/data/
58 |
59 | vmc:
60 | image: ${VMC_IMAGE}
61 | platform: linux/amd64
62 | container_name: vmc
63 | command: java -jar /opt/voltdb/volt-vmc-svc.jar --servers=voltdb --port=21212
64 | depends_on:
65 | voltdb:
66 | condition: service_healthy
67 | ports:
68 | - 8080:8080
69 | environment:
70 | VOLTDB_CONTAINER: docker
71 |
72 | prometheus:
73 | image: ${PROMETHEUS_IMAGE}
74 | container_name: prometheus
75 | ports:
76 | - "9090:9090"
77 | volumes:
78 | - ./resources/prometheus-1dbnode.yml:/etc/prometheus/prometheus.yml
79 | command:
80 | - '--config.file=/etc/prometheus/prometheus.yml'
81 | - '--log.level=error'
82 |
83 | grafana:
84 | image: ${GRAFANA_IMAGE}
85 | container_name: grafana
86 | ports:
87 | - "3000:3000"
88 | environment:
89 | - GF_AUTH_ANONYMOUS_ENABLED=true
90 | - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
91 | - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
92 | - GF_AUTH_BASIC_ENABLED=false
93 | - GF_AUTH_DISABLE_LOGIN_FORM=true
94 | - GF_AUTH_DISABLE_SIGNOUT_MENU=true
95 | - GF_USERS_ALLOW_SIGN_UP=false
96 | - GF_USERS_DEFAULT_THEME=light
97 | - GF_LOG_LEVEL=critical
98 | - GF_LOG_MODE=file
99 | - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/welcome-dashboard.json
100 | - GF_INSTALL_PLUGINS=yesoreyeram-infinity-datasource,marcusolsson-treemap-panel,zestairlove-compacthostmap-panel
101 | volumes:
102 | - grafana_data:/var/lib/grafana
103 | - ./resources/dashboards:/etc/grafana/dashboards
104 | - ./resources/volt-stream.svg:/usr/share/grafana/public/img/grafana_icon.svg
105 | - ./resources/volt-stream.png:/usr/share/grafana/public/img/grafana_icon.png
106 | - ./resources/dashboards/voltdb:/etc/grafana/provisioning/voltdb-dashboards
107 | - ./resources/dashboards/voltsp:/etc/grafana/provisioning/voltsp-dashboards
108 | - ./resources/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
109 | - ./resources/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
110 |
111 | voltsp:
112 | image: ${VOLTSP_IMAGE}
113 | platform: linux/amd64
114 | depends_on:
115 | voltdb:
116 | condition: service_healthy
117 | voltdb-init:
118 | condition: service_completed_successfully
119 | container_name: voltsp
120 | healthcheck:
121 | test: curl --fail http://localhost:11781/metrics || exit 1
122 | interval: 60s
123 | retries: 5
124 | start_period: 30s
125 | timeout: 10s
126 | mem_limit: 3g
127 | environment:
128 | - JAVA_OPTS=-XX:InitialRAMPercentage=80.0 -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Dvoltsp.parallelism=10
129 | volumes:
130 | - ./resources/voltsp-apps:/volt-apps
131 | - ./resources/voltsp-config-1dbnode.yaml:/etc/voltsp/configuration.yaml
132 | - ./resources/log4j2.xml:/etc/app/log4j2.xml
133 | - ${LICENSE_FILE_PATH}:/etc/voltsp/license.xml
134 |
135 | volumes:
136 | db:
137 | grafana_data:
138 |
--------------------------------------------------------------------------------
/dev-edition-app/docker-compose-1dbnodes_topics.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | services:
10 | voltdb:
11 | image: ${VOLTDB_IMAGE}
12 | platform: linux/amd64
13 | container_name: voltdb
14 | hostname: voltdb
15 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
16 | healthcheck:
17 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
18 | interval: 10s
19 | retries: 5
20 | start_period: 30s
21 | timeout: 10s
22 | ports:
23 | - 21212:21212
24 | - 9092:9092
25 | expose:
26 | - "21212"
27 | - "9092"
28 | environment:
29 | VOLTDB_START_CONFIG: "--ignore=thp -c 1 -H voltdb --publicinterface=localhost"
30 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
31 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
32 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
33 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
34 | VOLTDB_DIR: /voltdb
35 | VOLTDB_INIT_FORCE: true
36 | volumes:
37 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
38 | - ./resources/deploymentk0_topics.xml:/etc/voltdb/deployment.xml
39 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
40 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
41 | - db:/voltdb
42 |
43 | voltdb-init:
44 | image: ${VOLTDB_IMAGE}
45 | platform: linux/amd64
46 | container_name: voltdb-init
47 | hostname: voltdb-init
48 | command: >
49 | sh -c "csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/accounts.csv ACCOUNTS &&
50 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/known_vehicles.csv KNOWN_VEHICLES &&
51 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/toll_locations.csv TOLL_LOCATIONS &&
52 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb -f /etc/voltdb/data/vehicle_types.csv VEHICLE_TYPES"
53 | depends_on:
54 | voltdb:
55 | condition: service_healthy
56 | volumes:
57 | - ./resources/voltdb-apps:/etc/voltdb/data/
58 |
59 | vmc:
60 | image: ${VMC_IMAGE}
61 | platform: linux/amd64
62 | container_name: vmc
63 | command: java -jar /opt/voltdb/volt-vmc-svc.jar --servers=voltdb --port=21212
64 | depends_on:
65 | voltdb:
66 | condition: service_healthy
67 | ports:
68 | - 8080:8080
69 | environment:
70 | VOLTDB_CONTAINER: docker
71 |
72 | prometheus:
73 | image: ${PROMETHEUS_IMAGE}
74 | container_name: prometheus
75 | ports:
76 | - "9090:9090"
77 | volumes:
78 | - ./resources/prometheus-1dbnode.yml:/etc/prometheus/prometheus.yml
79 | command:
80 | - '--config.file=/etc/prometheus/prometheus.yml'
81 | - '--log.level=error'
82 |
83 | grafana:
84 | image: ${GRAFANA_IMAGE}
85 | container_name: grafana
86 | ports:
87 | - "3000:3000"
88 | environment:
89 | - GF_AUTH_ANONYMOUS_ENABLED=true
90 | - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
91 | - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
92 | - GF_AUTH_BASIC_ENABLED=false
93 | - GF_AUTH_DISABLE_LOGIN_FORM=true
94 | - GF_AUTH_DISABLE_SIGNOUT_MENU=true
95 | - GF_USERS_ALLOW_SIGN_UP=false
96 | - GF_USERS_DEFAULT_THEME=light
97 | - GF_LOG_LEVEL=critical
98 | - GF_LOG_MODE=file
99 | - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/welcome-dashboard.json
100 | - GF_INSTALL_PLUGINS=yesoreyeram-infinity-datasource,marcusolsson-treemap-panel,zestairlove-compacthostmap-panel
101 | volumes:
102 | - grafana_data:/var/lib/grafana
103 | - ./resources/dashboards:/etc/grafana/dashboards
104 | - ./resources/volt-stream.svg:/usr/share/grafana/public/img/grafana_icon.svg
105 | - ./resources/volt-stream.png:/usr/share/grafana/public/img/grafana_icon.png
106 | - ./resources/dashboards/voltdb:/etc/grafana/provisioning/voltdb-dashboards
107 | - ./resources/dashboards/voltsp:/etc/grafana/provisioning/voltsp-dashboards
108 | - ./resources/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
109 | - ./resources/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
110 |
111 | voltsp:
112 | image: ${VOLTSP_IMAGE}
113 | platform: linux/amd64
114 | depends_on:
115 | voltdb:
116 | condition: service_healthy
117 | voltdb-init:
118 | condition: service_completed_successfully
119 | container_name: voltsp
120 | healthcheck:
121 | test: curl --fail http://localhost:11781/metrics || exit 1
122 | interval: 60s
123 | retries: 5
124 | start_period: 30s
125 | timeout: 10s
126 | mem_limit: 3g
127 | environment:
128 | - JAVA_OPTS=-XX:InitialRAMPercentage=80.0 -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Dvoltsp.parallelism=10
129 | volumes:
130 | - ./resources/voltsp-apps:/volt-apps
131 | - ./resources/voltsp-config-1dbnode.yaml:/etc/voltsp/configuration.yaml
132 | - ./resources/log4j2.xml:/etc/app/log4j2.xml
133 | - ${LICENSE_FILE_PATH}:/etc/voltsp/license.xml
134 |
135 | volumes:
136 | db:
137 | grafana_data:
138 |
--------------------------------------------------------------------------------
/TollCollectClient/src/main/java/com/voltdb/tollcollect/client/TollCollector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 Volt Active Data Inc.
3 | *
4 | * Use of this source code is governed by an MIT
5 | * license that can be found in the LICENSE file or at
6 | * https://opensource.org/licenses/MIT.
7 | */
8 | package com.voltdb.tollcollect.client;
9 |
10 | import org.voltdb.VoltTable;
11 | import org.voltdb.client.ProcCallException;
12 |
13 | import java.io.Console;
14 | import java.io.IOException;
15 | import java.math.BigDecimal;
16 |
17 | public class TollCollector {
18 |
19 | private static final String DEFAULT_VOLT_HOST = "localhost";
20 | private static final int DEFAULT_VOLT_PORT = 21212;
21 |
22 | private final Console console;
23 |
24 | TollCollector(Console console) {
25 | this.console = console;
26 | }
27 |
28 | public static void main(String[] args) {
29 | new TollCollector(System.console()).run();
30 | }
31 |
32 | void run() {
33 | String server = getServerFromUser(console);
34 |
35 | // Instantiate object to handle Volt connection
36 | try (TollCollectorDbClient tc = new TollCollectorDbClient(server)) {
37 | // Connect to Volt
38 | try {
39 | System.out.println("Connecting to Volt at " + server);
40 | tc.connectToVolt();
41 | } catch (IOException ex) {
42 | System.out.println("Unable to connect.");
43 | System.exit(-1);
44 | }
45 |
46 | System.out.println("Enter plate scan info below (Ctrl-c to stop)");
47 |
48 | while (true) {
49 | long scanTimestamp = System.currentTimeMillis();
50 | String location = console.readLine("Enter toll location [Infinity Bridge|Echo Lane Station]: ");
51 | String lane = console.readLine("Enter toll lane [01-05]: ");
52 | String plateNum = console.readLine("Enter plate number [X000-X999]: ");
53 | String vehicleClass = console.readLine("Enter vehicle type [Car|Motorcycle|Small Truck|Large Truck|Bus]: ");
54 |
55 | try {
56 | // Perform Volt procedure call to process plate
57 | tc.processScanRow(scanTimestamp, location, lane, plateNum, vehicleClass);
58 | } catch (IOException | ProcCallException e) {
59 | System.err.println("Error processing scan: " + e.getMessage());
60 | continue;
61 | }
62 |
63 | System.out.println("Checking Entry...");
64 |
65 | VoltTable scanResult;
66 | // Perform Volt query, collect results, and print results with a well formatted string.
67 | try {
68 | scanResult = tc.getPlateHistory(plateNum, location, lane,1);
69 | System.out.println(scanResult.toFormattedString());
70 | } catch (IOException | ProcCallException e) {
71 | System.err.println("Error retrieving data: " + e.getMessage());
72 | continue;
73 | }
74 |
75 | // Read through the query result table and assign variables for further work
76 | if (scanResult.advanceRow() && scanResult.getLong("ACCOUNT_ID") > 0) {
77 | long scanId = scanResult.getLong("SCAN_ID");
78 | int accountId = (int) scanResult.getLong("ACCOUNT_ID");
79 | BigDecimal tollAmount = scanResult.getDecimalAsBigDecimal("TOLL_AMOUNT");
80 | String tollReason = scanResult.getString("TOLL_REASON");
81 |
82 | try {
83 | // Perform Volt procedure call to charge account
84 | tc.chargeRow(scanId, scanTimestamp, location, lane, plateNum, accountId, tollAmount, tollReason);
85 | } catch (IOException | ProcCallException e) {
86 | System.err.println("Error charging account: " + e.getMessage());
87 | continue;
88 | }
89 |
90 | System.out.println("Checking Entry...");
91 | // Perform Volt query, collect results, and print results with a well formatted string.
92 | try {
93 | VoltTable chargeResult = tc.getAccountHistory(accountId, 10);
94 | System.out.println(chargeResult.toFormattedString());
95 | } catch (IOException | ProcCallException e) {
96 | System.err.println("Error retrieving data: " + e.getMessage());
97 | }
98 | } else {
99 | System.out.println("No account found");
100 | }
101 | }
102 | } catch (RuntimeException e) {
103 | System.out.println("\nInput complete. Goodbye!");
104 | }
105 | }
106 |
107 | private static String getServerFromUser(Console console) {
108 | String connectionInput = console.readLine(
109 | "Enter VoltDB connection details (host:port) or press ENTER key for default [%s:%d]:",
110 | DEFAULT_VOLT_HOST,
111 | DEFAULT_VOLT_PORT
112 | );
113 |
114 | // If provided, user input will replace default connection details for Volt.
115 | String servers = DEFAULT_VOLT_HOST + ":" + DEFAULT_VOLT_PORT;
116 | if (connectionInput != null && !connectionInput.isEmpty()) {
117 | servers = connectionInput;
118 | }
119 | return servers;
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/TollCollectProcedures/src/main/java/com/voltdb/tollcollect/procedures/ChargeAccount.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 Volt Active Data Inc.
3 | *
4 | * Use of this source code is governed by an MIT
5 | * license that can be found in the LICENSE file or at
6 | * https://opensource.org/licenses/MIT.
7 | */
8 | package com.voltdb.tollcollect.procedures;
9 |
10 | import org.voltdb.SQLStmt;
11 | import org.voltdb.VoltProcedure;
12 | import org.voltdb.VoltTable;
13 | import org.voltdb.VoltTableRow;
14 | import org.voltdb.VoltType;
15 |
16 | import java.util.Date;
17 | import java.math.BigDecimal;
18 |
19 | public class ChargeAccount extends VoltProcedure {
20 |
21 | public final SQLStmt getAccountInfo = new SQLStmt(
22 | "SELECT balance, auto_topup, account_status FROM ACCOUNTS " +
23 | "WHERE account_id = ? AND account_status = 1;"
24 | );
25 |
26 | public final SQLStmt addTopUpAmount = new SQLStmt(
27 | "UPDATE ACCOUNTS SET balance = balance + ? " +
28 | "WHERE account_id = ?;"
29 | );
30 |
31 | public final SQLStmt exportTopUp = new SQLStmt(
32 | "INSERT INTO top_up_stream VALUES (?, ?, ?, ?);"
33 | );
34 |
35 | public final SQLStmt updateBalance = new SQLStmt(
36 | "UPDATE ACCOUNTS SET balance = balance - ? " +
37 | "WHERE account_id = ?;"
38 | );
39 |
40 | public final SQLStmt insertAccountHistory = new SQLStmt(
41 | "INSERT INTO ACCOUNT_HISTORY (acct_tx_id, acct_tx_timestamp, account_id, " +
42 | "plate_num, scan_id, scan_timestamp, toll_loc, toll_lane_num, " +
43 | "toll_amount, toll_reason, tx_fee_amount, " +
44 | "total_amount, tx_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"
45 | );
46 |
47 |
48 | // Insert into bill_by_mail_export stream
49 | public final SQLStmt exportBillByMail = new SQLStmt(
50 | "INSERT INTO bill_by_mail_stream VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"
51 | );
52 |
53 | public VoltTable[] run(long scanId,
54 | long scanTimestamp,
55 | String location,
56 | String lane,
57 | String plateNum,
58 | int accountId,
59 | BigDecimal tollAmount,
60 | String tollReason) throws VoltAbortException {
61 | //Initialize transaction variables
62 |
63 | BigDecimal txFeeAmount = new BigDecimal(0);
64 |
65 | final BigDecimal topup_amount = new BigDecimal(30);
66 | BigDecimal finalTotalAmount = tollAmount;
67 |
68 | // Use Volt to generate a safe uniqueId and timestamp for this transaction.
69 | long acct_tx_id = getUniqueId();
70 | Date acct_tx_timestamp = getTransactionTime();
71 |
72 | // Get account information
73 | voltQueueSQL(getAccountInfo, accountId);
74 | VoltTable[] accountResults = voltExecuteSQL();
75 |
76 | if (accountResults[0].getRowCount() == 0) {
77 | throw new VoltAbortException("Invalid account");
78 | }
79 |
80 | VoltTableRow accountRow = accountResults[0].fetchRow(0);
81 | BigDecimal currentBalance = accountRow.getDecimalAsBigDecimal("balance");
82 | byte autoTopup = (byte) accountRow.get("auto_topup", VoltType.TINYINT);
83 |
84 |
85 | // Check if balance after deduction would be below threshold
86 | BigDecimal projectedBalance = currentBalance.subtract(tollAmount);
87 |
88 | if (projectedBalance.compareTo(new BigDecimal(10)) == -1 && autoTopup == 1) {
89 | // Process auto top-up
90 | voltQueueSQL(addTopUpAmount, topup_amount, accountId);
91 |
92 | // Send to top-up stream to charge payment method. Assume successful.
93 | voltQueueSQL(exportTopUp,
94 | acct_tx_id,
95 | acct_tx_timestamp,
96 | accountId,
97 | topup_amount);
98 |
99 |
100 | // Record top-up in account history
101 | voltQueueSQL(insertAccountHistory,
102 | acct_tx_id,
103 | acct_tx_timestamp,
104 | accountId,
105 | null,
106 | null,
107 | null,
108 | null,
109 | null,
110 | null,
111 | "AUTO_TOPUP",
112 | null,
113 | topup_amount,
114 | "CREDIT");
115 | } else if (projectedBalance.compareTo(new BigDecimal(0)) == -1 && autoTopup == 0) {
116 | // Add administrative fee
117 | txFeeAmount = new BigDecimal(25);
118 | finalTotalAmount = txFeeAmount.add(tollAmount);
119 |
120 | // Send to bill-by-mail export stream. Separate export stream recommended to avoid MP transaction.
121 | voltQueueSQL(exportBillByMail,
122 | scanId,
123 | scanTimestamp,
124 | plateNum,
125 | location,
126 | lane,
127 | tollAmount,
128 | "INSUFFICIENT_BALANCE",
129 | null,
130 | txFeeAmount,
131 | finalTotalAmount);
132 |
133 | }
134 |
135 | // Update account balance
136 | voltQueueSQL(updateBalance, finalTotalAmount, accountId);
137 |
138 | // Record toll transaction in account history
139 | voltQueueSQL(insertAccountHistory,
140 | acct_tx_id,
141 | acct_tx_timestamp,
142 | accountId,
143 | plateNum,
144 | scanId,
145 | new java.util.Date(scanTimestamp),
146 | location,
147 | lane,
148 | tollAmount,
149 | tollReason,
150 | txFeeAmount,
151 | finalTotalAmount,
152 | "DEBIT");
153 |
154 | return voltExecuteSQL();
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/TollCollectProcedures/src/main/java/com/voltdb/tollcollect/procedures/ProcessPlate.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 Volt Active Data Inc.
3 | *
4 | * Use of this source code is governed by an MIT
5 | * license that can be found in the LICENSE file or at
6 | * https://opensource.org/licenses/MIT.
7 | */
8 | package com.voltdb.tollcollect.procedures;
9 |
10 | import org.voltdb.SQLStmt;
11 | import org.voltdb.VoltProcedure;
12 | import org.voltdb.VoltTable;
13 | import org.voltdb.VoltTableRow;
14 | import org.voltdb.VoltType;
15 | import java.math.BigDecimal;
16 |
17 | public class ProcessPlate extends VoltProcedure {
18 |
19 | // This section defines SQL statements to be executed as part of this transaction
20 | // This two statements will look up base toll for a toll location and vehicle multiplier
21 | public final SQLStmt getTollInfo = new SQLStmt(
22 | "SELECT base_fare FROM TOLL_LOCATIONS WHERE toll_loc = ? AND toll_loc_status = 1;"
23 | );
24 |
25 | public final SQLStmt getAppParam = new SQLStmt(
26 | "SELECT parameter_value FROM application_parameters WHERE parameter_name = ?;"
27 | );
28 |
29 | public final SQLStmt getVehicleMultiplier = new SQLStmt(
30 | "SELECT toll_multip FROM VEHICLE_TYPES WHERE vehicle_class = ?;"
31 | );
32 |
33 | // SQL statement to check known vehicles
34 | public final SQLStmt checkVehicle = new SQLStmt(
35 | "SELECT account_id, exempt_status, vehicle_type FROM KNOWN_VEHICLES " +
36 | "WHERE plate_num = ? AND active = 1;"
37 | );
38 |
39 | // Insert into bill_by_mail_stream stream
40 | public final SQLStmt exportBillByMail = new SQLStmt(
41 | "INSERT INTO bill_by_mail_stream VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"
42 | );
43 |
44 | // SQL statement to insert scan history
45 | public final SQLStmt insertScanHistory = new SQLStmt(
46 | "INSERT INTO SCAN_HISTORY VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"
47 | );
48 |
49 | // Delete up to 2 old scan history records
50 | public static final SQLStmt removeOldestTransaction = new SQLStmt("DELETE "
51 | + "FROM scan_history "
52 | + "WHERE plate_num = ? "
53 | + "AND scan_timestamp < DATEADD(MINUTE, (-1 * ?),NOW) "
54 | + "ORDER BY scan_timestamp, scan_id, plate_num LIMIT 2;");
55 |
56 | public long run(
57 | long scanTimestamp,
58 | String location,
59 | String lane,
60 | String plateNum,
61 | String vehicleClass) throws VoltAbortException {
62 |
63 | final long scanId = getUniqueId();
64 |
65 | // Set default values for parameters
66 | long keepMinutes = 10;
67 |
68 | //Initialize toll calculation variables
69 | BigDecimal baseToll;
70 | BigDecimal vehicleMultiplier;
71 | BigDecimal scanFeeAmount = new BigDecimal(0);
72 | BigDecimal tollAmount;
73 | BigDecimal totalAmount;
74 | String tollReason;
75 |
76 | //Initialize lookup values
77 | int accountId = 0;
78 | byte exemptStatus;
79 |
80 | // Get base toll for location
81 | voltQueueSQL(getTollInfo, location);
82 | VoltTable[] tollResults = voltExecuteSQL();
83 | if (tollResults[0].getRowCount() == 0) {
84 | throw new VoltAbortException("Invalid toll location");
85 | }
86 |
87 | // Get vehicle type multiplier
88 | voltQueueSQL(getVehicleMultiplier, vehicleClass);
89 | VoltTable[] vehicleResults = voltExecuteSQL();
90 | if (vehicleResults[0].getRowCount() == 0) {
91 | throw new VoltAbortException("Invalid vehicle class");
92 | }
93 |
94 | // Get how long to keep records for
95 | voltQueueSQL(getAppParam, "KEEP_MINUTES");
96 | VoltTable[] paramResults = voltExecuteSQL();
97 | if (paramResults[0].advanceRow()) {
98 | try {
99 | keepMinutes = Long.parseLong(paramResults[0].getString("PARAMETER_VALUE"));
100 | }
101 | catch (NumberFormatException e) {
102 | throw new VoltAbortException("Invalid keep minutes of " + paramResults[0].getString("PARAMETER_VALUE"));
103 | }
104 | }
105 |
106 | baseToll = tollResults[0]
107 | .fetchRow(0)
108 | .getDecimalAsBigDecimal("base_fare");
109 |
110 | vehicleMultiplier = vehicleResults[0]
111 | .fetchRow(0)
112 | .getDecimalAsBigDecimal("toll_multip");
113 |
114 | tollAmount = baseToll.multiply(vehicleMultiplier);
115 |
116 | // Check if vehicle is known
117 | voltQueueSQL(checkVehicle, plateNum);
118 | VoltTable[] vehicleCheckResults = voltExecuteSQL();
119 | if (vehicleCheckResults[0].getRowCount() > 0) {
120 | VoltTableRow vehicleRow = vehicleCheckResults[0].fetchRow(0);
121 | accountId = (int) vehicleRow.getLong("account_id");
122 | exemptStatus = (byte) vehicleRow.get("exempt_status", VoltType.TINYINT);
123 |
124 | if (exemptStatus == 1) {
125 | tollAmount = new BigDecimal(0);
126 | totalAmount = new BigDecimal(0);
127 | tollReason = "EXEMPT";
128 | } else {
129 | totalAmount = tollAmount;
130 | tollReason = "STANDARD TOLL ( " + vehicleClass + ")";
131 | }
132 | } else {
133 | // Unknown vehicle or mismatched type
134 | scanFeeAmount = new BigDecimal(2);
135 | totalAmount = tollAmount.add(scanFeeAmount);
136 | tollReason = "UNKNOWN_VEHICLE";
137 |
138 | // Insert into bill_by_mail_stream stream
139 | voltQueueSQL(exportBillByMail,
140 | scanId, new java.util.Date(scanTimestamp), plateNum, location, lane,
141 | tollAmount, tollReason, scanFeeAmount, null, tollAmount
142 | );
143 |
144 | voltExecuteSQL();
145 | }
146 |
147 | // Insert into scan history
148 | voltQueueSQL(insertScanHistory,
149 | scanId, new java.util.Date(scanTimestamp), plateNum, accountId,
150 | location, lane, tollAmount, tollReason, scanFeeAmount, totalAmount);
151 |
152 | // Delete stale scan history records
153 | voltQueueSQL(removeOldestTransaction, plateNum, keepMinutes);
154 |
155 | voltExecuteSQL(true);
156 |
157 | return 0;
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/dev-edition-app/docker-compose-2dbnodes.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | services:
10 | voltdb01:
11 | image: ${VOLTDB_IMAGE}
12 | platform: linux/amd64
13 | container_name: voltdb01
14 | hostname: voltdb01
15 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
16 | healthcheck:
17 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
18 | interval: 10s
19 | retries: 5
20 | start_period: 30s
21 | timeout: 10s
22 | ports:
23 | - 21212:21212
24 | - 9092:9092
25 | expose:
26 | - "21212"
27 | - "9092"
28 | environment:
29 | VOLTDB_START_CONFIG: "--ignore=thp -c 2 -H voltdb01,voltdb02 --publicinterface=localhost"
30 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
31 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
32 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
33 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
34 | VOLTDB_DIR: /voltdb01
35 | VOLTDB_INIT_FORCE: true
36 | volumes:
37 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
38 | - ./resources/deploymentk1.xml:/etc/voltdb/deployment.xml
39 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
40 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
41 | - db:/voltdb
42 |
43 | voltdb02:
44 | image: ${VOLTDB_IMAGE}
45 | platform: linux/amd64
46 | container_name: voltdb02
47 | hostname: voltdb02
48 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
49 | healthcheck:
50 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
51 | interval: 10s
52 | retries: 5
53 | start_period: 30s
54 | timeout: 10s
55 | ports:
56 | - 31212:31212
57 | - 39092:39092
58 | expose:
59 | - "31212"
60 | - "39092"
61 | environment:
62 | VOLTDB_START_CONFIG: "--ignore=thp -c 2 -H voltdb01,voltdb02 --publicinterface=localhost --client=:31212 --admin=:31211 --topicsport=39092"
63 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
64 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
65 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
66 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
67 | VOLTDB_DIR: /voltdb02
68 | VOLTDB_INIT_FORCE: true
69 | volumes:
70 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
71 | - ./resources/deploymentk1.xml:/etc/voltdb/deployment.xml
72 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
73 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
74 | - db:/voltdb
75 |
76 | voltdb-init:
77 | image: ${VOLTDB_IMAGE}
78 | platform: linux/amd64
79 | container_name: voltdb-init
80 | hostname: voltdb-init
81 | command: >
82 | sh -c "csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/accounts.csv ACCOUNTS &&
83 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/known_vehicles.csv KNOWN_VEHICLES &&
84 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/toll_locations.csv TOLL_LOCATIONS &&
85 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/vehicle_types.csv VEHICLE_TYPES"
86 | depends_on:
87 | voltdb01:
88 | condition: service_healthy
89 | volumes:
90 | - ./resources/voltdb-apps:/etc/voltdb/data/
91 |
92 | vmc:
93 | image: ${VMC_IMAGE}
94 | platform: linux/amd64
95 | container_name: vmc
96 | command: java -jar /opt/voltdb/volt-vmc-svc.jar --servers=voltdb01 --port=21212
97 | depends_on:
98 | voltdb01:
99 | condition: service_healthy
100 | ports:
101 | - 8080:8080
102 | environment:
103 | VOLTDB_CONTAINER: docker
104 |
105 | prometheus:
106 | image: ${PROMETHEUS_IMAGE}
107 | container_name: prometheus
108 | ports:
109 | - "9090:9090"
110 | volumes:
111 | - ./resources/prometheus-2dbnode.yml:/etc/prometheus/prometheus.yml
112 | command:
113 | - '--config.file=/etc/prometheus/prometheus.yml'
114 | - '--log.level=error'
115 |
116 | grafana:
117 | image: ${GRAFANA_IMAGE}
118 | container_name: grafana
119 | ports:
120 | - "3000:3000"
121 | environment:
122 | - GF_AUTH_ANONYMOUS_ENABLED=true
123 | - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
124 | - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
125 | - GF_AUTH_BASIC_ENABLED=false
126 | - GF_AUTH_DISABLE_LOGIN_FORM=true
127 | - GF_AUTH_DISABLE_SIGNOUT_MENU=true
128 | - GF_USERS_ALLOW_SIGN_UP=false
129 | - GF_USERS_DEFAULT_THEME=light
130 | - GF_LOG_LEVEL=critical
131 | - GF_LOG_MODE=file
132 | - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/welcome-dashboard.json
133 | - GF_INSTALL_PLUGINS=yesoreyeram-infinity-datasource,marcusolsson-treemap-panel,zestairlove-compacthostmap-panel
134 | volumes:
135 | - grafana_data:/var/lib/grafana
136 | - ./resources/dashboards:/etc/grafana/dashboards
137 | - ./resources/volt-stream.svg:/usr/share/grafana/public/img/grafana_icon.svg
138 | - ./resources/volt-stream.png:/usr/share/grafana/public/img/grafana_icon.png
139 | - ./resources/dashboards/voltdb:/etc/grafana/provisioning/voltdb-dashboards
140 | - ./resources/dashboards/voltsp:/etc/grafana/provisioning/voltsp-dashboards
141 | - ./resources/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
142 | - ./resources/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
143 |
144 | voltsp:
145 | image: ${VOLTSP_IMAGE}
146 | platform: linux/amd64
147 | depends_on:
148 | voltdb01:
149 | condition: service_healthy
150 | voltdb-init:
151 | condition: service_completed_successfully
152 | container_name: voltsp
153 | healthcheck:
154 | test: curl --fail http://localhost:11781/metrics || exit 1
155 | interval: 60s
156 | retries: 5
157 | start_period: 30s
158 | timeout: 10s
159 | mem_limit: 3g
160 | environment:
161 | - JAVA_OPTS=-XX:InitialRAMPercentage=80.0 -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Dvoltsp.parallelism=10
162 | volumes:
163 | - ./resources/voltsp-apps:/volt-apps
164 | - ./resources/voltsp-config-2dbnode.yaml:/etc/voltsp/configuration.yaml
165 | - ./resources/log4j2.xml:/etc/app/log4j2.xml
166 | - ${LICENSE_FILE_PATH}:/etc/voltsp/license.xml
167 |
168 | volumes:
169 | db:
170 | grafana_data:
171 |
--------------------------------------------------------------------------------
/dev-edition-app/docker-compose-2dbnodes_topics.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | services:
10 | voltdb01:
11 | image: ${VOLTDB_IMAGE}
12 | platform: linux/amd64
13 | container_name: voltdb01
14 | hostname: voltdb01
15 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
16 | healthcheck:
17 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
18 | interval: 10s
19 | retries: 5
20 | start_period: 30s
21 | timeout: 10s
22 | ports:
23 | - 21212:21212
24 | - 9092:9092
25 | expose:
26 | - "21212"
27 | - "9092"
28 | environment:
29 | VOLTDB_START_CONFIG: "--ignore=thp -c 2 -H voltdb01,voltdb02 --publicinterface=localhost"
30 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
31 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
32 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
33 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
34 | VOLTDB_DIR: /voltdb01
35 | VOLTDB_INIT_FORCE: true
36 | volumes:
37 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
38 | - ./resources/deploymentk1_topics.xml:/etc/voltdb/deployment.xml
39 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
40 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
41 | - db:/voltdb
42 |
43 | voltdb02:
44 | image: ${VOLTDB_IMAGE}
45 | platform: linux/amd64
46 | container_name: voltdb02
47 | hostname: voltdb02
48 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
49 | healthcheck:
50 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
51 | interval: 10s
52 | retries: 5
53 | start_period: 30s
54 | timeout: 10s
55 | ports:
56 | - 31212:31212
57 | - 39092:39092
58 | expose:
59 | - "31212"
60 | - "39092"
61 | environment:
62 | VOLTDB_START_CONFIG: "--ignore=thp -c 2 -H voltdb01,voltdb02 --publicinterface=localhost --client=:31212 --admin=:31211 --topicsport=39092"
63 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
64 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
65 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
66 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
67 | VOLTDB_DIR: /voltdb02
68 | VOLTDB_INIT_FORCE: true
69 | volumes:
70 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
71 | - ./resources/deploymentk1_topics.xml:/etc/voltdb/deployment.xml
72 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
73 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
74 | - db:/voltdb
75 |
76 | voltdb-init:
77 | image: ${VOLTDB_IMAGE}
78 | platform: linux/amd64
79 | container_name: voltdb-init
80 | hostname: voltdb-init
81 | command: >
82 | sh -c "csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/accounts.csv ACCOUNTS &&
83 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/known_vehicles.csv KNOWN_VEHICLES &&
84 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/toll_locations.csv TOLL_LOCATIONS &&
85 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/vehicle_types.csv VEHICLE_TYPES"
86 | depends_on:
87 | voltdb01:
88 | condition: service_healthy
89 | volumes:
90 | - ./resources/voltdb-apps:/etc/voltdb/data/
91 |
92 | vmc:
93 | image: ${VMC_IMAGE}
94 | platform: linux/amd64
95 | container_name: vmc
96 | command: java -jar /opt/voltdb/volt-vmc-svc.jar --servers=voltdb01 --port=21212
97 | depends_on:
98 | voltdb01:
99 | condition: service_healthy
100 | ports:
101 | - 8080:8080
102 | environment:
103 | VOLTDB_CONTAINER: docker
104 |
105 | prometheus:
106 | image: ${PROMETHEUS_IMAGE}
107 | container_name: prometheus
108 | ports:
109 | - "9090:9090"
110 | volumes:
111 | - ./resources/prometheus-2dbnode.yml:/etc/prometheus/prometheus.yml
112 | command:
113 | - '--config.file=/etc/prometheus/prometheus.yml'
114 | - '--log.level=error'
115 |
116 | grafana:
117 | image: ${GRAFANA_IMAGE}
118 | container_name: grafana
119 | ports:
120 | - "3000:3000"
121 | environment:
122 | - GF_AUTH_ANONYMOUS_ENABLED=true
123 | - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
124 | - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
125 | - GF_AUTH_BASIC_ENABLED=false
126 | - GF_AUTH_DISABLE_LOGIN_FORM=true
127 | - GF_AUTH_DISABLE_SIGNOUT_MENU=true
128 | - GF_USERS_ALLOW_SIGN_UP=false
129 | - GF_USERS_DEFAULT_THEME=light
130 | - GF_LOG_LEVEL=critical
131 | - GF_LOG_MODE=file
132 | - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/welcome-dashboard.json
133 | - GF_INSTALL_PLUGINS=yesoreyeram-infinity-datasource,marcusolsson-treemap-panel,zestairlove-compacthostmap-panel
134 | volumes:
135 | - grafana_data:/var/lib/grafana
136 | - ./resources/dashboards:/etc/grafana/dashboards
137 | - ./resources/volt-stream.svg:/usr/share/grafana/public/img/grafana_icon.svg
138 | - ./resources/volt-stream.png:/usr/share/grafana/public/img/grafana_icon.png
139 | - ./resources/dashboards/voltdb:/etc/grafana/provisioning/voltdb-dashboards
140 | - ./resources/dashboards/voltsp:/etc/grafana/provisioning/voltsp-dashboards
141 | - ./resources/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
142 | - ./resources/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
143 |
144 | voltsp:
145 | image: ${VOLTSP_IMAGE}
146 | platform: linux/amd64
147 | depends_on:
148 | voltdb01:
149 | condition: service_healthy
150 | voltdb-init:
151 | condition: service_completed_successfully
152 | container_name: voltsp
153 | healthcheck:
154 | test: curl --fail http://localhost:11781/metrics || exit 1
155 | interval: 60s
156 | retries: 5
157 | start_period: 30s
158 | timeout: 10s
159 | mem_limit: 3g
160 | environment:
161 | - JAVA_OPTS=-XX:InitialRAMPercentage=80.0 -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Dvoltsp.parallelism=10
162 | volumes:
163 | - ./resources/voltsp-apps:/volt-apps
164 | - ./resources/voltsp-config-2dbnode.yaml:/etc/voltsp/configuration.yaml
165 | - ./resources/log4j2.xml:/etc/app/log4j2.xml
166 | - ${LICENSE_FILE_PATH}:/etc/voltsp/license.xml
167 |
168 | volumes:
169 | db:
170 | grafana_data:
171 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # Toll Collection Demo with Volt Active Data
5 | ## Introduction
6 |
7 | An app to demonstrate the primary components of Volt Active Data and to provide an example of application development with the platform.
8 |
9 | The environment is implemented through Docker containers and is run using Docker Compose.
10 |
11 | This example lets you simulate a toll collection application for a make-believe organization that has built a number of impressive and imaginary infrastructure projects across the United States. For the convenience of its customers and one-time visitors, this company has chosen to implement license plate recognition (LPR) and computer vision technologies. Once the vehicle is detected and its license plate is scanned at various toll plazas, tunnels, and bridges, it will be the responsibility of the Volt Active Data platform to process the appropriate transactions quickly (in real time) and accurately.
12 |
13 | ## Directory Structure
14 |
15 | ### ddl
16 |
17 | This directory contains files with SQL statements to create the schema and structures of the database needed before running the application. In this example, the DDL statements will create replicated tables, partitioned tables, streams, materialized views, simple SQL stored procedures, java stored procedures, and table indexes.
18 |
19 | ### csv
20 |
21 | This directory contains csv files to populate the database with initial data before simulating any transactions. The files are:
22 |
23 | - Accounts.csv: Accounts, their balances, and other account attributes
24 | - Known\_vehicles.csv: Registered vehicles, their plate number, owner account, and other attributes.
25 | - Toll\_locations.csv: A list of toll locations, their geographic data, and their base fare.
26 | - Vehicle\_types: A list of vehicle types and an associated multiplier applied to a base fare.
27 |
28 | ### TollCollectProcedures
29 |
30 | This directory contains the source code and java classes (when compiled) to handle server-side logic. The workflow is divided into two ACID transactions:
31 |
32 | - [ProcessPlate](TollCollectProcedures/src/main/java/com/voltdb/tollcollect/procedures/ProcessPlate.java): Looks up vehicle and plate information, calculates a toll based on location and vehicle details, records an audit entry of the scan, and conditionally forwards the toll to an external bill-by-mail application for non-account holders.
33 | - [ChargeAccount](TollCollectProcedures/src/main/java/com/voltdb/tollcollect/procedures/ChargeAccount.java): Looks up account information, deducts appropriate toll amount, triggers any necessary top up of account balances for account holders that have opted in, and records an audit entry of the account transaction.
34 |
35 | ### TollCollectClient
36 |
37 | This directory contains the source code and executable java application (when compiled) that embeds the client2 java client interface to interact with Volt. For this example, the client application allows a user to manually submit vehicle information to the platform for toll processing.
38 |
39 | ### TollCollectStreamPipeline
40 |
41 | This directory contains the source and java classes (when compiled) of an ActiveSP stream pipeline to simulate the toll application at scale. The directory also includes custom java components that are referenced by the pipeline. This example of a stream processing pipeline is a limited implementation of the application’s business workflow, only processing vehicle information and leaving account charging as a future exercise. The pipeline consists of the following components:
42 |
43 | [TollCollectStream](https://github.com/VoltDB/TollCollectDemo/blob/master/TollCollectStreamPipeline/src/main/java/com/voltdb/tollcollect/pipeline/TollCollectStream.java)
44 | - Generator Source: a source operator that produces streams of synthetic data for the pipeline.
45 | - Stateless processor: processor that converts a message into a format appropriate for sending to Volt.
46 | - Volt Sink: a sink operator sending messages to a Volt Stored Procedure. In this case, to “ProcessPlate”.
47 |
48 | The directory also includes the following custom java that is used by the pipeline.
49 |
50 | - [PlateRecord](https://github.com/VoltDB/TollCollectDemo/blob/master/TollCollectStreamPipeline/src/main/java/com/voltdb/tollcollect/pipeline/PlateRecord.java): used by the generator to model messages created by the source.
51 | - [PlateRecordGenerator](https://github.com/VoltDB/TollCollectDemo/blob/master/TollCollectStreamPipeline/src/main/java/com/voltdb/tollcollect/pipeline/PlateRecordGenerator.java): custom logic to generate messages according to predefined algorithms.
52 |
53 | ### dev-edition-app
54 |
55 | This directory is for compiled application components and for configuration files needed to bring up the full streaming application through docker compose. This directory is also used to pass configuration values to the application components, including a few predefined grafana dashboards.
56 |
57 | ### Maven files
58 |
59 | The repository also contains pom.xml files to describe the structure of the project, handle dependencies, and to build the application locally from source using the maven build automation tool. If you don’t have maven on your system, the mvnw wrapper script will download maven for you from the maven central repository.
60 |
61 | ## Prerequisites
62 |
63 | To get started, first ensure that you have the prerequisites. You will need:
64 |
65 | - Java JDK 17 or 21
66 | - Docker Desktop
67 | - Request a [license](https://go.voltactivedata.com/l/916591/2025-01-31/c5yn4) to run the developer edition of Volt Active Data with ActiveSP
68 |
69 | ## Running the application
70 |
71 | ### Running the streaming application and database
72 |
73 | Once you have your license, set the LICENSE\_FILE\_PATH environment variable with the location of the license.
74 |
75 | ```
76 | LICENSE_FILE_PATH=/Users/tkowalcz/license.xml
77 | export LICENSE_FILE_PATH
78 | ```
79 |
80 | Download the repo contents or clone repo
81 |
82 | ```
83 | git clone https://github.com/VoltDB/TollCollectDemo
84 | ```
85 |
86 | Build project
87 |
88 | ```
89 | cd TollCollectDemo
90 | ./mvnw clean package
91 | ```
92 |
93 | Start the application
94 |
95 | ```
96 | cd target/dev-edition-app-1.0-SNAPSHOT/dev-edition-app
97 | docker compose up
98 | ```
99 |
100 | Note: you can use \-d to start the application in the background
101 |
102 | ### Running the client application
103 |
104 | Once your application components are running, you can also use the client application.
105 |
106 | ```
107 | cd TollCollectClient/target
108 | java -jar TollCollectClient-1.0-SNAPSHOT.jar
109 | ```
110 |
111 | ### Stopping the streaming application and database
112 |
113 | Remove the docker containers and clean up volumes
114 |
115 | ```
116 | docker compose down -v
117 | ```
118 |
119 | ## Next Steps
120 |
121 | See more details about getting started with this application and the Volt Active Data Developer Edition by reviewing the [Developer Edition: Quick Start Guide](https://go.voltactivedata.com/l/916591/2025-01-31/c5ynj)
122 |
123 |
124 |
--------------------------------------------------------------------------------
/mvnw.cmd:
--------------------------------------------------------------------------------
1 | <# : batch portion
2 | @REM ----------------------------------------------------------------------------
3 | @REM Licensed to the Apache Software Foundation (ASF) under one
4 | @REM or more contributor license agreements. See the NOTICE file
5 | @REM distributed with this work for additional information
6 | @REM regarding copyright ownership. The ASF licenses this file
7 | @REM to you under the Apache License, Version 2.0 (the
8 | @REM "License"); you may not use this file except in compliance
9 | @REM with the License. You may obtain a copy of the License at
10 | @REM
11 | @REM http://www.apache.org/licenses/LICENSE-2.0
12 | @REM
13 | @REM Unless required by applicable law or agreed to in writing,
14 | @REM software distributed under the License is distributed on an
15 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | @REM KIND, either express or implied. See the License for the
17 | @REM specific language governing permissions and limitations
18 | @REM under the License.
19 | @REM ----------------------------------------------------------------------------
20 |
21 | @REM ----------------------------------------------------------------------------
22 | @REM Apache Maven Wrapper startup batch script, version 3.3.2
23 | @REM
24 | @REM Optional ENV vars
25 | @REM MVNW_REPOURL - repo url base for downloading maven distribution
26 | @REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
27 | @REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
28 | @REM ----------------------------------------------------------------------------
29 |
30 | @IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
31 | @SET __MVNW_CMD__=
32 | @SET __MVNW_ERROR__=
33 | @SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
34 | @SET PSModulePath=
35 | @FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
36 | IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
37 | )
38 | @SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
39 | @SET __MVNW_PSMODULEP_SAVE=
40 | @SET __MVNW_ARG0_NAME__=
41 | @SET MVNW_USERNAME=
42 | @SET MVNW_PASSWORD=
43 | @IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
44 | @echo Cannot start maven from wrapper >&2 && exit /b 1
45 | @GOTO :EOF
46 | : end batch / begin powershell #>
47 |
48 | $ErrorActionPreference = "Stop"
49 | if ($env:MVNW_VERBOSE -eq "true") {
50 | $VerbosePreference = "Continue"
51 | }
52 |
53 | # calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
54 | $distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
55 | if (!$distributionUrl) {
56 | Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
57 | }
58 |
59 | switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
60 | "maven-mvnd-*" {
61 | $USE_MVND = $true
62 | $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
63 | $MVN_CMD = "mvnd.cmd"
64 | break
65 | }
66 | default {
67 | $USE_MVND = $false
68 | $MVN_CMD = $script -replace '^mvnw','mvn'
69 | break
70 | }
71 | }
72 |
73 | # apply MVNW_REPOURL and calculate MAVEN_HOME
74 | # maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/
75 | if ($env:MVNW_REPOURL) {
76 | $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" }
77 | $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')"
78 | }
79 | $distributionUrlName = $distributionUrl -replace '^.*/',''
80 | $distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
81 | $MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
82 | if ($env:MAVEN_USER_HOME) {
83 | $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
84 | }
85 | $MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
86 | $MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
87 |
88 | if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
89 | Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
90 | Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
91 | exit $?
92 | }
93 |
94 | if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
95 | Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
96 | }
97 |
98 | # prepare tmp dir
99 | $TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
100 | $TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
101 | $TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
102 | trap {
103 | if ($TMP_DOWNLOAD_DIR.Exists) {
104 | try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
105 | catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
106 | }
107 | }
108 |
109 | New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
110 |
111 | # Download and Install Apache Maven
112 | Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
113 | Write-Verbose "Downloading from: $distributionUrl"
114 | Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
115 |
116 | $webclient = New-Object System.Net.WebClient
117 | if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
118 | $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
119 | }
120 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
121 | $webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
122 |
123 | # If specified, validate the SHA-256 sum of the Maven distribution zip file
124 | $distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
125 | if ($distributionSha256Sum) {
126 | if ($USE_MVND) {
127 | Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
128 | }
129 | Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
130 | if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
131 | Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
132 | }
133 | }
134 |
135 | # unzip and move
136 | Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
137 | Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null
138 | try {
139 | Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
140 | } catch {
141 | if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
142 | Write-Error "fail to move MAVEN_HOME"
143 | }
144 | } finally {
145 | try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
146 | catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
147 | }
148 |
149 | Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
150 |
--------------------------------------------------------------------------------
/dev-edition-app/docker-compose-3dbnodes.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | services:
10 | voltdb01:
11 | image: ${VOLTDB_IMAGE}
12 | platform: linux/amd64
13 | container_name: voltdb01
14 | hostname: voltdb01
15 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
16 | healthcheck:
17 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
18 | interval: 10s
19 | retries: 5
20 | start_period: 30s
21 | timeout: 10s
22 | ports:
23 | - 21212:21212
24 | - 9092:9092
25 | expose:
26 | - "21212"
27 | - "9092"
28 | environment:
29 | VOLTDB_START_CONFIG: "--ignore=thp -c 3 -H voltdb01,voltdb02,voltdb03 --publicinterface=localhost"
30 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
31 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
32 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
33 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
34 | VOLTDB_DIR: /voltdb01
35 | VOLTDB_INIT_FORCE: true
36 | volumes:
37 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
38 | - ./resources/deploymentk1.xml:/etc/voltdb/deployment.xml
39 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
40 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
41 | - db:/voltdb
42 |
43 | voltdb02:
44 | image: ${VOLTDB_IMAGE}
45 | platform: linux/amd64
46 | container_name: voltdb02
47 | hostname: voltdb02
48 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
49 | healthcheck:
50 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
51 | interval: 10s
52 | retries: 5
53 | start_period: 30s
54 | timeout: 10s
55 | ports:
56 | - 31212:31212
57 | - 39092:39092
58 | expose:
59 | - "31212"
60 | - "39092"
61 | environment:
62 | VOLTDB_START_CONFIG: "--ignore=thp -c 3 -H voltdb01,voltdb02,voltdb03 --publicinterface=localhost --client=:31212 --admin=:31211 --topicsport=39092"
63 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
64 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
65 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
66 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
67 | VOLTDB_DIR: /voltdb02
68 | VOLTDB_INIT_FORCE: true
69 | volumes:
70 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
71 | - ./resources/deploymentk1.xml:/etc/voltdb/deployment.xml
72 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
73 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
74 | - db:/voltdb
75 |
76 | voltdb03:
77 | image: ${VOLTDB_IMAGE}
78 | platform: linux/amd64
79 | container_name: voltdb03
80 | hostname: voltdb03
81 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
82 | healthcheck:
83 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
84 | interval: 10s
85 | retries: 5
86 | start_period: 30s
87 | timeout: 10s
88 | ports:
89 | - 41212:41212
90 | - 49092:49092
91 | expose:
92 | - "41212"
93 | - "49092"
94 | environment:
95 | VOLTDB_START_CONFIG: "--ignore=thp -c 3 -H voltdb01,voltdb02,voltdb03 --publicinterface=localhost --client=:41212 --admin=:41211 --topicsport=49092"
96 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
97 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
98 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
99 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
100 | VOLTDB_DIR: /voltdb03
101 | VOLTDB_INIT_FORCE: true
102 | volumes:
103 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
104 | - ./resources/deploymentk1.xml:/etc/voltdb/deployment.xml
105 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
106 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
107 | - db:/voltdb
108 |
109 | voltdb-init:
110 | image: ${VOLTDB_IMAGE}
111 | platform: linux/amd64
112 | container_name: voltdb-init
113 | hostname: voltdb-init
114 | command: >
115 | sh -c "csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/accounts.csv ACCOUNTS &&
116 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/known_vehicles.csv KNOWN_VEHICLES &&
117 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/toll_locations.csv TOLL_LOCATIONS &&
118 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/vehicle_types.csv VEHICLE_TYPES"
119 | depends_on:
120 | voltdb01:
121 | condition: service_healthy
122 | volumes:
123 | - ./resources/voltdb-apps:/etc/voltdb/data/
124 |
125 | vmc:
126 | image: ${VMC_IMAGE}
127 | platform: linux/amd64
128 | container_name: vmc
129 | command: java -jar /opt/voltdb/volt-vmc-svc.jar --servers=voltdb01 --port=21212
130 | depends_on:
131 | voltdb01:
132 | condition: service_healthy
133 | ports:
134 | - 8080:8080
135 | environment:
136 | VOLTDB_CONTAINER: docker
137 |
138 | prometheus:
139 | image: ${PROMETHEUS_IMAGE}
140 | container_name: prometheus
141 | ports:
142 | - "9090:9090"
143 | volumes:
144 | - ./resources/prometheus-3dbnode.yml:/etc/prometheus/prometheus.yml
145 | command:
146 | - '--config.file=/etc/prometheus/prometheus.yml'
147 | - '--log.level=error'
148 |
149 | grafana:
150 | image: ${GRAFANA_IMAGE}
151 | container_name: grafana
152 | ports:
153 | - "3000:3000"
154 | environment:
155 | - GF_AUTH_ANONYMOUS_ENABLED=true
156 | - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
157 | - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
158 | - GF_AUTH_BASIC_ENABLED=false
159 | - GF_AUTH_DISABLE_LOGIN_FORM=true
160 | - GF_AUTH_DISABLE_SIGNOUT_MENU=true
161 | - GF_USERS_ALLOW_SIGN_UP=false
162 | - GF_USERS_DEFAULT_THEME=light
163 | - GF_LOG_LEVEL=critical
164 | - GF_LOG_MODE=file
165 | - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/welcome-dashboard.json
166 | - GF_INSTALL_PLUGINS=yesoreyeram-infinity-datasource,marcusolsson-treemap-panel,zestairlove-compacthostmap-panel
167 | volumes:
168 | - grafana_data:/var/lib/grafana
169 | - ./resources/dashboards:/etc/grafana/dashboards
170 | - ./resources/volt-stream.svg:/usr/share/grafana/public/img/grafana_icon.svg
171 | - ./resources/volt-stream.png:/usr/share/grafana/public/img/grafana_icon.png
172 | - ./resources/dashboards/voltdb:/etc/grafana/provisioning/voltdb-dashboards
173 | - ./resources/dashboards/voltsp:/etc/grafana/provisioning/voltsp-dashboards
174 | - ./resources/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
175 | - ./resources/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
176 |
177 | voltsp:
178 | image: ${VOLTSP_IMAGE}
179 | platform: linux/amd64
180 | depends_on:
181 | voltdb01:
182 | condition: service_healthy
183 | voltdb-init:
184 | condition: service_completed_successfully
185 | container_name: voltsp
186 | healthcheck:
187 | test: curl --fail http://localhost:11781/metrics || exit 1
188 | interval: 60s
189 | retries: 5
190 | start_period: 30s
191 | timeout: 10s
192 | mem_limit: 3g
193 | environment:
194 | - JAVA_OPTS=-XX:InitialRAMPercentage=80.0 -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Dvoltsp.parallelism=10
195 | volumes:
196 | - ./resources/voltsp-apps:/volt-apps
197 | - ./resources/voltsp-config-3dbnode.yaml:/etc/voltsp/configuration.yaml
198 | - ./resources/log4j2.xml:/etc/app/log4j2.xml
199 | - ${LICENSE_FILE_PATH}:/etc/voltsp/license.xml
200 |
201 | volumes:
202 | db:
203 | grafana_data:
204 |
--------------------------------------------------------------------------------
/dev-edition-app/docker-compose-3dbnodes_topics.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2025 Volt Active Data Inc.
3 | #
4 | # Use of this source code is governed by an MIT
5 | # license that can be found in the LICENSE file or at
6 | # https://opensource.org/licenses/MIT.
7 | #
8 |
9 | services:
10 | voltdb01:
11 | image: ${VOLTDB_IMAGE}
12 | platform: linux/amd64
13 | container_name: voltdb01
14 | hostname: voltdb01
15 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
16 | healthcheck:
17 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
18 | interval: 10s
19 | retries: 5
20 | start_period: 30s
21 | timeout: 10s
22 | ports:
23 | - 21212:21212
24 | - 9092:9092
25 | expose:
26 | - "21212"
27 | - "9092"
28 | environment:
29 | VOLTDB_START_CONFIG: "--ignore=thp -c 3 -H voltdb01,voltdb02,voltdb03 --publicinterface=localhost"
30 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
31 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
32 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
33 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
34 | VOLTDB_DIR: /voltdb01
35 | VOLTDB_INIT_FORCE: true
36 | volumes:
37 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
38 | - ./resources/deploymentk1_topics.xml:/etc/voltdb/deployment.xml
39 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
40 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
41 | - db:/voltdb
42 |
43 | voltdb02:
44 | image: ${VOLTDB_IMAGE}
45 | platform: linux/amd64
46 | container_name: voltdb02
47 | hostname: voltdb02
48 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
49 | healthcheck:
50 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
51 | interval: 10s
52 | retries: 5
53 | start_period: 30s
54 | timeout: 10s
55 | ports:
56 | - 31212:31212
57 | - 39092:39092
58 | expose:
59 | - "31212"
60 | - "39092"
61 | environment:
62 | VOLTDB_START_CONFIG: "--ignore=thp -c 3 -H voltdb01,voltdb02,voltdb03 --publicinterface=localhost --client=:31212 --admin=:31211 --topicsport=39092"
63 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
64 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
65 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
66 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
67 | VOLTDB_DIR: /voltdb02
68 | VOLTDB_INIT_FORCE: true
69 | volumes:
70 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
71 | - ./resources/deploymentk1_topics.xml:/etc/voltdb/deployment.xml
72 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
73 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
74 | - db:/voltdb
75 |
76 | voltdb03:
77 | image: ${VOLTDB_IMAGE}
78 | platform: linux/amd64
79 | container_name: voltdb03
80 | hostname: voltdb03
81 | command: /opt/voltdb/tools/kubernetes/test-entrypoint.sh
82 | healthcheck:
83 | test: [ "CMD-SHELL", "sqlcmd --query='exec @Ping;'" ]
84 | interval: 10s
85 | retries: 5
86 | start_period: 30s
87 | timeout: 10s
88 | ports:
89 | - 41212:41212
90 | - 49092:49092
91 | expose:
92 | - "41212"
93 | - "49092"
94 | environment:
95 | VOLTDB_START_CONFIG: "--ignore=thp -c 3 -H voltdb01,voltdb02,voltdb03 --publicinterface=localhost --client=:41212 --admin=:41211 --topicsport=49092"
96 | VOLTDB_LICENSE: "/etc/voltdb/license.xml"
97 | VOLTDB_CONFIG: /etc/voltdb/deployment.xml
98 | VOLTDB_SCHEMA: /etc/voltdb/voltdb-schemas
99 | VOLTDB_CLASSES: /etc/voltdb/voltdb-classes
100 | VOLTDB_DIR: /voltdb03
101 | VOLTDB_INIT_FORCE: true
102 | volumes:
103 | - ${LICENSE_FILE_PATH}:/etc/voltdb/license.xml
104 | - ./resources/deploymentk1_topics.xml:/etc/voltdb/deployment.xml
105 | - ./resources/voltdb-schemas:/etc/voltdb/voltdb-schemas
106 | - ./resources/voltdb-apps:/etc/voltdb/voltdb-classes
107 | - db:/voltdb
108 |
109 | voltdb-init:
110 | image: ${VOLTDB_IMAGE}
111 | platform: linux/amd64
112 | container_name: voltdb-init
113 | hostname: voltdb-init
114 | command: >
115 | sh -c "csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/accounts.csv ACCOUNTS &&
116 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/known_vehicles.csv KNOWN_VEHICLES &&
117 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/toll_locations.csv TOLL_LOCATIONS &&
118 | csvloader --skip=1 --reportdir=/etc/voltdb/data --servers=voltdb01 -f /etc/voltdb/data/vehicle_types.csv VEHICLE_TYPES"
119 | depends_on:
120 | voltdb01:
121 | condition: service_healthy
122 | volumes:
123 | - ./resources/voltdb-apps:/etc/voltdb/data/
124 |
125 | vmc:
126 | image: ${VMC_IMAGE}
127 | platform: linux/amd64
128 | container_name: vmc
129 | command: java -jar /opt/voltdb/volt-vmc-svc.jar --servers=voltdb01 --port=21212
130 | depends_on:
131 | voltdb01:
132 | condition: service_healthy
133 | ports:
134 | - 8080:8080
135 | environment:
136 | VOLTDB_CONTAINER: docker
137 |
138 | prometheus:
139 | image: ${PROMETHEUS_IMAGE}
140 | container_name: prometheus
141 | ports:
142 | - "9090:9090"
143 | volumes:
144 | - ./resources/prometheus-3dbnode.yml:/etc/prometheus/prometheus.yml
145 | command:
146 | - '--config.file=/etc/prometheus/prometheus.yml'
147 | - '--log.level=error'
148 |
149 | grafana:
150 | image: ${GRAFANA_IMAGE}
151 | container_name: grafana
152 | ports:
153 | - "3000:3000"
154 | environment:
155 | - GF_AUTH_ANONYMOUS_ENABLED=true
156 | - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org.
157 | - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
158 | - GF_AUTH_BASIC_ENABLED=false
159 | - GF_AUTH_DISABLE_LOGIN_FORM=true
160 | - GF_AUTH_DISABLE_SIGNOUT_MENU=true
161 | - GF_USERS_ALLOW_SIGN_UP=false
162 | - GF_USERS_DEFAULT_THEME=light
163 | - GF_LOG_LEVEL=critical
164 | - GF_LOG_MODE=file
165 | - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/dashboards/welcome-dashboard.json
166 | - GF_INSTALL_PLUGINS=yesoreyeram-infinity-datasource,marcusolsson-treemap-panel,zestairlove-compacthostmap-panel
167 | volumes:
168 | - grafana_data:/var/lib/grafana
169 | - ./resources/dashboards:/etc/grafana/dashboards
170 | - ./resources/volt-stream.svg:/usr/share/grafana/public/img/grafana_icon.svg
171 | - ./resources/volt-stream.png:/usr/share/grafana/public/img/grafana_icon.png
172 | - ./resources/dashboards/voltdb:/etc/grafana/provisioning/voltdb-dashboards
173 | - ./resources/dashboards/voltsp:/etc/grafana/provisioning/voltsp-dashboards
174 | - ./resources/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
175 | - ./resources/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
176 |
177 | voltsp:
178 | image: ${VOLTSP_IMAGE}
179 | platform: linux/amd64
180 | depends_on:
181 | voltdb01:
182 | condition: service_healthy
183 | voltdb-init:
184 | condition: service_completed_successfully
185 | container_name: voltsp
186 | healthcheck:
187 | test: curl --fail http://localhost:11781/metrics || exit 1
188 | interval: 60s
189 | retries: 5
190 | start_period: 30s
191 | timeout: 10s
192 | mem_limit: 3g
193 | environment:
194 | - JAVA_OPTS=-XX:InitialRAMPercentage=80.0 -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Dvoltsp.parallelism=10
195 | volumes:
196 | - ./resources/voltsp-apps:/volt-apps
197 | - ./resources/voltsp-config-3dbnode.yaml:/etc/voltsp/configuration.yaml
198 | - ./resources/log4j2.xml:/etc/app/log4j2.xml
199 | - ${LICENSE_FILE_PATH}:/etc/voltsp/license.xml
200 |
201 | volumes:
202 | db:
203 | grafana_data:
204 |
--------------------------------------------------------------------------------
/ddl/create_db.sql:
--------------------------------------------------------------------------------
1 | --
2 | -- Copyright (C) 2025 Volt Active Data Inc.
3 | --
4 | -- Use of this source code is governed by an MIT
5 | -- license that can be found in the LICENSE file or at
6 | -- https://opensource.org/licenses/MIT.
7 | --
8 |
9 |
10 | -- All DDL statements until END_OF_BATCH will succeed or fail together...
11 | --
12 | file -inlinebatch END_OF_BATCH
13 |
14 |
15 | -------------- REPLICATED TABLES ------------------------------------------------
16 | -- Define tables that will hold static or slow moving reference data and do not
17 | -- need to be partitioned
18 |
19 | CREATE TABLE VEHICLE_TYPES (
20 | vehicle_type SMALLINT NOT NULL, --Vehicle type ID
21 | vehicle_class VARCHAR(20) NOT NULL, --Text description of vehicle type
22 | toll_multip DECIMAL NOT NULL, --multiplier adjustment to base toll
23 | PRIMARY KEY (vehicle_type)
24 | );
25 |
26 | CREATE UNIQUE INDEX vt_uk_1 ON VEHICLE_TYPES (vehicle_class);
27 |
28 | CREATE TABLE TOLL_LOCATIONS (
29 | toll_loc_id SMALLINT NOT NULL, --Unique ID for entry
30 | toll_loc VARCHAR(64) NOT NULL, --Location of toll
31 | toll_loc_status TINYINT NOT NULL, --0 = inactive, 1 = active
32 | base_fare DECIMAL NOT NULL, --Base fare charge at toll location in USD
33 | latitude DECIMAL NOT NULL,
34 | longitude DECIMAL NOT NULL,
35 | PRIMARY KEY (toll_loc_id)
36 | );
37 |
38 | CREATE UNIQUE INDEX tl_uk_1 ON TOLL_LOCATIONS (toll_loc);
39 |
40 | CREATE TABLE APPLICATION_PARAMETERS
41 | (parameter_name varchar(30) not null primary key
42 | ,parameter_value varchar(40) not null);
43 |
44 | -------------- PARTITIONED TABLES -----------------------------------------------
45 | -- Define tables that should be spread across database partitions for parallel processing
46 | -- Partition by column
47 |
48 | CREATE TABLE KNOWN_VEHICLES (
49 | plate_num VARCHAR(20) NOT NULL, --String containing vehicle registration plate
50 | account_id INTEGER NOT NULL, --Account owner of the vehicle
51 | vehicle_type SMALLINT NOT NULL, --Type of vehicle. See toll table.
52 | active TINYINT NOT NULL, --0 = inactive, 1 = active
53 | exempt_status TINYINT NOT NULL, --0 = not exempt, 1 = exempt
54 | PRIMARY KEY (plate_num)
55 | );
56 | PARTITION TABLE KNOWN_VEHICLES ON COLUMN plate_num;
57 |
58 | CREATE TABLE SCAN_HISTORY (
59 | scan_id BIGINT NOT NULL,
60 | scan_timestamp TIMESTAMP NOT NULL,
61 | plate_num VARCHAR(20) NOT NULL, --String containing vehicle registration plate
62 | account_id INTEGER,
63 | toll_loc VARCHAR(64) NOT NULL,
64 | toll_lane_num VARCHAR(2) NOT NULL,
65 | toll_amount DECIMAL NOT NULL,
66 | toll_reason VARCHAR(200),
67 | scan_fee_amount DECIMAL,
68 | total_amount DECIMAL NOT NULL,
69 | PRIMARY KEY (plate_num, scan_id))
70 | USING TTL 3600 SECONDS ON COLUMN scan_timestamp BATCH_SIZE 200 MAX_FREQUENCY 1;
71 |
72 | PARTITION TABLE SCAN_HISTORY ON COLUMN plate_num;
73 |
74 | CREATE TABLE ACCOUNTS (
75 | account_id INTEGER NOT NULL, --Unique ID assigned on account creation
76 | account_status TINYINT NOT NULL, --0 = inactive, 1 = active
77 | auto_topup TINYINT NOT NULL, --0 = not enrolled, 1 = enrolled
78 | balance DECIMAL NOT NULL, --Prepaid balance in account in USD
79 | PRIMARY KEY (account_id)
80 | );
81 | PARTITION TABLE ACCOUNTS ON COLUMN account_id;
82 |
83 | CREATE TABLE ACCOUNT_HISTORY (
84 | acct_tx_id BIGINT NOT NULL,
85 | acct_tx_timestamp TIMESTAMP NOT NULL,
86 | account_id INTEGER NOT NULL,
87 | plate_num VARCHAR(20),
88 | scan_id BIGINT,
89 | scan_timestamp TIMESTAMP,
90 | toll_loc VARCHAR(64),
91 | toll_lane_num VARCHAR(2),
92 | toll_amount DECIMAL,
93 | toll_reason VARCHAR(200),
94 | tx_fee_amount DECIMAL,
95 | total_amount DECIMAL NOT NULL,
96 | tx_type VARCHAR(6) NOT NULL, --DEBIT for tolls, CREDIT for top ups.
97 | PRIMARY KEY (account_id, acct_tx_id)
98 | );
99 | PARTITION TABLE ACCOUNT_HISTORY ON COLUMN account_id;
100 |
101 | -------------- STREAMS ----------------------------------------------------------
102 | -- Define output stream tables for ephemeral processing
103 | -- Potential uses include generating materialized views, exporting to external
104 | -- systems, and/or writing to Volt topics for external consumers
105 | -- Data will not persist after processing
106 |
107 | CREATE STREAM bill_by_mail_stream
108 | PARTITION ON COLUMN plate_num
109 | EXPORT TO TOPIC bill_by_mail_topic
110 | WITH KEY (scan_id)
111 | (
112 | scan_id BIGINT NOT NULL,
113 | scan_timestamp TIMESTAMP NOT NULL,
114 | plate_num VARCHAR(20) NOT NULL, --String containing vehicle registration plate
115 | toll_loc VARCHAR(20) NOT NULL,
116 | toll_lane_num VARCHAR(2) NOT NULL,
117 | toll_amount DECIMAL NOT NULL,
118 | toll_reason VARCHAR(20),
119 | scan_fee_amount DECIMAL,
120 | tx_fee_amount DECIMAL,
121 | total_amount DECIMAL NOT NULL,
122 | );
123 |
124 |
125 | CREATE STREAM top_up_stream
126 | PARTITION ON COLUMN account_id
127 | EXPORT TO TOPIC top_up_topic
128 | WITH KEY (account_id)
129 | (
130 | acct_tx_id BIGINT NOT NULL,
131 | acct_tx_timestamp TIMESTAMP NOT NULL,
132 | account_id INTEGER NOT NULL,
133 | topup_amount DECIMAL NOT NULL,
134 | );
135 |
136 | -------------- VIEWS ----------------------------------------------------------
137 |
138 | CREATE VIEW highest_grossing_locations
139 | (toll_loc, total_toll_amount)
140 | AS SELECT toll_loc, SUM(toll_amount) AS total_toll_amount from SCAN_HISTORY GROUP BY toll_loc;
141 |
142 | CREATE VIEW location_scans
143 | (toll_loc, total_count)
144 | AS SELECT toll_loc, count(*) AS total_count from SCAN_HISTORY GROUP BY toll_loc;
145 |
146 | CREATE VIEW invalid_scans_locations
147 | (toll_loc, invalid_count)
148 | AS SELECT toll_loc, COUNT(*) AS invalid_count from SCAN_HISTORY WHERE toll_reason = 'UNKNOWN_VEHICLE' GROUP BY toll_loc;
149 |
150 | CREATE VIEW vehicle_classes_freq
151 | (vehicle_type, vehicle_class, scan_count)
152 | AS SELECT vt.vehicle_type,
153 | vt.vehicle_class,
154 | COUNT(*) AS scan_count
155 | FROM SCAN_HISTORY sh
156 | JOIN KNOWN_VEHICLES kv
157 | ON sh.plate_num = kv.plate_num
158 | JOIN VEHICLE_TYPES vt
159 | ON kv.vehicle_type = vt.vehicle_type
160 | GROUP BY vt.vehicle_type, vt.vehicle_class;
161 |
162 | CREATE VIEW activity_by_minute AS
163 | SELECT TRUNCATE(MINUTE, SCAN_TIMESTAMP) SCAN_TIMESTAMP
164 | , TOLL_LOC, SUM(TOTAL_AMOUNT) TOTAL_AMOUNT
165 | , COUNT(*) TOLLS_PER_MINUTE
166 | FROM scan_history
167 | GROUP BY TRUNCATE(MINUTE, SCAN_TIMESTAMP), TOLL_LOC;
168 |
169 | -------------- SQL STORED PROCEDURES ---------------------------------------------
170 | CREATE PROCEDURE AddToBalance PARTITION ON TABLE ACCOUNTS COLUMN account_id PARAMETER 1 AS
171 | UPDATE ACCOUNTS SET balance = balance + ?
172 | WHERE account_id = ?;
173 |
174 | CREATE PROCEDURE GetPlateHistory PARTITION ON TABLE scan_history COLUMN plate_num AS
175 | SELECT * FROM SCAN_HISTORY
176 | WHERE plate_num = ?
177 | AND toll_loc = ?
178 | AND toll_lane_num = ?
179 | ORDER BY scan_timestamp, plate_num, scan_id DESC LIMIT ?;
180 |
181 | CREATE PROCEDURE GetAccountHistory AS
182 | SELECT * FROM ACCOUNT_HISTORY
183 | WHERE account_id = ?
184 | ORDER BY acct_tx_timestamp, acct_tx_id DESC LIMIT ?;
185 |
186 | ------------- SQL STORED PROCEDURES USED BY THE DASHBOARD ------------------------
187 |
188 | CREATE PROCEDURE dashboard_parameters AS
189 | select * from APPLICATION_PARAMETERS ORDER BY parameter_name;
190 |
191 | CREATE PROCEDURE dashboard_gross AS
192 | select * from highest_grossing_locations order by TOTAL_TOLL_AMOUNT desc;
193 |
194 | CREATE PROCEDURE dashboard_fares AS
195 | select * from TOLL_LOCATIONS order by base_fare, toll_loc_id desc;
196 |
197 | CREATE PROCEDURE dashboard_location_scans AS
198 | SELECT * FROM location_scans ORDER BY toll_loc;
199 |
200 | CREATE PROCEDURE dashboard_top_10_accounts AS
201 | SELECT * FROM accounts ORDER BY balance desc limit 10;
202 |
203 | CREATE PROCEDURE dashboard_vehicle_classes AS
204 | SELECT vehicle_class, toll_multip FROM vehicle_types;
205 |
206 | CREATE PROCEDURE dashboard_vehicle_classes_freq AS
207 | SELECT vehicle_class, scan_count FROM vehicle_classes_freq;
208 |
209 | CREATE PROCEDURE dashboard_invalid_scans AS
210 | SELECT l.toll_loc
211 | , l.latitude
212 | , l.longitude
213 | , hgl.invalid_count AS invalid_count
214 | FROM TOLL_LOCATIONS l
215 | LEFT JOIN invalid_scans_locations hgl ON l.toll_loc = hgl.toll_loc ORDER BY l.toll_loc;
216 |
217 | CREATE PROCEDURE dashboard_gross_map AS
218 | SELECT l.toll_loc
219 | , l.latitude
220 | , l.longitude
221 | , hgl.TOTAL_TOLL_AMOUNT AS TOTAL_TOLL_AMOUNT
222 | FROM TOLL_LOCATIONS l
223 | LEFT JOIN highest_grossing_locations hgl ON l.toll_loc = hgl.toll_loc ORDER BY l.toll_loc;
224 |
225 | --
226 | -- Will return one row for each toll_loc for the last KEEP_MINUTES minutes
227 | --
228 | CREATE PROCEDURE dashboard_activity_by_minute AS
229 | SELECT SCAN_TIMESTAMP
230 | , CAST(YEAR(SCAN_TIMESTAMP) AS VARCHAR)
231 | ||'/'||CAST(MONTH(SCAN_TIMESTAMP) AS VARCHAR)
232 | ||'/'||CAST(DAY(SCAN_TIMESTAMP) AS VARCHAR)
233 | ||' '||CAST(HOUR(SCAN_TIMESTAMP) AS VARCHAR)
234 | ||':'||DECODE(CAST(MINUTE(SCAN_TIMESTAMP) AS VARCHAR),'0','0'
235 | ,'1','0'
236 | ,'2','0'
237 | ,'3','0'
238 | ,'4','0'
239 | ,'5','0'
240 | ,'6','0'
241 | ,'7','0'
242 | ,'8','0'
243 | ,'9','0'
244 | ,'')
245 | ||CAST(MINUTE(SCAN_TIMESTAMP) AS VARCHAR)||':00' SCAN_TIMESTAMP_HHMM
246 | , TOLL_LOC, TOTAL_AMOUNT
247 | , TOLLS_PER_MINUTE
248 | FROM activity_by_minute
249 | WHERE TOLL_LOC = ?
250 | AND SCAN_TIMESTAMP < DATEADD(MINUTE, (-1),NOW)
251 | ORDER BY toll_loc, SCAN_TIMESTAMP;
252 |
253 | -------------- JAVA STORED PROCEDURES --------------------------------------------
254 |
255 | CREATE PROCEDURE PARTITION ON TABLE scan_history COLUMN plate_num PARAMETER 3
256 | FROM CLASS com.voltdb.tollcollect.procedures.ProcessPlate;
257 |
258 | CREATE PROCEDURE PARTITION ON TABLE account_history COLUMN account_id PARAMETER 5
259 | FROM CLASS com.voltdb.tollcollect.procedures.ChargeAccount;
260 |
261 | -------------- INDEXES -----------------------------------------------------------
262 | -- Define any indexes for TABLES or VIEWS on columns that are not a PRIMARY KEY.
263 |
264 | CREATE INDEX sh_del_idx ON scan_history(plate_num, scan_timestamp, scan_id) ;
265 |
266 | CREATE INDEX sh_ttl_idx ON scan_history(scan_timestamp) ;
267 |
268 | -------------- SCHEDULED TASKS --------------------------------------------------
269 | -- Define tasks to execute stored procedures on a schedule
270 |
271 | -- All statements from the start to here succeed or fail as a unit..
272 |
273 | END_OF_BATCH
274 |
--------------------------------------------------------------------------------
/mvnw:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # ----------------------------------------------------------------------------
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | # ----------------------------------------------------------------------------
20 |
21 | # ----------------------------------------------------------------------------
22 | # Apache Maven Wrapper startup batch script, version 3.3.2
23 | #
24 | # Optional ENV vars
25 | # -----------------
26 | # JAVA_HOME - location of a JDK home dir, required when download maven via java source
27 | # MVNW_REPOURL - repo url base for downloading maven distribution
28 | # MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
29 | # MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
30 | # ----------------------------------------------------------------------------
31 |
32 | set -euf
33 | [ "${MVNW_VERBOSE-}" != debug ] || set -x
34 |
35 | # OS specific support.
36 | native_path() { printf %s\\n "$1"; }
37 | case "$(uname)" in
38 | CYGWIN* | MINGW*)
39 | [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
40 | native_path() { cygpath --path --windows "$1"; }
41 | ;;
42 | esac
43 |
44 | # set JAVACMD and JAVACCMD
45 | set_java_home() {
46 | # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
47 | if [ -n "${JAVA_HOME-}" ]; then
48 | if [ -x "$JAVA_HOME/jre/sh/java" ]; then
49 | # IBM's JDK on AIX uses strange locations for the executables
50 | JAVACMD="$JAVA_HOME/jre/sh/java"
51 | JAVACCMD="$JAVA_HOME/jre/sh/javac"
52 | else
53 | JAVACMD="$JAVA_HOME/bin/java"
54 | JAVACCMD="$JAVA_HOME/bin/javac"
55 |
56 | if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
57 | echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
58 | echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
59 | return 1
60 | fi
61 | fi
62 | else
63 | JAVACMD="$(
64 | 'set' +e
65 | 'unset' -f command 2>/dev/null
66 | 'command' -v java
67 | )" || :
68 | JAVACCMD="$(
69 | 'set' +e
70 | 'unset' -f command 2>/dev/null
71 | 'command' -v javac
72 | )" || :
73 |
74 | if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
75 | echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
76 | return 1
77 | fi
78 | fi
79 | }
80 |
81 | # hash string like Java String::hashCode
82 | hash_string() {
83 | str="${1:-}" h=0
84 | while [ -n "$str" ]; do
85 | char="${str%"${str#?}"}"
86 | h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
87 | str="${str#?}"
88 | done
89 | printf %x\\n $h
90 | }
91 |
92 | verbose() { :; }
93 | [ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
94 |
95 | die() {
96 | printf %s\\n "$1" >&2
97 | exit 1
98 | }
99 |
100 | trim() {
101 | # MWRAPPER-139:
102 | # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
103 | # Needed for removing poorly interpreted newline sequences when running in more
104 | # exotic environments such as mingw bash on Windows.
105 | printf "%s" "${1}" | tr -d '[:space:]'
106 | }
107 |
108 | # parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
109 | while IFS="=" read -r key value; do
110 | case "${key-}" in
111 | distributionUrl) distributionUrl=$(trim "${value-}") ;;
112 | distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
113 | esac
114 | done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
115 | [ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
116 |
117 | case "${distributionUrl##*/}" in
118 | maven-mvnd-*bin.*)
119 | MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
120 | case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
121 | *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
122 | :Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
123 | :Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
124 | :Linux*x86_64*) distributionPlatform=linux-amd64 ;;
125 | *)
126 | echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
127 | distributionPlatform=linux-amd64
128 | ;;
129 | esac
130 | distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
131 | ;;
132 | maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
133 | *) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
134 | esac
135 |
136 | # apply MVNW_REPOURL and calculate MAVEN_HOME
137 | # maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/
138 | [ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
139 | distributionUrlName="${distributionUrl##*/}"
140 | distributionUrlNameMain="${distributionUrlName%.*}"
141 | distributionUrlNameMain="${distributionUrlNameMain%-bin}"
142 | MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
143 | MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
144 |
145 | exec_maven() {
146 | unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
147 | exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
148 | }
149 |
150 | if [ -d "$MAVEN_HOME" ]; then
151 | verbose "found existing MAVEN_HOME at $MAVEN_HOME"
152 | exec_maven "$@"
153 | fi
154 |
155 | case "${distributionUrl-}" in
156 | *?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
157 | *) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
158 | esac
159 |
160 | # prepare tmp dir
161 | if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
162 | clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
163 | trap clean HUP INT TERM EXIT
164 | else
165 | die "cannot create temp dir"
166 | fi
167 |
168 | mkdir -p -- "${MAVEN_HOME%/*}"
169 |
170 | # Download and Install Apache Maven
171 | verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
172 | verbose "Downloading from: $distributionUrl"
173 | verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
174 |
175 | # select .zip or .tar.gz
176 | if ! command -v unzip >/dev/null; then
177 | distributionUrl="${distributionUrl%.zip}.tar.gz"
178 | distributionUrlName="${distributionUrl##*/}"
179 | fi
180 |
181 | # verbose opt
182 | __MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
183 | [ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
184 |
185 | # normalize http auth
186 | case "${MVNW_PASSWORD:+has-password}" in
187 | '') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
188 | has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
189 | esac
190 |
191 | if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
192 | verbose "Found wget ... using wget"
193 | wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
194 | elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
195 | verbose "Found curl ... using curl"
196 | curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
197 | elif set_java_home; then
198 | verbose "Falling back to use Java to download"
199 | javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
200 | targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
201 | cat >"$javaSource" <<-END
202 | public class Downloader extends java.net.Authenticator
203 | {
204 | protected java.net.PasswordAuthentication getPasswordAuthentication()
205 | {
206 | return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
207 | }
208 | public static void main( String[] args ) throws Exception
209 | {
210 | setDefault( new Downloader() );
211 | java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
212 | }
213 | }
214 | END
215 | # For Cygwin/MinGW, switch paths to Windows format before running javac and java
216 | verbose " - Compiling Downloader.java ..."
217 | "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
218 | verbose " - Running Downloader.java ..."
219 | "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
220 | fi
221 |
222 | # If specified, validate the SHA-256 sum of the Maven distribution zip file
223 | if [ -n "${distributionSha256Sum-}" ]; then
224 | distributionSha256Result=false
225 | if [ "$MVN_CMD" = mvnd.sh ]; then
226 | echo "Checksum validation is not supported for maven-mvnd." >&2
227 | echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
228 | exit 1
229 | elif command -v sha256sum >/dev/null; then
230 | if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
231 | distributionSha256Result=true
232 | fi
233 | elif command -v shasum >/dev/null; then
234 | if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
235 | distributionSha256Result=true
236 | fi
237 | else
238 | echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
239 | echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
240 | exit 1
241 | fi
242 | if [ $distributionSha256Result = false ]; then
243 | echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
244 | echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
245 | exit 1
246 | fi
247 | fi
248 |
249 | # unzip and move
250 | if command -v unzip >/dev/null; then
251 | unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
252 | else
253 | tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
254 | fi
255 | printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
256 | mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
257 |
258 | clean || :
259 | exec_maven "$@"
260 |
--------------------------------------------------------------------------------
/csv/accounts.csv:
--------------------------------------------------------------------------------
1 | account_id,acocunt_status,auto_topup,balance
2 | 1100,1,1,15.00
3 | 1101,1,1,10.00
4 | 1102,1,1,5.00
5 | 1103,1,1,0.00
6 | 1104,1,1,15.00
7 | 1105,1,0,30.00
8 | 1106,1,1,5.00
9 | 1107,1,1,45.00
10 | 1108,1,1,40.00
11 | 1109,1,0,60.00
12 | 1110,1,0,30.00
13 | 1111,1,1,10.00
14 | 1112,1,0,30.00
15 | 1113,1,1,30.00
16 | 1114,1,0,60.00
17 | 1115,1,0,55.00
18 | 1116,1,1,30.00
19 | 1117,1,1,40.00
20 | 1118,1,1,55.00
21 | 1119,1,1,40.00
22 | 1120,1,1,35.00
23 | 1121,1,1,20.00
24 | 1122,1,0,5.00
25 | 1123,1,1,55.00
26 | 1124,1,0,45.00
27 | 1125,1,0,30.00
28 | 1126,1,1,35.00
29 | 1127,1,1,30.00
30 | 1128,1,0,30.00
31 | 1129,1,1,60.00
32 | 1130,1,1,50.00
33 | 1131,1,1,5.00
34 | 1132,1,0,15.00
35 | 1133,1,1,30.00
36 | 1134,1,1,20.00
37 | 1135,1,0,15.00
38 | 1136,1,0,55.00
39 | 1137,1,1,45.00
40 | 1138,1,1,0.00
41 | 1139,1,1,15.00
42 | 1140,1,0,10.00
43 | 1141,1,1,15.00
44 | 1142,1,1,5.00
45 | 1143,1,1,15.00
46 | 1144,1,1,40.00
47 | 1145,1,1,45.00
48 | 1146,1,0,50.00
49 | 1147,1,0,45.00
50 | 1148,1,1,25.00
51 | 1149,1,1,55.00
52 | 1150,1,1,0.00
53 | 1151,1,1,50.00
54 | 1152,1,1,45.00
55 | 1153,1,1,45.00
56 | 1154,1,0,30.00
57 | 1155,1,1,10.00
58 | 1156,1,0,25.00
59 | 1157,1,0,35.00
60 | 1158,1,1,35.00
61 | 1159,1,0,55.00
62 | 1160,1,1,50.00
63 | 1161,1,1,40.00
64 | 1162,1,0,20.00
65 | 1163,1,1,40.00
66 | 1164,1,1,40.00
67 | 1165,1,1,15.00
68 | 1166,1,0,5.00
69 | 1167,1,1,15.00
70 | 1168,1,1,15.00
71 | 1169,1,1,15.00
72 | 1170,1,1,30.00
73 | 1171,1,1,0.00
74 | 1172,1,1,35.00
75 | 1173,1,0,10.00
76 | 1174,1,1,55.00
77 | 1175,1,1,5.00
78 | 1176,1,1,5.00
79 | 1177,1,0,15.00
80 | 1178,1,1,50.00
81 | 1179,1,0,5.00
82 | 1180,1,0,45.00
83 | 1181,1,0,55.00
84 | 1182,1,1,5.00
85 | 1183,1,1,25.00
86 | 1184,1,0,5.00
87 | 1185,1,1,50.00
88 | 1186,1,1,20.00
89 | 1187,1,1,55.00
90 | 1188,1,1,30.00
91 | 1189,1,0,15.00
92 | 1190,1,1,60.00
93 | 1191,1,0,15.00
94 | 1192,1,0,45.00
95 | 1193,1,1,5.00
96 | 1194,1,1,10.00
97 | 1195,1,1,5.00
98 | 1196,1,1,5.00
99 | 1197,1,1,20.00
100 | 1198,1,1,20.00
101 | 1199,1,0,45.00
102 | 1200,1,1,30.00
103 | 1201,1,1,40.00
104 | 1202,1,1,10.00
105 | 1203,1,1,20.00
106 | 1204,1,0,15.00
107 | 1205,1,0,25.00
108 | 1206,1,0,40.00
109 | 1207,1,1,40.00
110 | 1208,1,1,15.00
111 | 1209,1,0,0.00
112 | 1210,1,0,35.00
113 | 1211,1,0,10.00
114 | 1212,1,1,35.00
115 | 1213,1,0,25.00
116 | 1214,1,1,5.00
117 | 1215,1,1,45.00
118 | 1216,1,1,15.00
119 | 1217,1,1,60.00
120 | 1218,1,0,0.00
121 | 1219,1,1,10.00
122 | 1220,1,1,45.00
123 | 1221,1,1,50.00
124 | 1222,0,1,40.00
125 | 1223,1,1,55.00
126 | 1224,1,1,40.00
127 | 1225,1,0,25.00
128 | 1226,1,1,25.00
129 | 1227,1,0,5.00
130 | 1228,1,1,40.00
131 | 1229,1,0,25.00
132 | 1230,1,1,0.00
133 | 1231,1,0,45.00
134 | 1232,1,1,0.00
135 | 1233,1,1,5.00
136 | 1234,1,1,45.00
137 | 1235,1,1,55.00
138 | 1236,1,1,15.00
139 | 1237,1,0,50.00
140 | 1238,1,1,0.00
141 | 1239,1,1,15.00
142 | 1240,1,0,10.00
143 | 1241,1,1,35.00
144 | 1242,1,1,50.00
145 | 1243,1,0,55.00
146 | 1244,1,0,20.00
147 | 1245,1,1,25.00
148 | 1246,1,1,60.00
149 | 1247,1,0,0.00
150 | 1248,1,1,0.00
151 | 1249,1,1,55.00
152 | 1250,1,1,40.00
153 | 1251,1,1,35.00
154 | 1252,1,1,30.00
155 | 1253,1,1,55.00
156 | 1254,1,0,40.00
157 | 1255,1,1,25.00
158 | 1256,1,1,60.00
159 | 1257,1,1,20.00
160 | 1258,1,1,25.00
161 | 1259,1,1,10.00
162 | 1260,1,1,35.00
163 | 1261,1,1,45.00
164 | 1262,1,0,5.00
165 | 1263,1,1,45.00
166 | 1264,1,1,15.00
167 | 1265,1,0,35.00
168 | 1266,1,1,5.00
169 | 1267,1,0,10.00
170 | 1268,1,0,5.00
171 | 1269,1,1,25.00
172 | 1270,1,1,20.00
173 | 1271,1,1,50.00
174 | 1272,1,1,25.00
175 | 1273,1,0,25.00
176 | 1274,1,1,30.00
177 | 1275,1,0,25.00
178 | 1276,1,1,0.00
179 | 1277,1,0,30.00
180 | 1278,1,0,10.00
181 | 1279,1,0,45.00
182 | 1280,1,0,60.00
183 | 1281,1,1,35.00
184 | 1282,0,1,20.00
185 | 1283,1,1,35.00
186 | 1284,1,1,35.00
187 | 1285,1,0,55.00
188 | 1286,1,1,30.00
189 | 1287,1,0,25.00
190 | 1288,1,1,45.00
191 | 1289,1,1,35.00
192 | 1290,1,1,35.00
193 | 1291,1,1,50.00
194 | 1292,1,0,30.00
195 | 1293,1,0,5.00
196 | 1294,1,0,5.00
197 | 1295,1,1,60.00
198 | 1296,1,1,50.00
199 | 1297,1,1,5.00
200 | 1298,1,1,45.00
201 | 1299,1,0,35.00
202 | 1300,1,1,35.00
203 | 1301,1,1,60.00
204 | 1302,1,1,40.00
205 | 1303,1,1,5.00
206 | 1304,1,0,45.00
207 | 1305,1,1,25.00
208 | 1306,1,1,60.00
209 | 1307,1,1,40.00
210 | 1308,1,1,15.00
211 | 1309,1,1,45.00
212 | 1310,1,0,30.00
213 | 1311,1,0,5.00
214 | 1312,1,1,20.00
215 | 1313,1,1,25.00
216 | 1314,1,1,20.00
217 | 1315,1,1,40.00
218 | 1316,1,1,5.00
219 | 1317,1,1,45.00
220 | 1318,1,0,5.00
221 | 1319,1,0,40.00
222 | 1320,1,1,30.00
223 | 1321,1,1,20.00
224 | 1322,1,1,45.00
225 | 1323,1,1,15.00
226 | 1324,1,1,5.00
227 | 1325,1,1,55.00
228 | 1326,1,1,5.00
229 | 1327,1,1,35.00
230 | 1328,1,0,15.00
231 | 1329,1,0,5.00
232 | 1330,1,0,25.00
233 | 1331,1,0,0.00
234 | 1332,1,1,50.00
235 | 1333,1,0,45.00
236 | 1334,1,1,25.00
237 | 1335,1,0,40.00
238 | 1336,1,1,15.00
239 | 1337,1,1,45.00
240 | 1338,1,1,55.00
241 | 1339,0,1,50.00
242 | 1340,1,1,55.00
243 | 1341,1,1,30.00
244 | 1342,1,1,15.00
245 | 1343,1,0,35.00
246 | 1344,1,1,30.00
247 | 1345,1,1,20.00
248 | 1346,1,1,50.00
249 | 1347,1,1,15.00
250 | 1348,1,1,60.00
251 | 1349,1,0,5.00
252 | 1350,1,0,20.00
253 | 1351,1,1,0.00
254 | 1352,1,1,60.00
255 | 1353,1,0,55.00
256 | 1354,1,0,45.00
257 | 1355,1,0,10.00
258 | 1356,0,1,50.00
259 | 1357,1,0,40.00
260 | 1358,1,1,40.00
261 | 1359,1,1,55.00
262 | 1360,1,1,50.00
263 | 1361,1,1,5.00
264 | 1362,1,1,30.00
265 | 1363,1,1,15.00
266 | 1364,1,0,20.00
267 | 1365,1,1,10.00
268 | 1366,1,1,45.00
269 | 1367,1,1,0.00
270 | 1368,1,1,50.00
271 | 1369,1,1,35.00
272 | 1370,1,1,15.00
273 | 1371,1,1,20.00
274 | 1372,1,1,35.00
275 | 1373,1,1,25.00
276 | 1374,1,1,35.00
277 | 1375,1,0,55.00
278 | 1376,1,1,50.00
279 | 1377,1,1,35.00
280 | 1378,1,1,55.00
281 | 1379,1,0,30.00
282 | 1380,1,1,25.00
283 | 1381,1,1,35.00
284 | 1382,1,1,30.00
285 | 1383,1,0,55.00
286 | 1384,1,0,25.00
287 | 1385,1,1,30.00
288 | 1386,1,1,30.00
289 | 1387,1,1,10.00
290 | 1388,1,0,50.00
291 | 1389,1,1,55.00
292 | 1390,1,1,25.00
293 | 1391,1,1,40.00
294 | 1392,1,0,25.00
295 | 1393,1,0,45.00
296 | 1394,1,1,35.00
297 | 1395,0,1,30.00
298 | 1396,1,1,5.00
299 | 1397,1,1,5.00
300 | 1398,1,0,55.00
301 | 1399,1,1,55.00
302 | 1400,1,1,45.00
303 | 1401,1,1,45.00
304 | 1402,1,0,5.00
305 | 1403,1,1,60.00
306 | 1404,1,1,20.00
307 | 1405,1,1,55.00
308 | 1406,1,1,20.00
309 | 1407,1,1,0.00
310 | 1408,1,0,25.00
311 | 1409,1,1,55.00
312 | 1410,1,1,35.00
313 | 1411,1,1,0.00
314 | 1412,1,1,25.00
315 | 1413,1,1,15.00
316 | 1414,1,1,35.00
317 | 1415,1,1,35.00
318 | 1416,1,0,60.00
319 | 1417,1,1,25.00
320 | 1418,1,1,50.00
321 | 1419,1,1,40.00
322 | 1420,1,1,20.00
323 | 1421,1,1,55.00
324 | 1422,1,0,25.00
325 | 1423,1,0,20.00
326 | 1424,1,0,30.00
327 | 1425,1,0,25.00
328 | 1426,1,1,20.00
329 | 1427,1,1,30.00
330 | 1428,1,0,50.00
331 | 1429,1,1,35.00
332 | 1430,1,1,50.00
333 | 1431,1,1,20.00
334 | 1432,1,1,5.00
335 | 1433,1,0,50.00
336 | 1434,1,1,40.00
337 | 1435,1,1,55.00
338 | 1436,1,1,45.00
339 | 1437,1,1,20.00
340 | 1438,1,1,35.00
341 | 1439,1,1,50.00
342 | 1440,1,1,50.00
343 | 1441,1,1,40.00
344 | 1442,1,0,40.00
345 | 1443,1,1,50.00
346 | 1444,1,1,0.00
347 | 1445,1,0,25.00
348 | 1446,1,0,15.00
349 | 1447,1,1,10.00
350 | 1448,1,1,30.00
351 | 1449,1,0,15.00
352 | 1450,1,0,50.00
353 | 1451,1,0,60.00
354 | 1452,1,1,25.00
355 | 1453,1,1,15.00
356 | 1454,1,0,25.00
357 | 1455,1,1,40.00
358 | 1456,1,1,25.00
359 | 1457,1,1,40.00
360 | 1458,1,1,5.00
361 | 1459,1,0,45.00
362 | 1460,1,0,30.00
363 | 1461,1,1,45.00
364 | 1462,1,0,40.00
365 | 1463,1,1,60.00
366 | 1464,1,1,15.00
367 | 1465,1,1,5.00
368 | 1466,1,0,15.00
369 | 1467,1,1,50.00
370 | 1468,1,1,35.00
371 | 1469,1,0,40.00
372 | 1470,1,0,10.00
373 | 1471,1,1,15.00
374 | 1472,1,1,60.00
375 | 1473,1,0,50.00
376 | 1474,1,1,60.00
377 | 1475,1,1,55.00
378 | 1476,1,0,55.00
379 | 1477,1,1,35.00
380 | 1478,1,1,60.00
381 | 1479,1,0,5.00
382 | 1480,1,0,30.00
383 | 1481,1,1,25.00
384 | 1482,1,0,35.00
385 | 1483,1,1,25.00
386 | 1484,1,1,45.00
387 | 1485,1,1,0.00
388 | 1486,1,1,55.00
389 | 1487,1,1,60.00
390 | 1488,1,0,35.00
391 | 1489,1,1,40.00
392 | 1490,1,0,5.00
393 | 1491,1,1,30.00
394 | 1492,1,1,35.00
395 | 1493,1,1,60.00
396 | 1494,1,1,45.00
397 | 1495,1,0,10.00
398 | 1496,1,1,45.00
399 | 1497,1,1,45.00
400 | 1498,1,0,60.00
401 | 1499,1,0,45.00
402 | 1500,1,1,55.00
403 | 1501,1,1,20.00
404 | 1502,1,1,10.00
405 | 1503,1,1,15.00
406 | 1504,1,1,10.00
407 | 1505,1,1,45.00
408 | 1506,1,0,20.00
409 | 1507,1,1,40.00
410 | 1508,1,1,25.00
411 | 1509,1,0,20.00
412 | 1510,1,1,5.00
413 | 1511,1,0,40.00
414 | 1512,1,1,55.00
415 | 1513,1,1,20.00
416 | 1514,1,1,35.00
417 | 1515,1,1,30.00
418 | 1516,1,1,25.00
419 | 1517,1,1,5.00
420 | 1518,1,1,50.00
421 | 1519,1,1,40.00
422 | 1520,1,0,25.00
423 | 1521,1,0,25.00
424 | 1522,1,1,60.00
425 | 1523,1,0,50.00
426 | 1524,1,0,25.00
427 | 1525,1,1,0.00
428 | 1526,1,1,15.00
429 | 1527,1,0,50.00
430 | 1528,1,0,55.00
431 | 1529,1,0,45.00
432 | 1530,1,0,5.00
433 | 1531,1,1,30.00
434 | 1532,1,1,30.00
435 | 1533,1,1,5.00
436 | 1534,1,1,60.00
437 | 1535,1,1,50.00
438 | 1536,1,1,40.00
439 | 1537,1,1,50.00
440 | 1538,1,0,20.00
441 | 1539,1,0,40.00
442 | 1540,1,1,55.00
443 | 1541,1,1,15.00
444 | 1542,1,1,0.00
445 | 1543,1,1,60.00
446 | 1544,1,1,55.00
447 | 1545,1,1,55.00
448 | 1546,1,1,50.00
449 | 1547,1,1,45.00
450 | 1548,1,1,15.00
451 | 1549,0,1,5.00
452 | 1550,1,1,35.00
453 | 1551,1,1,40.00
454 | 1552,1,0,25.00
455 | 1553,1,1,25.00
456 | 1554,1,1,55.00
457 | 1555,1,1,5.00
458 | 1556,1,0,35.00
459 | 1557,1,1,20.00
460 | 1558,1,0,55.00
461 | 1559,1,1,0.00
462 | 1560,1,0,25.00
463 | 1561,1,1,35.00
464 | 1562,1,0,60.00
465 | 1563,1,0,5.00
466 | 1564,1,1,10.00
467 | 1565,1,1,55.00
468 | 1566,0,1,30.00
469 | 1567,1,1,55.00
470 | 1568,1,1,10.00
471 | 1569,1,1,15.00
472 | 1570,1,1,15.00
473 | 1571,1,1,15.00
474 | 1572,1,1,45.00
475 | 1573,1,1,60.00
476 | 1574,1,1,50.00
477 | 1575,1,1,50.00
478 | 1576,1,0,20.00
479 | 1577,1,1,50.00
480 | 1578,1,1,45.00
481 | 1579,1,1,35.00
482 | 1580,1,1,50.00
483 | 1581,1,1,45.00
484 | 1582,1,1,10.00
485 | 1583,1,1,20.00
486 | 1584,1,1,30.00
487 | 1585,1,0,0.00
488 | 1586,1,1,5.00
489 | 1587,1,1,0.00
490 | 1588,1,1,15.00
491 | 1589,1,1,10.00
492 | 1590,1,1,50.00
493 | 1591,1,1,60.00
494 | 1592,1,1,5.00
495 | 1593,1,1,5.00
496 | 1594,1,1,50.00
497 | 1595,1,0,25.00
498 | 1596,1,0,25.00
499 | 1597,1,1,60.00
500 | 1598,1,1,10.00
501 | 1599,1,1,35.00
502 | 1600,1,0,50.00
503 | 1601,1,1,35.00
504 | 1602,1,1,25.00
505 | 1603,1,1,35.00
506 | 1604,1,1,35.00
507 | 1605,1,1,25.00
508 | 1606,1,1,0.00
509 | 1607,1,1,15.00
510 | 1608,1,1,5.00
511 | 1609,1,1,40.00
512 | 1610,1,1,50.00
513 | 1611,1,1,25.00
514 | 1612,1,0,25.00
515 | 1613,1,0,25.00
516 | 1614,1,0,10.00
517 | 1615,1,1,35.00
518 | 1616,1,1,20.00
519 | 1617,1,0,10.00
520 | 1618,1,0,25.00
521 | 1619,1,1,45.00
522 | 1620,1,1,50.00
523 | 1621,0,0,20.00
524 | 1622,1,1,20.00
525 | 1623,1,0,30.00
526 | 1624,1,1,40.00
527 | 1625,1,1,50.00
528 | 1626,1,1,20.00
529 | 1627,1,1,40.00
530 | 1628,0,1,35.00
531 | 1629,1,1,35.00
532 | 1630,1,1,50.00
533 | 1631,1,1,45.00
534 | 1632,1,1,0.00
535 | 1633,1,1,40.00
536 | 1634,1,0,55.00
537 | 1635,1,1,15.00
538 | 1636,1,1,10.00
539 | 1637,1,1,40.00
540 | 1638,1,0,40.00
541 | 1639,1,1,60.00
542 | 1640,1,1,40.00
543 | 1641,1,0,50.00
544 | 1642,0,1,25.00
545 | 1643,1,1,5.00
546 | 1644,1,1,30.00
547 | 1645,1,0,30.00
548 | 1646,1,1,5.00
549 | 1647,1,1,25.00
550 | 1648,1,1,45.00
551 | 1649,1,1,45.00
552 | 1650,1,0,25.00
553 | 1651,1,1,25.00
554 | 1652,1,0,20.00
555 | 1653,1,1,20.00
556 | 1654,1,1,35.00
557 | 1655,1,1,10.00
558 | 1656,1,0,45.00
559 | 1657,1,1,35.00
560 | 1658,1,0,5.00
561 | 1659,1,1,40.00
562 | 1660,1,1,55.00
563 | 1661,1,0,15.00
564 | 1662,1,1,60.00
565 | 1663,1,1,45.00
566 | 1664,1,1,60.00
567 | 1665,1,0,55.00
568 | 1666,1,1,55.00
569 | 1667,1,0,50.00
570 | 1668,1,0,25.00
571 | 1669,1,1,60.00
572 | 1670,1,1,20.00
573 | 1671,1,1,5.00
574 | 1672,1,0,35.00
575 | 1673,1,1,45.00
576 | 1674,1,1,10.00
577 | 1675,1,1,20.00
578 | 1676,1,1,40.00
579 | 1677,1,1,45.00
580 | 1678,1,1,50.00
581 | 1679,1,0,25.00
582 | 1680,1,1,50.00
583 | 1681,1,1,50.00
584 | 1682,1,1,20.00
585 | 1683,1,1,20.00
586 | 1684,1,1,35.00
587 | 1685,1,1,30.00
588 | 1686,1,1,10.00
589 | 1687,1,1,10.00
590 | 1688,1,0,10.00
591 | 1689,1,1,50.00
592 | 1690,1,0,45.00
593 | 1691,1,1,50.00
594 | 1692,1,1,15.00
595 | 1693,1,1,50.00
596 | 1694,1,1,30.00
597 | 1695,1,0,0.00
598 | 1696,1,1,10.00
599 | 1697,1,0,55.00
600 | 1698,1,0,35.00
601 | 1699,1,1,10.00
602 | 1700,1,1,45.00
603 | 1701,1,1,20.00
604 | 1702,1,1,60.00
605 | 1703,1,1,30.00
606 | 1704,1,1,45.00
607 | 1705,1,1,40.00
608 | 1706,1,1,5.00
609 | 1707,1,1,15.00
610 | 1708,1,1,40.00
611 | 1709,1,1,40.00
612 | 1710,1,0,30.00
613 | 1711,1,0,15.00
614 | 1712,1,1,40.00
615 | 1713,1,1,25.00
616 | 1714,1,0,45.00
617 | 1715,1,1,35.00
618 | 1716,1,1,55.00
619 | 1717,1,1,15.00
620 | 1718,1,1,15.00
621 | 1719,1,1,30.00
622 | 1720,1,0,50.00
623 | 1721,1,1,35.00
624 | 1722,1,1,25.00
625 | 1723,1,1,45.00
626 | 1724,1,1,45.00
627 | 1725,1,1,15.00
628 | 1726,1,0,0.00
629 | 1727,1,1,30.00
630 | 1728,1,0,35.00
631 | 1729,1,1,50.00
632 | 1730,1,1,60.00
633 | 1731,1,1,0.00
634 | 1732,1,1,30.00
635 | 1733,1,0,10.00
636 | 1734,1,1,25.00
637 | 1735,1,1,45.00
638 | 1736,1,0,40.00
639 | 1737,1,1,15.00
640 | 1738,1,1,10.00
641 | 1739,1,1,40.00
642 | 1740,1,1,20.00
643 | 1741,1,1,10.00
644 | 1742,1,1,50.00
645 | 1743,1,1,40.00
646 | 1744,1,0,5.00
647 | 1745,1,1,15.00
648 | 1746,1,1,15.00
649 | 1747,1,1,30.00
650 | 1748,1,1,60.00
651 | 1749,1,1,35.00
652 | 1750,1,0,0.00
653 | 1751,0,0,55.00
654 | 1752,1,1,30.00
655 | 1753,1,1,15.00
656 | 1754,1,1,55.00
657 | 1755,1,1,0.00
658 | 1756,1,1,15.00
659 | 1757,1,1,40.00
660 | 1758,1,1,35.00
661 | 1759,1,0,40.00
662 | 1760,1,1,45.00
663 | 1761,1,1,45.00
664 | 1762,1,1,35.00
665 | 1763,1,1,45.00
666 | 1764,1,0,25.00
667 | 1765,1,0,30.00
668 | 1766,1,1,30.00
669 | 1767,1,1,30.00
670 | 1768,1,1,60.00
671 | 1769,1,1,20.00
672 | 1770,1,0,10.00
673 | 1771,1,1,10.00
674 | 1772,1,1,10.00
675 | 1773,1,0,5.00
676 | 1774,1,1,5.00
677 | 1775,1,1,35.00
678 | 1776,1,0,25.00
679 | 1777,1,1,55.00
680 | 1778,1,0,10.00
681 | 1779,1,0,40.00
682 | 1780,1,1,20.00
683 | 1781,1,0,25.00
684 | 1782,1,1,60.00
685 | 1783,1,0,0.00
686 | 1784,1,0,10.00
687 | 1785,1,1,35.00
688 | 1786,1,1,10.00
689 | 1787,1,1,25.00
690 | 1788,1,0,25.00
691 | 1789,1,1,40.00
692 | 1790,1,0,45.00
693 | 1791,1,1,40.00
694 | 1792,1,0,25.00
695 | 1793,1,1,5.00
696 | 1794,1,0,55.00
697 | 1795,1,0,5.00
698 | 1796,1,1,0.00
699 | 1797,1,0,35.00
700 | 1798,1,0,5.00
701 | 1799,1,1,15.00
702 | 1800,1,1,15.00
703 | 1801,1,1,25.00
704 | 1802,1,1,0.00
705 | 1803,1,1,5.00
706 | 1804,1,1,25.00
707 | 1805,1,1,35.00
708 | 1806,1,0,30.00
709 | 1807,1,1,15.00
710 | 1808,1,1,10.00
711 | 1809,1,1,0.00
712 | 1810,1,1,55.00
713 | 1811,1,1,25.00
714 | 1812,1,1,60.00
715 | 1813,1,1,15.00
716 | 1814,1,0,15.00
717 | 1815,1,0,10.00
718 | 1816,1,1,50.00
719 | 1817,1,1,55.00
720 | 1818,1,1,30.00
721 | 1819,1,0,40.00
722 | 1820,1,1,30.00
723 | 1821,1,1,10.00
724 | 1822,1,1,45.00
725 | 1823,1,0,20.00
726 | 1824,1,1,25.00
727 | 1825,1,0,55.00
728 | 1826,1,0,60.00
729 | 1827,1,1,25.00
730 | 1828,1,1,45.00
731 | 1829,1,1,40.00
732 | 1830,1,1,20.00
733 | 1831,1,1,55.00
734 | 1832,1,0,15.00
735 | 1833,1,1,25.00
736 | 1834,1,1,15.00
737 | 1835,1,1,45.00
738 | 1836,1,0,55.00
739 | 1837,1,1,35.00
740 | 1838,1,1,55.00
741 | 1839,0,1,50.00
742 | 1840,1,1,55.00
743 | 1841,1,0,45.00
744 | 1842,1,1,50.00
745 | 1843,1,1,35.00
746 | 1844,1,0,40.00
747 | 1845,1,1,50.00
748 | 1846,1,1,40.00
749 | 1847,1,1,25.00
750 | 1848,1,0,5.00
751 | 1849,1,1,55.00
752 | 1850,1,1,20.00
753 | 1851,1,1,45.00
754 | 1852,1,1,50.00
755 | 1853,1,1,40.00
756 | 1854,1,0,5.00
757 | 1855,1,1,15.00
758 | 1856,1,1,45.00
759 | 1857,1,1,30.00
760 | 1858,1,1,0.00
761 | 1859,1,0,45.00
762 | 1860,1,1,15.00
763 | 1861,1,1,20.00
764 | 1862,1,1,50.00
765 | 1863,1,0,0.00
766 | 1864,1,0,40.00
767 | 1865,1,1,50.00
768 | 1866,1,1,5.00
769 | 1867,1,0,55.00
770 | 1868,1,1,10.00
771 | 1869,1,0,50.00
772 | 1870,1,1,5.00
773 | 1871,1,1,30.00
774 | 1872,1,1,10.00
775 | 1873,1,1,10.00
776 | 1874,1,0,30.00
777 | 1875,1,1,0.00
778 | 1876,1,1,15.00
779 | 1877,1,1,10.00
780 | 1878,1,1,30.00
781 | 1879,1,0,55.00
782 | 1880,1,1,45.00
783 | 1881,1,1,60.00
784 | 1882,1,1,60.00
785 | 1883,1,0,30.00
786 | 1884,1,1,25.00
787 | 1885,1,0,10.00
788 | 1886,1,1,5.00
789 | 1887,1,1,30.00
790 | 1888,1,1,30.00
791 | 1889,1,0,5.00
792 | 1890,1,1,40.00
793 | 1891,1,1,15.00
794 | 1892,1,0,20.00
795 | 1893,1,0,10.00
796 | 1894,1,0,10.00
797 | 1895,1,1,5.00
798 | 1896,1,1,20.00
799 | 1897,1,1,5.00
800 | 1898,1,1,10.00
801 | 1899,1,1,55.00
802 | 1900,1,0,30.00
803 | 1901,1,1,30.00
804 | 1902,1,1,20.00
805 | 1903,1,0,35.00
806 | 1904,1,1,30.00
807 | 1905,1,1,40.00
808 | 1906,1,1,40.00
809 | 1907,1,1,10.00
810 | 1908,1,1,15.00
811 | 1909,1,0,55.00
812 | 1910,1,1,45.00
813 | 1911,1,1,15.00
814 | 1912,1,1,55.00
815 | 1913,1,0,25.00
816 | 1914,1,1,20.00
817 | 1915,1,1,50.00
818 | 1916,1,1,30.00
819 | 1917,1,1,25.00
820 | 1918,1,0,40.00
821 | 1919,1,1,40.00
822 | 1920,1,1,55.00
823 | 1921,1,1,55.00
824 | 1922,1,1,0.00
825 | 1923,1,1,50.00
826 | 1924,1,1,30.00
827 | 1925,1,1,20.00
828 | 1926,1,1,5.00
829 | 1927,1,0,20.00
830 | 1928,1,1,45.00
831 | 1929,1,1,0.00
832 | 1930,1,1,15.00
833 | 1931,1,0,25.00
834 | 1932,1,0,35.00
835 | 1933,1,0,20.00
836 | 1934,1,1,10.00
837 | 1935,1,1,40.00
838 | 1936,1,1,45.00
839 | 1937,1,1,0.00
840 | 1938,1,1,30.00
841 | 1939,1,1,55.00
842 | 1940,1,0,50.00
843 | 1941,1,1,40.00
844 | 1942,1,0,60.00
845 | 1943,1,1,45.00
846 | 1944,1,1,45.00
847 | 1945,1,1,55.00
848 | 1946,1,1,55.00
849 | 1947,1,1,10.00
850 | 1948,1,1,0.00
851 | 1949,1,1,25.00
852 | 1950,1,1,55.00
853 | 1951,1,0,45.00
854 | 1952,1,1,50.00
855 | 1953,1,1,55.00
856 | 1954,1,1,0.00
857 | 1955,1,1,25.00
858 | 1956,1,1,15.00
859 | 1957,1,0,25.00
860 | 1958,1,0,50.00
861 | 1959,1,0,10.00
862 | 1960,1,1,55.00
863 | 1961,1,1,30.00
864 | 1962,1,1,45.00
865 | 1963,1,1,5.00
866 | 1964,1,1,10.00
867 | 1965,1,0,50.00
868 | 1966,1,1,15.00
869 | 1967,1,1,45.00
870 | 1968,1,1,45.00
871 | 1969,1,0,5.00
872 | 1970,1,1,25.00
873 | 1971,1,1,30.00
874 | 1972,1,1,45.00
875 | 1973,1,1,15.00
876 | 1974,1,1,35.00
877 | 1975,1,1,55.00
878 | 1976,1,1,20.00
879 | 1977,1,1,25.00
880 | 1978,1,0,45.00
881 | 1979,1,1,20.00
882 | 1980,1,1,40.00
883 | 1981,1,1,0.00
884 | 1982,1,1,45.00
885 | 1983,1,0,60.00
886 | 1984,1,1,50.00
887 | 1985,1,1,5.00
888 | 1986,1,1,40.00
889 | 1987,1,1,60.00
890 | 1988,1,1,20.00
891 | 1989,1,0,45.00
892 | 1990,1,0,0.00
893 | 1991,1,0,10.00
894 | 1992,1,0,15.00
895 | 1993,1,0,5.00
896 | 1994,1,1,10.00
897 | 1995,1,1,20.00
898 | 1996,1,0,30.00
899 | 1997,1,1,50.00
900 | 1998,1,1,10.00
901 | 1999,1,1,55.00
902 |
--------------------------------------------------------------------------------
/csv/known_vehicles.csv:
--------------------------------------------------------------------------------
1 | plate_num,account_id,vehicle_type,active,exempt_status
2 | X001,1488,4,1,0
3 | X002,1764,2,1,0
4 | X003,1660,2,1,0
5 | X004,1810,2,1,0
6 | X005,1470,1,1,0
7 | X006,1678,2,0,0
8 | X007,1272,2,1,0
9 | X008,1666,2,1,0
10 | X009,1134,3,1,0
11 | X010,1836,2,1,0
12 | X011,1703,2,1,0
13 | X012,1256,2,1,1
14 | X013,1364,2,1,0
15 | X014,1376,2,1,0
16 | X015,1567,4,0,0
17 | X016,1121,2,1,0
18 | X017,1237,4,1,0
19 | X018,1168,2,1,0
20 | X019,1659,3,1,0
21 | X020,1551,4,1,0
22 | X021,1515,2,1,0
23 | X022,1825,4,1,0
24 | X023,1517,2,0,0
25 | X024,1660,2,1,0
26 | X025,1861,4,1,0
27 | X026,1356,2,1,0
28 | X027,1902,2,1,0
29 | X028,1440,2,1,0
30 | X029,1896,2,1,0
31 | X030,1582,2,0,0
32 | X031,1618,4,1,0
33 | X032,1642,2,1,0
34 | X033,1102,4,1,0
35 | X034,1641,2,1,0
36 | X035,1761,2,1,0
37 | X036,1100,4,1,0
38 | X037,1905,1,1,0
39 | X038,1431,2,1,0
40 | X039,1547,2,1,0
41 | X040,1740,2,1,0
42 | X041,1312,2,1,0
43 | X042,1517,4,1,0
44 | X043,1120,2,1,0
45 | X044,1987,4,1,0
46 | X045,1834,4,1,0
47 | X046,1138,4,1,0
48 | X047,1379,2,1,0
49 | X048,1847,2,1,0
50 | X049,1642,3,1,0
51 | X050,1373,2,1,0
52 | X051,1570,5,1,0
53 | X052,1112,2,1,0
54 | X053,1735,2,1,0
55 | X054,1675,3,1,0
56 | X055,1690,4,1,0
57 | X056,1309,2,1,0
58 | X057,1410,2,1,0
59 | X058,1660,2,1,1
60 | X059,1135,2,1,0
61 | X060,1893,2,1,0
62 | X061,1842,3,0,0
63 | X062,1163,2,1,0
64 | X063,1751,1,1,0
65 | X064,1240,2,1,0
66 | X065,1369,2,1,0
67 | X066,1920,2,1,1
68 | X067,1546,4,1,0
69 | X068,1414,2,1,0
70 | X069,1149,2,1,0
71 | X070,1364,2,1,0
72 | X071,1426,3,1,0
73 | X072,1614,4,1,0
74 | X073,1612,2,1,0
75 | X074,1175,2,1,0
76 | X075,1717,4,1,0
77 | X076,1777,2,1,0
78 | X077,1175,5,1,0
79 | X078,1286,2,1,0
80 | X079,1466,2,1,0
81 | X080,1838,2,1,0
82 | X081,1568,2,1,0
83 | X082,1661,3,1,0
84 | X083,1988,2,1,0
85 | X084,1588,2,1,0
86 | X085,1773,2,1,0
87 | X086,1850,2,1,0
88 | X087,1201,2,1,0
89 | X088,1398,2,1,0
90 | X089,1156,2,1,0
91 | X090,1491,4,1,0
92 | X091,1200,2,1,0
93 | X092,1196,2,1,1
94 | X093,1771,2,1,0
95 | X094,1353,2,1,0
96 | X095,1774,4,1,0
97 | X096,1814,3,1,0
98 | X097,1964,2,1,0
99 | X098,1907,3,1,0
100 | X099,1910,2,1,0
101 | X100,1574,2,1,0
102 | X101,1264,4,1,0
103 | X102,1699,5,1,0
104 | X103,1776,2,1,0
105 | X104,1846,3,1,0
106 | X105,1529,4,1,0
107 | X106,1146,2,1,0
108 | X107,1902,1,0,0
109 | X108,1890,2,1,0
110 | X109,1457,4,1,0
111 | X110,1801,4,1,0
112 | X111,1528,2,1,0
113 | X112,1376,2,1,0
114 | X113,1654,4,1,0
115 | X114,1576,2,1,0
116 | X115,1244,4,1,0
117 | X116,1785,2,1,0
118 | X117,1785,2,1,0
119 | X118,1397,4,1,0
120 | X119,1930,5,1,0
121 | X120,1123,4,1,0
122 | X121,1910,2,1,0
123 | X122,1265,4,1,0
124 | X123,1456,2,1,0
125 | X124,1332,2,1,0
126 | X125,1138,4,1,0
127 | X126,1621,2,1,0
128 | X127,1234,5,1,0
129 | X128,1146,2,1,0
130 | X129,1688,2,1,0
131 | X130,1449,2,1,0
132 | X131,1250,4,1,1
133 | X132,1843,3,1,1
134 | X133,1409,4,1,0
135 | X134,1653,2,1,0
136 | X135,1318,2,1,0
137 | X136,1716,2,1,0
138 | X137,1257,2,1,0
139 | X138,1710,3,1,0
140 | X139,1250,3,1,0
141 | X140,1473,2,1,0
142 | X141,1706,4,1,0
143 | X142,1169,4,1,0
144 | X143,1488,4,1,0
145 | X144,1541,2,1,0
146 | X145,1120,2,1,0
147 | X146,1183,2,1,0
148 | X147,1382,1,1,1
149 | X148,1495,2,0,0
150 | X149,1143,2,1,0
151 | X150,1517,2,1,0
152 | X151,1147,2,1,0
153 | X152,1902,3,1,0
154 | X153,1176,2,1,0
155 | X154,1312,3,1,0
156 | X155,1294,4,1,0
157 | X156,1316,2,1,0
158 | X157,1239,2,1,0
159 | X158,1363,4,1,0
160 | X159,1689,2,1,0
161 | X160,1994,2,1,0
162 | X161,1663,2,1,0
163 | X162,1189,2,1,0
164 | X163,1749,2,1,0
165 | X164,1778,4,1,0
166 | X165,1112,2,1,0
167 | X166,1492,5,1,0
168 | X167,1923,2,1,0
169 | X168,1267,4,1,0
170 | X169,1545,2,1,0
171 | X170,1312,5,1,0
172 | X171,1998,2,1,0
173 | X172,1401,2,1,0
174 | X173,1876,3,1,0
175 | X174,1535,2,0,0
176 | X175,1688,3,1,0
177 | X176,1240,2,1,0
178 | X177,1968,2,1,0
179 | X178,1858,5,1,0
180 | X179,1832,4,1,0
181 | X180,1862,4,1,0
182 | X181,1475,4,1,0
183 | X182,1497,3,1,0
184 | X183,1926,2,1,0
185 | X184,1787,4,1,0
186 | X185,1959,2,1,0
187 | X186,1768,2,1,0
188 | X187,1118,2,1,1
189 | X188,1186,2,1,0
190 | X189,1815,4,0,1
191 | X190,1172,2,1,0
192 | X191,1215,2,1,0
193 | X192,1577,2,1,0
194 | X193,1874,4,1,0
195 | X194,1288,1,1,0
196 | X195,1984,4,1,0
197 | X196,1767,5,1,0
198 | X197,1820,2,1,0
199 | X198,1768,4,1,0
200 | X199,1449,4,1,0
201 | X200,1197,2,1,0
202 | X201,1789,4,1,0
203 | X202,1636,3,1,0
204 | X203,1170,2,1,0
205 | X204,1816,2,0,0
206 | X205,1678,4,1,0
207 | X206,1139,2,1,0
208 | X207,1982,3,1,0
209 | X208,1552,2,1,0
210 | X209,1230,3,1,0
211 | X210,1994,2,1,0
212 | X211,1751,2,1,0
213 | X212,1176,4,1,0
214 | X213,1335,2,1,0
215 | X214,1339,1,1,0
216 | X215,1584,4,1,0
217 | X216,1169,2,1,0
218 | X217,1630,2,1,0
219 | X218,1894,4,1,0
220 | X219,1356,2,1,0
221 | X220,1715,2,1,0
222 | X221,1733,2,1,0
223 | X222,1463,4,1,0
224 | X223,1109,2,1,0
225 | X224,1157,3,1,0
226 | X225,1123,3,1,0
227 | X226,1395,5,1,0
228 | X227,1834,4,1,0
229 | X228,1906,2,1,0
230 | X229,1127,2,1,1
231 | X230,1240,2,1,0
232 | X231,1217,4,1,0
233 | X232,1989,4,1,0
234 | X233,1946,4,1,0
235 | X234,1493,2,1,0
236 | X235,1206,4,1,0
237 | X236,1306,2,1,0
238 | X237,1365,3,1,0
239 | X238,1326,2,1,0
240 | X239,1704,2,1,0
241 | X240,1587,4,1,0
242 | X241,1837,4,1,0
243 | X242,1320,2,1,0
244 | X243,1540,2,1,0
245 | X244,1460,2,1,0
246 | X245,1828,4,1,0
247 | X246,1286,2,1,1
248 | X247,1805,3,1,0
249 | X248,1830,4,1,0
250 | X249,1396,4,1,0
251 | X250,1564,3,1,0
252 | X251,1238,4,1,0
253 | X252,1848,2,1,0
254 | X253,1194,2,1,1
255 | X254,1365,4,1,0
256 | X255,1781,4,1,0
257 | X256,1274,2,1,0
258 | X257,1798,4,1,0
259 | X258,1539,2,1,1
260 | X259,1422,4,1,0
261 | X260,1359,2,1,0
262 | X261,1163,4,1,0
263 | X262,1448,3,1,0
264 | X263,1105,2,1,0
265 | X264,1244,2,1,1
266 | X265,1722,2,1,0
267 | X266,1227,4,1,1
268 | X267,1656,2,1,0
269 | X268,1766,4,1,0
270 | X269,1320,2,1,0
271 | X270,1960,2,1,0
272 | X271,1726,3,1,0
273 | X272,1706,2,1,0
274 | X273,1650,5,1,0
275 | X274,1817,2,1,0
276 | X275,1988,2,1,0
277 | X276,1351,4,1,0
278 | X277,1249,3,1,0
279 | X278,1191,2,1,0
280 | X279,1503,2,1,0
281 | X280,1908,2,1,0
282 | X281,1353,1,1,0
283 | X282,1738,2,1,0
284 | X283,1925,2,1,0
285 | X284,1789,5,1,0
286 | X285,1228,2,1,0
287 | X286,1893,2,1,0
288 | X287,1441,2,1,0
289 | X288,1158,3,1,0
290 | X289,1601,2,1,1
291 | X290,1474,2,1,0
292 | X291,1352,5,1,1
293 | X292,1271,3,1,0
294 | X293,1693,5,1,0
295 | X294,1329,2,1,0
296 | X295,1464,4,1,0
297 | X296,1222,2,1,0
298 | X297,1205,2,1,0
299 | X298,1959,3,1,1
300 | X299,1511,2,1,1
301 | X300,1696,4,1,0
302 | X301,1662,2,1,0
303 | X302,1936,4,1,0
304 | X303,1324,2,1,0
305 | X304,1359,4,1,0
306 | X305,1142,4,1,0
307 | X306,1403,2,1,1
308 | X307,1499,2,1,0
309 | X308,1679,2,1,0
310 | X309,1184,2,1,0
311 | X310,1258,2,1,0
312 | X311,1927,2,1,0
313 | X312,1387,3,1,1
314 | X313,1172,2,1,0
315 | X314,1919,4,1,0
316 | X315,1192,4,1,0
317 | X316,1729,2,1,0
318 | X317,1244,2,1,0
319 | X318,1747,4,1,0
320 | X319,1375,4,1,0
321 | X320,1731,2,1,0
322 | X321,1278,2,1,0
323 | X322,1701,4,1,0
324 | X323,1599,2,1,0
325 | X324,1515,1,1,0
326 | X325,1140,2,1,0
327 | X326,1768,2,1,0
328 | X327,1150,4,1,0
329 | X328,1123,4,1,0
330 | X329,1958,2,1,0
331 | X330,1720,4,1,0
332 | X331,1922,3,1,1
333 | X332,1705,4,1,1
334 | X333,1107,4,1,0
335 | X334,1826,2,1,0
336 | X335,1722,2,1,0
337 | X336,1849,2,1,0
338 | X337,1995,2,1,0
339 | X338,1224,2,1,0
340 | X339,1878,2,1,0
341 | X340,1772,1,1,0
342 | X341,1564,2,1,0
343 | X342,1357,2,1,0
344 | X343,1592,2,1,0
345 | X344,1725,4,1,0
346 | X345,1439,5,1,0
347 | X346,1650,2,1,0
348 | X347,1662,2,1,0
349 | X348,1711,2,1,0
350 | X349,1920,2,1,0
351 | X350,1187,2,1,0
352 | X351,1602,2,1,0
353 | X352,1732,4,1,0
354 | X353,1713,2,1,0
355 | X354,1559,2,1,0
356 | X355,1518,2,1,0
357 | X356,1604,2,1,0
358 | X357,1308,4,1,0
359 | X358,1874,5,1,0
360 | X359,1270,3,1,0
361 | X360,1490,2,1,0
362 | X361,1166,2,1,0
363 | X362,1187,4,1,0
364 | X363,1362,2,1,0
365 | X364,1948,4,1,0
366 | X365,1721,2,1,0
367 | X366,1295,3,1,0
368 | X367,1339,1,1,0
369 | X368,1745,2,1,0
370 | X369,1298,2,1,0
371 | X370,1178,2,1,0
372 | X371,1859,2,1,0
373 | X372,1750,4,1,0
374 | X373,1566,2,1,0
375 | X374,1834,2,1,0
376 | X375,1942,2,1,0
377 | X376,1604,3,1,0
378 | X377,1593,4,1,0
379 | X378,1312,4,1,0
380 | X379,1332,5,1,0
381 | X380,1656,2,1,0
382 | X381,1366,2,1,0
383 | X382,1392,5,1,0
384 | X383,1504,2,1,0
385 | X384,1468,4,1,0
386 | X385,1963,2,1,0
387 | X386,1458,2,1,0
388 | X387,1816,2,1,0
389 | X388,1371,2,1,0
390 | X389,1898,4,1,0
391 | X390,1130,2,1,0
392 | X391,1359,2,1,0
393 | X392,1801,3,1,0
394 | X393,1641,2,1,0
395 | X394,1410,2,1,0
396 | X395,1423,5,1,0
397 | X396,1204,5,1,0
398 | X397,1371,2,1,0
399 | X398,1258,2,1,0
400 | X399,1692,4,1,0
401 | X400,1570,2,1,0
402 | X401,1834,5,1,0
403 | X402,1266,4,1,0
404 | X403,1571,3,1,1
405 | X404,1793,2,1,0
406 | X405,1731,2,1,0
407 | X406,1425,2,1,0
408 | X407,1263,2,1,0
409 | X408,1521,3,1,0
410 | X409,1830,2,1,0
411 | X410,1627,2,1,0
412 | X411,1962,2,1,0
413 | X412,1563,3,1,1
414 | X413,1966,1,1,0
415 | X414,1683,2,1,0
416 | X415,1494,3,1,0
417 | X416,1489,2,1,0
418 | X417,1834,1,1,0
419 | X418,1630,2,1,0
420 | X419,1914,3,1,1
421 | X420,1779,2,1,0
422 | X421,1252,3,1,0
423 | X422,1242,2,1,0
424 | X423,1257,2,1,0
425 | X424,1704,3,1,0
426 | X425,1964,5,1,0
427 | X426,1237,2,1,0
428 | X427,1425,2,1,0
429 | X428,1951,2,1,0
430 | X429,1822,2,1,0
431 | X430,1772,2,1,0
432 | X431,1630,4,1,0
433 | X432,1939,2,1,1
434 | X433,1587,2,1,0
435 | X434,1602,2,1,0
436 | X435,1627,2,1,0
437 | X436,1575,5,1,0
438 | X437,1993,2,1,0
439 | X438,1730,4,1,0
440 | X439,1389,2,1,1
441 | X440,1301,2,1,0
442 | X441,1236,4,1,0
443 | X442,1805,2,1,0
444 | X443,1495,2,1,0
445 | X444,1361,4,1,0
446 | X445,1583,3,1,0
447 | X446,1338,4,1,0
448 | X447,1170,3,1,0
449 | X448,1305,3,1,0
450 | X449,1561,2,1,0
451 | X450,1431,2,1,0
452 | X451,1162,2,1,0
453 | X452,1995,2,1,0
454 | X453,1419,2,1,0
455 | X454,1632,4,1,0
456 | X455,1939,2,1,0
457 | X456,1177,2,1,0
458 | X457,1324,3,1,0
459 | X458,1228,5,1,0
460 | X459,1846,5,1,0
461 | X460,1571,2,1,0
462 | X461,1607,2,1,0
463 | X462,1145,2,1,1
464 | X463,1209,2,1,0
465 | X464,1617,3,1,0
466 | X465,1128,2,1,0
467 | X466,1579,5,1,0
468 | X467,1896,4,1,0
469 | X468,1257,5,1,0
470 | X469,1821,2,1,0
471 | X470,1819,1,1,0
472 | X471,1383,1,1,0
473 | X472,1873,3,1,0
474 | X473,1755,2,1,0
475 | X474,1833,2,1,0
476 | X475,1418,1,1,0
477 | X476,1928,4,1,0
478 | X477,1564,2,1,0
479 | X478,1836,2,1,0
480 | X479,1708,4,1,0
481 | X480,1911,1,1,0
482 | X481,1831,5,1,0
483 | X482,1515,4,1,0
484 | X483,1190,2,1,0
485 | X484,1602,2,1,0
486 | X485,1738,2,1,0
487 | X486,1487,2,1,0
488 | X487,1897,4,1,0
489 | X488,1122,2,1,0
490 | X489,1865,3,1,0
491 | X490,1979,3,1,0
492 | X491,1201,2,1,0
493 | X492,1700,2,1,0
494 | X493,1413,2,1,0
495 | X494,1890,4,1,0
496 | X495,1315,1,1,0
497 | X496,1304,2,1,0
498 | X497,1214,2,1,0
499 | X498,1219,3,1,0
500 | X499,1459,4,1,0
501 | X500,1899,4,1,0
502 | X501,1581,2,1,0
503 | X502,1438,2,1,0
504 | X503,1856,2,1,0
505 | X504,1295,2,1,0
506 | X505,1724,3,1,1
507 | X506,1398,2,1,0
508 | X507,1774,4,1,0
509 | X508,1309,2,1,0
510 | X509,1505,2,1,0
511 | X510,1822,2,1,0
512 | X511,1481,4,1,0
513 | X512,1874,3,1,0
514 | X513,1563,1,1,0
515 | X514,1285,2,1,0
516 | X515,1786,4,1,1
517 | X516,1901,2,1,0
518 | X517,1135,1,1,0
519 | X518,1843,4,1,0
520 | X519,1340,1,1,0
521 | X520,1170,2,1,1
522 | X521,1552,4,1,0
523 | X522,1524,2,1,0
524 | X523,1697,2,1,0
525 | X524,1294,4,1,0
526 | X525,1329,4,1,0
527 | X526,1843,2,1,0
528 | X527,1367,2,1,0
529 | X528,1581,2,1,0
530 | X529,1132,2,1,0
531 | X530,1297,2,1,0
532 | X531,1851,4,1,1
533 | X532,1395,4,1,0
534 | X533,1516,2,1,0
535 | X534,1925,2,1,0
536 | X535,1312,4,1,0
537 | X536,1662,3,1,0
538 | X537,1592,5,1,0
539 | X538,1948,4,1,0
540 | X539,1689,2,1,0
541 | X540,1115,2,1,0
542 | X541,1397,3,1,0
543 | X542,1373,4,1,0
544 | X543,1258,3,1,0
545 | X544,1806,3,1,0
546 | X545,1643,2,1,0
547 | X546,1450,2,1,0
548 | X547,1233,4,1,0
549 | X548,1389,2,1,0
550 | X549,1409,2,1,0
551 | X550,1151,5,1,0
552 | X551,1298,4,1,0
553 | X552,1200,2,1,0
554 | X553,1290,4,1,0
555 | X554,1118,1,1,0
556 | X555,1164,2,1,0
557 | X556,1327,2,1,0
558 | X557,1648,3,1,0
559 | X558,1151,4,1,0
560 | X559,1127,2,1,0
561 | X560,1877,3,1,0
562 | X561,1699,2,1,0
563 | X562,1457,4,1,0
564 | X563,1534,2,1,0
565 | X564,1440,2,1,0
566 | X565,1599,2,1,0
567 | X566,1393,2,1,0
568 | X567,1390,2,1,0
569 | X568,1555,4,1,0
570 | X569,1300,2,1,0
571 | X570,1814,2,1,0
572 | X571,1168,2,1,0
573 | X572,1565,2,1,0
574 | X573,1600,2,1,0
575 | X574,1613,2,1,0
576 | X575,1909,2,1,0
577 | X576,1371,2,1,0
578 | X577,1551,2,1,0
579 | X578,1761,4,1,0
580 | X579,1828,3,1,0
581 | X580,1820,2,1,0
582 | X581,1305,2,1,1
583 | X582,1844,4,1,0
584 | X583,1739,2,1,0
585 | X584,1987,4,1,0
586 | X585,1993,2,1,0
587 | X586,1661,4,1,0
588 | X587,1667,4,1,0
589 | X588,1882,3,1,0
590 | X589,1898,4,1,0
591 | X590,1771,2,1,0
592 | X591,1868,3,1,0
593 | X592,1132,2,1,0
594 | X593,1374,5,1,0
595 | X594,1842,4,1,0
596 | X595,1316,2,1,0
597 | X596,1275,1,1,0
598 | X597,1992,4,1,0
599 | X598,1353,2,1,1
600 | X599,1160,2,1,0
601 | X600,1542,4,1,0
602 | X601,1882,2,1,0
603 | X602,1283,4,1,0
604 | X603,1725,2,1,0
605 | X604,1110,2,1,0
606 | X605,1935,2,1,0
607 | X606,1483,2,1,1
608 | X607,1291,2,1,0
609 | X608,1797,4,1,0
610 | X609,1855,4,1,0
611 | X610,1562,4,1,0
612 | X611,1274,4,1,0
613 | X612,1468,3,1,0
614 | X613,1419,3,1,0
615 | X614,1987,4,1,0
616 | X615,1752,2,1,0
617 | X616,1295,2,1,0
618 | X617,1371,2,1,0
619 | X618,1865,4,1,1
620 | X619,1460,1,1,0
621 | X620,1479,2,1,0
622 | X621,1107,2,1,0
623 | X622,1824,3,1,0
624 | X623,1132,2,1,0
625 | X624,1434,1,1,0
626 | X625,1193,2,1,0
627 | X626,1187,4,1,0
628 | X627,1993,2,1,0
629 | X628,1872,4,1,0
630 | X629,1950,2,1,0
631 | X630,1658,4,1,0
632 | X631,1524,4,1,0
633 | X632,1665,5,1,0
634 | X633,1127,2,1,0
635 | X634,1334,2,1,0
636 | X635,1999,2,1,0
637 | X636,1452,3,1,0
638 | X637,1454,2,1,0
639 | X638,1688,4,1,0
640 | X639,1586,2,1,0
641 | X640,1303,2,1,0
642 | X641,1179,2,1,0
643 | X642,1371,2,1,0
644 | X643,1213,2,1,0
645 | X644,1105,3,1,0
646 | X645,1409,2,1,0
647 | X646,1540,2,1,0
648 | X647,1508,2,1,0
649 | X648,1842,5,1,0
650 | X649,1761,3,1,0
651 | X650,1103,2,1,0
652 | X651,1912,2,1,0
653 | X652,1329,1,1,0
654 | X653,1940,2,1,0
655 | X654,1218,2,1,0
656 | X655,1548,2,1,0
657 | X656,1722,2,1,0
658 | X657,1527,2,1,0
659 | X658,1864,4,1,0
660 | X659,1407,2,1,0
661 | X660,1161,2,1,0
662 | X661,1301,2,1,0
663 | X662,1549,2,1,0
664 | X663,1396,1,1,1
665 | X664,1410,3,1,0
666 | X665,1297,1,1,0
667 | X666,1552,2,1,0
668 | X667,1150,2,1,0
669 | X668,1154,4,1,0
670 | X669,1307,3,1,0
671 | X670,1163,2,1,0
672 | X671,1914,2,1,0
673 | X672,1145,2,1,0
674 | X673,1780,2,1,0
675 | X674,1767,2,1,0
676 | X675,1871,4,1,0
677 | X676,1463,4,1,0
678 | X677,1642,4,1,0
679 | X678,1339,4,1,0
680 | X679,1446,2,1,0
681 | X680,1658,1,1,0
682 | X681,1339,2,1,0
683 | X682,1471,2,1,0
684 | X683,1424,2,1,0
685 | X684,1703,2,1,0
686 | X685,1358,2,1,0
687 | X686,1963,2,1,0
688 | X687,1124,3,1,0
689 | X688,1188,2,1,0
690 | X689,1611,2,1,0
691 | X690,1731,4,1,0
692 | X691,1497,2,1,0
693 | X692,1535,2,1,0
694 | X693,1840,3,1,0
695 | X694,1467,2,1,0
696 | X695,1771,2,1,0
697 | X696,1953,2,1,0
698 | X697,1946,4,1,0
699 | X698,1576,2,1,0
700 | X699,1417,3,1,0
701 | X700,1381,4,1,0
702 | X701,1714,2,1,0
703 | X702,1546,1,1,0
704 | X703,1468,2,1,0
705 | X704,1239,2,1,0
706 | X705,1782,2,1,0
707 | X706,1982,3,1,0
708 | X707,1601,3,1,0
709 | X708,1368,1,1,0
710 | X709,1425,4,1,0
711 | X710,1800,2,1,0
712 | X711,1615,3,1,0
713 | X712,1690,3,1,0
714 | X713,1820,3,1,0
715 | X714,1446,2,1,0
716 | X715,1750,2,1,0
717 | X716,1663,2,1,0
718 | X717,1498,2,1,0
719 | X718,1201,2,1,0
720 | X719,1669,2,1,0
721 | X720,1207,2,1,0
722 | X721,1513,3,1,0
723 | X722,1625,1,1,0
724 | X723,1825,2,1,0
725 | X724,1187,2,1,0
726 | X725,1622,3,1,0
727 | X726,1396,4,1,0
728 | X727,1200,2,1,0
729 | X728,1401,3,1,0
730 | X729,1933,2,1,0
731 | X730,1480,4,1,0
732 | X731,1462,2,1,0
733 | X732,1480,2,1,0
734 | X733,1529,2,1,0
735 | X734,1612,2,1,0
736 | X735,1366,2,1,0
737 | X736,1901,2,1,0
738 | X737,1650,2,1,0
739 | X738,1535,3,1,0
740 | X739,1326,2,1,0
741 | X740,1137,1,1,1
742 | X741,1767,2,1,0
743 | X742,1435,2,1,0
744 | X743,1568,2,1,0
745 | X744,1244,2,1,0
746 | X745,1316,5,1,0
747 | X746,1899,4,1,0
748 | X747,1343,2,1,0
749 | X748,1631,4,1,0
750 | X749,1745,1,1,0
751 | X750,1724,2,1,0
752 | X751,1437,4,1,1
753 | X752,1217,2,1,0
754 | X753,1551,2,1,0
755 | X754,1312,2,1,0
756 | X755,1202,1,1,0
757 | X756,1433,2,1,0
758 | X757,1191,2,1,0
759 | X758,1892,2,1,0
760 | X759,1128,2,1,0
761 | X760,1910,2,1,0
762 | X761,1668,1,1,0
763 | X762,1385,2,1,1
764 | X763,1829,2,1,0
765 | X764,1297,4,1,0
766 | X765,1657,2,1,0
767 | X766,1535,1,1,0
768 | X767,1895,3,1,0
769 | X768,1980,2,1,0
770 | X769,1974,2,1,0
771 | X770,1391,2,1,0
772 | X771,1482,2,1,0
773 | X772,1147,4,1,0
774 | X773,1567,2,1,0
775 | X774,1866,2,1,0
776 | X775,1874,2,1,0
777 | X776,1169,2,1,0
778 | X777,1612,3,1,0
779 | X778,1646,2,1,0
780 | X779,1198,3,1,0
781 | X780,1537,2,1,0
782 | X781,1221,2,1,0
783 | X782,1760,3,1,0
784 | X783,1398,2,1,0
785 | X784,1518,2,1,0
786 | X785,1716,5,1,0
787 | X786,1550,4,1,0
788 | X787,1958,2,1,0
789 | X788,1335,2,1,0
790 | X789,1667,4,1,0
791 | X790,1375,4,1,0
792 | X791,1191,4,1,0
793 | X792,1669,2,1,0
794 | X793,1890,2,1,0
795 | X794,1979,4,1,0
796 | X795,1756,3,1,0
797 | X796,1908,2,1,0
798 | X797,1864,1,1,0
799 | X798,1968,1,1,0
800 | X799,1931,2,1,0
801 | X800,1825,2,1,0
802 | X801,1361,4,1,0
803 | X802,1287,3,1,0
804 | X803,1382,2,1,0
805 | X804,1846,3,1,0
806 | X805,1984,2,1,0
807 | X806,1351,4,1,0
808 | X807,1381,2,1,0
809 | X808,1506,2,1,0
810 | X809,1174,2,1,0
811 | X810,1658,1,1,0
812 | X811,1947,3,1,0
813 | X812,1428,2,1,0
814 | X813,1923,2,1,0
815 | X814,1457,2,1,0
816 | X815,1904,4,1,0
817 | X816,1104,2,1,0
818 | X817,1261,5,1,0
819 | X818,1219,4,1,1
820 | X819,1424,2,1,0
821 | X820,1328,2,1,0
822 | X821,1899,2,1,0
823 | X822,1505,3,1,0
824 | X823,1167,3,1,0
825 | X824,1453,2,1,0
826 | X825,1779,2,1,0
827 | X826,1544,5,1,0
828 | X827,1570,2,1,0
829 | X828,1825,2,1,0
830 | X829,1998,3,1,1
831 | X830,1733,2,1,0
832 | X831,1452,4,1,0
833 | X832,1102,5,1,0
834 | X833,1862,2,1,0
835 | X834,1357,2,1,0
836 | X835,1192,2,1,1
837 | X836,1364,3,1,0
838 | X837,1272,3,1,0
839 | X838,1837,2,1,0
840 | X839,1384,2,1,0
841 | X840,1537,2,1,0
842 | X841,1462,2,1,0
843 | X842,1275,3,1,0
844 | X843,1683,2,1,0
845 | X844,1561,2,1,0
846 | X845,1841,2,1,0
847 | X846,1496,2,1,0
848 | X847,1788,2,1,0
849 | X848,1473,2,1,1
850 | X849,1548,4,1,0
851 | X850,1233,2,1,0
852 | X851,1411,2,1,0
853 | X852,1961,2,1,0
854 | X853,1519,2,1,0
855 | X854,1983,2,1,0
856 | X855,1261,2,1,0
857 | X856,1493,2,1,0
858 | X857,1888,3,1,0
859 | X858,1208,2,1,0
860 | X859,1677,2,1,0
861 | X860,1114,2,1,0
862 | X861,1478,2,1,0
863 | X862,1867,2,1,0
864 | X863,1221,3,1,0
865 | X864,1344,2,1,0
866 | X865,1682,4,1,0
867 | X866,1278,2,1,0
868 | X867,1662,2,1,0
869 | X868,1407,2,1,0
870 | X869,1495,2,1,0
871 | X870,1918,3,1,0
872 | X871,1459,2,1,0
873 | X872,1235,3,1,0
874 | X873,1399,2,1,0
875 | X874,1944,2,1,0
876 | X875,1125,5,1,0
877 | X876,1358,2,1,0
878 | X877,1272,2,1,0
879 | X878,1404,4,1,0
880 | X879,1499,2,1,0
881 | X880,1801,4,1,0
882 | X881,1274,3,1,0
883 | X882,1704,2,1,0
884 | X883,1216,2,1,0
885 | X884,1904,2,1,0
886 | X885,1203,2,1,0
887 | X886,1334,4,1,0
888 | X887,1874,2,1,0
889 | X888,1570,5,1,0
890 | X889,1493,2,1,0
891 | X890,1148,4,1,0
892 | X891,1542,2,1,0
893 | X892,1979,2,1,0
894 | X893,1736,4,1,0
895 | X894,1279,3,1,0
896 | X895,1437,4,1,0
897 | X896,1805,2,1,0
898 | X897,1577,1,1,0
899 | X898,1481,2,1,0
900 | X899,1385,4,1,1
901 | X900,1309,2,1,0
902 | X901,1369,2,1,0
903 | X902,1572,2,1,0
904 | X903,1947,3,1,0
905 | X904,1688,2,1,0
906 | X905,1293,2,1,0
907 | X906,1368,2,1,0
908 | X907,1936,4,1,0
909 | X908,1200,2,1,0
910 | X909,1431,2,1,0
911 | X910,1299,2,1,0
912 | X911,1368,4,1,0
913 | X912,1268,2,1,0
914 | X913,1977,2,1,0
915 | X914,1580,2,1,0
916 | X915,1912,3,1,0
917 | X916,1188,2,1,0
918 | X917,1252,2,1,0
919 | X918,1347,2,1,0
920 | X919,1310,3,1,0
921 | X920,1842,2,1,0
922 | X921,1835,4,1,0
923 | X922,1301,2,1,1
924 | X923,1334,2,1,0
925 | X924,1697,4,1,0
926 | X925,1849,2,1,0
927 | X926,1456,2,1,0
928 | X927,1358,4,1,0
929 | X928,1626,4,1,0
930 | X929,1698,2,1,0
931 | X930,1324,1,1,0
932 | X931,1879,2,1,0
933 | X932,1535,2,1,0
934 | X933,1894,4,1,0
935 | X934,1478,2,1,0
936 | X935,1220,2,1,0
937 | X936,1907,1,1,0
938 | X937,1868,4,1,0
939 | X938,1143,2,1,0
940 | X939,1488,3,1,0
941 | X940,1162,2,1,0
942 | X941,1672,3,1,0
943 | X942,1841,2,1,0
944 | X943,1117,2,1,0
945 | X944,1770,4,1,0
946 | X945,1894,2,1,0
947 | X946,1849,2,1,1
948 | X947,1583,4,1,0
949 | X948,1720,4,1,0
950 | X949,1437,2,1,0
951 | X950,1143,5,1,0
952 | X951,1294,4,1,0
953 | X952,1625,4,1,0
954 | X953,1205,5,1,0
955 | X954,1171,2,1,1
956 | X955,1795,4,1,0
957 | X956,1993,2,1,0
958 | X957,1304,2,1,0
959 | X958,1826,2,1,0
960 | X959,1838,3,1,0
961 | X960,1664,4,1,0
962 | X961,1838,1,1,0
963 | X962,1448,2,1,0
964 | X963,1237,4,1,0
965 | X964,1872,2,1,0
966 | X965,1790,4,1,0
967 | X966,1974,2,1,0
968 | X967,1694,2,1,0
969 | X968,1245,2,1,0
970 | X969,1560,2,1,0
971 | X970,1628,3,1,0
972 | X971,1731,5,1,0
973 | X972,1877,2,1,0
974 | X973,1488,3,1,0
975 | X974,1276,5,1,0
976 | X975,1882,4,1,0
--------------------------------------------------------------------------------
/dev-edition-app/resources/dashboards/voltdb/voltdb-ttl.json:
--------------------------------------------------------------------------------
1 | {
2 | "annotations": {
3 | "list": [
4 | {
5 | "builtIn": 1,
6 | "datasource": {
7 | "type": "grafana",
8 | "uid": "-- Grafana --"
9 | },
10 | "enable": true,
11 | "hide": true,
12 | "iconColor": "rgba(0, 211, 255, 1)",
13 | "name": "Annotations & Alerts",
14 | "type": "dashboard"
15 | }
16 | ]
17 | },
18 | "editable": true,
19 | "fiscalYearStartMonth": 0,
20 | "graphTooltip": 0,
21 | "id": 11,
22 | "links": [],
23 | "liveNow": false,
24 | "panels": [
25 | {
26 | "collapsed": false,
27 | "gridPos": {
28 | "h": 1,
29 | "w": 24,
30 | "x": 0,
31 | "y": 0
32 | },
33 | "id": 1,
34 | "panels": [],
35 | "title": "Overview",
36 | "type": "row"
37 | },
38 | {
39 | "datasource": {
40 | "type": "prometheus",
41 | "uid": "prometheus"
42 | },
43 | "fieldConfig": {
44 | "defaults": {
45 | "color": {
46 | "mode": "thresholds"
47 | },
48 | "custom": {
49 | "align": "auto",
50 | "cellOptions": {
51 | "type": "auto"
52 | },
53 | "inspect": false
54 | },
55 | "mappings": [],
56 | "thresholds": {
57 | "mode": "absolute",
58 | "steps": [
59 | {
60 | "color": "green",
61 | "value": null
62 | }
63 | ]
64 | },
65 | "unit": "string"
66 | },
67 | "overrides": [
68 | {
69 | "matcher": {
70 | "id": "byName",
71 | "options": "Value"
72 | },
73 | "properties": [
74 | {
75 | "id": "unit",
76 | "value": "dateTimeFromNow"
77 | }
78 | ]
79 | }
80 | ]
81 | },
82 | "gridPos": {
83 | "h": 5,
84 | "w": 12,
85 | "x": 0,
86 | "y": 1
87 | },
88 | "id": 18,
89 | "options": {
90 | "cellHeight": "sm",
91 | "footer": {
92 | "countRows": false,
93 | "fields": "",
94 | "reducer": [
95 | "sum"
96 | ],
97 | "show": false
98 | },
99 | "frameIndex": 2,
100 | "showHeader": true
101 | },
102 | "pluginVersion": "10.4.2",
103 | "targets": [
104 | {
105 | "datasource": {
106 | "type": "prometheus",
107 | "uid": "prometheus"
108 | },
109 | "editorMode": "code",
110 | "exemplar": false,
111 | "expr": "voltdb_ttl_last_execution_timestamp_seconds{namespace=\"$cluster\",host_name=~\"$host\", table_name=~\"$tableName\"} * 1000",
112 | "instant": true,
113 | "legendFormat": "{{table_name}}",
114 | "range": false,
115 | "refId": "A"
116 | }
117 | ],
118 | "title": "Last execution time",
119 | "transformations": [
120 | {
121 | "id": "seriesToRows",
122 | "options": {}
123 | },
124 | {
125 | "id": "organize",
126 | "options": {
127 | "excludeByName": {
128 | "Time": true
129 | },
130 | "indexByName": {},
131 | "renameByName": {
132 | "Metric": "Table Name",
133 | "Value": "Last execution time"
134 | }
135 | }
136 | }
137 | ],
138 | "type": "table"
139 | },
140 | {
141 | "datasource": {
142 | "type": "prometheus",
143 | "uid": "prometheus"
144 | },
145 | "description": "Rows deleted for all TTL tables",
146 | "fieldConfig": {
147 | "defaults": {
148 | "color": {
149 | "mode": "thresholds"
150 | },
151 | "mappings": [
152 | {
153 | "options": {
154 | "match": "null",
155 | "result": {
156 | "color": "green",
157 | "index": 0,
158 | "text": "0"
159 | }
160 | },
161 | "type": "special"
162 | }
163 | ],
164 | "thresholds": {
165 | "mode": "absolute",
166 | "steps": [
167 | {
168 | "color": "green",
169 | "value": null
170 | }
171 | ]
172 | }
173 | },
174 | "overrides": []
175 | },
176 | "gridPos": {
177 | "h": 5,
178 | "w": 4,
179 | "x": 12,
180 | "y": 1
181 | },
182 | "id": 14,
183 | "options": {
184 | "colorMode": "value",
185 | "graphMode": "area",
186 | "justifyMode": "auto",
187 | "orientation": "auto",
188 | "reduceOptions": {
189 | "calcs": [
190 | "range"
191 | ],
192 | "fields": "",
193 | "values": false
194 | },
195 | "showPercentChange": false,
196 | "textMode": "auto",
197 | "wideLayout": true
198 | },
199 | "pluginVersion": "10.4.2",
200 | "targets": [
201 | {
202 | "datasource": {
203 | "type": "prometheus",
204 | "uid": "prometheus"
205 | },
206 | "editorMode": "code",
207 | "exemplar": false,
208 | "expr": "sum(increase(voltdb_ttl_rows_deleted_total{namespace=~\"$cluster\", host_name=~\"$host\"}[$__range]))",
209 | "hide": false,
210 | "instant": false,
211 | "legendFormat": "__auto",
212 | "range": true,
213 | "refId": "B"
214 | }
215 | ],
216 | "title": "All Rows Deleted",
217 | "type": "stat"
218 | },
219 | {
220 | "datasource": {
221 | "type": "prometheus",
222 | "uid": "prometheus"
223 | },
224 | "fieldConfig": {
225 | "defaults": {
226 | "color": {
227 | "mode": "thresholds"
228 | },
229 | "mappings": [
230 | {
231 | "options": {
232 | "match": "null",
233 | "result": {
234 | "color": "green",
235 | "index": 0,
236 | "text": "0"
237 | }
238 | },
239 | "type": "special"
240 | }
241 | ],
242 | "min": 0,
243 | "thresholds": {
244 | "mode": "absolute",
245 | "steps": [
246 | {
247 | "color": "orange",
248 | "value": null
249 | },
250 | {
251 | "color": "#EAB839",
252 | "value": 1
253 | }
254 | ]
255 | },
256 | "unit": "none"
257 | },
258 | "overrides": []
259 | },
260 | "gridPos": {
261 | "h": 5,
262 | "w": 4,
263 | "x": 16,
264 | "y": 1
265 | },
266 | "id": 13,
267 | "options": {
268 | "colorMode": "value",
269 | "graphMode": "area",
270 | "justifyMode": "auto",
271 | "orientation": "auto",
272 | "reduceOptions": {
273 | "calcs": [
274 | "lastNotNull"
275 | ],
276 | "fields": "",
277 | "values": false
278 | },
279 | "showPercentChange": false,
280 | "textMode": "auto",
281 | "wideLayout": true
282 | },
283 | "pluginVersion": "10.4.2",
284 | "targets": [
285 | {
286 | "datasource": {
287 | "type": "prometheus",
288 | "uid": "prometheus"
289 | },
290 | "editorMode": "code",
291 | "expr": "sum by (table_name) (voltdb_ttl_failed_total{namespace=\"$cluster\",host_name=~\"$host\"})",
292 | "legendFormat": "__auto",
293 | "range": true,
294 | "refId": "A"
295 | }
296 | ],
297 | "title": "Failing tasks",
298 | "type": "stat"
299 | },
300 | {
301 | "datasource": {
302 | "type": "prometheus",
303 | "uid": "prometheus"
304 | },
305 | "description": "Rows remaining for all TTL tables",
306 | "fieldConfig": {
307 | "defaults": {
308 | "color": {
309 | "mode": "thresholds"
310 | },
311 | "mappings": [],
312 | "thresholds": {
313 | "mode": "absolute",
314 | "steps": [
315 | {
316 | "color": "green",
317 | "value": null
318 | }
319 | ]
320 | }
321 | },
322 | "overrides": []
323 | },
324 | "gridPos": {
325 | "h": 5,
326 | "w": 4,
327 | "x": 20,
328 | "y": 1
329 | },
330 | "id": 15,
331 | "options": {
332 | "colorMode": "value",
333 | "graphMode": "area",
334 | "justifyMode": "auto",
335 | "orientation": "auto",
336 | "reduceOptions": {
337 | "calcs": [],
338 | "fields": "",
339 | "values": false
340 | },
341 | "showPercentChange": false,
342 | "textMode": "auto",
343 | "wideLayout": true
344 | },
345 | "pluginVersion": "10.4.2",
346 | "targets": [
347 | {
348 | "datasource": {
349 | "type": "prometheus",
350 | "uid": "prometheus"
351 | },
352 | "editorMode": "code",
353 | "expr": "sum (voltdb_ttl_rows_remaining_total{namespace=\"$cluster\",host_name=~\"$host\"})",
354 | "hide": false,
355 | "legendFormat": "__auto",
356 | "range": true,
357 | "refId": "B"
358 | }
359 | ],
360 | "title": "Remaining rows",
361 | "type": "stat"
362 | },
363 | {
364 | "datasource": {
365 | "type": "prometheus",
366 | "uid": "prometheus"
367 | },
368 | "description": "Number of deletes per second",
369 | "fieldConfig": {
370 | "defaults": {
371 | "color": {
372 | "mode": "palette-classic"
373 | },
374 | "custom": {
375 | "axisBorderShow": false,
376 | "axisCenteredZero": false,
377 | "axisColorMode": "text",
378 | "axisLabel": "",
379 | "axisPlacement": "auto",
380 | "barAlignment": 0,
381 | "drawStyle": "line",
382 | "fillOpacity": 0,
383 | "gradientMode": "none",
384 | "hideFrom": {
385 | "legend": false,
386 | "tooltip": false,
387 | "viz": false
388 | },
389 | "insertNulls": false,
390 | "lineInterpolation": "linear",
391 | "lineWidth": 1,
392 | "pointSize": 5,
393 | "scaleDistribution": {
394 | "type": "linear"
395 | },
396 | "showPoints": "auto",
397 | "spanNulls": false,
398 | "stacking": {
399 | "group": "A",
400 | "mode": "none"
401 | },
402 | "thresholdsStyle": {
403 | "mode": "off"
404 | }
405 | },
406 | "mappings": [],
407 | "thresholds": {
408 | "mode": "absolute",
409 | "steps": [
410 | {
411 | "color": "green",
412 | "value": null
413 | }
414 | ]
415 | },
416 | "unit": "ops"
417 | },
418 | "overrides": []
419 | },
420 | "gridPos": {
421 | "h": 8,
422 | "w": 24,
423 | "x": 0,
424 | "y": 6
425 | },
426 | "id": 16,
427 | "options": {
428 | "legend": {
429 | "calcs": [],
430 | "displayMode": "table",
431 | "placement": "bottom",
432 | "showLegend": true
433 | },
434 | "tooltip": {
435 | "mode": "single",
436 | "sort": "none"
437 | }
438 | },
439 | "targets": [
440 | {
441 | "datasource": {
442 | "type": "prometheus",
443 | "uid": "prometheus"
444 | },
445 | "editorMode": "code",
446 | "expr": "rate(voltdb_ttl_rows_deleted_total{namespace=\"$cluster\",host_name=~\"$host\", table_name=~\"$tableName\"}[$__rate_interval])",
447 | "legendFormat": "{{table_name}}",
448 | "range": true,
449 | "refId": "A"
450 | }
451 | ],
452 | "title": "Rows deleted by table name",
453 | "type": "timeseries"
454 | },
455 | {
456 | "datasource": {
457 | "type": "prometheus",
458 | "uid": "prometheus"
459 | },
460 | "fieldConfig": {
461 | "defaults": {
462 | "color": {
463 | "mode": "palette-classic"
464 | },
465 | "custom": {
466 | "axisBorderShow": false,
467 | "axisCenteredZero": false,
468 | "axisColorMode": "text",
469 | "axisLabel": "",
470 | "axisPlacement": "auto",
471 | "barAlignment": 0,
472 | "drawStyle": "line",
473 | "fillOpacity": 0,
474 | "gradientMode": "none",
475 | "hideFrom": {
476 | "legend": false,
477 | "tooltip": false,
478 | "viz": false
479 | },
480 | "insertNulls": false,
481 | "lineInterpolation": "linear",
482 | "lineWidth": 1,
483 | "pointSize": 5,
484 | "scaleDistribution": {
485 | "type": "linear"
486 | },
487 | "showPoints": "auto",
488 | "spanNulls": false,
489 | "stacking": {
490 | "group": "A",
491 | "mode": "none"
492 | },
493 | "thresholdsStyle": {
494 | "mode": "off"
495 | }
496 | },
497 | "mappings": [
498 | {
499 | "options": {
500 | "match": "null",
501 | "result": {
502 | "index": 0,
503 | "text": "0"
504 | }
505 | },
506 | "type": "special"
507 | }
508 | ],
509 | "thresholds": {
510 | "mode": "absolute",
511 | "steps": [
512 | {
513 | "color": "green",
514 | "value": null
515 | }
516 | ]
517 | }
518 | },
519 | "overrides": []
520 | },
521 | "gridPos": {
522 | "h": 8,
523 | "w": 24,
524 | "x": 0,
525 | "y": 14
526 | },
527 | "id": 17,
528 | "options": {
529 | "legend": {
530 | "calcs": [],
531 | "displayMode": "list",
532 | "placement": "bottom",
533 | "showLegend": true
534 | },
535 | "tooltip": {
536 | "mode": "single",
537 | "sort": "none"
538 | }
539 | },
540 | "targets": [
541 | {
542 | "datasource": {
543 | "type": "prometheus",
544 | "uid": "prometheus"
545 | },
546 | "editorMode": "code",
547 | "expr": "rate(voltdb_ttl_failed_total{namespace=\"$cluster\",host_name=~\"$host\", table_name=~\"$tableName\"}[$__rate_interval])",
548 | "legendFormat": "{{table_name}}",
549 | "range": true,
550 | "refId": "A"
551 | }
552 | ],
553 | "title": "Failures by table name",
554 | "type": "timeseries"
555 | }
556 | ],
557 | "refresh": "30s",
558 | "schemaVersion": 39,
559 | "tags": [],
560 | "templating": {
561 | "list": [
562 | {
563 | "current": {
564 | "selected": false,
565 | "text": "prometheus",
566 | "value": "prometheus"
567 | },
568 | "hide": 2,
569 | "includeAll": false,
570 | "label": "datasource",
571 | "multi": false,
572 | "name": "datasource",
573 | "options": [],
574 | "query": "prometheus",
575 | "queryValue": "",
576 | "refresh": 1,
577 | "regex": "",
578 | "skipUrlSync": false,
579 | "type": "datasource"
580 | },
581 | {
582 | "datasource": {
583 | "type": "prometheus",
584 | "uid": "prometheus"
585 | },
586 | "definition": "label_values(namespace)",
587 | "hide": 0,
588 | "includeAll": false,
589 | "label": "Cluster",
590 | "multi": false,
591 | "name": "cluster",
592 | "options": [],
593 | "query": {
594 | "query": "label_values(namespace)",
595 | "refId": "PrometheusVariableQueryEditor-VariableQuery"
596 | },
597 | "refresh": 1,
598 | "regex": "",
599 | "skipUrlSync": false,
600 | "sort": 0,
601 | "type": "query"
602 | },
603 | {
604 | "allValue": ".*",
605 | "current": {
606 | "selected": false,
607 | "text": "All",
608 | "value": "$__all"
609 | },
610 | "datasource": {
611 | "type": "prometheus",
612 | "uid": "prometheus"
613 | },
614 | "definition": "label_values({namespace=\"$cluster\"},host_name)",
615 | "hide": 0,
616 | "includeAll": true,
617 | "label": "Host",
618 | "multi": false,
619 | "name": "host",
620 | "options": [],
621 | "query": {
622 | "query": "label_values({namespace=\"$cluster\"},host_name)",
623 | "refId": "PrometheusVariableQueryEditor-VariableQuery"
624 | },
625 | "refresh": 2,
626 | "regex": "",
627 | "skipUrlSync": false,
628 | "sort": 0,
629 | "type": "query"
630 | },
631 | {
632 | "allValue": ".*",
633 | "current": {
634 | "selected": false,
635 | "text": "All",
636 | "value": "$__all"
637 | },
638 | "datasource": {
639 | "type": "prometheus",
640 | "uid": "prometheus"
641 | },
642 | "definition": "label_values({namespace=\"$cluster\", host_name=~\"$host\"},table_name)",
643 | "hide": 0,
644 | "includeAll": true,
645 | "label": "Table name",
646 | "multi": false,
647 | "name": "tableName",
648 | "options": [],
649 | "query": {
650 | "query": "label_values({namespace=\"$cluster\", host_name=~\"$host\"},table_name)",
651 | "refId": "PrometheusVariableQueryEditor-VariableQuery"
652 | },
653 | "refresh": 2,
654 | "regex": "",
655 | "skipUrlSync": false,
656 | "sort": 0,
657 | "type": "query"
658 | }
659 | ]
660 | },
661 | "time": {
662 | "from": "now-3h",
663 | "to": "now"
664 | },
665 | "timepicker": {},
666 | "timezone": "",
667 | "title": "VoltDB TTL",
668 | "uid": "f637c19a-f7db-4a75-984d-1a77ee372b5a",
669 | "version": 1,
670 | "weekStart": ""
671 | }
--------------------------------------------------------------------------------