org.apache.flink.runtime.broadcast.InitializationTypeConflictException Java Examples
The following examples show how to use
org.apache.flink.runtime.broadcast.InitializationTypeConflictException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DistributedRuntimeUDFContext.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Override public <T> List<T> getBroadcastVariable(String name) { Preconditions.checkNotNull(name, "The broadcast variable name must not be null."); // check if we have an initialized version @SuppressWarnings("unchecked") BroadcastVariableMaterialization<T, ?> variable = (BroadcastVariableMaterialization<T, ?>) this.broadcastVars.get(name); if (variable != null) { try { return variable.getVariable(); } catch (InitializationTypeConflictException e) { throw new RuntimeException("The broadcast variable '" + name + "' has been initialized by a prior call to a " + e.getType()); } } else { throw new IllegalArgumentException("The broadcast variable with name '" + name + "' has not been set."); } }
Example #2
Source File: DistributedRuntimeUDFContext.java From flink with Apache License 2.0 | 6 votes |
@Override public <T> List<T> getBroadcastVariable(String name) { Preconditions.checkNotNull(name, "The broadcast variable name must not be null."); // check if we have an initialized version @SuppressWarnings("unchecked") BroadcastVariableMaterialization<T, ?> variable = (BroadcastVariableMaterialization<T, ?>) this.broadcastVars.get(name); if (variable != null) { try { return variable.getVariable(); } catch (InitializationTypeConflictException e) { throw new RuntimeException("The broadcast variable '" + name + "' has been initialized by a prior call to a " + e.getType()); } } else { throw new IllegalArgumentException("The broadcast variable with name '" + name + "' has not been set."); } }
Example #3
Source File: DistributedRuntimeUDFContext.java From flink with Apache License 2.0 | 6 votes |
@Override public <T> List<T> getBroadcastVariable(String name) { Preconditions.checkNotNull(name, "The broadcast variable name must not be null."); // check if we have an initialized version @SuppressWarnings("unchecked") BroadcastVariableMaterialization<T, ?> variable = (BroadcastVariableMaterialization<T, ?>) this.broadcastVars.get(name); if (variable != null) { try { return variable.getVariable(); } catch (InitializationTypeConflictException e) { throw new RuntimeException("The broadcast variable '" + name + "' has been initialized by a prior call to a " + e.getType()); } } else { throw new IllegalArgumentException("The broadcast variable with name '" + name + "' has not been set."); } }