for (int i = 0; i < firstFieldIndexes.length; i++) { Preconditions.checkElementIndex(firstFieldIndexes[i], maxFieldIndex);
for (int i = 0; i < firstFieldIndexes.length; i++) { Preconditions.checkElementIndex(firstFieldIndexes[i], maxFieldIndex);
for (int i = 0; i < secondFieldIndexes.length; i++) { Preconditions.checkElementIndex(secondFieldIndexes[i], maxFieldIndex);
public Projection(DataSet<T> ds, int[] fieldIndexes) { if (!(ds.getType() instanceof TupleTypeInfo)) { throw new UnsupportedOperationException("project() can only be applied to DataSets of Tuples."); } if (fieldIndexes.length == 0) { throw new IllegalArgumentException("project() needs to select at least one (1) field."); } else if (fieldIndexes.length > Tuple.MAX_ARITY - 1) { throw new IllegalArgumentException( "project() may select only up to (" + (Tuple.MAX_ARITY - 1) + ") fields."); } int maxFieldIndex = ds.getType().getArity(); for (int fieldIndexe : fieldIndexes) { Preconditions.checkElementIndex(fieldIndexe, maxFieldIndex); } this.ds = ds; this.fieldIndexes = fieldIndexes; }
protected StreamProjection(DataStream<IN> dataStream, int[] fieldIndexes) { if (!dataStream.getType().isTupleType()) { throw new RuntimeException("Only Tuple DataStreams can be projected"); } if (fieldIndexes.length == 0) { throw new IllegalArgumentException("project() needs to select at least one (1) field."); } else if (fieldIndexes.length > Tuple.MAX_ARITY - 1) { throw new IllegalArgumentException( "project() may select only up to (" + (Tuple.MAX_ARITY - 1) + ") fields."); } int maxFieldIndex = (dataStream.getType()).getArity(); for (int i = 0; i < fieldIndexes.length; i++) { Preconditions.checkElementIndex(fieldIndexes[i], maxFieldIndex); } this.dataStream = dataStream; this.fieldIndexes = fieldIndexes; }
for (int i = 0; i < secondFieldIndexes.length; i++) { Preconditions.checkElementIndex(secondFieldIndexes[i], maxFieldIndex);
Preconditions.checkElementIndex(this.fieldIndexes[i], maxFieldIndex);
Preconditions.checkElementIndex(this.fieldIndexes[i], maxFieldIndex);
/** * Returns the requested subpartition. */ public ResultSubpartitionView createSubpartitionView(int index, BufferAvailabilityListener availabilityListener) throws IOException { int refCnt = pendingReferences.get(); checkState(refCnt != -1, "Partition released."); checkState(refCnt > 0, "Partition not pinned."); checkElementIndex(index, subpartitions.length, "Subpartition not found."); ResultSubpartitionView readView = subpartitions[index].createReadView(availabilityListener); LOG.debug("Created {}", readView); return readView; }
/** * Returns the requested subpartition. */ public ResultSubpartitionView createSubpartitionView(int index, BufferAvailabilityListener availabilityListener) throws IOException { int refCnt = pendingReferences.get(); checkState(refCnt != -1, "Partition released."); checkState(refCnt > 0, "Partition not pinned."); checkElementIndex(index, subpartitions.length, "Subpartition not found."); ResultSubpartitionView readView = subpartitions[index].createReadView(availabilityListener); LOG.debug("Created {}", readView); return readView; }
/** * Returns the requested subpartition. */ public ResultSubpartitionView createSubpartitionView(int index, BufferAvailabilityListener availabilityListener) throws IOException { int refCnt = pendingReferences.get(); checkState(refCnt != -1, "Partition released."); checkState(refCnt > 0, "Partition not pinned."); checkElementIndex(index, subpartitions.length, "Subpartition not found."); ResultSubpartitionView readView = subpartitions[index].createReadView(availabilityListener); LOG.debug("Created {}", readView); return readView; }
/** * Returns the requested subpartition. */ public ResultSubpartitionView createSubpartitionView(int index, BufferAvailabilityListener availabilityListener) throws IOException { int refCnt = pendingReferences.get(); checkState(refCnt != -1, "Partition released."); checkState(refCnt > 0, "Partition not pinned."); checkElementIndex(index, subpartitions.length, "Subpartition not found."); ResultSubpartitionView readView = subpartitions[index].createReadView(availabilityListener); LOG.debug("Created {}", readView); return readView; }
for (int i = 0; i < secondFieldIndexes.length; i++) { Preconditions.checkElementIndex(secondFieldIndexes[i], maxFieldIndex);
public Projection(DataSet<T> ds, int[] fieldIndexes) { if (!(ds.getType() instanceof TupleTypeInfo)) { throw new UnsupportedOperationException("project() can only be applied to DataSets of Tuples."); } if (fieldIndexes.length == 0) { throw new IllegalArgumentException("project() needs to select at least one (1) field."); } else if (fieldIndexes.length > Tuple.MAX_ARITY - 1) { throw new IllegalArgumentException( "project() may select only up to (" + (Tuple.MAX_ARITY - 1) + ") fields."); } int maxFieldIndex = ds.getType().getArity(); for (int fieldIndexe : fieldIndexes) { Preconditions.checkElementIndex(fieldIndexe, maxFieldIndex); } this.ds = ds; this.fieldIndexes = fieldIndexes; }
for (int i = 0; i < secondFieldIndexes.length; i++) { Preconditions.checkElementIndex(secondFieldIndexes[i], maxFieldIndex);
for (int i = 0; i < secondFieldIndexes.length; i++) { Preconditions.checkElementIndex(secondFieldIndexes[i], maxFieldIndex);
public Projection(DataSet<T> ds, int[] fieldIndexes) { if (!(ds.getType() instanceof TupleTypeInfo)) { throw new UnsupportedOperationException("project() can only be applied to DataSets of Tuples."); } if (fieldIndexes.length == 0) { throw new IllegalArgumentException("project() needs to select at least one (1) field."); } else if (fieldIndexes.length > Tuple.MAX_ARITY - 1) { throw new IllegalArgumentException( "project() may select only up to (" + (Tuple.MAX_ARITY - 1) + ") fields."); } int maxFieldIndex = ds.getType().getArity(); for (int fieldIndexe : fieldIndexes) { Preconditions.checkElementIndex(fieldIndexe, maxFieldIndex); } this.ds = ds; this.fieldIndexes = fieldIndexes; }
protected StreamProjection(DataStream<IN> dataStream, int[] fieldIndexes) { if (!dataStream.getType().isTupleType()) { throw new RuntimeException("Only Tuple DataStreams can be projected"); } if (fieldIndexes.length == 0) { throw new IllegalArgumentException("project() needs to select at least one (1) field."); } else if (fieldIndexes.length > Tuple.MAX_ARITY - 1) { throw new IllegalArgumentException( "project() may select only up to (" + (Tuple.MAX_ARITY - 1) + ") fields."); } int maxFieldIndex = (dataStream.getType()).getArity(); for (int i = 0; i < fieldIndexes.length; i++) { Preconditions.checkElementIndex(fieldIndexes[i], maxFieldIndex); } this.dataStream = dataStream; this.fieldIndexes = fieldIndexes; }
protected StreamProjection(DataStream<IN> dataStream, int[] fieldIndexes) { if (!dataStream.getType().isTupleType()) { throw new RuntimeException("Only Tuple DataStreams can be projected"); } if (fieldIndexes.length == 0) { throw new IllegalArgumentException("project() needs to select at least one (1) field."); } else if (fieldIndexes.length > Tuple.MAX_ARITY - 1) { throw new IllegalArgumentException( "project() may select only up to (" + (Tuple.MAX_ARITY - 1) + ") fields."); } int maxFieldIndex = (dataStream.getType()).getArity(); for (int i = 0; i < fieldIndexes.length; i++) { Preconditions.checkElementIndex(fieldIndexes[i], maxFieldIndex); } this.dataStream = dataStream; this.fieldIndexes = fieldIndexes; }
protected StreamProjection(DataStream<IN> dataStream, int[] fieldIndexes) { if (!dataStream.getType().isTupleType()) { throw new RuntimeException("Only Tuple DataStreams can be projected"); } if (fieldIndexes.length == 0) { throw new IllegalArgumentException("project() needs to select at least one (1) field."); } else if (fieldIndexes.length > Tuple.MAX_ARITY - 1) { throw new IllegalArgumentException( "project() may select only up to (" + (Tuple.MAX_ARITY - 1) + ") fields."); } int maxFieldIndex = (dataStream.getType()).getArity(); for (int i = 0; i < fieldIndexes.length; i++) { Preconditions.checkElementIndex(fieldIndexes[i], maxFieldIndex); } this.dataStream = dataStream; this.fieldIndexes = fieldIndexes; }