|
42 | 42 | import org.apache.spark.SparkContext$;
|
43 | 43 | import org.apache.spark.TaskContext;
|
44 | 44 | import org.apache.spark.broadcast.Broadcast;
|
45 |
| -import org.apache.spark.io.CompressionCodec; |
46 | 45 | import org.apache.spark.scheduler.DAGScheduler;
|
47 | 46 | import org.apache.spark.scheduler.MapStatus;
|
48 | 47 | import org.apache.spark.scheduler.MapStatus$;
|
@@ -388,16 +387,14 @@ public static byte[] serializeGetReducerFileGroupResponse(
|
388 | 387 | scala.reflect.ClassManifestFactory.fromClass(
|
389 | 388 | GetReducerFileGroupResponse.class));
|
390 | 389 |
|
391 |
| - CompressionCodec codec = CompressionCodec.createCodec(sparkContext.conf()); |
392 | 390 | // Using `org.apache.commons.io.output.ByteArrayOutputStream` instead of the standard
|
393 | 391 | // one
|
394 | 392 | // This implementation doesn't reallocate the whole memory block but allocates
|
395 | 393 | // additional buffers. This way no buffers need to be garbage collected and
|
396 | 394 | // the contents don't have to be copied to the new buffer.
|
397 | 395 | org.apache.commons.io.output.ByteArrayOutputStream out =
|
398 | 396 | new org.apache.commons.io.output.ByteArrayOutputStream();
|
399 |
| - try (ObjectOutputStream oos = |
400 |
| - new ObjectOutputStream(codec.compressedOutputStream(out))) { |
| 397 | + try (ObjectOutputStream oos = new ObjectOutputStream(out)) { |
401 | 398 | oos.writeObject(broadcast);
|
402 | 399 | }
|
403 | 400 | byte[] _serializeResult = out.toByteArray();
|
@@ -426,10 +423,7 @@ public static GetReducerFileGroupResponse deserializeGetReducerFileGroupResponse
|
426 | 423 | GetReducerFileGroupResponse response = null;
|
427 | 424 |
|
428 | 425 | try {
|
429 |
| - CompressionCodec codec = CompressionCodec.createCodec(sparkContext.conf()); |
430 |
| - try (ObjectInputStream objIn = |
431 |
| - new ObjectInputStream( |
432 |
| - codec.compressedInputStream(new ByteArrayInputStream(bytes)))) { |
| 426 | + try (ObjectInputStream objIn = new ObjectInputStream(new ByteArrayInputStream(bytes))) { |
433 | 427 | Broadcast<GetReducerFileGroupResponse> broadcast =
|
434 | 428 | (Broadcast<GetReducerFileGroupResponse>) objIn.readObject();
|
435 | 429 | response = broadcast.value();
|
|
0 commit comments