Package org.apache.flink.util
Class Utils
- java.lang.Object
-
- org.apache.flink.util.Utils
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Utils.ChecksumHashCode
Accumulator ofUtils.ChecksumHashCode
.static class
Utils.ChecksumHashCodeHelper<T>
static class
Utils.CollectHelper<T>
Utility sink function that collects elements into an accumulator, from which it they can be retrieved by the client.static class
Utils.CountHelper<T>
Utility sink function that counts elements and writes the count into an accumulator, from which it can be retrieved by the client.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getCallLocationName()
static String
getCallLocationName(int depth)
static String
getKeyFromArgs(String[] args, int index)
Get the key from the given args.static <T> String
getSerializerTree(TypeInformation<T> ti)
Debugging utility to understand the hierarchy of serializers created by the Java API.static <T> Optional<T>
resolveFactory(ThreadLocal<T> threadLocalFactory, T staticFactory)
Resolves the given factories.
-
-
-
Field Detail
-
RNG
public static final Random RNG
-
-
Method Detail
-
getCallLocationName
public static String getCallLocationName()
-
getCallLocationName
public static String getCallLocationName(int depth)
-
getSerializerTree
public static <T> String getSerializerTree(TypeInformation<T> ti)
Debugging utility to understand the hierarchy of serializers created by the Java API. Tested in GroupReduceITCase.testGroupByGenericType()
-
resolveFactory
public static <T> Optional<T> resolveFactory(ThreadLocal<T> threadLocalFactory, @Nullable T staticFactory)
Resolves the given factories. The thread local factory has preference over the static factory. If none is set, the method returnsOptional.empty()
.- Type Parameters:
T
- type of factory- Parameters:
threadLocalFactory
- containing the thread local factorystaticFactory
- containing the global factory- Returns:
- Optional containing the resolved factory if it exists, otherwise it's empty
-
-