public List<T> getVariable() throws InitializationTypeConflictException { if (!materialized) { throw new IllegalStateException("The Broadcast Variable has not yet been materialized."); } if (disposed) { throw new IllegalStateException("The Broadcast Variable has been disposed"); } synchronized (references) { if (transformed != null) { if (transformed instanceof List) { @SuppressWarnings("unchecked") List<T> casted = (List<T>) transformed; return casted; } else { throw new InitializationTypeConflictException(transformed.getClass()); } } else { return data; } } }
@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."); } }
@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."); } }
@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."); } }
public List<T> getVariable() throws InitializationTypeConflictException { if (!materialized) { throw new IllegalStateException("The Broadcast Variable has not yet been materialized."); } if (disposed) { throw new IllegalStateException("The Broadcast Variable has been disposed"); } synchronized (references) { if (transformed != null) { if (transformed instanceof List) { @SuppressWarnings("unchecked") List<T> casted = (List<T>) transformed; return casted; } else { throw new InitializationTypeConflictException(transformed.getClass()); } } else { return data; } } }
@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."); } }
public List<T> getVariable() throws InitializationTypeConflictException { if (!materialized) { throw new IllegalStateException("The Broadcast Variable has not yet been materialized."); } if (disposed) { throw new IllegalStateException("The Broadcast Variable has been disposed"); } synchronized (references) { if (transformed != null) { if (transformed instanceof List) { @SuppressWarnings("unchecked") List<T> casted = (List<T>) transformed; return casted; } else { throw new InitializationTypeConflictException(transformed.getClass()); } } else { return data; } } }
public List<T> getVariable() throws InitializationTypeConflictException { if (!materialized) { throw new IllegalStateException("The Broadcast Variable has not yet been materialized."); } if (disposed) { throw new IllegalStateException("The Broadcast Variable has been disposed"); } synchronized (references) { if (transformed != null) { if (transformed instanceof List) { @SuppressWarnings("unchecked") List<T> casted = (List<T>) transformed; return casted; } else { throw new InitializationTypeConflictException(transformed.getClass()); } } else { return data; } } }