本文整理了Java中org.apache.flink.api.java.Utils.getSerializerTree()
方法的一些代码示例,展示了Utils.getSerializerTree()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getSerializerTree()
方法的具体详情如下:
包路径:org.apache.flink.api.java.Utils
类名称:Utils
方法名:getSerializerTree
[英]Debugging utility to understand the hierarchy of serializers created by the Java API. Tested in GroupReduceITCase.testGroupByGenericType()
[中]调试实用程序,以了解Java API创建的序列化程序的层次结构。在这个案例中进行了测试。testGroupByGenericType()
代码示例来源:origin: apache/flink
/**
* Debugging utility to understand the hierarchy of serializers created by the Java API.
* Tested in GroupReduceITCase.testGroupByGenericType()
*/
public static <T> String getSerializerTree(TypeInformation<T> ti) {
return getSerializerTree(ti, 0);
}
代码示例来源:origin: apache/flink
private static <T> String getSerializerTree(TypeInformation<T> ti, int indent) {
String ret = "";
if (ti instanceof CompositeType) {
ret += StringUtils.repeat(' ', indent) + ti.getClass().getSimpleName() + "\n";
CompositeType<T> cti = (CompositeType<T>) ti;
String[] fieldNames = cti.getFieldNames();
for (int i = 0; i < cti.getArity(); i++) {
TypeInformation<?> fieldType = cti.getTypeAt(i);
ret += StringUtils.repeat(' ', indent + 2) + fieldNames[i] + ":" + getSerializerTree(fieldType, indent);
}
} else {
if (ti instanceof GenericTypeInfo) {
ret += StringUtils.repeat(' ', indent) + "GenericTypeInfo (" + ti.getTypeClass().getSimpleName() + ")\n";
ret += getGenericTypeTree(ti.getTypeClass(), indent + 4);
} else {
ret += StringUtils.repeat(' ', indent) + ti.toString() + "\n";
}
}
return ret;
}
代码示例来源:origin: apache/flink
TypeExtractor.createTypeInfo(CollectionDataSets.PojoWithCollectionGeneric.class);
String serTree = Utils.getSerializerTree(ti);
代码示例来源:origin: org.apache.flink/flink-java
/**
* Debugging utility to understand the hierarchy of serializers created by the Java API.
* Tested in GroupReduceITCase.testGroupByGenericType()
*/
public static <T> String getSerializerTree(TypeInformation<T> ti) {
return getSerializerTree(ti, 0);
}
代码示例来源:origin: com.alibaba.blink/flink-java
/**
* Debugging utility to understand the hierarchy of serializers created by the Java API.
* Tested in GroupReduceITCase.testGroupByGenericType()
*/
public static <T> String getSerializerTree(TypeInformation<T> ti) {
return getSerializerTree(ti, 0);
}
代码示例来源:origin: org.apache.flink/flink-java
private static <T> String getSerializerTree(TypeInformation<T> ti, int indent) {
String ret = "";
if (ti instanceof CompositeType) {
ret += StringUtils.repeat(' ', indent) + ti.getClass().getSimpleName() + "\n";
CompositeType<T> cti = (CompositeType<T>) ti;
String[] fieldNames = cti.getFieldNames();
for (int i = 0; i < cti.getArity(); i++) {
TypeInformation<?> fieldType = cti.getTypeAt(i);
ret += StringUtils.repeat(' ', indent + 2) + fieldNames[i] + ":" + getSerializerTree(fieldType, indent);
}
} else {
if (ti instanceof GenericTypeInfo) {
ret += StringUtils.repeat(' ', indent) + "GenericTypeInfo (" + ti.getTypeClass().getSimpleName() + ")\n";
ret += getGenericTypeTree(ti.getTypeClass(), indent + 4);
} else {
ret += StringUtils.repeat(' ', indent) + ti.toString() + "\n";
}
}
return ret;
}
代码示例来源:origin: com.alibaba.blink/flink-java
private static <T> String getSerializerTree(TypeInformation<T> ti, int indent) {
String ret = "";
if (ti instanceof CompositeType) {
ret += StringUtils.repeat(' ', indent) + ti.getClass().getSimpleName() + "\n";
CompositeType<T> cti = (CompositeType<T>) ti;
String[] fieldNames = cti.getFieldNames();
for (int i = 0; i < cti.getArity(); i++) {
TypeInformation<?> fieldType = cti.getTypeAt(i);
ret += StringUtils.repeat(' ', indent + 2) + fieldNames[i] + ":" + getSerializerTree(fieldType, indent);
}
} else {
if (ti instanceof GenericTypeInfo) {
ret += StringUtils.repeat(' ', indent) + "GenericTypeInfo (" + ti.getTypeClass().getSimpleName() + ")\n";
ret += getGenericTypeTree(ti.getTypeClass(), indent + 4);
} else {
ret += StringUtils.repeat(' ', indent) + ti.toString() + "\n";
}
}
return ret;
}
内容来源于网络,如有侵权,请联系作者删除!