@@ -60,22 +60,6 @@ public void compressedFilePartition(CompressedFileEnvironmentContext context) th
60
60
executeBenchmark (context .env );
61
61
}
62
62
63
- @ Benchmark
64
- public void uncompressedMmapPartition (UncompressedMmapEnvironmentContext context )
65
- throws Exception {
66
- executeBenchmark (context .env );
67
- }
68
-
69
- @ Benchmark
70
- public void compressedSortPartition (CompressedSortEnvironmentContext context ) throws Exception {
71
- executeBenchmark (context .env );
72
- }
73
-
74
- @ Benchmark
75
- public void uncompressedSortPartition (UncompressedSortEnvironmentContext context ) throws Exception {
76
- executeBenchmark (context .env );
77
- }
78
-
79
63
private void executeBenchmark (StreamExecutionEnvironment env ) throws Exception {
80
64
StreamGraph streamGraph =
81
65
StreamGraphUtils .buildGraphForBatchJob (env , RECORDS_PER_INVOCATION );
@@ -102,23 +86,15 @@ public void setUp() throws Exception {
102
86
}
103
87
104
88
protected Configuration createConfiguration (
105
- boolean compressionEnabled , String subpartitionType , boolean isSortShuffle ) {
89
+ boolean compressionEnabled ) {
106
90
Configuration configuration = super .createConfiguration ();
107
91
108
- if (isSortShuffle ) {
109
- configuration .setInteger (
110
- NettyShuffleEnvironmentOptions .NETWORK_SORT_SHUFFLE_MIN_PARALLELISM , 1 );
111
- } else {
112
- configuration .setInteger (
113
- NettyShuffleEnvironmentOptions .NETWORK_SORT_SHUFFLE_MIN_PARALLELISM ,
114
- Integer .MAX_VALUE );
115
- }
116
- configuration .setBoolean (
117
- NettyShuffleEnvironmentOptions .BATCH_SHUFFLE_COMPRESSION_ENABLED ,
118
- compressionEnabled );
119
- configuration .setString (
120
- NettyShuffleEnvironmentOptions .NETWORK_BLOCKING_SHUFFLE_TYPE , subpartitionType );
121
- configuration .setString (
92
+ configuration .set (
93
+ NettyShuffleEnvironmentOptions .SHUFFLE_COMPRESSION_CODEC ,
94
+ compressionEnabled ?
95
+ NettyShuffleEnvironmentOptions .CompressionCodec .LZ4
96
+ : NettyShuffleEnvironmentOptions .CompressionCodec .NONE );
97
+ configuration .set (
122
98
CoreOptions .TMP_DIRS ,
123
99
FileUtils .getCurrentWorkingDirectory ().toAbsolutePath ().toString ());
124
100
return configuration ;
@@ -129,39 +105,15 @@ public static class UncompressedFileEnvironmentContext
129
105
extends BlockingPartitionEnvironmentContext {
130
106
@ Override
131
107
protected Configuration createConfiguration () {
132
- return createConfiguration (false , "file" , false );
108
+ return createConfiguration (false );
133
109
}
134
110
}
135
111
136
112
public static class CompressedFileEnvironmentContext
137
113
extends BlockingPartitionEnvironmentContext {
138
114
@ Override
139
115
protected Configuration createConfiguration () {
140
- return createConfiguration (true , "file" , false );
141
- }
142
- }
143
-
144
- public static class UncompressedMmapEnvironmentContext
145
- extends BlockingPartitionEnvironmentContext {
146
- @ Override
147
- protected Configuration createConfiguration () {
148
- return createConfiguration (false , "mmap" , false );
149
- }
150
- }
151
-
152
- public static class CompressedSortEnvironmentContext
153
- extends BlockingPartitionEnvironmentContext {
154
- @ Override
155
- protected Configuration createConfiguration () {
156
- return createConfiguration (true , "file" , true );
157
- }
158
- }
159
-
160
- public static class UncompressedSortEnvironmentContext
161
- extends BlockingPartitionEnvironmentContext {
162
- @ Override
163
- protected Configuration createConfiguration () {
164
- return createConfiguration (false , "file" , true );
116
+ return createConfiguration (true );
165
117
}
166
118
}
167
119
}
0 commit comments