Kryo related fixes
- remove dependency to kryo-serializers - update kryo to 3.0.0 -- includes bug fix for protected constructor issue Change-Id: Ib4cac77fe3943c58933bd92a058172f89ad628f5
Showing
11 changed files
with
49 additions
and
45 deletions
| ... | @@ -53,10 +53,6 @@ | ... | @@ -53,10 +53,6 @@ |
| 53 | <groupId>org.apache.felix</groupId> | 53 | <groupId>org.apache.felix</groupId> |
| 54 | <artifactId>org.apache.felix.scr.annotations</artifactId> | 54 | <artifactId>org.apache.felix.scr.annotations</artifactId> |
| 55 | </dependency> | 55 | </dependency> |
| 56 | - <dependency> | ||
| 57 | - <groupId>de.javakaffee</groupId> | ||
| 58 | - <artifactId>kryo-serializers</artifactId> | ||
| 59 | - </dependency> | ||
| 60 | </dependencies> | 56 | </dependencies> |
| 61 | 57 | ||
| 62 | <build> | 58 | <build> | ... | ... |
| ... | @@ -46,10 +46,6 @@ | ... | @@ -46,10 +46,6 @@ |
| 46 | <groupId>com.hazelcast</groupId> | 46 | <groupId>com.hazelcast</groupId> |
| 47 | <artifactId>hazelcast</artifactId> | 47 | <artifactId>hazelcast</artifactId> |
| 48 | </dependency> | 48 | </dependency> |
| 49 | - <dependency> | ||
| 50 | - <groupId>de.javakaffee</groupId> | ||
| 51 | - <artifactId>kryo-serializers</artifactId> | ||
| 52 | - </dependency> | ||
| 53 | </dependencies> | 49 | </dependencies> |
| 54 | 50 | ||
| 55 | <build> | 51 | <build> | ... | ... |
| ... | @@ -34,10 +34,6 @@ | ... | @@ -34,10 +34,6 @@ |
| 34 | <groupId>com.hazelcast</groupId> | 34 | <groupId>com.hazelcast</groupId> |
| 35 | <artifactId>hazelcast</artifactId> | 35 | <artifactId>hazelcast</artifactId> |
| 36 | </dependency> | 36 | </dependency> |
| 37 | - <dependency> | ||
| 38 | - <groupId>de.javakaffee</groupId> | ||
| 39 | - <artifactId>kryo-serializers</artifactId> | ||
| 40 | - </dependency> | ||
| 41 | </dependencies> | 37 | </dependencies> |
| 42 | 38 | ||
| 43 | <build> | 39 | <build> | ... | ... |
| ... | @@ -46,10 +46,6 @@ | ... | @@ -46,10 +46,6 @@ |
| 46 | <groupId>com.hazelcast</groupId> | 46 | <groupId>com.hazelcast</groupId> |
| 47 | <artifactId>hazelcast</artifactId> | 47 | <artifactId>hazelcast</artifactId> |
| 48 | </dependency> | 48 | </dependency> |
| 49 | - <dependency> | ||
| 50 | - <groupId>de.javakaffee</groupId> | ||
| 51 | - <artifactId>kryo-serializers</artifactId> | ||
| 52 | - </dependency> | ||
| 53 | </dependencies> | 49 | </dependencies> |
| 54 | 50 | ||
| 55 | <build> | 51 | <build> | ... | ... |
| ... | @@ -25,10 +25,6 @@ | ... | @@ -25,10 +25,6 @@ |
| 25 | <groupId>org.apache.felix</groupId> | 25 | <groupId>org.apache.felix</groupId> |
| 26 | <artifactId>org.apache.felix.scr.annotations</artifactId> | 26 | <artifactId>org.apache.felix.scr.annotations</artifactId> |
| 27 | </dependency> | 27 | </dependency> |
| 28 | - <dependency> | ||
| 29 | - <groupId>de.javakaffee</groupId> | ||
| 30 | - <artifactId>kryo-serializers</artifactId> | ||
| 31 | - </dependency> | ||
| 32 | </dependencies> | 28 | </dependencies> |
| 33 | 29 | ||
| 34 | <build> | 30 | <build> | ... | ... |
| ... | @@ -30,8 +30,6 @@ import org.onlab.packet.IpAddress; | ... | @@ -30,8 +30,6 @@ import org.onlab.packet.IpAddress; |
| 30 | import org.onlab.packet.IpPrefix; | 30 | import org.onlab.packet.IpPrefix; |
| 31 | import org.onlab.util.KryoPool; | 31 | import org.onlab.util.KryoPool; |
| 32 | 32 | ||
| 33 | -import de.javakaffee.kryoserializers.URISerializer; | ||
| 34 | - | ||
| 35 | public final class KryoPoolUtil { | 33 | public final class KryoPoolUtil { |
| 36 | 34 | ||
| 37 | /** | 35 | /** | ... | ... |
| 1 | +package org.onlab.onos.store.serializers; | ||
| 2 | + | ||
| 3 | +import java.net.URI; | ||
| 4 | + | ||
| 5 | +import com.esotericsoftware.kryo.Kryo; | ||
| 6 | +import com.esotericsoftware.kryo.Serializer; | ||
| 7 | +import com.esotericsoftware.kryo.io.Input; | ||
| 8 | +import com.esotericsoftware.kryo.io.Output; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * Serializer for {@link URI}. | ||
| 12 | + */ | ||
| 13 | +public class URISerializer extends Serializer<URI> { | ||
| 14 | + | ||
| 15 | + /** | ||
| 16 | + * Creates {@link URI} serializer instance. | ||
| 17 | + */ | ||
| 18 | + public URISerializer() { | ||
| 19 | + super(false); | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + @Override | ||
| 23 | + public void write(Kryo kryo, Output output, URI object) { | ||
| 24 | + output.writeString(object.toString()); | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + @Override | ||
| 28 | + public URI read(Kryo kryo, Input input, Class<URI> type) { | ||
| 29 | + return URI.create(input.readString()); | ||
| 30 | + } | ||
| 31 | +} |
| ... | @@ -20,10 +20,11 @@ | ... | @@ -20,10 +20,11 @@ |
| 20 | <bundle>mvn:io.dropwizard.metrics/metrics-core/3.1.0</bundle> | 20 | <bundle>mvn:io.dropwizard.metrics/metrics-core/3.1.0</bundle> |
| 21 | <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.1</bundle> | 21 | <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.1</bundle> |
| 22 | 22 | ||
| 23 | - <bundle>mvn:com.esotericsoftware.kryo/kryo/2.24.0</bundle> | 23 | + <bundle>mvn:com.esotericsoftware/kryo/3.0.0</bundle> |
| 24 | + <bundle>mvn:com.esotericsoftware/reflectasm/1.10.0</bundle> | ||
| 25 | + <bundle>mvn:org.ow2.asm/asm/4.2</bundle> | ||
| 24 | <bundle>mvn:com.esotericsoftware/minlog/1.3.0</bundle> | 26 | <bundle>mvn:com.esotericsoftware/minlog/1.3.0</bundle> |
| 25 | <bundle>mvn:org.objenesis/objenesis/2.1</bundle> | 27 | <bundle>mvn:org.objenesis/objenesis/2.1</bundle> |
| 26 | - <bundle>mvn:de.javakaffee/kryo-serializers/0.27</bundle> | ||
| 27 | 28 | ||
| 28 | <bundle>mvn:org.onlab.onos/onlab-nio/1.0.0-SNAPSHOT</bundle> | 29 | <bundle>mvn:org.onlab.onos/onlab-nio/1.0.0-SNAPSHOT</bundle> |
| 29 | 30 | ... | ... |
| ... | @@ -193,9 +193,20 @@ | ... | @@ -193,9 +193,20 @@ |
| 193 | <version>0.9.1</version> | 193 | <version>0.9.1</version> |
| 194 | </dependency> | 194 | </dependency> |
| 195 | <dependency> | 195 | <dependency> |
| 196 | - <groupId>com.esotericsoftware.kryo</groupId> | 196 | + <groupId>com.esotericsoftware</groupId> |
| 197 | - <artifactId>kryo</artifactId> | 197 | + <artifactId>kryo</artifactId> |
| 198 | - <version>2.24.0</version> | 198 | + <version>3.0.0</version> |
| 199 | + </dependency> | ||
| 200 | + <dependency> | ||
| 201 | + <groupId>com.esotericsoftware</groupId> | ||
| 202 | + <artifactId>reflectasm</artifactId> | ||
| 203 | + <version>1.10.0</version> | ||
| 204 | + <type>bundle</type> | ||
| 205 | + </dependency> | ||
| 206 | + <dependency> | ||
| 207 | + <groupId>org.ow2.asm</groupId> | ||
| 208 | + <artifactId>asm</artifactId> | ||
| 209 | + <version>4.2</version> | ||
| 199 | </dependency> | 210 | </dependency> |
| 200 | <dependency> | 211 | <dependency> |
| 201 | <groupId>com.esotericsoftware</groupId> | 212 | <groupId>com.esotericsoftware</groupId> |
| ... | @@ -207,11 +218,6 @@ | ... | @@ -207,11 +218,6 @@ |
| 207 | <artifactId>objenesis</artifactId> | 218 | <artifactId>objenesis</artifactId> |
| 208 | <version>2.1</version> | 219 | <version>2.1</version> |
| 209 | </dependency> | 220 | </dependency> |
| 210 | - <dependency> | ||
| 211 | - <groupId>de.javakaffee</groupId> | ||
| 212 | - <artifactId>kryo-serializers</artifactId> | ||
| 213 | - <version>0.27</version> | ||
| 214 | - </dependency> | ||
| 215 | 221 | ||
| 216 | <!-- ONOS related --> | 222 | <!-- ONOS related --> |
| 217 | <dependency> | 223 | <dependency> | ... | ... |
| ... | @@ -44,18 +44,10 @@ | ... | @@ -44,18 +44,10 @@ |
| 44 | <artifactId>minimal-json</artifactId> | 44 | <artifactId>minimal-json</artifactId> |
| 45 | </dependency> | 45 | </dependency> |
| 46 | <dependency> | 46 | <dependency> |
| 47 | - <groupId>com.esotericsoftware.kryo</groupId> | 47 | + <groupId>com.esotericsoftware</groupId> |
| 48 | <artifactId>kryo</artifactId> | 48 | <artifactId>kryo</artifactId> |
| 49 | </dependency> | 49 | </dependency> |
| 50 | <dependency> | 50 | <dependency> |
| 51 | - <groupId>com.esotericsoftware</groupId> | ||
| 52 | - <artifactId>minlog</artifactId> | ||
| 53 | - </dependency> | ||
| 54 | - <dependency> | ||
| 55 | - <groupId>org.objenesis</groupId> | ||
| 56 | - <artifactId>objenesis</artifactId> | ||
| 57 | - </dependency> | ||
| 58 | - <dependency> | ||
| 59 | <groupId>io.dropwizard.metrics</groupId> | 51 | <groupId>io.dropwizard.metrics</groupId> |
| 60 | <artifactId>metrics-core</artifactId> | 52 | <artifactId>metrics-core</artifactId> |
| 61 | <version>3.1.0</version> | 53 | <version>3.1.0</version> | ... | ... |
| ... | @@ -32,10 +32,6 @@ | ... | @@ -32,10 +32,6 @@ |
| 32 | <scope>test</scope> | 32 | <scope>test</scope> |
| 33 | </dependency> | 33 | </dependency> |
| 34 | <dependency> | 34 | <dependency> |
| 35 | - <groupId>de.javakaffee</groupId> | ||
| 36 | - <artifactId>kryo-serializers</artifactId> | ||
| 37 | - </dependency> | ||
| 38 | - <dependency> | ||
| 39 | <groupId>io.netty</groupId> | 35 | <groupId>io.netty</groupId> |
| 40 | <artifactId>netty-all</artifactId> | 36 | <artifactId>netty-all</artifactId> |
| 41 | </dependency> | 37 | </dependency> | ... | ... |
-
Please register or login to post a comment