public void setCustomPartitioner(Partitioner<?> customPartitioner) { if (customPartitioner != null) { int[] keys = getKeyColumns(0); if (keys == null || keys.length == 0) { throw new IllegalArgumentException("Cannot use custom partitioner for a non-grouped GroupReduce (AllGroupReduce)"); } if (keys.length > 1) { throw new IllegalArgumentException("Cannot use the key partitioner for composite keys (more than one key field)"); } } this.customPartitioner = customPartitioner; }
TypeInformation<IN> inputType = operatorInfo.getInputType(); int[] keyColumns = getKeyColumns(0); int[] sortColumns = keyColumns; boolean[] sortOrderings = new boolean[sortColumns.length];
assertEquals(1, reducer.getKeyColumns(0).length); assertEquals(0, reducer.getKeyColumns(0)[0]);
when(op.getKeyColumns(0)).thenReturn(new int[]{3,2}); when(op.getParameters()).thenReturn(new Configuration());
public void setCustomPartitioner(Partitioner<?> customPartitioner) { if (customPartitioner != null) { int[] keys = getKeyColumns(0); if (keys == null || keys.length == 0) { throw new IllegalArgumentException("Cannot use custom partitioner for a non-grouped GroupReduce (AllGroupReduce)"); } if (keys.length > 1) { throw new IllegalArgumentException("Cannot use the key partitioner for composite keys (more than one key field)"); } } this.customPartitioner = customPartitioner; }
public void setCustomPartitioner(Partitioner<?> customPartitioner) { if (customPartitioner != null) { int[] keys = getKeyColumns(0); if (keys == null || keys.length == 0) { throw new IllegalArgumentException("Cannot use custom partitioner for a non-grouped GroupReduce (AllGroupReduce)"); } if (keys.length > 1) { throw new IllegalArgumentException("Cannot use the key partitioner for composite keys (more than one key field)"); } } this.customPartitioner = customPartitioner; }
TypeInformation<IN> inputType = operatorInfo.getInputType(); int[] keyColumns = getKeyColumns(0); int[] sortColumns = keyColumns; boolean[] sortOrderings = new boolean[sortColumns.length];
TypeInformation<IN> inputType = operatorInfo.getInputType(); int[] keyColumns = getKeyColumns(0); int[] sortColumns = keyColumns; boolean[] sortOrderings = new boolean[sortColumns.length];