Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions presto-native-execution/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ if(PRESTO_ENABLE_PARQUET)
add_definitions(-DPRESTO_ENABLE_PARQUET)
endif()

if(VELOX_ENABLE_HDFS)
add_definitions(-DVELOX_ENABLE_HDFS)
endif()

set(VELOX_BUILD_TESTING
OFF
CACHE BOOL "Enable Velox tests")
Expand Down
2 changes: 2 additions & 0 deletions presto-native-execution/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ CPU_TARGET ?= "avx"
CMAKE_PREFIX_PATH ?= "/usr/local"

PRESTO_ENABLE_PARQUET ?= "OFF"
VELOX_ENABLE_HDFS ?= "OFF"

CMAKE_FLAGS := -DTREAT_WARNINGS_AS_ERRORS=${TREAT_WARNINGS_AS_ERRORS}
CMAKE_FLAGS += -DENABLE_ALL_WARNINGS=${ENABLE_WALL}
CMAKE_FLAGS += -DCMAKE_PREFIX_PATH=$(CMAKE_PREFIX_PATH)
CMAKE_FLAGS += -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
CMAKE_FLAGS += -DPRESTO_ENABLE_PARQUET=$(PRESTO_ENABLE_PARQUET)
CMAKE_FLAGS += -DVELOX_ENABLE_HDFS=$(VELOX_ENABLE_HDFS)

# Use Ninja if available. If Ninja is used, pass through parallelism control flags.
USE_NINJA ?= 1
Expand Down
4 changes: 4 additions & 0 deletions presto-native-execution/presto_cpp/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ target_link_libraries(
${CIDER_VELOX_LIB}
)

if(VELOX_ENABLE_HDFS)
target_link_libraries(presto_server_lib velox_hdfs)
endif()

add_executable(presto_server PrestoMain.cpp)

target_link_libraries(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@
#include "velox/connectors/hive/storage_adapters/s3fs/S3FileSystem.h" // @manual
#endif

#ifdef VELOX_ENABLE_HDFS
#include "velox/connectors/hive/storage_adapters/hdfs/HdfsFileSystem.h" // @manual
#endif

namespace facebook::presto {

void registerOptionalHiveStorageAdapters() {
#ifdef PRESTO_ENABLE_S3
velox::filesystems::registerS3FileSystem();
#endif
#ifdef VELOX_ENABLE_HDFS
velox::filesystems::registerHdfsFileSystem();
#endif
}

} // namespace facebook::presto