This is an automated email from the ASF dual-hosted git repository.
abstractdog pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 6eca44e HIVE-22770: Skip interning of MapWork fields during
deserialization (László Bodor reviewed by Ashutosh Chauhan)
6eca44e is described below
commit 6eca44e5a2ac6909105bf210b72e190a4b9ab780
Author: László Bodor <[email protected]>
AuthorDate: Wed Jan 29 15:02:03 2020 +0100
HIVE-22770: Skip interning of MapWork fields during deserialization (László
Bodor reviewed by Ashutosh Chauhan)
Signed-off-by: Laszlo Bodor <[email protected]>
---
.../hive/ql/exec/SerializationUtilities.java | 24 ----------------------
1 file changed, 24 deletions(-)
diff --git
a/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java
b/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java
index e205c08..f19f394 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java
@@ -234,7 +234,6 @@ public class SerializationUtilities {
kryo.register(Arrays.asList("").getClass(), new
ArraysAsListSerializer());
kryo.register(new java.util.ArrayList().subList(0,0).getClass(), new
ArrayListSubListSerializer());
kryo.register(CopyOnFirstWriteProperties.class, new
CopyOnFirstWritePropertiesSerializer());
- kryo.register(MapWork.class, new MapWorkSerializer(kryo, MapWork.class));
kryo.register(PartitionDesc.class, new PartitionDescSerializer(kryo,
PartitionDesc.class));
((Kryo.DefaultInstantiatorStrategy) kryo.getInstantiatorStrategy())
@@ -565,29 +564,6 @@ public class SerializationUtilities {
}
/**
- * We use a custom {@link com.esotericsoftware.kryo.Serializer} for {@link
MapWork} objects in
- * order to invoke any string interning code present in the "setter"
methods. The fields in {@link
- * MapWork} often store paths that contain duplicate strings, so interning
them can decrease
- * memory significantly.
- */
- private static class MapWorkSerializer extends FieldSerializer<MapWork> {
-
- MapWorkSerializer(Kryo kryo, Class type) {
- super(kryo, type);
- }
-
- @Override
- public MapWork read(Kryo kryo, Input input, Class<MapWork> type) {
- MapWork mapWork = super.read(kryo, input, type);
- // The set methods in MapWork intern the any duplicate strings which is
why we call them
- // during de-serialization
- mapWork.setPathToPartitionInfo(mapWork.getPathToPartitionInfo());
- mapWork.setPathToAliases(mapWork.getPathToAliases());
- return mapWork;
- }
- }
-
- /**
* We use a custom {@link com.esotericsoftware.kryo.Serializer} for {@link
PartitionDesc} objects
* in order to invoke any string interning code present in the "setter"
methods. {@link
* PartitionDesc} objects are usually stored by {@link MapWork} objects and
contain duplicate info