Skip to content

Commit

Permalink
Some memory and writer code cleanup (facebookincubator#7396)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebookincubator#7396

Reviewed By: tanjialiang

Differential Revision: D50959930

Pulled By: xiaoxmeng

fbshipit-source-id: fc0c04eb1308efad2c0dec1ea84ef5f1496ca00a
  • Loading branch information
xiaoxmeng authored and facebook-github-bot committed Nov 3, 2023
1 parent c4fefa4 commit fcb9a37
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
8 changes: 0 additions & 8 deletions velox/common/memory/MemoryArbitrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ class MemoryArbitrator {
/// registered.
static void unregisterFactory(const std::string& kind);

#ifdef VELOX_ENABLE_BACKWARD_COMPATIBILITY
/// Register all the supported memory arbitrator kinds.
static void registerAllFactories() {}

/// Unregister all the supported memory arbitrator kinds.
static void unregisterAllFactories() {}
#endif

/// Invoked by the memory manager to create an instance of memory arbitrator
/// based on the kind specified in 'config'. The arbitrator kind must be
/// registered through MemoryArbitrator::registerFactory(), otherwise the
Expand Down
3 changes: 1 addition & 2 deletions velox/connectors/hive/tests/HiveDataSinkTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "velox/dwio/common/Options.h"
#include "velox/exec/tests/utils/PlanBuilder.h"
#include "velox/exec/tests/utils/TempDirectoryPath.h"
#include "velox/serializers/PrestoSerializer.h"
#include "velox/vector/fuzzer/VectorFuzzer.h"

namespace facebook::velox::connector::hive {
Expand Down Expand Up @@ -60,7 +59,7 @@ class HiveDataSinkTest : public exec::test::HiveConnectorTestBase {
}

std::unique_ptr<SpillConfig> getSpillConfig(
const std::string spillPath,
const std::string& spillPath,
uint64_t writerFlushThreshold) {
return std::make_unique<SpillConfig>(
spillPath,
Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/common/SortingWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class SortingWriter : public Writer {
memory::MemoryReclaimer::Stats& stats) override;

private:
MemoryReclaimer(SortingWriter* writer)
explicit MemoryReclaimer(SortingWriter* writer)
: exec::MemoryReclaimer(),
writer_(writer),
canReclaim_(writer_->sortBuffer_->canSpill()) {}
Expand Down
3 changes: 2 additions & 1 deletion velox/exec/Operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ class Operator : public BaseRuntimeStatWriter {
/// allocation from memory pool that can't be done under operator constructor.
///
/// NOTE: the default implementation set 'initialized_' to true to ensure we
/// never call this more than once.
/// never call this more than once. The overload initialize() implementation
/// must call this base implementation first.
virtual void initialize();

/// Indicates if this operator has been initialized or not.
Expand Down

0 comments on commit fcb9a37

Please sign in to comment.