Jonathan Hart

Revert "Upgrade Kryo to 3.0.3."

Problems in distributed environment

This reverts commit aa20d61c.

Change-Id: I9f94927edb769afb2c7576a34e017cd77c7af730
...@@ -40,11 +40,11 @@ ...@@ -40,11 +40,11 @@
40 <bundle>mvn:io.dropwizard.metrics/metrics-json/3.1.2</bundle> 40 <bundle>mvn:io.dropwizard.metrics/metrics-json/3.1.2</bundle>
41 <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.1</bundle> 41 <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.1</bundle>
42 42
43 - <bundle>mvn:com.esotericsoftware/kryo/3.0.3</bundle> 43 + <bundle>mvn:com.esotericsoftware/kryo/3.0.0</bundle>
44 <bundle>mvn:com.esotericsoftware/reflectasm/1.11.0</bundle> 44 <bundle>mvn:com.esotericsoftware/reflectasm/1.11.0</bundle>
45 <bundle>mvn:org.ow2.asm/asm/4.2</bundle> 45 <bundle>mvn:org.ow2.asm/asm/4.2</bundle>
46 <bundle>mvn:com.esotericsoftware/minlog/1.3.0</bundle> 46 <bundle>mvn:com.esotericsoftware/minlog/1.3.0</bundle>
47 - <bundle>mvn:org.objenesis/objenesis/2.2</bundle> 47 + <bundle>mvn:org.objenesis/objenesis/2.1</bundle>
48 48
49 <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle> 49 <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle>
50 <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle> 50 <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle>
......
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
308 <dependency> 308 <dependency>
309 <groupId>com.esotericsoftware</groupId> 309 <groupId>com.esotericsoftware</groupId>
310 <artifactId>kryo</artifactId> 310 <artifactId>kryo</artifactId>
311 - <version>3.0.3</version> 311 + <version>3.0.0</version>
312 </dependency> 312 </dependency>
313 <dependency> 313 <dependency>
314 <groupId>com.esotericsoftware</groupId> 314 <groupId>com.esotericsoftware</groupId>
......
...@@ -15,6 +15,17 @@ ...@@ -15,6 +15,17 @@
15 */ 15 */
16 package org.onlab.util; 16 package org.onlab.util;
17 17
18 +import static org.slf4j.LoggerFactory.getLogger;
19 +
20 +import java.io.InputStream;
21 +import java.io.OutputStream;
22 +import java.nio.ByteBuffer;
23 +import java.util.ArrayList;
24 +import java.util.List;
25 +
26 +import org.apache.commons.lang3.tuple.Pair;
27 +import org.slf4j.Logger;
28 +
18 import com.esotericsoftware.kryo.Kryo; 29 import com.esotericsoftware.kryo.Kryo;
19 import com.esotericsoftware.kryo.Serializer; 30 import com.esotericsoftware.kryo.Serializer;
20 import com.esotericsoftware.kryo.io.ByteBufferInput; 31 import com.esotericsoftware.kryo.io.ByteBufferInput;
...@@ -25,17 +36,6 @@ import com.esotericsoftware.kryo.pool.KryoFactory; ...@@ -25,17 +36,6 @@ import com.esotericsoftware.kryo.pool.KryoFactory;
25 import com.esotericsoftware.kryo.pool.KryoPool; 36 import com.esotericsoftware.kryo.pool.KryoPool;
26 import com.google.common.base.MoreObjects; 37 import com.google.common.base.MoreObjects;
27 import com.google.common.collect.ImmutableList; 38 import com.google.common.collect.ImmutableList;
28 -import org.apache.commons.lang3.tuple.Pair;
29 -import org.objenesis.strategy.StdInstantiatorStrategy;
30 -import org.slf4j.Logger;
31 -
32 -import java.io.InputStream;
33 -import java.io.OutputStream;
34 -import java.nio.ByteBuffer;
35 -import java.util.ArrayList;
36 -import java.util.List;
37 -
38 -import static org.slf4j.LoggerFactory.getLogger;
39 39
40 /** 40 /**
41 * Pool of Kryo instances, with classes pre-registered. 41 * Pool of Kryo instances, with classes pre-registered.
...@@ -381,9 +381,6 @@ public final class KryoNamespace implements KryoFactory, KryoPool { ...@@ -381,9 +381,6 @@ public final class KryoNamespace implements KryoFactory, KryoPool {
381 public Kryo create() { 381 public Kryo create() {
382 Kryo kryo = new Kryo(); 382 Kryo kryo = new Kryo();
383 kryo.setRegistrationRequired(registrationRequired); 383 kryo.setRegistrationRequired(registrationRequired);
384 - // TODO rethink whether we want to use StdInstantiatorStrategy
385 - kryo.setInstantiatorStrategy(
386 - new Kryo.DefaultInstantiatorStrategy(new StdInstantiatorStrategy()));
387 for (RegistrationBlock block : registeredBlocks) { 384 for (RegistrationBlock block : registeredBlocks) {
388 int id = block.begin(); 385 int id = block.begin();
389 if (id == FLOATING_ID) { 386 if (id == FLOATING_ID) {
......