Go to the project folder,stop the server, pull from git, build with maven, and start the server. cd /opt/project/MultiDBs-Query-Server/ ./stop-servers.sh git pull mvn clean install ./start-servers.sh
Go to the project folder, full from git. cd /opt/project/MultiDBs-Query-WebClient/ git pull
Sometimes when there's error, temporary catalogs cannot be deleted. So we have to delete them manually. cd /opt/project/MultiDBs-Query-Server/presto-server-0.97/etc/catalog/ find . -type f -name tmp\* -exec rm {} \;
When metastore deletes a datasource, they should have called our drop catalog api yet they seem not to have called it. So, we have to call it by ourselves. First get all datasources information from metastore (you can do it by opening the webpage). Then, call the url in the browser "http://{your server ip}:{port}/Catalog/drop/{databaseid}" to drop it.
When occurred an out-of-memory error, presto kills itself. (You can change it in jvm.config under presto-server-0.97/etc folder) To start the server, just simply go to the presto-server-0.97 folder, and call the launcher to start the server. cd /opt/project/MultiDBs-Query-Server/presto-server-0.97 bin/launcher start
Currently, the only way for presto to get new catalog loaded or get a catalog removed is to restart. This may cause many issues. Later workers should try to change presto code to add a catalog listening thread to detect catalog changes.
Please go to presto github to see more information and be free to ask questions and submit issues.
Currently, we have a class called "CatalogMatcherManager" which has not been implemented. Yet it should be able to handle stuff like: 1). Connect to metastore and check lost catalogs. 2). Fix lost catalogs. 3). Connect to metastore and check catalogs that has been removed from metastore. 4). Remove outdated catalogs. 5). Remove trash catalogs generated but not deleted caused by errors when using save API in the wrong way. Refer to 3 above in Maintainance part.
Now we only have add and drop catalog APIs. Yet there're some needs that we provide all catalogs we have. Plus, there should be a API to launch presto server if we found that it was down.