Skip to content
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions velox/benchmarks/QueryBenchmarkBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,23 +186,23 @@ void QueryBenchmarkBase::initialize() {
std::move(configurationValues));

// Create hive connector with config...
connector::registerConnectorFactory(
connector::common::registerConnectorFactory(
std::make_shared<connector::hive::HiveConnectorFactory>());
auto hiveConnector =
connector::getConnectorFactory(
connector::common::getConnectorFactory(
connector::hive::HiveConnectorFactory::kHiveConnectorName)
->newConnector(kHiveConnectorId, properties, ioExecutor_.get());
connector::registerConnector(hiveConnector);
connector::common::registerConnector(hiveConnector);
parquet::registerParquetReaderFactory();
dwrf::registerDwrfReaderFactory();
}

std::vector<std::shared_ptr<connector::ConnectorSplit>>
std::vector<std::shared_ptr<connector::common::ConnectorSplit>>
QueryBenchmarkBase::listSplits(
const std::string& path,
int32_t numSplitsPerFile,
const exec::test::TpchPlan& plan) {
std::vector<std::shared_ptr<connector::ConnectorSplit>> result;
std::vector<std::shared_ptr<connector::common::ConnectorSplit>> result;
auto temp = HiveConnectorTestBase::makeHiveConnectorSplits(
path, numSplitsPerFile, plan.dataFileFormat);
for (auto& i : temp) {
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/QueryBenchmarkBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class QueryBenchmarkBase {
std::pair<std::unique_ptr<exec::TaskCursor>, std::vector<RowVectorPtr>> run(
const exec::test::TpchPlan& tpchPlan);

virtual std::vector<std::shared_ptr<connector::ConnectorSplit>> listSplits(
virtual std::vector<std::shared_ptr<connector::common::ConnectorSplit>> listSplits(
const std::string& path,
int32_t numSplitsPerFile,
const exec::test::TpchPlan& plan);
Expand Down
2 changes: 1 addition & 1 deletion velox/buffer/tests/BufferTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ DEBUG_ONLY_TEST_F(BufferTest, testReallocateFails) {

::memset(buffer->asMutable<char>(), 'a', bufferSize);

common::testutil::TestValue::enable();
velox::common::testutil::TestValue::enable();

const std::string kErrorMessage = "Expected out of memory exception";
SCOPED_TESTVALUE_SET(
Expand Down
4 changes: 2 additions & 2 deletions velox/common/base/AsyncSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class AsyncSource {
// Makes an item if it is not already made. To be called on a background
// executor.
void prepare() {
common::testutil::TestValue::adjust(
velox::common::testutil::TestValue::adjust(
"facebook::velox::AsyncSource::prepare", this);
std::function<std::unique_ptr<Item>()> make = nullptr;
{
Expand Down Expand Up @@ -101,7 +101,7 @@ class AsyncSource {
// If the item is preparing on the executor, waits for the item and
// otherwise makes it on the caller thread.
std::unique_ptr<Item> move() {
common::testutil::TestValue::adjust(
velox::common::testutil::TestValue::adjust(
"facebook::velox::AsyncSource::move", this);
std::function<std::unique_ptr<Item>()> make = nullptr;
ContinueFuture wait;
Expand Down
4 changes: 2 additions & 2 deletions velox/common/base/BloomFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class BloomFilter {
}

void merge(const char* serialized) {
common::InputByteStream stream(serialized);
velox::common::InputByteStream stream(serialized);
auto version = stream.read<int8_t>();
VELOX_USER_CHECK_EQ(kBloomFilterV1, version);
auto size = stream.read<int32_t>();
Expand All @@ -88,7 +88,7 @@ class BloomFilter {
}

void serialize(char* output) const {
common::OutputByteStream stream(output);
velox::common::OutputByteStream stream(output);
stream.appendOne(kBloomFilterV1);
stream.appendOne((int32_t)bits_.size());
for (auto bit : bits_) {
Expand Down
2 changes: 1 addition & 1 deletion velox/common/base/SpillConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ SpillConfig::SpillConfig(
maxSpillLevel(_maxSpillLevel),
maxSpillRunRows(_maxSpillRunRows),
writerFlushThresholdSize(_writerFlushThresholdSize),
compressionKind(common::stringToCompressionKind(_compressionKind)),
compressionKind(velox::common::stringToCompressionKind(_compressionKind)),
prefixSortConfig(_prefixSortConfig),
fileCreateConfig(_fileCreateConfig) {
VELOX_USER_CHECK_GE(
Expand Down
2 changes: 1 addition & 1 deletion velox/common/base/SpillConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct SpillConfig {
uint64_t writerFlushThresholdSize;

/// CompressionKind when spilling, CompressionKind_NONE means no compression.
common::CompressionKind compressionKind;
velox::common::CompressionKind compressionKind;

/// Prefix sort config when spilling, enable prefix sort when this config is
/// set, otherwise, fallback to timsort.
Expand Down
2 changes: 1 addition & 1 deletion velox/common/base/SpillStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct SpillStats {

FOLLY_ALWAYS_INLINE std::ostream& operator<<(
std::ostream& o,
const common::SpillStats& stats) {
const velox::common::SpillStats& stats) {
return o << stats.toString();
}

Expand Down
6 changes: 3 additions & 3 deletions velox/common/caching/SsdFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,21 +935,21 @@ void SsdFile::disableFileCow() {

namespace {
template <typename T>
T readNumber(common::FileInputStream* stream) {
T readNumber(velox::common::FileInputStream* stream) {
T data;
stream->readBytes(reinterpret_cast<uint8_t*>(&data), sizeof(T));
return data;
}

std::string readString(common::FileInputStream* stream, int32_t length) {
std::string readString(velox::common::FileInputStream* stream, int32_t length) {
std::string data(length, '\0');
stream->readBytes(
reinterpret_cast<uint8_t*>(const_cast<char*>(data.data())), length);
return data;
}

template <typename T>
std::vector<T> readVector(common::FileInputStream* stream, int32_t size) {
std::vector<T> readVector(velox::common::FileInputStream* stream, int32_t size) {
std::vector<T> dataVector(size);
stream->readBytes(
reinterpret_cast<uint8_t*>(dataVector.data()), size * sizeof(T));
Expand Down
2 changes: 1 addition & 1 deletion velox/common/compression/tests/CompressionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct TestParams {
std::shared_ptr<CodecOptions> codecOptions;

explicit TestParams(
common::CompressionKind compressionKind,
velox::common::CompressionKind compressionKind,
std::shared_ptr<CodecOptions> codecOptions = kDefaultCodecOptions)
: compressionKind(compressionKind),
codecOptions(std::move(codecOptions)) {}
Expand Down
4 changes: 2 additions & 2 deletions velox/common/file/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ uint64_t ReadFile::preadv(
}

uint64_t ReadFile::preadv(
folly::Range<const common::Region*> regions,
folly::Range<const velox::common::Region*> regions,
folly::Range<folly::IOBuf*> iobufs,
filesystems::File::IoStats* stats) const {
VELOX_CHECK_EQ(regions.size(), iobufs.size());
Expand Down Expand Up @@ -309,7 +309,7 @@ LocalWriteFile::LocalWriteFile(
const auto dir = fs::path(path_).parent_path();
if (shouldCreateParentDirectories && !fs::exists(dir)) {
VELOX_CHECK(
common::generateFileDirectory(dir.c_str()),
velox::common::generateFileDirectory(dir.c_str()),
"Failed to generate file directory");
}

Expand Down
2 changes: 1 addition & 1 deletion velox/common/file/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class ReadFile {
//
// This method should be thread safe.
virtual uint64_t preadv(
folly::Range<const common::Region*> regions,
folly::Range<const velox::common::Region*> regions,
folly::Range<folly::IOBuf*> iobufs,
filesystems::File::IoStats* stats = nullptr) const;

Expand Down
10 changes: 5 additions & 5 deletions velox/common/hyperloglog/DenseHll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ int64_t cardinalityImpl(const DenseHllView& hll) {
}

DenseHllView deserialize(const char* serialized) {
common::InputByteStream stream(serialized);
velox::common::InputByteStream stream(serialized);

auto version = stream.read<int8_t>();
VELOX_CHECK_EQ(kPrestoDenseV2, version);
Expand Down Expand Up @@ -407,7 +407,7 @@ bool DenseHll::canDeserialize(const char* input, int size) {
return false;
}

common::InputByteStream stream(input);
velox::common::InputByteStream stream(input);
auto version = stream.read<int8_t>();
if (kPrestoDenseV2 != version) {
return false;
Expand Down Expand Up @@ -461,7 +461,7 @@ bool DenseHll::canDeserialize(const char* input, int size) {

// static
int8_t DenseHll::deserializeIndexBitLength(const char* input) {
common::InputByteStream stream(input);
velox::common::InputByteStream stream(input);
stream.read<int8_t>();
return stream.read<int8_t>();
}
Expand All @@ -478,7 +478,7 @@ void DenseHll::serialize(char* output) {
// sort overflow arrays to get consistent serialization for equivalent HLLs
sortOverflows();

common::OutputByteStream stream(output);
velox::common::OutputByteStream stream(output);
stream.appendOne(kPrestoDenseV2);
stream.appendOne(indexBitLength_);
stream.appendOne(baseline_);
Expand Down Expand Up @@ -540,7 +540,7 @@ void DenseHll::mergeWith(const DenseHll& other) {
}

void DenseHll::mergeWith(const char* serialized) {
common::InputByteStream stream(serialized);
velox::common::InputByteStream stream(serialized);

auto version = stream.read<int8_t>();
VELOX_CHECK_EQ(kPrestoDenseV2, version);
Expand Down
6 changes: 3 additions & 3 deletions velox/common/hyperloglog/SparseHll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int searchIndex(
}

common::InputByteStream initializeInputStream(const char* serialized) {
common::InputByteStream stream(serialized);
velox::common::InputByteStream stream(serialized);

auto version = stream.read<int8_t>();
VELOX_CHECK_EQ(kPrestoSparseV2, version);
Expand Down Expand Up @@ -111,7 +111,7 @@ int64_t SparseHll::cardinality(const char* serialized) {
}

void SparseHll::serialize(int8_t indexBitLength, char* output) const {
common::OutputByteStream stream(output);
velox::common::OutputByteStream stream(output);
stream.appendOne(kPrestoSparseV2);
stream.appendOne(indexBitLength);
stream.appendOne(static_cast<int16_t>(entries_.size()));
Expand All @@ -127,7 +127,7 @@ std::string SparseHll::serializeEmpty(int8_t indexBitLength) {
std::string serialized;
serialized.resize(kSize);

common::OutputByteStream stream(serialized.data());
velox::common::OutputByteStream stream(serialized.data());
stream.appendOne(kPrestoSparseV2);
stream.appendOne(indexBitLength);
stream.appendOne(static_cast<int16_t>(0));
Expand Down
6 changes: 3 additions & 3 deletions velox/common/hyperloglog/benchmarks/DenseHll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class DenseHllBenchmark {
folly::BenchmarkSuspender suspender;

HashStringAllocator allocator(pool_);
common::hll::DenseHll hll(hashBits, &allocator);
velox::common::hll::DenseHll hll(hashBits, &allocator);

suspender.dismiss();

Expand All @@ -61,15 +61,15 @@ class DenseHllBenchmark {
private:
std::string makeSerializedHll(int hashBits, int32_t step) {
HashStringAllocator allocator(pool_);
common::hll::DenseHll hll(hashBits, &allocator);
velox::common::hll::DenseHll hll(hashBits, &allocator);
for (int32_t i = 0; i < 1'000'000; ++i) {
auto hash = hashOne(i * step);
hll.insertHash(hash);
}
return serialize(hll);
}

static std::string serialize(common::hll::DenseHll& denseHll) {
static std::string serialize(velox::common::hll::DenseHll& denseHll) {
auto size = denseHll.serializedSize();
std::string serialized;
serialized.resize(size);
Expand Down
2 changes: 1 addition & 1 deletion velox/common/time/Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace facebook::velox {

using namespace std::chrono;
using common::testutil::ScopedTestTime;
using velox::common::testutil::ScopedTestTime;

#ifndef NDEBUG

Expand Down
Loading