flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmetzger <...@git.apache.org>
Subject [GitHub] flink pull request: Add support for Subclasses, Interfaces, Abstra...
Date Tue, 10 Feb 2015 10:40:16 GMT
Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/236#discussion_r24402907
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/typeutils/runtime/KryoSerializer.java
---
    @@ -82,29 +75,15 @@
     	
     	// ------------------------------------------------------------------------
     
    -	public KryoSerializer(Class<T> type){
    +	public KryoSerializer(Class<T> type, ExecutionConfig executionConfig){
     		if(type == null){
     			throw new NullPointerException("Type class cannot be null.");
     		}
     		this.type = type;
     
    -		// create copies of the statically registered serializers
    -		// we use static synchronization to safeguard against concurrent use
    -		// of the static collections.
    -		synchronized (KryoSerializer.class) {
    -			this.registeredSerializers = staticRegisteredSerializers.isEmpty() ?
    -				Collections.<Class<?>, Serializer<?>>emptyMap() :
    -				new HashMap<Class<?>, Serializer<?>>(staticRegisteredSerializers);
    -		
    -			this.registeredSerializersClasses = staticRegisteredSerializersClasses.isEmpty() ?
    -				Collections.<Class<?>, Class<? extends Serializer<?>>>emptyMap()
:
    -				new HashMap<Class<?>, Class<? extends Serializer<?>>>(staticRegisteredSerializersClasses);
    -				
    -			this.registeredTypes = staticRegisteredTypes.isEmpty() ?
    -				Collections.<Class<?>>emptySet() :
    -				new HashSet<Class<?>>(staticRegisteredTypes);
    -		}
    -		
    +		this.registeredSerializers = executionConfig.getRegisteredKryoSerializers();
    --- End diff --
    
    We should add a way to register default Kryo serializers as well .. to have complete support.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message