diff --git a/CMake/resolve_dependency_modules/folly/CMakeLists.txt b/CMake/resolve_dependency_modules/folly/CMakeLists.txt index a017409c1bd3..ffe09fb14b91 100644 --- a/CMake/resolve_dependency_modules/folly/CMakeLists.txt +++ b/CMake/resolve_dependency_modules/folly/CMakeLists.txt @@ -14,11 +14,11 @@ project(Folly) cmake_minimum_required(VERSION 3.14) -set(VELOX_FOLLY_BUILD_VERSION v2022.11.14.00) +set(VELOX_FOLLY_BUILD_VERSION v2023.12.04.00) set(VELOX_FOLLY_BUILD_SHA256_CHECKSUM - b249436cb61b6dfd5288093565438d8da642b07ae021191a4042b221bc1bdc0e) + ed66d435eacb8065ade2fac310c452ef288998e16fd73a95a7db4bdbbb4eea5d) set(VELOX_FOLLY_SOURCE_URL - "https://github.com/facebook/folly/archive/${VELOX_FOLLY_BUILD_VERSION}.tar.gz" + "https://github.com/facebook/folly/releases/download/${VELOX_FOLLY_BUILD_VERSION}/folly-${VELOX_FOLLY_BUILD_VERSION}.tar.gz" ) resolve_dependency_url(FOLLY) @@ -52,11 +52,17 @@ add_library(Folly::folly ALIAS folly) # The folly target does not contain any include directories, they are propagated # from folly_base. This marks them as system headers which should suppress # warnigs generated by them when they are included else where. -get_target_property(_inc folly_base INTERFACE_INCLUDE_DIRECTORIES) -target_include_directories(folly_base SYSTEM INTERFACE ${_inc}) +set_target_properties( + folly_deps + PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES + $) +set_target_properties( + folly_base + PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES + $) if(${gflags_SOURCE} STREQUAL "BUNDLED") - add_dependencies(folly glog gflags) + add_dependencies(folly glog gflags_static fmt::fmt) endif() set(FOLLY_BENCHMARK_STATIC_LIB diff --git a/CMake/resolve_dependency_modules/glog.cmake b/CMake/resolve_dependency_modules/glog.cmake index 2b77c8f7e9a7..54836009ed7c 100644 --- a/CMake/resolve_dependency_modules/glog.cmake +++ b/CMake/resolve_dependency_modules/glog.cmake @@ -37,7 +37,7 @@ set(BUILD_TESTING OFF) FetchContent_MakeAvailable(glog) unset(BUILD_TESTING) unset(BUILD_SHARED_LIBS) -add_dependencies(glog gflags) +add_dependencies(glog gflags_static) list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/glog) set(glog_INCLUDE_DIR ${glog_BINARY_DIR}) diff --git a/CMakeLists.txt b/CMakeLists.txt index f705a8fa4d9f..647eb9f4041c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,6 +180,10 @@ if(${VELOX_BUILD_PYTHON_PACKAGE}) set(VELOX_ENABLE_BENCHMARKS OFF) endif() +# We look for OpenSSL here to cache the result enforce the version across our +# dependencies. +find_package(OpenSSL REQUIRED) + if(VELOX_ENABLE_CCACHE AND NOT CMAKE_C_COMPILER_LAUNCHER AND NOT CMAKE_CXX_COMPILER_LAUNCHER) diff --git a/scripts/setup-circleci.sh b/scripts/setup-circleci.sh index b49d21eaee95..f041ac089a4e 100755 --- a/scripts/setup-circleci.sh +++ b/scripts/setup-circleci.sh @@ -118,9 +118,6 @@ cmake_install glog -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr cmake_install snappy -DSNAPPY_BUILD_TESTS=OFF cmake_install fmt -DFMT_TEST=OFF cmake_install folly -DFOLLY_HAVE_INT128_T=ON -# remove in #7700 -sed -i 's/\[\[deprecated.*\]\]//g' /usr/local/include/folly/init/Init.h - cmake_install fizz/fizz -DBUILD_TESTS=OFF cmake_install wangle/wangle -DBUILD_TESTS=OFF diff --git a/scripts/setup-macos.sh b/scripts/setup-macos.sh index 00195e30a291..51dcfadd9a50 100755 --- a/scripts/setup-macos.sh +++ b/scripts/setup-macos.sh @@ -93,7 +93,7 @@ function install_fmt { } function install_folly { - github_checkout facebook/folly "v2022.11.14.00" + github_checkout facebook/folly "v2023.12.04.00" OPENSSL_ROOT_DIR=$(brew --prefix openssl@1.1) \ cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON } diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index 061b65c4a46d..14ac9f144b91 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -23,7 +23,7 @@ source $SCRIPTDIR/setup-helper-functions.sh CPU_TARGET="${CPU_TARGET:-avx}" COMPILER_FLAGS=$(get_cxx_flags "$CPU_TARGET") export COMPILER_FLAGS -FB_OS_VERSION=v2022.11.14.00 +FB_OS_VERSION=v2023.12.04.00 NPROC=$(getconf _NPROCESSORS_ONLN) DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)} export CMAKE_BUILD_TYPE=Release @@ -102,6 +102,11 @@ function install_wangle { cmake_install -DBUILD_TESTS=OFF -S wangle } +function install_mvfst { + github_checkout facebook/mvfst "${FB_OS_VERSION}" + cmake_install -DBUILD_TESTS=OFF +} + function install_fbthrift { github_checkout facebook/fbthrift "${FB_OS_VERSION}" cmake_install -DBUILD_TESTS=OFF @@ -118,6 +123,7 @@ function install_velox_deps { run_and_time install_folly run_and_time install_fizz run_and_time install_wangle + run_and_time install_mvfst run_and_time install_fbthrift run_and_time install_conda } diff --git a/scripts/setup-velox-torcharrow.sh b/scripts/setup-velox-torcharrow.sh index 72186bc7158c..5773bd932eae 100755 --- a/scripts/setup-velox-torcharrow.sh +++ b/scripts/setup-velox-torcharrow.sh @@ -79,7 +79,7 @@ function wget_and_untar { wget_and_untar https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz gflags wget_and_untar https://ftp.openssl.org/source/openssl-1.1.1k.tar.gz openssl & wget_and_untar https://boostorg.jfrog.io/artifactory/main/release/1.69.0/source/boost_1_69_0.tar.gz boost & -wget_and_untar https://github.com/facebook/folly/archive/v2022.11.14.00.tar.gz folly & +wget_and_untar https://github.com/facebook/folly/archive/v2023.12.04.00.tar.gz folly & wget_and_untar https://github.com/fmtlib/fmt/archive/refs/tags/10.1.1.tar.gz fmt & wait diff --git a/velox/benchmarks/basic/ComparisonConjunct.cpp b/velox/benchmarks/basic/ComparisonConjunct.cpp index 28a00211b9bf..cf40330eef4b 100644 --- a/velox/benchmarks/basic/ComparisonConjunct.cpp +++ b/velox/benchmarks/basic/ComparisonConjunct.cpp @@ -175,7 +175,7 @@ BENCHMARK(conjunctsNested) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); memory::MemoryManager::initialize({}); benchmark = std::make_unique(1'000); diff --git a/velox/benchmarks/basic/DecodedVector.cpp b/velox/benchmarks/basic/DecodedVector.cpp index f4d44a8fa9f0..3489967da7a2 100644 --- a/velox/benchmarks/basic/DecodedVector.cpp +++ b/velox/benchmarks/basic/DecodedVector.cpp @@ -188,7 +188,7 @@ BENCHMARK(decodeDictionary5Nested) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); memory::MemoryManager::initialize({}); benchmark = std::make_unique(10'000); diff --git a/velox/benchmarks/basic/FeatureNormalization.cpp b/velox/benchmarks/basic/FeatureNormalization.cpp index fd328e9e5eb0..405e14819aa6 100644 --- a/velox/benchmarks/basic/FeatureNormalization.cpp +++ b/velox/benchmarks/basic/FeatureNormalization.cpp @@ -110,7 +110,7 @@ BENCHMARK(normalizeConstant) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); memory::MemoryManager::initialize({}); benchmark = std::make_unique(); diff --git a/velox/benchmarks/basic/LikeTpchBenchmark.cpp b/velox/benchmarks/basic/LikeTpchBenchmark.cpp index 5ca4087a13b8..dfd8f03aed10 100644 --- a/velox/benchmarks/basic/LikeTpchBenchmark.cpp +++ b/velox/benchmarks/basic/LikeTpchBenchmark.cpp @@ -242,7 +242,7 @@ BENCHMARK(tpchQuery20) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv, true); + folly::Init init{&argc, &argv, true}; memory::MemoryManager::initialize({}); benchmark = std::make_unique(); folly::runBenchmarks(); diff --git a/velox/benchmarks/basic/Preproc.cpp b/velox/benchmarks/basic/Preproc.cpp index be40b988cf68..528e1a6461f9 100644 --- a/velox/benchmarks/basic/Preproc.cpp +++ b/velox/benchmarks/basic/Preproc.cpp @@ -444,7 +444,7 @@ BENCHMARK(allFusedWithNulls) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; memory::MemoryManager::initialize({}); benchmark = std::make_unique(); // Verify that benchmark calculations are correct. diff --git a/velox/benchmarks/basic/SelectivityVector.cpp b/velox/benchmarks/basic/SelectivityVector.cpp index 734a4857c8ad..cef36633157e 100644 --- a/velox/benchmarks/basic/SelectivityVector.cpp +++ b/velox/benchmarks/basic/SelectivityVector.cpp @@ -164,7 +164,7 @@ BENCHMARK(sumSelectivity1PerCent) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); memory::MemoryManager::initialize({}); benchmark = std::make_unique(10'000); diff --git a/velox/benchmarks/basic/SimpleArithmetic.cpp b/velox/benchmarks/basic/SimpleArithmetic.cpp index 8f1d2ef1b044..4da3453a1863 100644 --- a/velox/benchmarks/basic/SimpleArithmetic.cpp +++ b/velox/benchmarks/basic/SimpleArithmetic.cpp @@ -343,7 +343,7 @@ BENCHMARK(plusCheckedLarge) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); memory::MemoryManager::initialize({}); benchmark = std::make_unique(); diff --git a/velox/benchmarks/basic/SimpleCastExpr.cpp b/velox/benchmarks/basic/SimpleCastExpr.cpp index 2f26a1446080..497b66d8c0b8 100644 --- a/velox/benchmarks/basic/SimpleCastExpr.cpp +++ b/velox/benchmarks/basic/SimpleCastExpr.cpp @@ -250,7 +250,7 @@ BENCHMARK(castStructManyFieldsNestedCastMedium) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); memory::MemoryManager::initialize({}); benchmark = std::make_unique(); diff --git a/velox/benchmarks/basic/VectorCompare.cpp b/velox/benchmarks/basic/VectorCompare.cpp index 803fbe062d20..6b67e267d882 100644 --- a/velox/benchmarks/basic/VectorCompare.cpp +++ b/velox/benchmarks/basic/VectorCompare.cpp @@ -114,7 +114,7 @@ BENCHMARK_DRAW_LINE(); } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); memory::MemoryManager::initialize({}); benchmark = std::make_unique(1000); diff --git a/velox/benchmarks/basic/VectorFuzzer.cpp b/velox/benchmarks/basic/VectorFuzzer.cpp index c7fc6f2c434c..2196e8bf9952 100644 --- a/velox/benchmarks/basic/VectorFuzzer.cpp +++ b/velox/benchmarks/basic/VectorFuzzer.cpp @@ -131,7 +131,7 @@ BENCHMARK_RELATIVE_MULTI(flatMapArrayNested, n) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); memory::MemoryManager::initialize({}); folly::runBenchmarks(); diff --git a/velox/benchmarks/basic/VectorSlice.cpp b/velox/benchmarks/basic/VectorSlice.cpp index de01ac34c19e..d03cc06ea6af 100644 --- a/velox/benchmarks/basic/VectorSlice.cpp +++ b/velox/benchmarks/basic/VectorSlice.cpp @@ -110,7 +110,7 @@ DEFINE_BENCHMARKS(row) } // namespace facebook::velox int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; using namespace facebook::velox; gflags::ParseCommandLineFlags(&argc, &argv, true); VELOX_CHECK_LE(FLAGS_slice_size, kVectorSize); diff --git a/velox/benchmarks/tpch/CMakeLists.txt b/velox/benchmarks/tpch/CMakeLists.txt index ef0147ad5c93..0961fc105faf 100644 --- a/velox/benchmarks/tpch/CMakeLists.txt +++ b/velox/benchmarks/tpch/CMakeLists.txt @@ -33,8 +33,8 @@ target_link_libraries( velox_type_fbhive velox_caching velox_vector_test_lib - Folly::folly ${FOLLY_BENCHMARK} + Folly::folly fmt::fmt) add_executable(velox_tpch_benchmark TpchBenchmarkMain.cpp) diff --git a/velox/benchmarks/tpch/TpchBenchmarkMain.cpp b/velox/benchmarks/tpch/TpchBenchmarkMain.cpp index acd59b3878fc..4477455d8f3c 100644 --- a/velox/benchmarks/tpch/TpchBenchmarkMain.cpp +++ b/velox/benchmarks/tpch/TpchBenchmarkMain.cpp @@ -23,6 +23,6 @@ int main(int argc, char** argv) { std::string kUsage( "This program benchmarks TPC-H queries. Run 'velox_tpch_benchmark -helpon=TpchBenchmark' for available options.\n"); gflags::SetUsageMessage(kUsage); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; tpchBenchmarkMain(); } diff --git a/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp b/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp index d267274ce56f..6038c358dfb0 100644 --- a/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp +++ b/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp @@ -435,7 +435,7 @@ BENCHMARK_RELATIVE_MULTI(MmapReallocateMix64) { } // namespace int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; // TODO: add to run benchmark as a standalone program with multithreading as // well as actual memory access to trigger minor page faults in OS which traps // into kernel context to setup physical pages for the lazy-mapped virtual diff --git a/velox/common/base/benchmarks/BitUtilBenchmark.cpp b/velox/common/base/benchmarks/BitUtilBenchmark.cpp index 6f8ac7cefbbd..453c61ddcaef 100644 --- a/velox/common/base/benchmarks/BitUtilBenchmark.cpp +++ b/velox/common/base/benchmarks/BitUtilBenchmark.cpp @@ -191,7 +191,7 @@ BENCHMARK_RELATIVE_MULTI(forEachBitFirstBitFalse) { } // namespace facebook int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/common/base/tests/Memcpy.cpp b/velox/common/base/tests/Memcpy.cpp index 236612db45e2..bcca8960986a 100644 --- a/velox/common/base/tests/Memcpy.cpp +++ b/velox/common/base/tests/Memcpy.cpp @@ -58,7 +58,7 @@ struct CopyCallable { int main(int argc, char** argv) { constexpr int32_t kAlignment = folly::hardware_destructive_interference_size; - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; auto chunk = bits::roundUp( std::max(FLAGS_bytes / FLAGS_threads, kAlignment), kAlignment); int64_t bytes = chunk * FLAGS_threads; diff --git a/velox/common/base/tests/StatsReporterTest.cpp b/velox/common/base/tests/StatsReporterTest.cpp index a40569b689fd..b405f7251383 100644 --- a/velox/common/base/tests/StatsReporterTest.cpp +++ b/velox/common/base/tests/StatsReporterTest.cpp @@ -134,7 +134,7 @@ folly::Singleton reporter([]() { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; facebook::velox::BaseStatsReporter::registered = true; return RUN_ALL_TESTS(); } diff --git a/velox/common/file/benchmark/ReadBenchmarkMain.cpp b/velox/common/file/benchmark/ReadBenchmarkMain.cpp index 848321c92de1..e9d601803651 100644 --- a/velox/common/file/benchmark/ReadBenchmarkMain.cpp +++ b/velox/common/file/benchmark/ReadBenchmarkMain.cpp @@ -24,7 +24,7 @@ using namespace facebook::velox; // and the IO throughput is 100 MBps, then it takes 10 seconds to just read the // data. int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; ReadBenchmark bm; bm.initialize(); bm.run(); diff --git a/velox/common/memory/tests/MemoryPoolBenchmark.cpp b/velox/common/memory/tests/MemoryPoolBenchmark.cpp index ae13d673841e..82296fb7e74f 100644 --- a/velox/common/memory/tests/MemoryPoolBenchmark.cpp +++ b/velox/common/memory/tests/MemoryPoolBenchmark.cpp @@ -239,7 +239,7 @@ BENCHMARK(FlatSticks, iters) { } int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/common/process/ThreadDebugInfo.h b/velox/common/process/ThreadDebugInfo.h index 058a8a3c8e68..545f8a2fee8a 100644 --- a/velox/common/process/ThreadDebugInfo.h +++ b/velox/common/process/ThreadDebugInfo.h @@ -47,9 +47,9 @@ const ThreadDebugInfo* GetThreadDebugInfo(); // Install a signal handler to dump thread local debug information. This should // be called before calling folly::symbolizer::installFatalSignalCallbacks() -// which is usually called at startup via folly::Init(). This is just a default -// implementation but you can install your own signal handler. Make sure to -// install one at the start of your program. +// which is usually called at startup via folly::Init init{}. This is just a +// default implementation but you can install your own signal handler. Make sure +// to install one at the start of your program. void addDefaultFatalSignalHandler(); } // namespace facebook::velox::process diff --git a/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp b/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp index b0cf2fd40a89..a3eec393b000 100644 --- a/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp +++ b/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp @@ -329,7 +329,7 @@ BENCHMARK_DRAW_LINE(); } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); memory::MemoryManager::initialize({}); benchmarkFew = std::make_unique(1'000); diff --git a/velox/connectors/hive/storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp b/velox/connectors/hive/storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp index f18437f9e490..ae6ecb70925e 100644 --- a/velox/connectors/hive/storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp +++ b/velox/connectors/hive/storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp @@ -24,7 +24,7 @@ using namespace facebook::velox; // and the IO throughput is 100 MBps, then it takes 10 seconds to just read the // data. int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; GCSReadBenchmark bm; bm.initialize(); bm.run(); diff --git a/velox/connectors/hive/storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp b/velox/connectors/hive/storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp index 5b9d233f56f1..bb16e6d509d0 100644 --- a/velox/connectors/hive/storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp +++ b/velox/connectors/hive/storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp @@ -24,7 +24,7 @@ using namespace facebook::velox; // and the IO throughput is 100 MBps, then it takes 10 seconds to just read the // data. int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; S3ReadBenchmark bm; bm.initialize(); bm.run(); diff --git a/velox/connectors/hive/storage_adapters/s3fs/tests/S3InsertTest.cpp b/velox/connectors/hive/storage_adapters/s3fs/tests/S3InsertTest.cpp index a1edd2f4ac90..727b62f98e17 100644 --- a/velox/connectors/hive/storage_adapters/s3fs/tests/S3InsertTest.cpp +++ b/velox/connectors/hive/storage_adapters/s3fs/tests/S3InsertTest.cpp @@ -119,6 +119,6 @@ TEST_F(S3InsertTest, s3InsertTest) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/connectors/hive/storage_adapters/s3fs/tests/S3MultipleEndpointsTest.cpp b/velox/connectors/hive/storage_adapters/s3fs/tests/S3MultipleEndpointsTest.cpp index 6d0cb9959c45..23a22a809efe 100644 --- a/velox/connectors/hive/storage_adapters/s3fs/tests/S3MultipleEndpointsTest.cpp +++ b/velox/connectors/hive/storage_adapters/s3fs/tests/S3MultipleEndpointsTest.cpp @@ -174,6 +174,6 @@ TEST_F(S3MultipleEndpoints, s3Join) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/connectors/hive/storage_adapters/s3fs/tests/S3ReadTest.cpp b/velox/connectors/hive/storage_adapters/s3fs/tests/S3ReadTest.cpp index c5c2b86afb97..c53d08764ecb 100644 --- a/velox/connectors/hive/storage_adapters/s3fs/tests/S3ReadTest.cpp +++ b/velox/connectors/hive/storage_adapters/s3fs/tests/S3ReadTest.cpp @@ -90,6 +90,6 @@ TEST_F(S3ReadTest, s3ReadTest) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/connectors/hive/tests/HiveDataSinkTest.cpp b/velox/connectors/hive/tests/HiveDataSinkTest.cpp index ce2e2ed626c8..e10549d0f11d 100644 --- a/velox/connectors/hive/tests/HiveDataSinkTest.cpp +++ b/velox/connectors/hive/tests/HiveDataSinkTest.cpp @@ -906,6 +906,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); // Signal handler required for ThreadDebugInfoTest facebook::velox::process::addDefaultFatalSignalHandler(); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/connectors/tpch/tests/SpeedTest.cpp b/velox/connectors/tpch/tests/SpeedTest.cpp index 3817fbc8bb5f..d212386de16e 100644 --- a/velox/connectors/tpch/tests/SpeedTest.cpp +++ b/velox/connectors/tpch/tests/SpeedTest.cpp @@ -180,7 +180,7 @@ class TpchSpeedTest { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; TpchSpeedTest speedTest; speedTest.run( diff --git a/velox/connectors/tpch/tests/TpchConnectorTest.cpp b/velox/connectors/tpch/tests/TpchConnectorTest.cpp index 1a1eeb02d491..74459930497c 100644 --- a/velox/connectors/tpch/tests/TpchConnectorTest.cpp +++ b/velox/connectors/tpch/tests/TpchConnectorTest.cpp @@ -290,6 +290,6 @@ TEST_F(TpchConnectorTest, orderDateCount) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp b/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp index fd2bb793521d..cbe9072cb01e 100644 --- a/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp +++ b/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp @@ -593,7 +593,7 @@ void naiveDecodeBitsLE( } int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; // Populate uint32 buffer diff --git a/velox/dwio/common/tests/DataBufferBenchmark.cpp b/velox/dwio/common/tests/DataBufferBenchmark.cpp index efc6ebafe4d2..42397b3e837d 100644 --- a/velox/dwio/common/tests/DataBufferBenchmark.cpp +++ b/velox/dwio/common/tests/DataBufferBenchmark.cpp @@ -53,7 +53,7 @@ BENCHMARK(ChainedBufferOps, iters) { } int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); facebook::velox::memory::MemoryManager::initialize({}); return 0; diff --git a/velox/dwio/common/tests/IntDecoderBenchmark.cpp b/velox/dwio/common/tests/IntDecoderBenchmark.cpp index fab234c025b2..48e61768a227 100644 --- a/velox/dwio/common/tests/IntDecoderBenchmark.cpp +++ b/velox/dwio/common/tests/IntDecoderBenchmark.cpp @@ -939,7 +939,7 @@ BENCHMARK_RELATIVE(decodeNew_64) { } int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; // Populate uint16 buffer buffer_u16.resize(kNumElements); diff --git a/velox/dwio/dwrf/test/E2EFilterTest.cpp b/velox/dwio/dwrf/test/E2EFilterTest.cpp index cc501126e1c8..3f397e04d97f 100644 --- a/velox/dwio/dwrf/test/E2EFilterTest.cpp +++ b/velox/dwio/dwrf/test/E2EFilterTest.cpp @@ -453,6 +453,6 @@ TEST_F(E2EFilterTest, mutationCornerCases) { // Define main so that gflags get processed. int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp b/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp index f6e8e7aa4df6..30f70a2bc529 100644 --- a/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp +++ b/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp @@ -129,7 +129,7 @@ BENCHMARK(FloatColumnWriterBenchmark10000) { } int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; diff --git a/velox/dwio/dwrf/test/IntEncoderBenchmark.cpp b/velox/dwio/dwrf/test/IntEncoderBenchmark.cpp index 4026819aa69a..5de1d7d5daed 100644 --- a/velox/dwio/dwrf/test/IntEncoderBenchmark.cpp +++ b/velox/dwio/dwrf/test/IntEncoderBenchmark.cpp @@ -204,7 +204,7 @@ BENCHMARK_RELATIVE(GenerateAutoIdNew_64) { } int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; diff --git a/velox/dwio/parquet/tests/ParquetTpchTest.cpp b/velox/dwio/parquet/tests/ParquetTpchTest.cpp index 3fd47964c4ff..a6584497c20e 100644 --- a/velox/dwio/parquet/tests/ParquetTpchTest.cpp +++ b/velox/dwio/parquet/tests/ParquetTpchTest.cpp @@ -248,6 +248,6 @@ TEST_F(ParquetTpchTest, Q22) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/parquet/tests/reader/E2EFilterTest.cpp b/velox/dwio/parquet/tests/reader/E2EFilterTest.cpp index 5e4bf729431d..ba0a18cb3165 100644 --- a/velox/dwio/parquet/tests/reader/E2EFilterTest.cpp +++ b/velox/dwio/parquet/tests/reader/E2EFilterTest.cpp @@ -683,6 +683,6 @@ TEST_F(E2EFilterTest, configurableWriteSchema) { // Define main so that gflags get processed. int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp b/velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp index 0829a6ee628c..a15a1060f714 100644 --- a/velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp +++ b/velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp @@ -404,7 +404,7 @@ PARQUET_BENCHMARKS_NO_FILTER(ARRAY(BIGINT()), List); // TODO: Add all data types int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; diff --git a/velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp b/velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp index 5cb7b7592593..1ec63e3e793a 100644 --- a/velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp +++ b/velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp @@ -445,6 +445,6 @@ TEST_F(ParquetTableScanTest, readAsLowerCase) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp b/velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp index 2fed88512f6d..68ddc6d9fced 100644 --- a/velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp +++ b/velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp @@ -106,6 +106,6 @@ TEST_F(ThriftTransportTest, bufferedOutOfBoundry) { // Define main so that gflags get processed. int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/examples/OperatorExtensibility.cpp b/velox/examples/OperatorExtensibility.cpp index efd4b3307350..b002fe019675 100644 --- a/velox/examples/OperatorExtensibility.cpp +++ b/velox/examples/OperatorExtensibility.cpp @@ -160,7 +160,7 @@ class DuplicateRowTranslator : public exec::Operator::PlanNodeTranslator { }; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; // Fourth, we register the custom plan translator. We're now ready to use our // operator in a query plan. diff --git a/velox/examples/ScanAndSort.cpp b/velox/examples/ScanAndSort.cpp index 2f54b17bba5e..ec73732c2d58 100644 --- a/velox/examples/ScanAndSort.cpp +++ b/velox/examples/ScanAndSort.cpp @@ -42,7 +42,7 @@ using exec::test::HiveConnectorTestBase; int main(int argc, char** argv) { // Velox Tasks/Operators are based on folly's async framework, so we need to // make sure we initialize it first. - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; // Default memory allocator used throughout this example. memory::MemoryManager::initialize({}); diff --git a/velox/examples/ScanOrc.cpp b/velox/examples/ScanOrc.cpp index bed6e6aa9d32..8b76af9ab2bd 100644 --- a/velox/examples/ScanOrc.cpp +++ b/velox/examples/ScanOrc.cpp @@ -31,7 +31,7 @@ using namespace facebook::velox::dwrf; // Used to compare the ORC data read by DWRFReader against apache-orc repo. // Usage: velox_example_scan_orc {orc_file_path} int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; if (argc < 2) { return 1; diff --git a/velox/exec/benchmarks/ExchangeBenchmark.cpp b/velox/exec/benchmarks/ExchangeBenchmark.cpp index dfd3ddffdf69..b0371128908f 100644 --- a/velox/exec/benchmarks/ExchangeBenchmark.cpp +++ b/velox/exec/benchmarks/ExchangeBenchmark.cpp @@ -384,7 +384,7 @@ BENCHMARK(localFlat10k) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; memory::MemoryManager::initialize({}); functions::prestosql::registerAllScalarFunctions(); aggregate::prestosql::registerAllAggregateFunctions(); diff --git a/velox/exec/benchmarks/FilterProjectBenchmark.cpp b/velox/exec/benchmarks/FilterProjectBenchmark.cpp index fd74c1e8359e..30d854e8ce1a 100644 --- a/velox/exec/benchmarks/FilterProjectBenchmark.cpp +++ b/velox/exec/benchmarks/FilterProjectBenchmark.cpp @@ -266,7 +266,7 @@ class FilterProjectBenchmark : public VectorTestBase { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; functions::prestosql::registerAllScalarFunctions(); aggregate::prestosql::registerAllAggregateFunctions(); parse::registerTypeResolver(); diff --git a/velox/exec/benchmarks/HashTableBenchmark.cpp b/velox/exec/benchmarks/HashTableBenchmark.cpp index a11b88360169..2ac69469f8a2 100644 --- a/velox/exec/benchmarks/HashTableBenchmark.cpp +++ b/velox/exec/benchmarks/HashTableBenchmark.cpp @@ -612,7 +612,7 @@ void combineResults( } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; memory::MemoryManagerOptions options; options.useMmapAllocator = true; options.allocatorCapacity = 10UL << 30; diff --git a/velox/exec/benchmarks/MergeBenchmark.cpp b/velox/exec/benchmarks/MergeBenchmark.cpp index e44819e57c8e..cb8e8dba2c97 100644 --- a/velox/exec/benchmarks/MergeBenchmark.cpp +++ b/velox/exec/benchmarks/MergeBenchmark.cpp @@ -54,7 +54,7 @@ BENCHMARK_RELATIVE(wideArray) { } int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); MergeTestBase test; test.seed(1); diff --git a/velox/exec/benchmarks/RowContainerSortBenchmark.cpp b/velox/exec/benchmarks/RowContainerSortBenchmark.cpp index 95269631b42b..00ed39771a66 100644 --- a/velox/exec/benchmarks/RowContainerSortBenchmark.cpp +++ b/velox/exec/benchmarks/RowContainerSortBenchmark.cpp @@ -233,7 +233,7 @@ BENCHMARK_DRAW_LINE(); } // namespace facebook::velox::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; diff --git a/velox/exec/benchmarks/VectorHasherBenchmark.cpp b/velox/exec/benchmarks/VectorHasherBenchmark.cpp index 6a70133131dd..d594aadbe888 100644 --- a/velox/exec/benchmarks/VectorHasherBenchmark.cpp +++ b/velox/exec/benchmarks/VectorHasherBenchmark.cpp @@ -240,7 +240,7 @@ BENCHMARK(computeValueIdsLowCardinalityNotAllUsed) { } int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; diff --git a/velox/exec/tests/ExchangeFuzzer.cpp b/velox/exec/tests/ExchangeFuzzer.cpp index 13380e9b421b..c092b8e53bea 100644 --- a/velox/exec/tests/ExchangeFuzzer.cpp +++ b/velox/exec/tests/ExchangeFuzzer.cpp @@ -404,7 +404,7 @@ class ExchangeFuzzer : public VectorTestBase { int32_t ExchangeFuzzer::iteration_; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; memory::MemoryManagerOptions options; options.useMmapAllocator = true; options.allocatorCapacity = 20UL << 30; diff --git a/velox/exec/tests/VeloxIn10MinDemo.cpp b/velox/exec/tests/VeloxIn10MinDemo.cpp index d38122fd8972..1ed5c89fedce 100644 --- a/velox/exec/tests/VeloxIn10MinDemo.cpp +++ b/velox/exec/tests/VeloxIn10MinDemo.cpp @@ -291,7 +291,7 @@ void VeloxIn10MinDemo::run() { } int main(int argc, char** argv) { - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; VeloxIn10MinDemo demo; demo.run(); diff --git a/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp b/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp index 7671d560d9bb..4dec69416819 100644 --- a/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp +++ b/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp @@ -24,7 +24,7 @@ using namespace facebook::velox; using namespace facebook::velox::codegen; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; CodegenBenchmark benchmark; diff --git a/velox/experimental/gpu/tests/BlockingQueueTest.cu b/velox/experimental/gpu/tests/BlockingQueueTest.cu index e15354f29aee..3e59c2e2d6b8 100644 --- a/velox/experimental/gpu/tests/BlockingQueueTest.cu +++ b/velox/experimental/gpu/tests/BlockingQueueTest.cu @@ -281,7 +281,7 @@ void runKernelLaunches() { int main(int argc, char** argv) { using namespace facebook::velox::gpu; - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; checkDeviceProperties(); runCpuGpuPingPong(); printf("\n"); diff --git a/velox/experimental/gpu/tests/DependencyWatchTest.cu b/velox/experimental/gpu/tests/DependencyWatchTest.cu index f605436d55ce..31fd8c536332 100644 --- a/velox/experimental/gpu/tests/DependencyWatchTest.cu +++ b/velox/experimental/gpu/tests/DependencyWatchTest.cu @@ -97,7 +97,7 @@ void schedule(Node* nodes, int size, States* states) { int main(int argc, char** argv) { using namespace facebook::velox::gpu; - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; Node* nodes; CUDA_CHECK_FATAL(cudaMallocManaged(&nodes, FLAGS_node_count * sizeof(Node))); for (int i = 0; i < FLAGS_node_count; ++i) { diff --git a/velox/experimental/gpu/tests/DoubleBufferProcessTest.cu b/velox/experimental/gpu/tests/DoubleBufferProcessTest.cu index c1005c533108..79070fb4ea18 100644 --- a/velox/experimental/gpu/tests/DoubleBufferProcessTest.cu +++ b/velox/experimental/gpu/tests/DoubleBufferProcessTest.cu @@ -197,7 +197,7 @@ void testCudaEvent(int deviceId) { int main(int argc, char** argv) { using namespace facebook::velox::gpu; - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; int deviceCount; CUDA_CHECK_FATAL(cudaGetDeviceCount(&deviceCount)); printf("Device count: %d\n", deviceCount); diff --git a/velox/experimental/gpu/tests/HashTableTest.cu b/velox/experimental/gpu/tests/HashTableTest.cu index e45bb61d2b20..d1d5ac23ef25 100644 --- a/velox/experimental/gpu/tests/HashTableTest.cu +++ b/velox/experimental/gpu/tests/HashTableTest.cu @@ -745,7 +745,7 @@ void runPartitioned() { int main(int argc, char** argv) { using namespace facebook::velox::gpu; - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; assert(__builtin_popcount(FLAGS_table_size) == 1); assert(FLAGS_table_size % kBlockSize == 0); CUDA_CHECK_FATAL(cudaSetDevice(FLAGS_device)); diff --git a/velox/experimental/wave/common/tests/CudaTest.cpp b/velox/experimental/wave/common/tests/CudaTest.cpp index 7bb5c36c8ef5..62ec21ff75dd 100644 --- a/velox/experimental/wave/common/tests/CudaTest.cpp +++ b/velox/experimental/wave/common/tests/CudaTest.cpp @@ -898,7 +898,7 @@ TEST_F(CudaTest, reduceMatrix) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; if (int device; cudaGetDevice(&device) != cudaSuccess) { LOG(WARNING) << "No CUDA detected, skipping all tests"; return 0; diff --git a/velox/experimental/wave/exec/tests/Main.cpp b/velox/experimental/wave/exec/tests/Main.cpp index 970f35d8180a..8bf768f54a66 100644 --- a/velox/experimental/wave/exec/tests/Main.cpp +++ b/velox/experimental/wave/exec/tests/Main.cpp @@ -24,6 +24,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); // Signal handler required for ThreadDebugInfoTest facebook::velox::process::addDefaultFatalSignalHandler(); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/expression/benchmarks/CallNullFreeBenchmark.cpp b/velox/expression/benchmarks/CallNullFreeBenchmark.cpp index 43ca62870308..a1498b87806a 100644 --- a/velox/expression/benchmarks/CallNullFreeBenchmark.cpp +++ b/velox/expression/benchmarks/CallNullFreeBenchmark.cpp @@ -312,7 +312,7 @@ BENCHMARK_MULTI(simpleMinIntegerNullFreeFastPath) { } // namespace facebook::velox::functions int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::functions::CallNullFreeBenchmark benchmark; benchmark.test(); folly::runBenchmarks(); diff --git a/velox/expression/benchmarks/TryBenchmark.cpp b/velox/expression/benchmarks/TryBenchmark.cpp index 61e6fed47542..8a947d78520a 100644 --- a/velox/expression/benchmarks/TryBenchmark.cpp +++ b/velox/expression/benchmarks/TryBenchmark.cpp @@ -185,7 +185,7 @@ BENCHMARK_MULTI(divideAllExceptions) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/expression/benchmarks/VariadicBenchmark.cpp b/velox/expression/benchmarks/VariadicBenchmark.cpp index 1bc058848a9e..457dbd69efd8 100644 --- a/velox/expression/benchmarks/VariadicBenchmark.cpp +++ b/velox/expression/benchmarks/VariadicBenchmark.cpp @@ -194,7 +194,7 @@ BENCHMARK_MULTI(simpleVariadicLotsOfArgs) { } // namespace facebook::velox::functions int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::functions::VariadicBenchmark benchmark; benchmark.test(); folly::runBenchmarks(); diff --git a/velox/functions/lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp b/velox/functions/lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp index b9dd530d822f..bd1236d523da 100644 --- a/velox/functions/lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp +++ b/velox/functions/lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp @@ -115,7 +115,7 @@ BENCHMARK_NAMED_PARAM(merge, capacity2048, 1e6, 2048) } // namespace facebook::velox::functions int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/velox/functions/lib/benchmarks/KllSketchBenchmark.cpp b/velox/functions/lib/benchmarks/KllSketchBenchmark.cpp index 2b78ec7edf80..9257e8df583f 100644 --- a/velox/functions/lib/benchmarks/KllSketchBenchmark.cpp +++ b/velox/functions/lib/benchmarks/KllSketchBenchmark.cpp @@ -188,7 +188,7 @@ BENCHMARK_RELATIVE_NAMED_PARAM(mergeKllSketch, 1e6x80, 1e6, 80); } // namespace facebook::velox::functions::kll::test int main(int argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; gflags::ParseCommandLineFlags(&argc, &argv, true); folly::runBenchmarks(); return 0; diff --git a/velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp b/velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp index 1e852bf290d2..50f7c6f43ef7 100644 --- a/velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp +++ b/velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp @@ -103,7 +103,7 @@ void registerRe2Functions() { } // namespace facebook::velox::functions::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::functions::test::registerRe2Functions(); facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); diff --git a/velox/functions/prestosql/BinaryFunctions.h b/velox/functions/prestosql/BinaryFunctions.h index 1f945a1609de..6238a729b248 100644 --- a/velox/functions/prestosql/BinaryFunctions.h +++ b/velox/functions/prestosql/BinaryFunctions.h @@ -19,10 +19,7 @@ #define XXH_INLINE_ALL #include -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include "folly/ssl/OpenSSLHash.h" -#pragma GCC diagnostic pop #include "velox/common/base/BitUtil.h" #include "velox/common/encode/Base64.h" #include "velox/external/md5/md5.h" diff --git a/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp b/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp index 2bcc735dcba4..5facd36cb7f2 100644 --- a/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp +++ b/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp @@ -268,7 +268,7 @@ BENCHMARK_DRAW_LINE(); } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; memory::MemoryManager::initialize({}); benchmark = std::make_unique(); folly::runBenchmarks(); diff --git a/velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp index 3d452e1d9b3e..df091822eaf5 100644 --- a/velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp @@ -67,7 +67,7 @@ VELOX_UDF_END(); } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; functions::prestosql::registerArrayFunctions(); registerFunction< diff --git a/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp index e3249b41d000..243e4124e5a1 100644 --- a/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp @@ -46,7 +46,7 @@ void registerTestSimpleFunctions() { using namespace facebook::velox; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; functions::prestosql::registerArrayFunctions(); functions::registerTestVectorFunctionBasic(); diff --git a/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp index 81cb138c6524..c59741fa6c1c 100644 --- a/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp @@ -222,7 +222,7 @@ BENCHMARK_RELATIVE(vectorBasicIntegerWithInstance) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp index 4b649cd55fa4..ec2b88e94a77 100644 --- a/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp @@ -27,7 +27,7 @@ using namespace facebook::velox::exec; using namespace facebook::velox::functions; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; functions::prestosql::registerArrayFunctions(); registerFunction>( diff --git a/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp index 191ec5c1b48f..02372fa5c74f 100644 --- a/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp @@ -275,7 +275,7 @@ BENCHMARK_MULTI(std_reference) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::exec::ArrayWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp b/velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp index 712441e7e2a9..f62c506ff1af 100644 --- a/velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp @@ -154,7 +154,7 @@ BENCHMARK_RELATIVE(bitwise_shift_left) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp b/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp index 99c7f84d21d0..720b1d70b2b3 100644 --- a/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp @@ -238,7 +238,7 @@ BENCHMARK(vectorConditional) { } int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp b/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp index 49c1e790c3be..6253de929114 100644 --- a/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp @@ -180,7 +180,7 @@ BENCHMARK_MULTI(Gt_Velox) { } // namespace facebook::velox::functions::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp b/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp index 4331b986e10b..0c1f9bdef81e 100644 --- a/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp @@ -109,7 +109,7 @@ BENCHMARK_RELATIVE(simd_tinyint_eq) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp b/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp index 56b0ee058ba5..b753c95f1155 100644 --- a/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp @@ -137,7 +137,7 @@ BENCHMARK_MULTI(flattenAndConstantFold, n) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp b/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp index 4348e99a8145..5ecab3eae1cb 100644 --- a/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp @@ -200,7 +200,7 @@ BENCHMARK(second) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/InBenchmark.cpp b/velox/functions/prestosql/benchmarks/InBenchmark.cpp index 7f3955349058..8b07463450e6 100644 --- a/velox/functions/prestosql/benchmarks/InBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/InBenchmark.cpp @@ -129,7 +129,7 @@ BENCHMARK_RELATIVE(in1K) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp b/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp index b798c2640f9e..3c18a0797d0a 100644 --- a/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp @@ -474,7 +474,7 @@ BENCHMARK_DRAW_LINE(); } // namespace facebook::velox::functions::prestosql int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/functions/prestosql/benchmarks/MapBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapBenchmark.cpp index 01e718f8895f..f7a1d2ac56a7 100644 --- a/velox/functions/prestosql/benchmarks/MapBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/MapBenchmark.cpp @@ -83,7 +83,7 @@ BENCHMARK_MULTI(flatKeys, n) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp index c657949681f8..26f2a03136fa 100644 --- a/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp @@ -434,7 +434,7 @@ BENCHMARK_RELATIVE(nestedMapSumVectorFunctionMapView) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; MapInputBenchmark benchmark; if (benchmark.testMapSum() && benchmark.testNestedMapSum()) { diff --git a/velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp b/velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp index 5660439b9cbd..aa705b198a2f 100644 --- a/velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp +++ b/velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp @@ -255,7 +255,7 @@ BENCHMARK(simple_general, n) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::exec::MapWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp index c4ec34fc8365..3ec68b047cf6 100644 --- a/velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp @@ -123,7 +123,7 @@ BENCHMARK_MULTI(dictionaryKeys, n) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp index 798990bbef7c..e2f4584a96e5 100644 --- a/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp @@ -194,7 +194,7 @@ BENCHMARK_MULTI(simple) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::exec::NestedArrayWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/NotBenchmark.cpp b/velox/functions/prestosql/benchmarks/NotBenchmark.cpp index 236b5cd34beb..c4f097c1f009 100644 --- a/velox/functions/prestosql/benchmarks/NotBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/NotBenchmark.cpp @@ -79,7 +79,7 @@ BENCHMARK_RELATIVE(vectorizedNot) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/Row.cpp b/velox/functions/prestosql/benchmarks/Row.cpp index 5118c6eb821d..f1cf3b278dfa 100644 --- a/velox/functions/prestosql/benchmarks/Row.cpp +++ b/velox/functions/prestosql/benchmarks/Row.cpp @@ -73,7 +73,7 @@ BENCHMARK(copyMostlyConst) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp index 67b897b272a9..0d42eb1353c8 100644 --- a/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp @@ -220,7 +220,7 @@ BENCHMARK_MULTI(complex_row) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::exec::RowWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp b/velox/functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp index 12b526fef848..395dcd6ae184 100644 --- a/velox/functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp @@ -352,7 +352,7 @@ BENCHMARK(ArraySubscript_ArrayRowIntInt) { } int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; benchmark = std::make_unique(); benchmark->test(); folly::runBenchmarks(); diff --git a/velox/functions/prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp b/velox/functions/prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp index e23b4c46b5a0..b3dd2e41f926 100644 --- a/velox/functions/prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp +++ b/velox/functions/prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp @@ -185,7 +185,7 @@ BENCHMARK_RELATIVE(aciiRPad) { // asciiUpper 98.22% 68.98ms 14.50 //============================================================================ int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp index 41ff095d2c87..0fc94466fc34 100644 --- a/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp @@ -178,7 +178,7 @@ BENCHMARK_MULTI(array_of_string) { } // namespace facebook::velox::exec int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::exec::StringWriterBenchmark benchmark; benchmark.test(); diff --git a/velox/functions/prestosql/benchmarks/URLBenchmark.cpp b/velox/functions/prestosql/benchmarks/URLBenchmark.cpp index 94cfe5764136..3ba4e941fc27 100644 --- a/velox/functions/prestosql/benchmarks/URLBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/URLBenchmark.cpp @@ -300,7 +300,7 @@ BENCHMARK_RELATIVE(velox_param) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp b/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp index c7be659c4b20..4aeb355c9c2b 100644 --- a/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp @@ -111,7 +111,7 @@ BENCHMARK_RELATIVE(widthBucket) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp b/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp index 33fb428db37f..d9a3f08d4a95 100644 --- a/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp @@ -111,7 +111,7 @@ BENCHMARK_MULTI(NeqSizeFlatFlat) { } // namespace facebook::velox::functions::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp b/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp index fe54035de2de..36cc4c72d16f 100644 --- a/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp +++ b/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp @@ -136,7 +136,7 @@ BENCHMARK_MULTI(fast, n) { } // namespace int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/remote/client/tests/RemoteFunctionTest.cpp b/velox/functions/remote/client/tests/RemoteFunctionTest.cpp index 9f22afca793d..186b7e3237de 100644 --- a/velox/functions/remote/client/tests/RemoteFunctionTest.cpp +++ b/velox/functions/remote/client/tests/RemoteFunctionTest.cpp @@ -180,6 +180,6 @@ VELOX_INSTANTIATE_TEST_SUITE_P( int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/functions/remote/server/RemoteFunctionServiceMain.cpp b/velox/functions/remote/server/RemoteFunctionServiceMain.cpp index 85999b7b13c4..c92ab9231d11 100644 --- a/velox/functions/remote/server/RemoteFunctionServiceMain.cpp +++ b/velox/functions/remote/server/RemoteFunctionServiceMain.cpp @@ -43,7 +43,7 @@ using namespace ::facebook::velox; using ::apache::thrift::ThriftServer; int main(int argc, char* argv[]) { - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; FLAGS_logtostderr = true; // Always registers all Presto functions and make them available under a diff --git a/velox/functions/sparksql/String.h b/velox/functions/sparksql/String.h index 5b4b3b6228bb..ad135b71ee76 100644 --- a/velox/functions/sparksql/String.h +++ b/velox/functions/sparksql/String.h @@ -15,10 +15,7 @@ */ #pragma once -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include "folly/ssl/OpenSSLHash.h" -#pragma GCC diagnostic pop #include #include diff --git a/velox/functions/sparksql/benchmarks/In.cpp b/velox/functions/sparksql/benchmarks/In.cpp index bfe7ad39faab..45600ece0ef7 100644 --- a/velox/functions/sparksql/benchmarks/In.cpp +++ b/velox/functions/sparksql/benchmarks/In.cpp @@ -124,7 +124,7 @@ void registerInFunctions() { } // namespace facebook::velox::functions::sparksql int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::functions::registerPrestoIn(); facebook::velox::functions::sparksql::registerInFunctions(); facebook::velox::functions::registerArrayConstructor(); diff --git a/velox/functions/sparksql/window/tests/Main.cpp b/velox/functions/sparksql/window/tests/Main.cpp index 684d28a08797..fe6fb2fb6aee 100644 --- a/velox/functions/sparksql/window/tests/Main.cpp +++ b/velox/functions/sparksql/window/tests/Main.cpp @@ -18,6 +18,6 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp b/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp index 38b71c11d354..e32623244a7a 100644 --- a/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp +++ b/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp @@ -173,7 +173,7 @@ BENCHMARK_NAMED_PARAM_MULTI( } // namespace facebook::spark::benchmarks int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; diff --git a/velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp b/velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp index 74eb8501d758..ee9f43c7984a 100644 --- a/velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp +++ b/velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp @@ -299,7 +299,7 @@ SERDE_BENCHMARKS( } // namespace facebook::velox::row int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; diff --git a/velox/serializers/tests/SerializerBenchmark.cpp b/velox/serializers/tests/SerializerBenchmark.cpp index 0a3131f2dafe..d6aeb1f3add7 100644 --- a/velox/serializers/tests/SerializerBenchmark.cpp +++ b/velox/serializers/tests/SerializerBenchmark.cpp @@ -150,7 +150,7 @@ class SerializerBenchmark : public VectorTestBase { }; int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; serializer::presto::PrestoVectorSerde::registerVectorSerde(); SerializerBenchmark bm; bm.setup(); diff --git a/velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp b/velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp index 37806134e913..d9af98c2e7bb 100644 --- a/velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp +++ b/velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp @@ -509,6 +509,6 @@ TEST_F(VeloxSubstraitRoundTripTest, dateType) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/tpch/gen/tests/TpchGenTest.cpp b/velox/tpch/gen/tests/TpchGenTest.cpp index c177ae2f79eb..637907b499ad 100644 --- a/velox/tpch/gen/tests/TpchGenTest.cpp +++ b/velox/tpch/gen/tests/TpchGenTest.cpp @@ -850,6 +850,6 @@ TEST_F(TpchGenTestCustomerTest, reproducible) { int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); - folly::init(&argc, &argv, false); + folly::Init init{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/type/tests/FilterBenchmark.cpp b/velox/type/tests/FilterBenchmark.cpp index ead694fe61dc..c699b4da1e95 100644 --- a/velox/type/tests/FilterBenchmark.cpp +++ b/velox/type/tests/FilterBenchmark.cpp @@ -70,7 +70,7 @@ BENCHMARK_RELATIVE(simdSparse) { int32_t main(int32_t argc, char* argv[]) { constexpr int32_t kNumValues = 1000000; constexpr int32_t kFilterValues = 1000; - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; std::vector filterValues; filterValues.reserve(kFilterValues); diff --git a/velox/type/tests/NegatedBigintRangeBenchmark.cpp b/velox/type/tests/NegatedBigintRangeBenchmark.cpp index 4c4c4369de0d..7da7b4073a7e 100644 --- a/velox/type/tests/NegatedBigintRangeBenchmark.cpp +++ b/velox/type/tests/NegatedBigintRangeBenchmark.cpp @@ -118,7 +118,7 @@ DEFINE_RANGE_BENCHMARKS(9000) DEFINE_RANGE_BENCHMARKS(9900) int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; constexpr int32_t kNumValues = 1000000; constexpr int64_t distinctVals = 20001; // -10000 to 10000 const std::vector pctZeros = {0, 1, 5, 10, 50, 90, 95, 99, 100}; diff --git a/velox/type/tests/NegatedBytesRangeBenchmark.cpp b/velox/type/tests/NegatedBytesRangeBenchmark.cpp index fe0a0d0b5cbb..3ed0b3cef249 100644 --- a/velox/type/tests/NegatedBytesRangeBenchmark.cpp +++ b/velox/type/tests/NegatedBytesRangeBenchmark.cpp @@ -129,7 +129,7 @@ DEFINE_BENCHMARKS(100, 94) DEFINE_BENCHMARKS(100, 98) int32_t main(int32_t argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; constexpr int32_t kNumValues = 1000000; constexpr int32_t kStringPoolSize = 20000; const std::vector stringLengths = {2, 3, 5, 10, 100}; diff --git a/velox/type/tests/NegatedBytesValuesBenchmark.cpp b/velox/type/tests/NegatedBytesValuesBenchmark.cpp index 3217e6c316f8..cac1d449f904 100644 --- a/velox/type/tests/NegatedBytesValuesBenchmark.cpp +++ b/velox/type/tests/NegatedBytesValuesBenchmark.cpp @@ -121,7 +121,7 @@ DEFINE_BENCHMARKS(100, 1000) DEFINE_BENCHMARKS(100, 10000) int32_t main(int32_t argc, char* argv[]) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; constexpr int32_t k_num_values = 1000000; constexpr int32_t k_string_pool_size = 20000; const std::vector string_lengths = {1, 2, 5, 10, 100}; diff --git a/velox/type/tests/NegatedValuesFilterBenchmark.cpp b/velox/type/tests/NegatedValuesFilterBenchmark.cpp index b613911cc24f..62393b9124b1 100644 --- a/velox/type/tests/NegatedValuesFilterBenchmark.cpp +++ b/velox/type/tests/NegatedValuesFilterBenchmark.cpp @@ -125,7 +125,7 @@ int32_t main(int32_t argc, char* argv[]) { 1000, 1000, 10000, 10, 1000, 1000, 1000}; std::vector> rejectedValues; - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; rejectedValues.reserve(kFilterSizes.size()); for (auto i = 0; i < kFilterSizes.size(); ++i) { diff --git a/velox/type/tests/StringViewBenchmark.cpp b/velox/type/tests/StringViewBenchmark.cpp index d4cb5e63423c..c710b21df57d 100644 --- a/velox/type/tests/StringViewBenchmark.cpp +++ b/velox/type/tests/StringViewBenchmark.cpp @@ -53,7 +53,7 @@ BENCHMARK_PARAM(runStringViewCreate, NON_INLINE_SIZE); } // namespace facebook::velox int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/CopyBenchmark.cpp b/velox/vector/benchmarks/CopyBenchmark.cpp index 0fbeb2ed202c..bd7f2c7db697 100644 --- a/velox/vector/benchmarks/CopyBenchmark.cpp +++ b/velox/vector/benchmarks/CopyBenchmark.cpp @@ -364,7 +364,7 @@ BENCHMARK_MULTI(copyStructNonContiguous) { } // namespace facebook::velox int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; diff --git a/velox/vector/benchmarks/NthBitBenchmark.cpp b/velox/vector/benchmarks/NthBitBenchmark.cpp index d6a4043c53b5..c7d26ed60b95 100644 --- a/velox/vector/benchmarks/NthBitBenchmark.cpp +++ b/velox/vector/benchmarks/NthBitBenchmark.cpp @@ -117,7 +117,7 @@ BENCHMARK_RELATIVE_PARAM(BM_setNthBit_shift_false_unsigned, 1000000); BENCHMARK_DRAW_LINE(); int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp b/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp index a2678843b6a0..61f4ccecc902 100644 --- a/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp +++ b/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp @@ -308,7 +308,7 @@ BENCHMARK_DRAW_LINE(); // buck run @mode/opt-clang-thinlto \ // velox/vector/benchmarks:selectivity_vector_benchmark int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp b/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp index ec8c4c8fb207..374c27449647 100644 --- a/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp +++ b/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp @@ -467,7 +467,7 @@ BENCHMARK_DRAW_LINE(); } // namespace facebook::velox::test int main(int argc, char** argv) { - folly::init(&argc, &argv); + folly::Init init{&argc, &argv}; facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0;