{"id":15048335,"url":"https://github.com/github/presto","last_synced_at":"2025-10-04T08:31:32.927Z","repository":{"id":65974885,"uuid":"138219940","full_name":"github/presto","owner":"github","description":"Distributed SQL query engine for big data","archived":true,"fork":true,"pushed_at":"2018-08-15T13:28:41.000Z","size":95058,"stargazers_count":9,"open_issues_count":0,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-29T00:21:27.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://prestodb.io","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"prestodb/presto","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-21T20:46:03.000Z","updated_at":"2024-07-31T03:19:00.000Z","dependencies_parsed_at":"2023-02-19T18:15:36.081Z","dependency_job_id":null,"html_url":"https://github.com/github/presto","commit_stats":null,"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fpresto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fpresto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fpresto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fpresto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/presto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235232526,"owners_count":18957057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T21:10:59.517Z","updated_at":"2025-10-04T08:31:24.313Z","avatar_url":"https://github.com/github.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Presto [![Build Status](https://travis-ci.org/prestodb/presto.svg?branch=master)](https://travis-ci.org/prestodb/presto)\n\nPresto is a distributed SQL query engine for big data.\n\nSee the [User Manual](https://prestodb.io/docs/current/) for deployment instructions and end user documentation.\n\n## Requirements\n\n* Mac OS X or Linux\n* Java 8 Update 92 or higher (8u92+), 64-bit. Both Oracle JDK and OpenJDK are supported.\n* Maven 3.3.9+ (for building)\n* Python 2.4+ (for running with the launcher script)\n\n## Building Presto\n\nPresto is a standard Maven project. Simply run the following command from the project root directory:\n\n    ./mvnw clean install\n\nOn the first build, Maven will download all the dependencies from the internet and cache them in the local repository (`~/.m2/repository`), which can take a considerable amount of time. Subsequent builds will be faster.\n\nPresto has a comprehensive set of unit tests that can take several minutes to run. You can disable the tests when building:\n\n    ./mvnw clean install -DskipTests\n\n## Running Presto in your IDE\n\n### Overview\n\nAfter building Presto for the first time, you can load the project into your IDE and run the server. We recommend using [IntelliJ IDEA](http://www.jetbrains.com/idea/). Because Presto is a standard Maven project, you can import it into your IDE using the root `pom.xml` file. In IntelliJ, choose Open Project from the Quick Start box or choose Open from the File menu and select the root `pom.xml` file.\n\nAfter opening the project in IntelliJ, double check that the Java SDK is properly configured for the project:\n\n* Open the File menu and select Project Structure\n* In the SDKs section, ensure that a 1.8 JDK is selected (create one if none exist)\n* In the Project section, ensure the Project language level is set to 8.0 as Presto makes use of several Java 8 language features\n\nPresto comes with sample configuration that should work out-of-the-box for development. Use the following options to create a run configuration:\n\n* Main Class: `com.facebook.presto.server.PrestoServer`\n* VM Options: `-ea -XX:+UseG1GC -XX:G1HeapRegionSize=32M -XX:+UseGCOverheadLimit -XX:+ExplicitGCInvokesConcurrent -Xmx2G -Dconfig=etc/config.properties -Dlog.levels-file=etc/log.properties`\n* Working directory: `$MODULE_DIR$`\n* Use classpath of module: `presto-main`\n\nThe working directory should be the `presto-main` subdirectory. In IntelliJ, using `$MODULE_DIR$` accomplishes this automatically.\n\nAdditionally, the Hive plugin must be configured with location of your Hive metastore Thrift service. Add the following to the list of VM options, replacing `localhost:9083` with the correct host and port (or use the below value if you do not have a Hive metastore):\n\n    -Dhive.metastore.uri=thrift://localhost:9083\n\n### Using SOCKS for Hive or HDFS\n\nIf your Hive metastore or HDFS cluster is not directly accessible to your local machine, you can use SSH port forwarding to access it. Setup a dynamic SOCKS proxy with SSH listening on local port 1080:\n\n    ssh -v -N -D 1080 server\n\nThen add the following to the list of VM options:\n\n    -Dhive.metastore.thrift.client.socks-proxy=localhost:1080\n\n### Running the CLI\n\nStart the CLI to connect to the server and run SQL queries:\n\n    presto-cli/target/presto-cli-*-executable.jar\n\nRun a query to see the nodes in the cluster:\n\n    SELECT * FROM system.runtime.nodes;\n\nIn the sample configuration, the Hive connector is mounted in the `hive` catalog, so you can run the following queries to show the tables in the Hive database `default`:\n\n    SHOW TABLES FROM hive.default;\n\n## Developers\n\nWe recommend you use IntelliJ as your IDE. The code style template for the project can be found in the [codestyle](https://github.com/airlift/codestyle) repository along with our general programming and Java guidelines. In addition to those you should also adhere to the following:\n\n* Alphabetize sections in the documentation source files (both in table of contents files and other regular documentation files). In general, alphabetize methods/variables/sections if such ordering already exists in the surrounding code.\n* When appropriate, use the Java 8 stream API. However, note that the stream implementation does not perform well so avoid using it in inner loops or otherwise performance sensitive sections.\n* Categorize errors when throwing exceptions. For example, PrestoException takes an error code as an argument, `PrestoException(HIVE_TOO_MANY_OPEN_PARTITIONS)`. This categorization lets you generate reports so you can monitor the frequency of various failures.\n* Ensure that all files have the appropriate license header; you can generate the license by running `mvn license:format`.\n* Consider using String formatting (printf style formatting using the Java `Formatter` class): `format(\"Session property %s is invalid: %s\", name, value)` (note that `format()` should always be statically imported). Sometimes, if you only need to append something, consider using the `+` operator.\n* Avoid using the ternary operator except for trivial expressions.\n* Use an assertion from Airlift's `Assertions` class if there is one that covers your case rather than writing the assertion by hand. Over time we may move over to more fluent assertions like AssertJ.\n* When writing a Git commit message, follow these [guidelines](https://chris.beams.io/posts/git-commit/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fpresto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fpresto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fpresto/lists"}