Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.

add_library(
add_library(presto_tool_trace_replayers PartitionAndSerializeReplayer.cpp)

target_link_libraries(
presto_tool_trace_replayers
PartitionAndSerializeReplayer.cpp
presto_operators
velox_core
velox_exec
velox_tool_trace
)

add_executable(presto_trace_replayer TraceReplayerMain.cpp)

target_link_libraries(
presto_trace_replayer
presto_tool_trace_replayers
presto_operators
presto_type_converter
velox_core
velox_exec
velox_tool_trace
${FOLLY_WITH_DEPENDENCIES}
${GFLAGS_LIBRARIES}
)

if(PRESTO_ENABLE_TESTING)
add_subdirectory(tests)
endif()
add_subdirectory(tests)
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
#include "presto_cpp/main/tool/trace/PartitionAndSerializeReplayer.h"

#include "presto_cpp/main/operators/PartitionAndSerialize.h"
#include "velox/tool/trace/TraceReplayTaskRunner.h"

Expand All @@ -32,6 +28,7 @@ PartitionAndSerializeReplayer::PartitionAndSerializeReplayer(
const std::string& taskId,
const std::string& nodeId,
const std::string& nodeName,
const std::string& spillBaseDir,
const std::string& driverIds,
uint64_t queryCapacity,
folly::Executor* executor)
Expand All @@ -41,6 +38,7 @@ PartitionAndSerializeReplayer::PartitionAndSerializeReplayer(
taskId,
nodeId,
nodeName,
spillBaseDir,
driverIds,
queryCapacity,
executor) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
#pragma once

#include "velox/core/PlanNode.h"
#include "velox/tool/trace/OperatorReplayerBase.h"

namespace facebook::velox::tool::trace {

/// The replayer to replay the traced 'PartitionAndSerialize' operators.
class PartitionAndSerializeReplayer final : public OperatorReplayerBase {
public:
Expand All @@ -30,6 +26,7 @@ class PartitionAndSerializeReplayer final : public OperatorReplayerBase {
const std::string& taskId,
const std::string& nodeId,
const std::string& nodeName,
const std::string& spillBaseDir,
const std::string& driverIds,
uint64_t queryCapacity,
folly::Executor* executor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class PrestoTraceReplayRunner
FLAGS_task_id,
FLAGS_node_id,
nodeName,
"",
FLAGS_driver_ids,
queryCapacityBytes,
cpuExecutor_.get());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

add_executable(presto_partition_and_serialize_replayer_test PartitionAndSerializeReplayerTest.cpp)

target_link_libraries(
presto_partition_and_serialize_replayer_test
presto_tool_trace_replayers
presto_operators
presto_plan_builder
velox_core
velox_exec
velox_exec_test_lib
velox_hive_connector
velox_tool_trace
gtest
gtest_main
${FOLLY_WITH_DEPENDENCIES}
${GFLAGS_LIBRARIES}
)

add_test(
NAME presto_partition_and_serialize_replayer_test
COMMAND presto_partition_and_serialize_replayer_test
)
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ TEST_F(PartitionAndSerializeReplayerTest, basicReplay) {
task->taskId(),
partitionNodeId,
"PartitionAndSerialize",
"",
driverIds,
queryCapacity,
executor_.get());
Expand Down
Loading