Skip to content

Commit

Permalink
fix Init
Browse files Browse the repository at this point in the history
  • Loading branch information
assignUser committed Jan 24, 2024
1 parent e9b78a2 commit 31d54ef
Show file tree
Hide file tree
Showing 111 changed files with 111 additions and 111 deletions.
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/ComparisonConjunct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ComparisonBenchmark>(1'000);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/DecodedVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<DecodedVectorBenchmark>(10'000);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/FeatureNormalization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<FeatureNormailzationBenchmark>();
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/LikeTpchBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<LikeFunctionsBenchmark>();
folly::runBenchmarks();
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/Preproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PreprocBenchmark>();
// Verify that benchmark calculations are correct.
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/SelectivityVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<SelectivityVectorBenchmark>(10'000);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/SimpleArithmetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<SimpleArithmeticBenchmark>();
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/SimpleCastExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<SimpleCastBenchmark>();
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/VectorCompare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<VectorCompareBenchmark>(1000);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/VectorFuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/VectorSlice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/tpch/TpchBenchmarkMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion velox/common/base/benchmarks/BitUtilBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion velox/common/base/tests/Memcpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t>(FLAGS_bytes / FLAGS_threads, kAlignment), kAlignment);
int64_t bytes = chunk * FLAGS_threads;
Expand Down
2 changes: 1 addition & 1 deletion velox/common/base/tests/StatsReporterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ folly::Singleton<BaseStatsReporter> 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();
}
2 changes: 1 addition & 1 deletion velox/common/file/benchmark/ReadBenchmarkMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion velox/common/memory/tests/MemoryPoolBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion velox/common/process/ThreadDebugInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<HivePartitionFunctionBenchmark>(1'000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion velox/connectors/hive/tests/HiveDataSinkTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion velox/connectors/tpch/tests/SpeedTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion velox/connectors/tpch/tests/TpchConnectorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion velox/dwio/common/tests/BitPackDecoderBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/common/tests/DataBufferBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/common/tests/IntDecoderBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/dwrf/test/E2EFilterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/dwrf/test/IntEncoderBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/ParquetTpchTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/reader/E2EFilterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion velox/examples/OperatorExtensibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion velox/examples/ScanAndSort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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({});
Expand Down
2 changes: 1 addition & 1 deletion velox/examples/ScanOrc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion velox/exec/benchmarks/ExchangeBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion velox/exec/benchmarks/FilterProjectBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion velox/exec/benchmarks/HashTableBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 31d54ef

Please sign in to comment.