GithubHelp home page GithubHelp logo

presto_template's Introduction

presto_template

This is a blank presto single server/laptop template using presto version 0.229 Sensitive Catalog/Connection credentials have been replaced with empty strings.

Requirements

  1. Presto has a few basic requirements:
  • Linux or Mac OS X
  • Java 8, 64-bit -- this one was the trickiest req for me
    • sudo apt install openjdk-8-jdk openjdk-8-jre
  • Python 2.4+

Deploying Single Presto Server

  1. Requirements above
  2. Visit https://prestodb.io/download.html and download presto-server-0.229.tar.gz or latest version.
  3. Extract the presto-server-0.229.tar.gz gzip file and move to a directory. You can delete the original gzip file after extrtacting.
  • This guide will depend on moving the extracted directory into the ~/presto/presto-server-0.229/ location
  1. Download this repository
  1. Move /etc/ from this repository into your presto-server folder.
  • mv /tmp/presto/etc ~/presto/presto-server-0.229/
  1. Change 'angel' in node.data-dir=/home/angel/presto/presto-server-0.229/data to your presto server data dir in the following file
  • /presto-server-0.229/etc/node.properties : line 3
  1. Run presto in the background from any directory in the command line with the following command
  • ~/presto/presto-server-0.229/bin/launcher start
  1. Visit http://localhost:8080/ in your browser will show you a UI for presto
  2. Kill presto with
  • ~/presto/presto-server-0.229/bin/launcher kill

Running with Jupyter Notebook

  1. Complete Deploying Single Presto Server section
  2. Run pip install -r /tmp/presto/requirements.txt from the repository download above if you haven't yet.
  3. The following bash command will run presto in port 8080
  • ~/presto/presto-server-0.229/bin/launcher run
  1. Move the template jupyter notebook from the temporary repository location and run it locally with the following commands
  • mv ~/tmp/presto/cross-db-template.ipynb ~/presto/
  • jupyter notebook ~/presto/cross-db-template.ipynb &
  1. visiting http://localhost:8888/ in your browser will show you a UI for Jupyter

Deploying Presto CLI

  1. Requirements specified above Single Presto Server installation
  2. Visit https://prestodb.io/download.html and download presto-cli-0.229-executable.jar
  3. Move this jar file into the home presto location while renaming it to presto-cli
    • mv ~/Downloads/presto-cli-0.229-executable.jar ~/presto/presto-cli
  4. Make this jar file executable
    • chmod +x ~/presto/presto-cli
  5. Run from any directory in the command line with the following command
    • ~/presto/presto-cli
  6. Check if it is running with following CLI command
    • SHOW CATALOGS
  7. Kill with exit

Materials included in repository

Single Server config

Four Configuration files are held in the /etc which does not include the catalog directory which make presto work on a single computer or instance.

  1. config.properties
  2. jvm.config
  3. log.properties
  4. node.properties

Catalog Included

Database connections are named Catalogs in Presto. There are two catalog templates included in this template; MySQL and Postgres. They can be found in etc/catalog directory

Jupyter Notebook Template

There is a single jupyter notebook file in this repository which has all python code needed for a cross database join.

presto_template's People

Contributors

angelddaz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.