Skip to content

Commit 3900fd4

Browse files
duxiao1212facebook-github-bot
authored andcommitted
fix: Added spillBaseDir for PartitionAndSerializeReplayer (#26562)
Summary: Pull Request resolved: #26562 Added spillBaseDir for PartitionAndSerializeReplayer ``` == NO RELEASE NOTE == ``` Reviewed By: tanjialiang Differential Revision: D86552256
1 parent 12cd04c commit 3900fd4

File tree

6 files changed

+60
-11
lines changed

6 files changed

+60
-11
lines changed

presto-native-execution/presto_cpp/main/tool/trace/cMakeLists.txt renamed to presto-native-execution/presto_cpp/main/tool/trace/CMakeLists.txt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ target_link_libraries(
2323
velox_tool_trace
2424
)
2525

26-
if(PRESTO_ENABLE_TESTING)
27-
add_subdirectory(tests)
28-
endif()
26+
add_executable(
27+
presto_trace_replayer
28+
TraceReplayerMain.cpp
29+
)
30+
31+
target_link_libraries(
32+
presto_trace_replayer
33+
presto_tool_trace_replayers
34+
presto_operators
35+
presto_type_converter
36+
velox_core
37+
velox_exec
38+
velox_tool_trace
39+
${FOLLY_WITH_DEPENDENCIES}
40+
${GFLAGS_LIBRARIES}
41+
)
42+
43+
add_subdirectory(tests)

presto-native-execution/presto_cpp/main/tool/trace/PartitionAndSerializeReplayer.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111
* See the License for the specific language governing permissions and
1212
* limitations under the License.
1313
*/
14-
/*
15-
* Copyright (c) Facebook, Inc. and its affiliates.
16-
*/
1714
#include "presto_cpp/main/tool/trace/PartitionAndSerializeReplayer.h"
18-
1915
#include "presto_cpp/main/operators/PartitionAndSerialize.h"
2016
#include "velox/tool/trace/TraceReplayTaskRunner.h"
2117

@@ -32,6 +28,7 @@ PartitionAndSerializeReplayer::PartitionAndSerializeReplayer(
3228
const std::string& taskId,
3329
const std::string& nodeId,
3430
const std::string& nodeName,
31+
const std::string& spillBaseDir,
3532
const std::string& driverIds,
3633
uint64_t queryCapacity,
3734
folly::Executor* executor)
@@ -41,6 +38,7 @@ PartitionAndSerializeReplayer::PartitionAndSerializeReplayer(
4138
taskId,
4239
nodeId,
4340
nodeName,
41+
spillBaseDir,
4442
driverIds,
4543
queryCapacity,
4644
executor) {}

presto-native-execution/presto_cpp/main/tool/trace/PartitionAndSerializeReplayer.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@
1111
* See the License for the specific language governing permissions and
1212
* limitations under the License.
1313
*/
14-
/*
15-
* Copyright (c) Facebook, Inc. and its affiliates.
16-
*/
1714
#pragma once
1815

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

2219
namespace facebook::velox::tool::trace {
23-
2420
/// The replayer to replay the traced 'PartitionAndSerialize' operators.
2521
class PartitionAndSerializeReplayer final : public OperatorReplayerBase {
2622
public:
@@ -30,6 +26,7 @@ class PartitionAndSerializeReplayer final : public OperatorReplayerBase {
3026
const std::string& taskId,
3127
const std::string& nodeId,
3228
const std::string& nodeName,
29+
const std::string& spillBaseDir,
3330
const std::string& driverIds,
3431
uint64_t queryCapacity,
3532
folly::Executor* executor);

presto-native-execution/presto_cpp/main/tool/trace/TraceReplayerMain.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class PrestoTraceReplayRunner
5656
FLAGS_task_id,
5757
FLAGS_node_id,
5858
nodeName,
59+
"",
5960
FLAGS_driver_ids,
6061
queryCapacityBytes,
6162
cpuExecutor_.get());
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
13+
add_executable(
14+
presto_partition_and_serialize_replayer_test
15+
PartitionAndSerializeReplayerTest.cpp
16+
)
17+
18+
target_link_libraries(
19+
presto_partition_and_serialize_replayer_test
20+
presto_tool_trace_replayers
21+
presto_operators
22+
presto_plan_builder
23+
velox_core
24+
velox_exec
25+
velox_exec_test_lib
26+
velox_hive_connector
27+
velox_tool_trace
28+
gtest
29+
gtest_main
30+
${FOLLY_WITH_DEPENDENCIES}
31+
${GFLAGS_LIBRARIES}
32+
)
33+
34+
add_test(
35+
NAME presto_partition_and_serialize_replayer_test
36+
COMMAND presto_partition_and_serialize_replayer_test
37+
)

presto-native-execution/presto_cpp/main/tool/trace/tests/PartitionAndSerializeReplayerTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ TEST_F(PartitionAndSerializeReplayerTest, basicReplay) {
202202
task->taskId(),
203203
partitionNodeId,
204204
"PartitionAndSerialize",
205+
"",
205206
driverIds,
206207
queryCapacity,
207208
executor_.get());

0 commit comments

Comments
 (0)