Luy
05/23/2022, 10:04 AMCyril de Catheu
05/23/2022, 12:21 PMCyril de Catheu
05/23/2022, 12:21 PMLuy
05/23/2022, 12:22 PMCyril de Catheu
05/23/2022, 12:22 PMLuy
05/23/2022, 12:24 PMCyril de Catheu
05/23/2022, 12:25 PMLuy
05/23/2022, 12:26 PMLuy
05/23/2022, 12:27 PMCyril de Catheu
05/23/2022, 12:31 PMLuy
05/23/2022, 12:32 PMCyril de Catheu
05/23/2022, 12:33 PMLuy
05/23/2022, 12:33 PMCyril de Catheu
05/23/2022, 12:35 PMCyril de Catheu
05/23/2022, 12:36 PMLuy
05/23/2022, 12:49 PMCyril de Catheu
05/23/2022, 12:50 PMLuy
05/23/2022, 12:50 PMLuy
05/23/2022, 12:51 PMversion: '3.7'
services:
zookeeper:
image: zookeeper:3.5.6
hostname: zookeeper
container_name: manual-zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
pinot-controller:
image: apachepinot/pinot:0.9.3
command: "StartController -zkAddress manual-zookeeper:2181"
container_name: "manual-pinot-controller"
volumes:
- /home/csguru/workspace/Sapient/works/pinot:/tmp/pinot-quick-start
restart: unless-stopped
ports:
- "9000:9000"
environment:
JAVA_OPTS: "-Dplugins.dir=/opt/pinot/plugins -Xms1G -Xmx4G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-controller.log"
depends_on:
- zookeeper
pinot-broker:
image: apachepinot/pinot:0.9.3
command: "StartBroker -zkAddress manual-zookeeper:2181"
restart: unless-stopped
container_name: "manual-pinot-broker"
ports:
- "8099:8099"
environment:
JAVA_OPTS: "-Dplugins.dir=/opt/pinot/plugins -Xms4G -Xmx4G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-broker.log"
depends_on:
- pinot-controller
pinot-server:
image: apachepinot/pinot:0.9.3
command: "StartServer -zkAddress manual-zookeeper:2181"
restart: unless-stopped
container_name: "manual-pinot-server"
environment:
JAVA_OPTS: "-Dplugins.dir=/opt/pinot/plugins -Xms4G -Xmx16G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-server.log"
depends_on:
- pinot-brokerCyril de Catheu
05/23/2022, 12:51 PMLuy
05/23/2022, 12:52 PMCyril de Catheu
05/23/2022, 12:53 PMLuy
05/23/2022, 12:53 PMLuy
05/23/2022, 12:54 PMCyril de Catheu
05/23/2022, 12:54 PMdataSourceConfigs:
- className: org.apache.pinot.thirdeye.datasource.pinot.PinotThirdEyeDataSource
properties:
zookeeperUrl: 'localhost:2181'
clusterName: 'PinotCluster'
controllerConnectionScheme: 'http'
controllerHost: '127.0.0.1'
controllerPort: 9000
cacheLoaderClassName: org.apache.pinot.thirdeye.datasource.pinot.PinotD2ResponseCacheLoader
metadataSourceConfigs:
- className: org.apache.pinot.thirdeye.auto.onboard.AutoOnboardPinotMetadataSource
should workLuy
05/23/2022, 12:55 PMLuy
05/23/2022, 1:02 PMStep 8/20 : RUN curl -o- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh> | bash
&& export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm
install v10.24.1 && npm install -g phantomjs --unsafe-perm --ignore-scripts
---> Running in a57163dfcfda
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
curl: (7) Failed to connect to <http://raw.githubusercontent.com|raw.githubusercontent.com> port 443: Connection refusedLuy
05/23/2022, 1:02 PMLuy
05/23/2022, 2:32 PMCyril de Catheu
05/23/2022, 2:36 PMLuy
05/23/2022, 2:38 PMLuy
05/23/2022, 2:38 PMLuy
05/23/2022, 2:38 PMLuy
05/23/2022, 2:39 PMCyril de Catheu
05/23/2022, 2:39 PMLuy
05/23/2022, 2:42 PMStep 8/20 : RUN curl -o- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh> | bash && export NVM_DIR="$HOME/.nvm"
&& [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install v10.24.1 && npm install -g phantomjs --unsafe-perm
--ignore-scripts
---> Running in 07a284672750
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
curl: (7) Failed to connect to <http://raw.githubusercontent.com|raw.githubusercontent.com> port 443: Connection refused
The command '/bin/sh -c curl -o- <https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh> | bash && export NVM_DIR="$HO
ME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install v10.24.1 && npm install -g phantomjs --uns
afe-perm --ignore-scripts' returned a non-zero code: 1
This is what I'm getting now.Luy
05/23/2022, 2:43 PM# run
docker-compose up front workersCyril de Catheu
05/23/2022, 3:07 PMLuy
05/23/2022, 3:12 PMCyril de Catheu
05/23/2022, 3:14 PMLuy
05/23/2022, 3:15 PMLuy
05/23/2022, 3:18 PMdocker-compose up -d mysqlCyril de Catheu
05/23/2022, 3:19 PMdocker-compose up -d mysql
export PERSISTENCE_MYSQL_PORT=3307
export DATASOURCE_MYSQL_PORT=3307
make create-persistence-db-tables
# creation in database testdata - replace by your own when you're ready
make create-datasource-tablesLuy
05/23/2022, 3:20 PMCyril de Catheu
05/23/2022, 3:21 PMcat config/data-sources/data-sources-config.ymlLuy
05/23/2022, 3:21 PMdataSourceConfigs:
- className: org.apache.pinot.thirdeye.datasource.sql.SqlThirdEyeDataSource
properties:
MySQL:
- db:
## notice the &useSSL=false
dataset: jdbc:<mysql://172.17.0.1:3307/testdata?autoReconnect=true&useSSL=false>
user: root
password: ""
## add other sql datasources here if you want
## just hardcode things for test
# - other_db:
# dataset: jdbc:<mysql://mySqlDBHost:3307/testdata>
# user: haha
# password: blablaCyril de Catheu
05/23/2022, 3:21 PMLuy
05/23/2022, 3:22 PMCyril de Catheu
05/23/2022, 3:22 PMmysql -u root -pCyril de Catheu
05/23/2022, 3:22 PMLuy
05/23/2022, 3:22 PMCyril de Catheu
05/23/2022, 3:22 PMLuy
05/23/2022, 3:23 PMCyril de Catheu
05/23/2022, 3:23 PMLuy
05/23/2022, 3:23 PMdatasci@alert-system:~/thirdeye-oss/quickstart$ sudo mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.29-0ubuntu0.20.04.3 (Ubuntu)
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>Cyril de Catheu
05/23/2022, 3:23 PMCyril de Catheu
05/23/2022, 3:23 PMLuy
05/23/2022, 3:23 PMCyril de Catheu
05/23/2022, 3:24 PMmysql --host localhost:3307 -u root -pCyril de Catheu
05/23/2022, 3:24 PMLuy
05/23/2022, 3:24 PMCyril de Catheu
05/23/2022, 3:25 PMCyril de Catheu
05/23/2022, 3:26 PMLuy
05/23/2022, 3:26 PMCyril de Catheu
05/23/2022, 3:27 PMCyril de Catheu
05/23/2022, 3:27 PMmysql -h 127.0.0.1 -P 3307 -u root -p
mysql -h localhost -P 3307 -u root -p
mysql -h 172.17.0.1 -P 3307 -u root -pLuy
05/23/2022, 3:28 PMmysql -h 127.0.0.1 -P 3307 -u root -p
It's workingCyril de Catheu
05/23/2022, 3:28 PMCyril de Catheu
05/23/2022, 3:28 PMconfig/data-sources/data-sources-config.yml
can you replace the mysql url by the one that is workingCyril de Catheu
05/23/2022, 3:29 PMLuy
05/23/2022, 3:30 PMdataset: jdbc:<mysql://127.0.0.1:3307/testdata?autoReconnect=true&useSSL=false>
It this okay?Cyril de Catheu
05/23/2022, 3:30 PMconfig/persistence.ymlLuy
05/23/2022, 3:31 PMdatabaseConfiguration:
## notice useSSL=false
url: jdbc:<mysql://127.0.1:3307/thirdeye?autoReconnect=true&useSSL=false>
user: root
password: ""
driver: com.mysql.jdbc.DriverCyril de Catheu
05/23/2022, 3:31 PMLuy
05/23/2022, 3:32 PMCyril de Catheu
05/23/2022, 3:32 PMdocker-compose up front workersLuy
05/23/2022, 3:33 PMCyril de Catheu
05/23/2022, 3:37 PMLuy
05/23/2022, 3:38 PMCyril de Catheu
05/23/2022, 3:41 PMCyril de Catheu
05/23/2022, 3:42 PMhost.docker.internal
172.17.42.1Cyril de Catheu
05/23/2022, 3:43 PMUse --network="host" in your docker run command, then 127.0.0.1 in your docker container will point to your docker host.
Note: This mode only works on Docker for Linux, per the documentationLuy
05/23/2022, 3:45 PM--network="host"Cyril de Catheu
05/23/2022, 3:46 PMdocker run -it mysql:5.7 /bin/sh
# then try
mysql -h 127.0.0.1 -P 3307 -u root -p
mysql -h localhost -P 3307 -u root -p
mysql -h 172.17.0.1 -P 3307 -u root -p
mysql -h 172.17.42.1 -P 3307 -u root -pCyril de Catheu
05/23/2022, 3:47 PMLuy
05/23/2022, 3:48 PMLuy
05/23/2022, 3:48 PMCyril de Catheu
05/23/2022, 3:49 PMLuy
05/23/2022, 3:49 PMLuy
05/23/2022, 3:51 PMLuy
05/23/2022, 3:51 PMLuy
05/23/2022, 3:51 PMCyril de Catheu
05/23/2022, 3:52 PMLuy
05/23/2022, 3:53 PMLuy
05/23/2022, 4:40 PMLuy
05/23/2022, 5:47 PMLuy
05/23/2022, 5:48 PMfront_1 | {"exception":"java.net.ConnectException: Connection refused\n\tat sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)\n\tat sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)\n\tat org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)\n\tat org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1144)\n","level":"WARN","logger":"org.apache.zookeeper.ClientCnxn","thread":"pool-6-thread-18-SendThread(localhost:2181)","message":"Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect","timestamp":1653328100865}Cyril de Catheu
05/23/2022, 8:50 PM