From 4badd548155672a70289626c4023f208d1dfa0e4 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Tue, 7 Nov 2023 03:58:29 +0100 Subject: [PATCH 01/13] bump folly version bump to newest version Revert "bump to newest version" This reverts commit 016f862d4cc2cbf7915692bd94832a640902bc90. use 2023.10.30 use newest folly --- CMake/resolve_dependency_modules/folly/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMake/resolve_dependency_modules/folly/CMakeLists.txt b/CMake/resolve_dependency_modules/folly/CMakeLists.txt index a017409c1bd3..f30df3ca560b 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) From 1d5249a2b308870878d84e43f4e022f1643410ed Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Tue, 5 Dec 2023 05:06:05 +0100 Subject: [PATCH 02/13] be more specific with dependencies --- CMake/resolve_dependency_modules/folly/CMakeLists.txt | 2 +- CMake/resolve_dependency_modules/glog.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMake/resolve_dependency_modules/folly/CMakeLists.txt b/CMake/resolve_dependency_modules/folly/CMakeLists.txt index f30df3ca560b..2734a10b36f7 100644 --- a/CMake/resolve_dependency_modules/folly/CMakeLists.txt +++ b/CMake/resolve_dependency_modules/folly/CMakeLists.txt @@ -56,7 +56,7 @@ get_target_property(_inc folly_base INTERFACE_INCLUDE_DIRECTORIES) target_include_directories(folly_base SYSTEM INTERFACE ${_inc}) 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}) From 83efeb822d3a4934546706cc72aa8d8228a09cae Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 6 Dec 2023 02:37:35 +0100 Subject: [PATCH 03/13] fix link order for folly_benchmark --- velox/benchmarks/tpch/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From ac96a16fd45f0f846b163c573d52b3963717c090 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Thu, 7 Dec 2023 05:35:20 +0100 Subject: [PATCH 04/13] enfore folly as system headers this properly suppresses all warnings that happen within folly headers (e.g. openssl) --- CMake/resolve_dependency_modules/folly/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMake/resolve_dependency_modules/folly/CMakeLists.txt b/CMake/resolve_dependency_modules/folly/CMakeLists.txt index 2734a10b36f7..ffe09fb14b91 100644 --- a/CMake/resolve_dependency_modules/folly/CMakeLists.txt +++ b/CMake/resolve_dependency_modules/folly/CMakeLists.txt @@ -52,8 +52,14 @@ 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_static fmt::fmt) From e556c818631deff86767a03dcc7eee7dbaeb70a1 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Thu, 7 Dec 2023 06:52:35 +0100 Subject: [PATCH 05/13] remove unnecessary pragmas --- velox/functions/prestosql/BinaryFunctions.h | 3 --- velox/functions/sparksql/String.h | 3 --- 2 files changed, 6 deletions(-) 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/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 From 129f123164d036ec3b789cb3aebe0e5a6be6f0ec Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Thu, 14 Dec 2023 15:56:17 +0100 Subject: [PATCH 06/13] update setup scripts --- scripts/setup-macos.sh | 2 +- scripts/setup-ubuntu.sh | 2 +- scripts/setup-velox-torcharrow.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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..c392208b9bef 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 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 From 3dec5925411e1abffb8d601c091e653a3d5ede61 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 24 Jan 2024 04:40:31 +0100 Subject: [PATCH 07/13] use RAII folly::Init --- velox/benchmarks/basic/ComparisonConjunct.cpp | 2 +- velox/benchmarks/basic/DecodedVector.cpp | 2 +- velox/benchmarks/basic/FeatureNormalization.cpp | 2 +- velox/benchmarks/basic/LikeTpchBenchmark.cpp | 2 +- velox/benchmarks/basic/Preproc.cpp | 2 +- velox/benchmarks/basic/SelectivityVector.cpp | 2 +- velox/benchmarks/basic/SimpleArithmetic.cpp | 2 +- velox/benchmarks/basic/SimpleCastExpr.cpp | 2 +- velox/benchmarks/basic/VectorCompare.cpp | 2 +- velox/benchmarks/basic/VectorFuzzer.cpp | 2 +- velox/benchmarks/basic/VectorSlice.cpp | 2 +- velox/benchmarks/tpch/TpchBenchmarkMain.cpp | 2 +- velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp | 2 +- velox/common/base/benchmarks/BitUtilBenchmark.cpp | 2 +- velox/common/base/tests/Memcpy.cpp | 2 +- velox/common/base/tests/StatsReporterTest.cpp | 2 +- velox/common/file/benchmark/ReadBenchmarkMain.cpp | 2 +- velox/common/memory/tests/MemoryPoolBenchmark.cpp | 2 +- velox/common/process/ThreadDebugInfo.h | 2 +- .../hive/benchmarks/HivePartitionFunctionBenchmark.cpp | 2 +- .../storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp | 2 +- .../storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp | 2 +- .../hive/storage_adapters/s3fs/tests/S3InsertTest.cpp | 2 +- .../storage_adapters/s3fs/tests/S3MultipleEndpointsTest.cpp | 2 +- .../connectors/hive/storage_adapters/s3fs/tests/S3ReadTest.cpp | 2 +- velox/connectors/hive/tests/HiveDataSinkTest.cpp | 2 +- velox/connectors/tpch/tests/SpeedTest.cpp | 2 +- velox/connectors/tpch/tests/TpchConnectorTest.cpp | 2 +- velox/dwio/common/tests/BitPackDecoderBenchmark.cpp | 2 +- velox/dwio/common/tests/DataBufferBenchmark.cpp | 2 +- velox/dwio/common/tests/IntDecoderBenchmark.cpp | 2 +- velox/dwio/dwrf/test/E2EFilterTest.cpp | 2 +- velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp | 2 +- velox/dwio/dwrf/test/IntEncoderBenchmark.cpp | 2 +- velox/dwio/parquet/tests/ParquetTpchTest.cpp | 2 +- velox/dwio/parquet/tests/reader/E2EFilterTest.cpp | 2 +- velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp | 2 +- velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp | 2 +- velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp | 2 +- velox/examples/OperatorExtensibility.cpp | 2 +- velox/examples/ScanAndSort.cpp | 2 +- velox/examples/ScanOrc.cpp | 2 +- velox/exec/benchmarks/ExchangeBenchmark.cpp | 2 +- velox/exec/benchmarks/FilterProjectBenchmark.cpp | 2 +- velox/exec/benchmarks/HashTableBenchmark.cpp | 2 +- velox/exec/benchmarks/MergeBenchmark.cpp | 2 +- velox/exec/benchmarks/RowContainerSortBenchmark.cpp | 2 +- velox/exec/benchmarks/VectorHasherBenchmark.cpp | 2 +- velox/exec/tests/ExchangeFuzzer.cpp | 2 +- velox/exec/tests/VeloxIn10MinDemo.cpp | 2 +- velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp | 2 +- velox/experimental/gpu/tests/BlockingQueueTest.cu | 2 +- velox/experimental/gpu/tests/DependencyWatchTest.cu | 2 +- velox/experimental/gpu/tests/DoubleBufferProcessTest.cu | 2 +- velox/experimental/gpu/tests/HashTableTest.cu | 2 +- velox/experimental/wave/common/tests/CudaTest.cpp | 2 +- velox/experimental/wave/exec/tests/Main.cpp | 2 +- velox/expression/benchmarks/CallNullFreeBenchmark.cpp | 2 +- velox/expression/benchmarks/TryBenchmark.cpp | 2 +- velox/expression/benchmarks/VariadicBenchmark.cpp | 2 +- .../lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp | 2 +- velox/functions/lib/benchmarks/KllSketchBenchmark.cpp | 2 +- velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp | 2 +- .../prestosql/aggregates/benchmarks/SimpleAggregates.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/CompareBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/InBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/MapBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp | 2 +- velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp | 2 +- .../prestosql/benchmarks/NestedArrayWriterBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/NotBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/Row.cpp | 2 +- velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp | 2 +- .../functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp | 2 +- .../prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp | 2 +- velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/URLBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ZipBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp | 2 +- velox/functions/remote/client/tests/RemoteFunctionTest.cpp | 2 +- velox/functions/remote/server/RemoteFunctionServiceMain.cpp | 2 +- velox/functions/sparksql/benchmarks/In.cpp | 2 +- velox/functions/sparksql/window/tests/Main.cpp | 2 +- velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp | 2 +- velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp | 2 +- velox/serializers/tests/SerializerBenchmark.cpp | 2 +- velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp | 2 +- velox/tpch/gen/tests/TpchGenTest.cpp | 2 +- velox/type/tests/FilterBenchmark.cpp | 2 +- velox/type/tests/NegatedBigintRangeBenchmark.cpp | 2 +- velox/type/tests/NegatedBytesRangeBenchmark.cpp | 2 +- velox/type/tests/NegatedBytesValuesBenchmark.cpp | 2 +- velox/type/tests/NegatedValuesFilterBenchmark.cpp | 2 +- velox/type/tests/StringViewBenchmark.cpp | 2 +- velox/vector/benchmarks/CopyBenchmark.cpp | 2 +- velox/vector/benchmarks/NthBitBenchmark.cpp | 2 +- velox/vector/benchmarks/SelectivityVectorBenchmark.cpp | 2 +- velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp | 2 +- 111 files changed, 111 insertions(+), 111 deletions(-) diff --git a/velox/benchmarks/basic/ComparisonConjunct.cpp b/velox/benchmarks/basic/ComparisonConjunct.cpp index 28a00211b9bf..37b9459efaeb 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{&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..2ec4c8d19173 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{&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..7ab09f320bef 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{&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..9633ae2e32f1 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{&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..1a7e7547eac0 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{&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..f2f40a5b7571 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{&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..a55a42e82cbe 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{&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..9ac212a202b5 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{&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..10f6d6753686 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{&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..5416e3fa085b 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{&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..dd31e3367c0d 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{&argc, &argv}; using namespace facebook::velox; gflags::ParseCommandLineFlags(&argc, &argv, true); VELOX_CHECK_LE(FLAGS_slice_size, kVectorSize); diff --git a/velox/benchmarks/tpch/TpchBenchmarkMain.cpp b/velox/benchmarks/tpch/TpchBenchmarkMain.cpp index acd59b3878fc..bb270ac086f1 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{&argc, &argv, false}; tpchBenchmarkMain(); } diff --git a/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp b/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp index d267274ce56f..6e78b3adf6b7 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{&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..be0d0819259b 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{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/common/base/tests/Memcpy.cpp b/velox/common/base/tests/Memcpy.cpp index 236612db45e2..87ae3b649453 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{&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..7b5fbb5e561b 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{&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..7dd8c8f76028 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{&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..e2982f1f37ac 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{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/common/process/ThreadDebugInfo.h b/velox/common/process/ThreadDebugInfo.h index 058a8a3c8e68..efc8a83dbc2f 100644 --- a/velox/common/process/ThreadDebugInfo.h +++ b/velox/common/process/ThreadDebugInfo.h @@ -47,7 +47,7 @@ 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 +// 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. void addDefaultFatalSignalHandler(); diff --git a/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp b/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp index b0cf2fd40a89..0b59e5dea39b 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{&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..5a8f4981b018 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{&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..e0037c25e1cf 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{&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..5b8e321149e8 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{&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..e9264dadc11b 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{&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..7e9699ada89e 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{&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..3d11cce601de 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{&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..8fe53eb1f733 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{&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..1f7117b297b8 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{&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..9fff9e28b007 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{&argc, &argv}; // Populate uint32 buffer diff --git a/velox/dwio/common/tests/DataBufferBenchmark.cpp b/velox/dwio/common/tests/DataBufferBenchmark.cpp index efc6ebafe4d2..376342baf37b 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{&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..a55686958bbf 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{&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..b2e61b693a26 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{&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..ed9dc210f71f 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{&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..bccc7880e638 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{&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..bf6021f1ffc2 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{&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..c6f8f5f9a5b3 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{&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..a964384c10f9 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{&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..2b663a032304 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{&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..977332be6c7a 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{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/examples/OperatorExtensibility.cpp b/velox/examples/OperatorExtensibility.cpp index efd4b3307350..a3a01542456c 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{&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..2b0b71ddacf2 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{&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..c9909ed6fa22 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{&argc, &argv}; if (argc < 2) { return 1; diff --git a/velox/exec/benchmarks/ExchangeBenchmark.cpp b/velox/exec/benchmarks/ExchangeBenchmark.cpp index dfd3ddffdf69..09c136bd7082 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{&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..2ffe70c36290 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{&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..77ffbbd950cc 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{&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..8ee8e9a94678 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{&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..f63ebc384c02 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{&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..d3ebdf6d5df7 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{&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..4f2694b2e144 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{&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..5ad8cd8ef8e0 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{&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..e35f665dda2b 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{&argc, &argv}; CodegenBenchmark benchmark; diff --git a/velox/experimental/gpu/tests/BlockingQueueTest.cu b/velox/experimental/gpu/tests/BlockingQueueTest.cu index e15354f29aee..45c37075e2f1 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{&argc, &argv}; checkDeviceProperties(); runCpuGpuPingPong(); printf("\n"); diff --git a/velox/experimental/gpu/tests/DependencyWatchTest.cu b/velox/experimental/gpu/tests/DependencyWatchTest.cu index f605436d55ce..0f28726da92e 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{&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..6793d6f7820c 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{&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..aa28f5c363b6 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{&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..b30f6036668c 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{&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..452787dcfac4 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{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/expression/benchmarks/CallNullFreeBenchmark.cpp b/velox/expression/benchmarks/CallNullFreeBenchmark.cpp index 43ca62870308..83b37decbd2c 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{&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..0502ac2d73ad 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/expression/benchmarks/VariadicBenchmark.cpp b/velox/expression/benchmarks/VariadicBenchmark.cpp index 1bc058848a9e..0d815221100d 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{&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..72b42c3dcd50 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{&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..5f3fc48cc4a3 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{&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..fdd052272f3e 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{&argc, &argv}; facebook::velox::functions::test::registerRe2Functions(); facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); diff --git a/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp b/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp index 2bcc735dcba4..e6c98be788ea 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{&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..f2d6d5b29107 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{&argc, &argv}; functions::prestosql::registerArrayFunctions(); registerFunction< diff --git a/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp index e3249b41d000..c8303da52abb 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{&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..7b1ac51fbcae 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp index 4b649cd55fa4..f9a935c10eda 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{&argc, &argv}; functions::prestosql::registerArrayFunctions(); registerFunction>( diff --git a/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp index 191ec5c1b48f..237a015e4be2 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{&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..81ad9b9ab7dd 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp b/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp index 99c7f84d21d0..51039d772ba1 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{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp b/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp index 49c1e790c3be..96c40dbf4b4f 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp b/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp index 4331b986e10b..efd1bc7b19a4 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp b/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp index 56b0ee058ba5..0d7491eff8df 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{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp b/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp index 4348e99a8145..7cf545032d7c 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/InBenchmark.cpp b/velox/functions/prestosql/benchmarks/InBenchmark.cpp index 7f3955349058..aa644cf00691 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp b/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp index b798c2640f9e..d6e7535f0935 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{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/functions/prestosql/benchmarks/MapBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapBenchmark.cpp index 01e718f8895f..d62bd66bc15d 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{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp index c657949681f8..8e95258f5274 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{&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..c0ad9aa29575 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{&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..37006b5c07b7 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{&argc, &argv}; LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp index 798990bbef7c..62802b65c20f 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{&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..8004918fea91 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/Row.cpp b/velox/functions/prestosql/benchmarks/Row.cpp index 5118c6eb821d..1cd429f6d9c0 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp index 67b897b272a9..2e521db7797a 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{&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..83f37e5dd0df 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{&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..4e85096751ef 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp index 41ff095d2c87..504da0b3c086 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{&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..9f9e58ad9eca 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp b/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp index c7be659c4b20..8a7109b4b0d3 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp b/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp index 33fb428db37f..655f11d61357 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{&argc, &argv}; folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp b/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp index fe54035de2de..1eff0e0799d0 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{&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..df7a110bf5bc 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{&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..1cb82eab7b57 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{&argc, &argv, false}; FLAGS_logtostderr = true; // Always registers all Presto functions and make them available under a diff --git a/velox/functions/sparksql/benchmarks/In.cpp b/velox/functions/sparksql/benchmarks/In.cpp index bfe7ad39faab..539dc18a51ec 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{&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..3ab9aed5dd99 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{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp b/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp index 38b71c11d354..ca0089a358f5 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{&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..9c52cc792d1c 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{&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..b6d07237b815 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{&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..8ad221bb3c64 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{&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..a588f1abb291 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{&argc, &argv, false}; return RUN_ALL_TESTS(); } diff --git a/velox/type/tests/FilterBenchmark.cpp b/velox/type/tests/FilterBenchmark.cpp index ead694fe61dc..be36bf80c976 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{&argc, &argv}; std::vector filterValues; filterValues.reserve(kFilterValues); diff --git a/velox/type/tests/NegatedBigintRangeBenchmark.cpp b/velox/type/tests/NegatedBigintRangeBenchmark.cpp index 4c4c4369de0d..14b0cd4da103 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{&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..19a0fb8ef840 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{&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..6fc810ba6078 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{&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..ee85cf7be77c 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{&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..f0a46014c756 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{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/CopyBenchmark.cpp b/velox/vector/benchmarks/CopyBenchmark.cpp index 0fbeb2ed202c..709a69fd0c10 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{&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..2020ff2af818 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{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp b/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp index a2678843b6a0..3ac27ce1b743 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{&argc, &argv}; folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp b/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp index ec8c4c8fb207..d20eeb097c0b 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{&argc, &argv}; facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; From e99077ee7187872f7900310fb2a7af619cf3f79d Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Thu, 7 Dec 2023 16:55:56 +0100 Subject: [PATCH 08/13] find openssl early --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) 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) From 9edbfbaf42088e148e6937fca254978ae3adb47b Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 24 Jan 2024 04:44:42 +0100 Subject: [PATCH 09/13] remove superflous header edit --- scripts/setup-circleci.sh | 3 --- 1 file changed, 3 deletions(-) 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 From 8e28190e460c8fcf8bb9b40f58e464b0e8a68d9f Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 24 Jan 2024 04:59:35 +0100 Subject: [PATCH 10/13] fix ubuntu setup --- scripts/setup-ubuntu.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index c392208b9bef..14ac9f144b91 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -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 } From e9b78a27233ed1a862aa339aa3c08868c66c34ef Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 24 Jan 2024 16:56:37 +0100 Subject: [PATCH 11/13] Revert "use RAII folly::Init" This reverts commit 3dec5925411e1abffb8d601c091e653a3d5ede61. --- velox/benchmarks/basic/ComparisonConjunct.cpp | 2 +- velox/benchmarks/basic/DecodedVector.cpp | 2 +- velox/benchmarks/basic/FeatureNormalization.cpp | 2 +- velox/benchmarks/basic/LikeTpchBenchmark.cpp | 2 +- velox/benchmarks/basic/Preproc.cpp | 2 +- velox/benchmarks/basic/SelectivityVector.cpp | 2 +- velox/benchmarks/basic/SimpleArithmetic.cpp | 2 +- velox/benchmarks/basic/SimpleCastExpr.cpp | 2 +- velox/benchmarks/basic/VectorCompare.cpp | 2 +- velox/benchmarks/basic/VectorFuzzer.cpp | 2 +- velox/benchmarks/basic/VectorSlice.cpp | 2 +- velox/benchmarks/tpch/TpchBenchmarkMain.cpp | 2 +- velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp | 2 +- velox/common/base/benchmarks/BitUtilBenchmark.cpp | 2 +- velox/common/base/tests/Memcpy.cpp | 2 +- velox/common/base/tests/StatsReporterTest.cpp | 2 +- velox/common/file/benchmark/ReadBenchmarkMain.cpp | 2 +- velox/common/memory/tests/MemoryPoolBenchmark.cpp | 2 +- velox/common/process/ThreadDebugInfo.h | 2 +- .../hive/benchmarks/HivePartitionFunctionBenchmark.cpp | 2 +- .../storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp | 2 +- .../storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp | 2 +- .../hive/storage_adapters/s3fs/tests/S3InsertTest.cpp | 2 +- .../storage_adapters/s3fs/tests/S3MultipleEndpointsTest.cpp | 2 +- .../connectors/hive/storage_adapters/s3fs/tests/S3ReadTest.cpp | 2 +- velox/connectors/hive/tests/HiveDataSinkTest.cpp | 2 +- velox/connectors/tpch/tests/SpeedTest.cpp | 2 +- velox/connectors/tpch/tests/TpchConnectorTest.cpp | 2 +- velox/dwio/common/tests/BitPackDecoderBenchmark.cpp | 2 +- velox/dwio/common/tests/DataBufferBenchmark.cpp | 2 +- velox/dwio/common/tests/IntDecoderBenchmark.cpp | 2 +- velox/dwio/dwrf/test/E2EFilterTest.cpp | 2 +- velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp | 2 +- velox/dwio/dwrf/test/IntEncoderBenchmark.cpp | 2 +- velox/dwio/parquet/tests/ParquetTpchTest.cpp | 2 +- velox/dwio/parquet/tests/reader/E2EFilterTest.cpp | 2 +- velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp | 2 +- velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp | 2 +- velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp | 2 +- velox/examples/OperatorExtensibility.cpp | 2 +- velox/examples/ScanAndSort.cpp | 2 +- velox/examples/ScanOrc.cpp | 2 +- velox/exec/benchmarks/ExchangeBenchmark.cpp | 2 +- velox/exec/benchmarks/FilterProjectBenchmark.cpp | 2 +- velox/exec/benchmarks/HashTableBenchmark.cpp | 2 +- velox/exec/benchmarks/MergeBenchmark.cpp | 2 +- velox/exec/benchmarks/RowContainerSortBenchmark.cpp | 2 +- velox/exec/benchmarks/VectorHasherBenchmark.cpp | 2 +- velox/exec/tests/ExchangeFuzzer.cpp | 2 +- velox/exec/tests/VeloxIn10MinDemo.cpp | 2 +- velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp | 2 +- velox/experimental/gpu/tests/BlockingQueueTest.cu | 2 +- velox/experimental/gpu/tests/DependencyWatchTest.cu | 2 +- velox/experimental/gpu/tests/DoubleBufferProcessTest.cu | 2 +- velox/experimental/gpu/tests/HashTableTest.cu | 2 +- velox/experimental/wave/common/tests/CudaTest.cpp | 2 +- velox/experimental/wave/exec/tests/Main.cpp | 2 +- velox/expression/benchmarks/CallNullFreeBenchmark.cpp | 2 +- velox/expression/benchmarks/TryBenchmark.cpp | 2 +- velox/expression/benchmarks/VariadicBenchmark.cpp | 2 +- .../lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp | 2 +- velox/functions/lib/benchmarks/KllSketchBenchmark.cpp | 2 +- velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp | 2 +- .../prestosql/aggregates/benchmarks/SimpleAggregates.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/CompareBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/InBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/MapBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp | 2 +- velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp | 2 +- .../prestosql/benchmarks/NestedArrayWriterBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/NotBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/Row.cpp | 2 +- velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp | 2 +- .../functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp | 2 +- .../prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp | 2 +- velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/URLBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ZipBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp | 2 +- velox/functions/remote/client/tests/RemoteFunctionTest.cpp | 2 +- velox/functions/remote/server/RemoteFunctionServiceMain.cpp | 2 +- velox/functions/sparksql/benchmarks/In.cpp | 2 +- velox/functions/sparksql/window/tests/Main.cpp | 2 +- velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp | 2 +- velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp | 2 +- velox/serializers/tests/SerializerBenchmark.cpp | 2 +- velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp | 2 +- velox/tpch/gen/tests/TpchGenTest.cpp | 2 +- velox/type/tests/FilterBenchmark.cpp | 2 +- velox/type/tests/NegatedBigintRangeBenchmark.cpp | 2 +- velox/type/tests/NegatedBytesRangeBenchmark.cpp | 2 +- velox/type/tests/NegatedBytesValuesBenchmark.cpp | 2 +- velox/type/tests/NegatedValuesFilterBenchmark.cpp | 2 +- velox/type/tests/StringViewBenchmark.cpp | 2 +- velox/vector/benchmarks/CopyBenchmark.cpp | 2 +- velox/vector/benchmarks/NthBitBenchmark.cpp | 2 +- velox/vector/benchmarks/SelectivityVectorBenchmark.cpp | 2 +- velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp | 2 +- 111 files changed, 111 insertions(+), 111 deletions(-) diff --git a/velox/benchmarks/basic/ComparisonConjunct.cpp b/velox/benchmarks/basic/ComparisonConjunct.cpp index 37b9459efaeb..28a00211b9bf 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(&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 2ec4c8d19173..f4d44a8fa9f0 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(&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 7ab09f320bef..fd328e9e5eb0 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(&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 9633ae2e32f1..5ca4087a13b8 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(&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 1a7e7547eac0..be40b988cf68 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(&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 f2f40a5b7571..734a4857c8ad 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(&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 a55a42e82cbe..8f1d2ef1b044 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(&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 9ac212a202b5..2f26a1446080 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(&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 10f6d6753686..803fbe062d20 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(&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 5416e3fa085b..c7fc6f2c434c 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(&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 dd31e3367c0d..de01ac34c19e 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(&argc, &argv); using namespace facebook::velox; gflags::ParseCommandLineFlags(&argc, &argv, true); VELOX_CHECK_LE(FLAGS_slice_size, kVectorSize); diff --git a/velox/benchmarks/tpch/TpchBenchmarkMain.cpp b/velox/benchmarks/tpch/TpchBenchmarkMain.cpp index bb270ac086f1..acd59b3878fc 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(&argc, &argv, false); tpchBenchmarkMain(); } diff --git a/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp b/velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp index 6e78b3adf6b7..d267274ce56f 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(&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 be0d0819259b..6f8ac7cefbbd 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(&argc, &argv); folly::runBenchmarks(); return 0; } diff --git a/velox/common/base/tests/Memcpy.cpp b/velox/common/base/tests/Memcpy.cpp index 87ae3b649453..236612db45e2 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(&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 7b5fbb5e561b..a40569b689fd 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(&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 7dd8c8f76028..848321c92de1 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(&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 e2982f1f37ac..ae13d673841e 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(&argc, &argv); folly::runBenchmarks(); return 0; } diff --git a/velox/common/process/ThreadDebugInfo.h b/velox/common/process/ThreadDebugInfo.h index efc8a83dbc2f..058a8a3c8e68 100644 --- a/velox/common/process/ThreadDebugInfo.h +++ b/velox/common/process/ThreadDebugInfo.h @@ -47,7 +47,7 @@ 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 +// 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. void addDefaultFatalSignalHandler(); diff --git a/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp b/velox/connectors/hive/benchmarks/HivePartitionFunctionBenchmark.cpp index 0b59e5dea39b..b0cf2fd40a89 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(&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 5a8f4981b018..f18437f9e490 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(&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 e0037c25e1cf..5b9d233f56f1 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(&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 5b8e321149e8..a1edd2f4ac90 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(&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 e9264dadc11b..6d0cb9959c45 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(&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 7e9699ada89e..c5c2b86afb97 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/connectors/hive/tests/HiveDataSinkTest.cpp b/velox/connectors/hive/tests/HiveDataSinkTest.cpp index 3d11cce601de..ce2e2ed626c8 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/connectors/tpch/tests/SpeedTest.cpp b/velox/connectors/tpch/tests/SpeedTest.cpp index 8fe53eb1f733..3817fbc8bb5f 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(&argc, &argv, false); TpchSpeedTest speedTest; speedTest.run( diff --git a/velox/connectors/tpch/tests/TpchConnectorTest.cpp b/velox/connectors/tpch/tests/TpchConnectorTest.cpp index 1f7117b297b8..1a1eeb02d491 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp b/velox/dwio/common/tests/BitPackDecoderBenchmark.cpp index 9fff9e28b007..fd2bb793521d 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(&argc, &argv); // Populate uint32 buffer diff --git a/velox/dwio/common/tests/DataBufferBenchmark.cpp b/velox/dwio/common/tests/DataBufferBenchmark.cpp index 376342baf37b..efc6ebafe4d2 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(&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 a55686958bbf..fab234c025b2 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(&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 b2e61b693a26..cc501126e1c8 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp b/velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp index ed9dc210f71f..f6e8e7aa4df6 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(&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 bccc7880e638..4026819aa69a 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(&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 bf6021f1ffc2..3fd47964c4ff 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(&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 c6f8f5f9a5b3..5e4bf729431d 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(&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 a964384c10f9..0829a6ee628c 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(&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 2b663a032304..5cb7b7592593 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(&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 977332be6c7a..2fed88512f6d 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/examples/OperatorExtensibility.cpp b/velox/examples/OperatorExtensibility.cpp index a3a01542456c..efd4b3307350 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(&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 2b0b71ddacf2..2f54b17bba5e 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(&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 c9909ed6fa22..bed6e6aa9d32 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(&argc, &argv); if (argc < 2) { return 1; diff --git a/velox/exec/benchmarks/ExchangeBenchmark.cpp b/velox/exec/benchmarks/ExchangeBenchmark.cpp index 09c136bd7082..dfd3ddffdf69 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(&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 2ffe70c36290..fd74c1e8359e 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(&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 77ffbbd950cc..a11b88360169 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(&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 8ee8e9a94678..e44819e57c8e 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(&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 f63ebc384c02..95269631b42b 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(&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 d3ebdf6d5df7..6a70133131dd 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(&argc, &argv); memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; diff --git a/velox/exec/tests/ExchangeFuzzer.cpp b/velox/exec/tests/ExchangeFuzzer.cpp index 4f2694b2e144..13380e9b421b 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(&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 5ad8cd8ef8e0..d38122fd8972 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(&argc, &argv, false); VeloxIn10MinDemo demo; demo.run(); diff --git a/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp b/velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp index e35f665dda2b..7671d560d9bb 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(&argc, &argv); CodegenBenchmark benchmark; diff --git a/velox/experimental/gpu/tests/BlockingQueueTest.cu b/velox/experimental/gpu/tests/BlockingQueueTest.cu index 45c37075e2f1..e15354f29aee 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(&argc, &argv); checkDeviceProperties(); runCpuGpuPingPong(); printf("\n"); diff --git a/velox/experimental/gpu/tests/DependencyWatchTest.cu b/velox/experimental/gpu/tests/DependencyWatchTest.cu index 0f28726da92e..f605436d55ce 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(&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 6793d6f7820c..c1005c533108 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(&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 aa28f5c363b6..e45bb61d2b20 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(&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 b30f6036668c..7bb5c36c8ef5 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(&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 452787dcfac4..970f35d8180a 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/expression/benchmarks/CallNullFreeBenchmark.cpp b/velox/expression/benchmarks/CallNullFreeBenchmark.cpp index 83b37decbd2c..43ca62870308 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(&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 0502ac2d73ad..61e6fed47542 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/expression/benchmarks/VariadicBenchmark.cpp b/velox/expression/benchmarks/VariadicBenchmark.cpp index 0d815221100d..1bc058848a9e 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(&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 72b42c3dcd50..b9dd530d822f 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(&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 5f3fc48cc4a3..2b78ec7edf80 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(&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 fdd052272f3e..1e852bf290d2 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(&argc, &argv); facebook::velox::functions::test::registerRe2Functions(); facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); diff --git a/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp b/velox/functions/prestosql/aggregates/benchmarks/SimpleAggregates.cpp index e6c98be788ea..2bcc735dcba4 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(&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 f2d6d5b29107..3d452e1d9b3e 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(&argc, &argv); functions::prestosql::registerArrayFunctions(); registerFunction< diff --git a/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp index c8303da52abb..e3249b41d000 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(&argc, &argv); functions::prestosql::registerArrayFunctions(); functions::registerTestVectorFunctionBasic(); diff --git a/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp index 7b1ac51fbcae..81cb138c6524 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp index f9a935c10eda..4b649cd55fa4 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(&argc, &argv); functions::prestosql::registerArrayFunctions(); registerFunction>( diff --git a/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp index 237a015e4be2..191ec5c1b48f 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(&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 81ad9b9ab7dd..712441e7e2a9 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp b/velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp index 51039d772ba1..99c7f84d21d0 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(&argc, &argv); LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp b/velox/functions/prestosql/benchmarks/CompareBenchmark.cpp index 96c40dbf4b4f..49c1e790c3be 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp b/velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp index efd1bc7b19a4..4331b986e10b 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp b/velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp index 0d7491eff8df..56b0ee058ba5 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(&argc, &argv); LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp b/velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp index 7cf545032d7c..4348e99a8145 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/InBenchmark.cpp b/velox/functions/prestosql/benchmarks/InBenchmark.cpp index aa644cf00691..7f3955349058 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp b/velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp index d6e7535f0935..b798c2640f9e 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(&argc, &argv); folly::runBenchmarks(); return 0; } diff --git a/velox/functions/prestosql/benchmarks/MapBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapBenchmark.cpp index d62bd66bc15d..01e718f8895f 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(&argc, &argv); folly::runBenchmarks(); return 0; } diff --git a/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp b/velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp index 8e95258f5274..c657949681f8 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(&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 c0ad9aa29575..5660439b9cbd 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(&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 37006b5c07b7..c4ec34fc8365 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(&argc, &argv); LOG(ERROR) << "Seed: " << seed; { diff --git a/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/NestedArrayWriterBenchmark.cpp index 62802b65c20f..798990bbef7c 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(&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 8004918fea91..236b5cd34beb 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/Row.cpp b/velox/functions/prestosql/benchmarks/Row.cpp index 1cd429f6d9c0..5118c6eb821d 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp index 2e521db7797a..67b897b272a9 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(&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 83f37e5dd0df..12b526fef848 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(&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 4e85096751ef..e23b4c46b5a0 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp b/velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp index 504da0b3c086..41ff095d2c87 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(&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 9f9e58ad9eca..94cfe5764136 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp b/velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp index 8a7109b4b0d3..c7be659c4b20 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp b/velox/functions/prestosql/benchmarks/ZipBenchmark.cpp index 655f11d61357..33fb428db37f 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(&argc, &argv); folly::runBenchmarks(); return 0; diff --git a/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp b/velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp index 1eff0e0799d0..fe54035de2de 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(&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 df7a110bf5bc..9f22afca793d 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/functions/remote/server/RemoteFunctionServiceMain.cpp b/velox/functions/remote/server/RemoteFunctionServiceMain.cpp index 1cb82eab7b57..85999b7b13c4 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(&argc, &argv, false); FLAGS_logtostderr = true; // Always registers all Presto functions and make them available under a diff --git a/velox/functions/sparksql/benchmarks/In.cpp b/velox/functions/sparksql/benchmarks/In.cpp index 539dc18a51ec..bfe7ad39faab 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(&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 3ab9aed5dd99..684d28a08797 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp b/velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp index ca0089a358f5..38b71c11d354 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(&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 9c52cc792d1c..74eb8501d758 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(&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 b6d07237b815..0a3131f2dafe 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(&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 8ad221bb3c64..37806134e913 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/tpch/gen/tests/TpchGenTest.cpp b/velox/tpch/gen/tests/TpchGenTest.cpp index a588f1abb291..c177ae2f79eb 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(&argc, &argv, false); return RUN_ALL_TESTS(); } diff --git a/velox/type/tests/FilterBenchmark.cpp b/velox/type/tests/FilterBenchmark.cpp index be36bf80c976..ead694fe61dc 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(&argc, &argv); std::vector filterValues; filterValues.reserve(kFilterValues); diff --git a/velox/type/tests/NegatedBigintRangeBenchmark.cpp b/velox/type/tests/NegatedBigintRangeBenchmark.cpp index 14b0cd4da103..4c4c4369de0d 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(&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 19a0fb8ef840..fe0a0d0b5cbb 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(&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 6fc810ba6078..3217e6c316f8 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(&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 ee85cf7be77c..b613911cc24f 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(&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 f0a46014c756..d4cb5e63423c 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(&argc, &argv); folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/CopyBenchmark.cpp b/velox/vector/benchmarks/CopyBenchmark.cpp index 709a69fd0c10..0fbeb2ed202c 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(&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 2020ff2af818..d6a4043c53b5 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(&argc, &argv); folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp b/velox/vector/benchmarks/SelectivityVectorBenchmark.cpp index 3ac27ce1b743..a2678843b6a0 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(&argc, &argv); folly::runBenchmarks(); return 0; } diff --git a/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp b/velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp index d20eeb097c0b..ec8c4c8fb207 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(&argc, &argv); facebook::velox::memory::MemoryManager::initialize({}); folly::runBenchmarks(); return 0; From 31d54efe3406c0a864a1abeaa7baa89f53d90935 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 24 Jan 2024 17:01:29 +0100 Subject: [PATCH 12/13] fix Init --- velox/benchmarks/basic/ComparisonConjunct.cpp | 2 +- velox/benchmarks/basic/DecodedVector.cpp | 2 +- velox/benchmarks/basic/FeatureNormalization.cpp | 2 +- velox/benchmarks/basic/LikeTpchBenchmark.cpp | 2 +- velox/benchmarks/basic/Preproc.cpp | 2 +- velox/benchmarks/basic/SelectivityVector.cpp | 2 +- velox/benchmarks/basic/SimpleArithmetic.cpp | 2 +- velox/benchmarks/basic/SimpleCastExpr.cpp | 2 +- velox/benchmarks/basic/VectorCompare.cpp | 2 +- velox/benchmarks/basic/VectorFuzzer.cpp | 2 +- velox/benchmarks/basic/VectorSlice.cpp | 2 +- velox/benchmarks/tpch/TpchBenchmarkMain.cpp | 2 +- velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp | 2 +- velox/common/base/benchmarks/BitUtilBenchmark.cpp | 2 +- velox/common/base/tests/Memcpy.cpp | 2 +- velox/common/base/tests/StatsReporterTest.cpp | 2 +- velox/common/file/benchmark/ReadBenchmarkMain.cpp | 2 +- velox/common/memory/tests/MemoryPoolBenchmark.cpp | 2 +- velox/common/process/ThreadDebugInfo.h | 2 +- .../hive/benchmarks/HivePartitionFunctionBenchmark.cpp | 2 +- .../storage_adapters/gcs/benchmark/GCSReadBenchmarkMain.cpp | 2 +- .../storage_adapters/s3fs/benchmark/S3ReadBenchmarkMain.cpp | 2 +- .../hive/storage_adapters/s3fs/tests/S3InsertTest.cpp | 2 +- .../storage_adapters/s3fs/tests/S3MultipleEndpointsTest.cpp | 2 +- .../connectors/hive/storage_adapters/s3fs/tests/S3ReadTest.cpp | 2 +- velox/connectors/hive/tests/HiveDataSinkTest.cpp | 2 +- velox/connectors/tpch/tests/SpeedTest.cpp | 2 +- velox/connectors/tpch/tests/TpchConnectorTest.cpp | 2 +- velox/dwio/common/tests/BitPackDecoderBenchmark.cpp | 2 +- velox/dwio/common/tests/DataBufferBenchmark.cpp | 2 +- velox/dwio/common/tests/IntDecoderBenchmark.cpp | 2 +- velox/dwio/dwrf/test/E2EFilterTest.cpp | 2 +- velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp | 2 +- velox/dwio/dwrf/test/IntEncoderBenchmark.cpp | 2 +- velox/dwio/parquet/tests/ParquetTpchTest.cpp | 2 +- velox/dwio/parquet/tests/reader/E2EFilterTest.cpp | 2 +- velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp | 2 +- velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp | 2 +- velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp | 2 +- velox/examples/OperatorExtensibility.cpp | 2 +- velox/examples/ScanAndSort.cpp | 2 +- velox/examples/ScanOrc.cpp | 2 +- velox/exec/benchmarks/ExchangeBenchmark.cpp | 2 +- velox/exec/benchmarks/FilterProjectBenchmark.cpp | 2 +- velox/exec/benchmarks/HashTableBenchmark.cpp | 2 +- velox/exec/benchmarks/MergeBenchmark.cpp | 2 +- velox/exec/benchmarks/RowContainerSortBenchmark.cpp | 2 +- velox/exec/benchmarks/VectorHasherBenchmark.cpp | 2 +- velox/exec/tests/ExchangeFuzzer.cpp | 2 +- velox/exec/tests/VeloxIn10MinDemo.cpp | 2 +- velox/experimental/codegen/benchmark/CodegenBenchmarks.cpp | 2 +- velox/experimental/gpu/tests/BlockingQueueTest.cu | 2 +- velox/experimental/gpu/tests/DependencyWatchTest.cu | 2 +- velox/experimental/gpu/tests/DoubleBufferProcessTest.cu | 2 +- velox/experimental/gpu/tests/HashTableTest.cu | 2 +- velox/experimental/wave/common/tests/CudaTest.cpp | 2 +- velox/experimental/wave/exec/tests/Main.cpp | 2 +- velox/expression/benchmarks/CallNullFreeBenchmark.cpp | 2 +- velox/expression/benchmarks/TryBenchmark.cpp | 2 +- velox/expression/benchmarks/VariadicBenchmark.cpp | 2 +- .../lib/benchmarks/ApproxMostFrequentStreamSummaryBenchmark.cpp | 2 +- velox/functions/lib/benchmarks/KllSketchBenchmark.cpp | 2 +- velox/functions/lib/benchmarks/Re2FunctionsBenchmarks.cpp | 2 +- .../prestosql/aggregates/benchmarks/SimpleAggregates.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayContainsBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayMinMaxBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayPositionBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArraySumBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ArrayWriterBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/BitwiseBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/CardinalityBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/CompareBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ComparisonsBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ConcatBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/DateTimeBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/InBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/JsonExprBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/MapBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/MapInputBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/MapWriterBenchmarks.cpp | 2 +- velox/functions/prestosql/benchmarks/MapZipWithBenchmark.cpp | 2 +- .../prestosql/benchmarks/NestedArrayWriterBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/NotBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/Row.cpp | 2 +- velox/functions/prestosql/benchmarks/RowWriterBenchmark.cpp | 2 +- .../functions/prestosql/benchmarks/SimpleSubscriptBenchmark.cpp | 2 +- .../prestosql/benchmarks/StringAsciiUTFFunctionBenchmarks.cpp | 2 +- velox/functions/prestosql/benchmarks/StringWriterBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/URLBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/WidthBucketBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ZipBenchmark.cpp | 2 +- velox/functions/prestosql/benchmarks/ZipWithBenchmark.cpp | 2 +- velox/functions/remote/client/tests/RemoteFunctionTest.cpp | 2 +- velox/functions/remote/server/RemoteFunctionServiceMain.cpp | 2 +- velox/functions/sparksql/benchmarks/In.cpp | 2 +- velox/functions/sparksql/window/tests/Main.cpp | 2 +- velox/row/benchmark/DynamicRowVectorDeserializeBenchmark.cpp | 2 +- velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp | 2 +- velox/serializers/tests/SerializerBenchmark.cpp | 2 +- velox/substrait/tests/VeloxSubstraitRoundTripTest.cpp | 2 +- velox/tpch/gen/tests/TpchGenTest.cpp | 2 +- velox/type/tests/FilterBenchmark.cpp | 2 +- velox/type/tests/NegatedBigintRangeBenchmark.cpp | 2 +- velox/type/tests/NegatedBytesRangeBenchmark.cpp | 2 +- velox/type/tests/NegatedBytesValuesBenchmark.cpp | 2 +- velox/type/tests/NegatedValuesFilterBenchmark.cpp | 2 +- velox/type/tests/StringViewBenchmark.cpp | 2 +- velox/vector/benchmarks/CopyBenchmark.cpp | 2 +- velox/vector/benchmarks/NthBitBenchmark.cpp | 2 +- velox/vector/benchmarks/SelectivityVectorBenchmark.cpp | 2 +- velox/vector/benchmarks/SimpleVectorHashAllBenchmark.cpp | 2 +- 111 files changed, 111 insertions(+), 111 deletions(-) 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/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..5512f0028704 100644 --- a/velox/common/process/ThreadDebugInfo.h +++ b/velox/common/process/ThreadDebugInfo.h @@ -47,7 +47,7 @@ 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 +// 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(); 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/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/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; From 333d297d1e180310065e4dce2a2e65f0fcfd4dbc Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 24 Jan 2024 18:41:31 +0100 Subject: [PATCH 13/13] format --- velox/common/process/ThreadDebugInfo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/velox/common/process/ThreadDebugInfo.h b/velox/common/process/ThreadDebugInfo.h index 5512f0028704..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 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