flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-1555) Add utility to log the serializers of composite types
Date Fri, 20 Feb 2015 17:13:14 GMT

    [ https://issues.apache.org/jira/browse/FLINK-1555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14329188#comment-14329188
] 

ASF GitHub Bot commented on FLINK-1555:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/415#discussion_r25085047
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompositeType.java
---
    @@ -132,7 +133,31 @@ public CompositeType(Class<T> typeClass) {
     		}
     		return getNewComparator(config);
     	}
    - 	
    +
    +	// --------------------------------------------------------------------------------------------
    +
    +	/**
    +	 * Debugging utility to understand the hierarchy of serializers created by the Java
API.
    +	 */
    +	public static <T> String getSerializerTree(TypeInformation<T> ti) {
    +		return getSerializerTree(ti, 0);
    +	}
    +
    +	private static <T> String getSerializerTree(TypeInformation<T> ti, int indent)
{
    +		String ret = "";
    +		if(ti instanceof CompositeType) {
    +			ret += ti.toString()+"\n";
    --- End diff --
    
    Should the ```toString``` method not already print the whole tree? Thus, the information
would be redundant.


> Add utility to log the serializers of composite types
> -----------------------------------------------------
>
>                 Key: FLINK-1555
>                 URL: https://issues.apache.org/jira/browse/FLINK-1555
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Robert Metzger
>            Assignee: Robert Metzger
>            Priority: Minor
>
> Users affected by poor performance might want to understand how Flink is serializing
their data.
> Therefore, it would be cool to have a tool utility which logs the serializers like this:
> {{SerializerUtils.getSerializers(TypeInformation<POJO> t);}}
> to get 
> {code}
> PojoSerializer
>     TupleSerializer
>       IntSer
>       DateSer
>       GenericTypeSer(java.sql.Date)
>     PojoSerializer
>       GenericTypeSer(HashMap)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message