Run make
in the root directory to compile the sources. For development, use
make debug
to build a non-optimized debug version. Use make unittest
to build
and run tests.
A reminder of the available Makefile targets can be obtained using make help
make help
all Build the release version
clean Delete all build artifacts
cmake Use CMake to create a Makefile build system
build Build the software based in BUILD_DIR and BUILD_TYPE variables
debug Build with debugging symbols
release Build the release version
unittest Build with debugging and run unit tests
format-fix Fix formatting issues in the current branch
format-check Check for formatting issues on the current branch
header-fix Fix license header issues in the current branch
header-check Check for license header issues on the current branch
tidy-fix Fix clang-tidy issues in the current branch
tidy-check Check clang-tidy issues in the current branch
linux-container Build the CircleCi linux container from scratch
help Show the help messages
Makefile targets exist for showing, fixing and checking formatting, license
headers and clang-tidy warnings. These targets are shortcuts for calling
./scripts/check.py
.
GitHub Actions run make format-check
, make header-check
and
make tidy-check
as part of our continuous integration. Pull requests should
pass linux-build, format-check, header-check and other jobs without errors
before being accepted.
Formatting issues found on the changed lines in the current commit can be
displayed using make format-show
. These issues can be fixed by using make format-fix
. This will apply formatting changes to changed lines in the
current commit.
Header issues found on the changed files in the current commit can be displayed
using make header-show
. These issues can be fixed by using make header-fix
. This will apply license header updates to the files in the current
commit.
Similar commands make tidy-show
, make-tidy-fix
, make tidy-check
exist for
running clang-tidy, but these checks are currently advisory only.
An entire directory tree of files can be formatted and have license headers added
using the tree
variant of the format.sh commands:
./scripts/check.py format tree
./scripts/check.py format tree --fix
./scripts/check.py header tree
./scripts/check.py header tree --fix
All the available formatting commands can be displayed by using
./scripts/check.py help
.
There is not currently a mechanism to opt out files or directories from the checks. When we need one it can be added.
presto/presto-native-execution/scripts/setup-macos.sh
.export PATH=$HOME/bin:$HOME/Library/Python/3.7/bin:$PATH
presto/presto-native-execution/scripts/setup-centos.sh
Clone the whole Presto repository.
Close IntelliJ and CLion
In local Presto repo
git fetch upstream
git co upstream/master
mvn clean install -DskipTests -T1C -pl -presto-docs
Run IntelliJ
HiveQueryRunnerExternal
Application Run/Debug Configuration (alter paths accordingly).
com.facebook.presto.hive.HiveExternalWorkerQueryRunner
.-ea -Xmx5G -XX:+ExitOnOutOfMemoryError -Duser.timezone=America/Bahia_Banderas -Dhive.security=legacy
.$MODULE_DIR$
PRESTO_SERVER=/Users/<user>/git/presto/presto-native-execution/cmake-build-debug/presto_cpp/main/presto_server;DATA_DIR=/Users/<user>/Desktop/data;WORKER_COUNT=0
presto-native-execution
module.TestHiveQueriesUsingJSON
Test Run/Debug Configuration (alter paths accordingly).
com.facebook.presto.nativeworker.TestHiveQueriesUsingJSON
-ea -DPRESTO_SERVER=/Users/<user>/git/presto_cpp/cmake-build-debug/presto_cpp/main/presto_server -DDATA_DIR=/Users/<user>/Desktop/data
$MODULE_WORKING_DIR$
Presto Client
Application Run/Debug Configuration (alter paths accordingly).
com.facebook.presto.cli.Presto
--catalog hive --schema tpch
presto-cli
module.In "presto/presto-native-execution" run:
make -C presto-native-execution submodules
git/presto/presto-native-execution % sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/sbin; sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/bin; sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/lib; chmod u+w /usr/local/bin /usr/local/lib /usr/local/sbin; chmod u+w /usr/local/bin /usr/local/lib /usr/local/bin; chmod u+w /usr/local/bin /usr/local/lib /usr/local/lib; ./scripts/setup-macos.sh
Run CLion:
presto/presto-native-execution
folder as CMake project and wait till CLion loads/generates cmake files, symbols, etc.presto_server
module (alter paths accordingly).
--logtostderr=1 --v=1 --etc_dir=/Users/<user>/git/presto/presto-native-execution/etc
/Users/<user>/git/presto/presto-native-execution
-DVELOX_BUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-- -j 12
Project
Open any h or cpp file in the editor and select Enable ClangFormat
by clicking 4 spaces
rectangle in the status bar (bottom right) which is next to UTF-8
bar.
Running Presto Coordinator + Worker on MacOS
======== SERVER STARTED ========
in the log output).Discovery URL http://127.0.0.1:50555
. The port is 'random' with every start.discovery.uri
field in presto/presto-native-execution/etc/config.properties
for the worker to discover the Coordinator.Announcement succeeded: 202
line in the log output.java -jar presto-cli/target/presto-cli-*-executable.jar --catalog hive --schema tpch
Presto Client
Application (see above on how to create and setup the configuration) inside IntelliJshow tables;
and describe table;
queries and execute more queries as needed.presto/presto-native-execution/src/test/java/com/facebook/presto/nativeworker
path.git -C presto-native-execution/velox checkout main
git -C presto-native-execution/velox pull
git add presto-native-execution/velox
[native]
prefix in the title
as well as to the commit message
for PRs modifying anything in presto-native-execution
.presto-native-execution
should be approved by a Code Owner (team-velox) to have merging enabled.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。