You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ap...@apache.org on 2020/03/06 23:52:53 UTC
[incubator-pinot] 04/05: full front and backend support with
dedicated db server
This is an automated email from the ASF dual-hosted git repository.
apucher pushed a commit to branch docker-pinot-quickstart-thirdeye
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit e06129d4708e795df6784ddec74a46e4f97d0212
Author: Alexander Pucher <al...@alexpucher.com>
AuthorDate: Tue Mar 3 15:50:02 2020 -0800
full front and backend support with dedicated db server
---
docker/images/pinot-thirdeye/bin/start-thirdeye.sh | 21 ++++++++++++++-------
...-config.yml => data-sources-config-backend.yml} | 2 +-
...config.yml => data-sources-config-frontend.yml} | 0
.../anomaly-functions/anomalyClassifier.properties | 0
.../config/ephemeral/persistence.yml | 2 +-
.../config/pinot-quickstart/dashboard.yml | 2 +-
.../anomaly-functions/anomalyClassifier.properties | 0
.../config/pinot-quickstart/detector.yml | 12 ++++++------
.../config/pinot-quickstart/h2db.mv.db | Bin 2949120 -> 0 bytes
.../config/pinot-quickstart/persistence.yml | 2 +-
10 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/docker/images/pinot-thirdeye/bin/start-thirdeye.sh b/docker/images/pinot-thirdeye/bin/start-thirdeye.sh
index de43e25..08b30e7 100755
--- a/docker/images/pinot-thirdeye/bin/start-thirdeye.sh
+++ b/docker/images/pinot-thirdeye/bin/start-thirdeye.sh
@@ -20,18 +20,25 @@
if [[ "$#" -gt 0 ]]
then
- CONFIG_DIR=./config/$1
+ CONFIG_DIR="./config/$1"
else
CONFIG_DIR="./config/default"
fi
-echo "Running thirdeye backend with config: ${CONFIG_DIR}"
-java -cp "./bin/thirdeye-pinot-1.0-SNAPSHOT.jar" org.apache.pinot.thirdeye.anomaly.ThirdEyeAnomalyApplication ${CONFIG_DIR} &
+echo "Starting H2 database server"
+java -cp "./bin/thirdeye-pinot-1.0-SNAPSHOT.jar" org.h2.tools.Server -tcp -baseDir "${CONFIG_DIR}/.." &
+sleep 1
-sleep 30
-kill %1
+echo "Creating ThirdEye database schema"
+java -cp "./bin/thirdeye-pinot-1.0-SNAPSHOT.jar" org.h2.tools.RunScript -user "sa" -password "sa" -url "jdbc:h2:tcp:localhost/h2db" -script "zip:./bin/thirdeye-pinot-1.0-SNAPSHOT.jar!/schema/create-schema.sql"
-echo "Running thirdeye frontend with config: ${CONFIG_DIR}"
-java -cp "./bin/thirdeye-pinot-1.0-SNAPSHOT.jar" org.apache.pinot.thirdeye.dashboard.ThirdEyeDashboardApplication ${CONFIG_DIR} &
+echo "Running thirdeye backend config: ${CONFIG_DIR}"
+[ -f "${CONFIG_DIR}/data-sources/data-sources-config-backend.yml" ] && cp "${CONFIG_DIR}/data-sources/data-sources-config-backend.yml" "${CONFIG_DIR}/data-sources/data-sources-config.yml"
+java -cp "./bin/thirdeye-pinot-1.0-SNAPSHOT.jar" org.apache.pinot.thirdeye.anomaly.ThirdEyeAnomalyApplication "${CONFIG_DIR}" &
+sleep 5
+
+echo "Running thirdeye frontend config: ${CONFIG_DIR}"
+[ -f "${CONFIG_DIR}/data-sources/data-sources-config-frontend.yml" ] && cp "${CONFIG_DIR}/data-sources/data-sources-config-frontend.yml" "${CONFIG_DIR}/data-sources/data-sources-config.yml"
+java -cp "./bin/thirdeye-pinot-1.0-SNAPSHOT.jar" org.apache.pinot.thirdeye.dashboard.ThirdEyeDashboardApplication "${CONFIG_DIR}" &
wait
diff --git a/docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config.yml b/docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config-backend.yml
similarity index 99%
copy from docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config.yml
copy to docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config-backend.yml
index b2b083d..97ee451 100644
--- a/docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config.yml
+++ b/docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config-backend.yml
@@ -3,7 +3,7 @@
dataSourceConfigs:
- className: org.apache.pinot.thirdeye.datasource.mock.MockThirdEyeDataSource
properties:
- populateMetaData: true
+ populateMetaData: false
lookback: 90
datasets:
tracking:
diff --git a/docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config.yml b/docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config-frontend.yml
similarity index 100%
rename from docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config.yml
rename to docker/images/pinot-thirdeye/config/ephemeral/data-sources/data-sources-config-frontend.yml
diff --git a/docker/images/pinot-thirdeye/config/ephemeral/detector-config/anomaly-functions/anomalyClassifier.properties b/docker/images/pinot-thirdeye/config/ephemeral/detector-config/anomaly-functions/anomalyClassifier.properties
new file mode 100644
index 0000000..e69de29
diff --git a/docker/images/pinot-thirdeye/config/ephemeral/persistence.yml b/docker/images/pinot-thirdeye/config/ephemeral/persistence.yml
index efab492..991d18d 100644
--- a/docker/images/pinot-thirdeye/config/ephemeral/persistence.yml
+++ b/docker/images/pinot-thirdeye/config/ephemeral/persistence.yml
@@ -1,5 +1,5 @@
databaseConfiguration:
- url: jdbc:h2:./config/h2db
+ url: jdbc:h2:tcp://localhost/h2db
user: sa
password: sa
driver: org.h2.Driver
diff --git a/docker/images/pinot-thirdeye/config/pinot-quickstart/dashboard.yml b/docker/images/pinot-thirdeye/config/pinot-quickstart/dashboard.yml
index 09c4e86..b7b4b47 100644
--- a/docker/images/pinot-thirdeye/config/pinot-quickstart/dashboard.yml
+++ b/docker/images/pinot-thirdeye/config/pinot-quickstart/dashboard.yml
@@ -16,7 +16,7 @@ rootCause:
- org.apache.pinot.thirdeye.dashboard.resources.v2.rootcause.DimensionEntityFormatter
- org.apache.pinot.thirdeye.dashboard.resources.v2.rootcause.ServiceEntityFormatter
- org.apache.pinot.thirdeye.dashboard.resources.v2.rootcause.DefaultEventEntityFormatter
-dashboardHost: "http://thirdeye-dashboard:1426"
+dashboardHost: "http://localhost:1426"
failureFromAddress: thirdeye@localhost
failureToAddress: user@localhost
alerterConfiguration:
diff --git a/docker/images/pinot-thirdeye/config/pinot-quickstart/detector-config/anomaly-functions/anomalyClassifier.properties b/docker/images/pinot-thirdeye/config/pinot-quickstart/detector-config/anomaly-functions/anomalyClassifier.properties
new file mode 100644
index 0000000..e69de29
diff --git a/docker/images/pinot-thirdeye/config/pinot-quickstart/detector.yml b/docker/images/pinot-thirdeye/config/pinot-quickstart/detector.yml
index 0f0975e..9556cb1 100644
--- a/docker/images/pinot-thirdeye/config/pinot-quickstart/detector.yml
+++ b/docker/images/pinot-thirdeye/config/pinot-quickstart/detector.yml
@@ -17,13 +17,13 @@ alert: false
autoload: true
classifier: false
holidayEventsLoader: false
-monitor: false
+monitor: true
pinotProxy: false
-scheduler: false
-worker: false
-detectionPipeline: false
-detectionAlert: false
-dashboardHost: "http://thirdeye-dashboard:1426"
+scheduler: true
+worker: true
+detectionPipeline: true
+detectionAlert: true
+dashboardHost: "http://localhost:1426"
id: 0
alerterConfiguration:
smtpConfiguration:
diff --git a/docker/images/pinot-thirdeye/config/pinot-quickstart/h2db.mv.db b/docker/images/pinot-thirdeye/config/pinot-quickstart/h2db.mv.db
deleted file mode 100644
index c59e59c..0000000
Binary files a/docker/images/pinot-thirdeye/config/pinot-quickstart/h2db.mv.db and /dev/null differ
diff --git a/docker/images/pinot-thirdeye/config/pinot-quickstart/persistence.yml b/docker/images/pinot-thirdeye/config/pinot-quickstart/persistence.yml
index efab492..991d18d 100644
--- a/docker/images/pinot-thirdeye/config/pinot-quickstart/persistence.yml
+++ b/docker/images/pinot-thirdeye/config/pinot-quickstart/persistence.yml
@@ -1,5 +1,5 @@
databaseConfiguration:
- url: jdbc:h2:./config/h2db
+ url: jdbc:h2:tcp://localhost/h2db
user: sa
password: sa
driver: org.h2.Driver
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org